aboutsummaryrefslogtreecommitdiffstats
path: root/src/fseccomp/seccomp_print.c
diff options
context:
space:
mode:
authorLibravatar Fred-Barclay <Fred-Barclay@users.noreply.github.com>2017-11-19 15:02:42 -0600
committerLibravatar Fred-Barclay <Fred-Barclay@users.noreply.github.com>2017-11-19 15:02:42 -0600
commitb936e5ab77dfa0b54b2f6f6dd53762a8244e4230 (patch)
treeedb7237ba54d7c2a85a8531c8901d6466c5e0e4d /src/fseccomp/seccomp_print.c
parentMore qtox profile tightening (diff)
downloadfirejail-b936e5ab77dfa0b54b2f6f6dd53762a8244e4230.tar.gz
firejail-b936e5ab77dfa0b54b2f6f6dd53762a8244e4230.tar.zst
firejail-b936e5ab77dfa0b54b2f6f6dd53762a8244e4230.zip
strip trailing whitespace
Diffstat (limited to 'src/fseccomp/seccomp_print.c')
-rw-r--r--src/fseccomp/seccomp_print.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/fseccomp/seccomp_print.c b/src/fseccomp/seccomp_print.c
index e8df2bda5..ffc65e7c3 100644
--- a/src/fseccomp/seccomp_print.c
+++ b/src/fseccomp/seccomp_print.c
@@ -68,7 +68,7 @@ static int detect_filter_type(void) {
68 assert(filter); 68 assert(filter);
69 69
70 printf("SECCOMP Filter\n"); 70 printf("SECCOMP Filter\n");
71 71
72 // testing for main seccomp filter, protocol, mdwe - platform architecture 72 // testing for main seccomp filter, protocol, mdwe - platform architecture
73 const struct sock_filter start_main[] = { 73 const struct sock_filter start_main[] = {
74 VALIDATE_ARCHITECTURE, 74 VALIDATE_ARCHITECTURE,
@@ -79,7 +79,7 @@ static int detect_filter_type(void) {
79 EXAMINE_SYSCALL 79 EXAMINE_SYSCALL
80#endif 80#endif
81 }; 81 };
82 82
83 if (memcmp(&start_main[0], filter, sizeof(start_main)) == 0) { 83 if (memcmp(&start_main[0], filter, sizeof(start_main)) == 0) {
84 printf(" VALIDATE_ARCHITECTURE\n"); 84 printf(" VALIDATE_ARCHITECTURE\n");
85 printf(" EXAMINE_SYSCALL\n"); 85 printf(" EXAMINE_SYSCALL\n");
@@ -88,26 +88,26 @@ static int detect_filter_type(void) {
88#endif 88#endif
89 return sizeof(start_main) / sizeof(struct sock_filter); 89 return sizeof(start_main) / sizeof(struct sock_filter);
90 } 90 }
91 91
92 92
93 // testing for secondary 64 bit filter 93 // testing for secondary 64 bit filter
94 const struct sock_filter start_secondary_64[] = { 94 const struct sock_filter start_secondary_64[] = {
95 VALIDATE_ARCHITECTURE_64, 95 VALIDATE_ARCHITECTURE_64,
96 EXAMINE_SYSCALL, 96 EXAMINE_SYSCALL,
97 }; 97 };
98 98
99 if (memcmp(&start_secondary_64[0], filter, sizeof(start_secondary_64)) == 0) { 99 if (memcmp(&start_secondary_64[0], filter, sizeof(start_secondary_64)) == 0) {
100 printf(" VALIDATE_ARCHITECTURE_64\n"); 100 printf(" VALIDATE_ARCHITECTURE_64\n");
101 printf(" EXAMINE_SYSCALL\n"); 101 printf(" EXAMINE_SYSCALL\n");
102 return sizeof(start_secondary_64) / sizeof(struct sock_filter); 102 return sizeof(start_secondary_64) / sizeof(struct sock_filter);
103 } 103 }
104 104
105 // testing for secondary 32 bit filter 105 // testing for secondary 32 bit filter
106 const struct sock_filter start_secondary_32[] = { 106 const struct sock_filter start_secondary_32[] = {
107 VALIDATE_ARCHITECTURE_32, 107 VALIDATE_ARCHITECTURE_32,
108 EXAMINE_SYSCALL, 108 EXAMINE_SYSCALL,
109 }; 109 };
110 110
111 if (memcmp(&start_secondary_32[0], filter, sizeof(start_secondary_32)) == 0) { 111 if (memcmp(&start_secondary_32[0], filter, sizeof(start_secondary_32)) == 0) {
112 printf(" VALIDATE_ARCHITECTURE_32\n"); 112 printf(" VALIDATE_ARCHITECTURE_32\n");
113 printf(" EXAMINE_SYSCALL\n"); 113 printf(" EXAMINE_SYSCALL\n");
@@ -132,7 +132,7 @@ static int detect_filter_type(void) {
132#endif 132#endif
133 return sizeof(start_secondary_block) / sizeof(struct sock_filter); 133 return sizeof(start_secondary_block) / sizeof(struct sock_filter);
134 } 134 }
135 135
136 return 0; // filter unrecognized 136 return 0; // filter unrecognized
137} 137}
138 138
@@ -146,7 +146,7 @@ void filter_print(const char *fname) {
146 printf("Invalid seccomp filter %s\n", fname); 146 printf("Invalid seccomp filter %s\n", fname);
147 return; 147 return;
148 } 148 }
149 149
150 // loop trough the rest of commands 150 // loop trough the rest of commands
151 while (i < filter_cnt) { 151 while (i < filter_cnt) {
152 // minimal parsing! 152 // minimal parsing!