aboutsummaryrefslogtreecommitdiffstats
path: root/src/firejail/netfilter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/firejail/netfilter.c')
-rw-r--r--src/firejail/netfilter.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/firejail/netfilter.c b/src/firejail/netfilter.c
index b50d61039..c1f9a2c37 100644
--- a/src/firejail/netfilter.c
+++ b/src/firejail/netfilter.c
@@ -145,7 +145,8 @@ void netfilter(const char *fname) {
145 // wipe out environment variables 145 // wipe out environment variables
146 environ = NULL; 146 environ = NULL;
147 execl(iptables_restore, iptables_restore, NULL); 147 execl(iptables_restore, iptables_restore, NULL);
148 // it will never get here!!! 148 perror("execl");
149 _exit(1);
149 } 150 }
150 // wait for the child to finish 151 // wait for the child to finish
151 waitpid(child, NULL, 0); 152 waitpid(child, NULL, 0);
@@ -163,7 +164,8 @@ void netfilter(const char *fname) {
163 errExit("setregid"); 164 errExit("setregid");
164 environ = NULL; 165 environ = NULL;
165 execl(iptables, iptables, "-vL", NULL); 166 execl(iptables, iptables, "-vL", NULL);
166 // it will never get here!!! 167 perror("execl");
168 _exit(1);
167 } 169 }
168 // wait for the child to finish 170 // wait for the child to finish
169 waitpid(child, NULL, 0); 171 waitpid(child, NULL, 0);
@@ -256,7 +258,8 @@ void netfilter6(const char *fname) {
256 // wipe out environment variables 258 // wipe out environment variables
257 environ = NULL; 259 environ = NULL;
258 execl(ip6tables_restore, ip6tables_restore, NULL); 260 execl(ip6tables_restore, ip6tables_restore, NULL);
259 // it will never get here!!! 261 perror("execl");
262 _exit(1);
260 } 263 }
261 // wait for the child to finish 264 // wait for the child to finish
262 waitpid(child, NULL, 0); 265 waitpid(child, NULL, 0);
@@ -269,7 +272,8 @@ void netfilter6(const char *fname) {
269 if (child == 0) { 272 if (child == 0) {
270 environ = NULL; 273 environ = NULL;
271 execl(ip6tables, ip6tables, "-vL", NULL); 274 execl(ip6tables, ip6tables, "-vL", NULL);
272 // it will never get here!!! 275 perror("execl");
276 _exit(1);
273 } 277 }
274 // wait for the child to finish 278 // wait for the child to finish
275 waitpid(child, NULL, 0); 279 waitpid(child, NULL, 0);