aboutsummaryrefslogtreecommitdiffstats
path: root/src/firejail/netfilter.c
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-11-03 10:53:51 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-11-03 10:53:51 -0400
commit3b81e1f2c331644ced87d26a943b22eed6242b8f (patch)
tree092f9d881ced236c86ba0baeabb32a955b4054a0 /src/firejail/netfilter.c
parentfixed TOCTOU problem for --get and --put (diff)
downloadfirejail-3b81e1f2c331644ced87d26a943b22eed6242b8f.tar.gz
firejail-3b81e1f2c331644ced87d26a943b22eed6242b8f.tar.zst
firejail-3b81e1f2c331644ced87d26a943b22eed6242b8f.zip
security: env variables
Diffstat (limited to 'src/firejail/netfilter.c')
-rw-r--r--src/firejail/netfilter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/firejail/netfilter.c b/src/firejail/netfilter.c
index c1f9a2c37..efef45d90 100644
--- a/src/firejail/netfilter.c
+++ b/src/firejail/netfilter.c
@@ -144,6 +144,7 @@ void netfilter(const char *fname) {
144 144
145 // wipe out environment variables 145 // wipe out environment variables
146 environ = NULL; 146 environ = NULL;
147 assert(getenv("LD_PRELOAD") == NULL);
147 execl(iptables_restore, iptables_restore, NULL); 148 execl(iptables_restore, iptables_restore, NULL);
148 perror("execl"); 149 perror("execl");
149 _exit(1); 150 _exit(1);
@@ -163,6 +164,7 @@ void netfilter(const char *fname) {
163 if (setregid(0, 0)) 164 if (setregid(0, 0))
164 errExit("setregid"); 165 errExit("setregid");
165 environ = NULL; 166 environ = NULL;
167 assert(getenv("LD_PRELOAD") == NULL);
166 execl(iptables, iptables, "-vL", NULL); 168 execl(iptables, iptables, "-vL", NULL);
167 perror("execl"); 169 perror("execl");
168 _exit(1); 170 _exit(1);
@@ -257,6 +259,7 @@ void netfilter6(const char *fname) {
257 259
258 // wipe out environment variables 260 // wipe out environment variables
259 environ = NULL; 261 environ = NULL;
262 assert(getenv("LD_PRELOAD") == NULL);
260 execl(ip6tables_restore, ip6tables_restore, NULL); 263 execl(ip6tables_restore, ip6tables_restore, NULL);
261 perror("execl"); 264 perror("execl");
262 _exit(1); 265 _exit(1);