diff options
Diffstat (limited to 'src/fseccomp/seccomp_print.c')
-rw-r--r-- | src/fseccomp/seccomp_print.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fseccomp/seccomp_print.c b/src/fseccomp/seccomp_print.c index d18f2efa5..67555e554 100644 --- a/src/fseccomp/seccomp_print.c +++ b/src/fseccomp/seccomp_print.c | |||
@@ -26,7 +26,7 @@ static int filter_cnt = 0; | |||
26 | 26 | ||
27 | static void load_seccomp(const char *fname) { | 27 | static void load_seccomp(const char *fname) { |
28 | assert(fname); | 28 | assert(fname); |
29 | 29 | ||
30 | // open filter file | 30 | // open filter file |
31 | int fd = open(fname, O_RDONLY); | 31 | int fd = open(fname, O_RDONLY); |
32 | if (fd == -1) | 32 | if (fd == -1) |
@@ -40,7 +40,7 @@ static void load_seccomp(const char *fname) { | |||
40 | goto errexit; | 40 | goto errexit; |
41 | unsigned short entries = (unsigned short) size / (unsigned short) sizeof(struct sock_filter); | 41 | unsigned short entries = (unsigned short) size / (unsigned short) sizeof(struct sock_filter); |
42 | filter_cnt = entries; | 42 | filter_cnt = entries; |
43 | 43 | ||
44 | // read filter | 44 | // read filter |
45 | filter = malloc(size); | 45 | filter = malloc(size); |
46 | if (filter == NULL) | 46 | if (filter == NULL) |
@@ -53,7 +53,7 @@ static void load_seccomp(const char *fname) { | |||
53 | goto errexit; | 53 | goto errexit; |
54 | rd += rv; | 54 | rd += rv; |
55 | } | 55 | } |
56 | 56 | ||
57 | // close file | 57 | // close file |
58 | close(fd); | 58 | close(fd); |
59 | return; | 59 | return; |
@@ -67,7 +67,7 @@ errexit: | |||
67 | void filter_print(const char *fname) { | 67 | void filter_print(const char *fname) { |
68 | assert(fname); | 68 | assert(fname); |
69 | load_seccomp(fname); | 69 | load_seccomp(fname); |
70 | 70 | ||
71 | // start filter | 71 | // start filter |
72 | struct sock_filter start[] = { | 72 | struct sock_filter start[] = { |
73 | VALIDATE_ARCHITECTURE, | 73 | VALIDATE_ARCHITECTURE, |
@@ -86,7 +86,7 @@ void filter_print(const char *fname) { | |||
86 | printf("Invalid seccomp filter %s\n", fname); | 86 | printf("Invalid seccomp filter %s\n", fname); |
87 | return; | 87 | return; |
88 | } | 88 | } |
89 | 89 | ||
90 | // loop trough blacklists | 90 | // loop trough blacklists |
91 | int i = 4; | 91 | int i = 4; |
92 | while (i < filter_cnt) { | 92 | while (i < filter_cnt) { |