diff options
Diffstat (limited to 'src/firejail/seccomp.c')
-rw-r--r-- | src/firejail/seccomp.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/firejail/seccomp.c b/src/firejail/seccomp.c index 1ee6256d4..3da0206e1 100644 --- a/src/firejail/seccomp.c +++ b/src/firejail/seccomp.c | |||
@@ -138,6 +138,7 @@ errexit: | |||
138 | } | 138 | } |
139 | 139 | ||
140 | // 32 bit arch filter installed on 64 bit architectures | 140 | // 32 bit arch filter installed on 64 bit architectures |
141 | #if defined(__x86_64__) | ||
141 | #if defined(__LP64__) | 142 | #if defined(__LP64__) |
142 | static void seccomp_filter_32(void) { | 143 | static void seccomp_filter_32(void) { |
143 | if (seccomp_load(RUN_SECCOMP_32) == 0) { | 144 | if (seccomp_load(RUN_SECCOMP_32) == 0) { |
@@ -146,15 +147,6 @@ static void seccomp_filter_32(void) { | |||
146 | } | 147 | } |
147 | } | 148 | } |
148 | #endif | 149 | #endif |
149 | |||
150 | // 64 bit arch filter installed on 32 bit architectures | ||
151 | #if defined(__ILP32__) | ||
152 | static void seccomp_filter_64(void) { | ||
153 | if (seccomp_load(RUN_SECCOMP_64) == 0) { | ||
154 | if (arg_debug) | ||
155 | printf("Dual 32/64 bit seccomp filter configured\n"); | ||
156 | } | ||
157 | } | ||
158 | #endif | 150 | #endif |
159 | 151 | ||
160 | static void seccomp_filter_block_secondary(void) { | 152 | static void seccomp_filter_block_secondary(void) { |
@@ -177,11 +169,10 @@ int seccomp_filter_drop(void) { | |||
177 | if (arg_seccomp_block_secondary) | 169 | if (arg_seccomp_block_secondary) |
178 | seccomp_filter_block_secondary(); | 170 | seccomp_filter_block_secondary(); |
179 | else { | 171 | else { |
172 | #if defined(__x86_64__) | ||
180 | #if defined(__LP64__) | 173 | #if defined(__LP64__) |
181 | seccomp_filter_32(); | 174 | seccomp_filter_32(); |
182 | #endif | 175 | #endif |
183 | #if defined(__ILP32__) | ||
184 | seccomp_filter_64(); | ||
185 | #endif | 176 | #endif |
186 | } | 177 | } |
187 | } | 178 | } |
@@ -190,11 +181,10 @@ int seccomp_filter_drop(void) { | |||
190 | if (arg_seccomp_block_secondary) | 181 | if (arg_seccomp_block_secondary) |
191 | seccomp_filter_block_secondary(); | 182 | seccomp_filter_block_secondary(); |
192 | else { | 183 | else { |
184 | #if defined(__x86_64__) | ||
193 | #if defined(__LP64__) | 185 | #if defined(__LP64__) |
194 | seccomp_filter_32(); | 186 | seccomp_filter_32(); |
195 | #endif | 187 | #endif |
196 | #if defined(__ILP32__) | ||
197 | seccomp_filter_64(); | ||
198 | #endif | 188 | #endif |
199 | } | 189 | } |
200 | if (arg_debug) | 190 | if (arg_debug) |