diff options
author | smitsohu <smitsohu@gmail.com> | 2018-08-20 23:34:28 +0200 |
---|---|---|
committer | smitsohu <smitsohu@gmail.com> | 2018-08-20 23:34:28 +0200 |
commit | ec7f59b8d370c29bd229fa9124640611c0667159 (patch) | |
tree | 30b12ce89fd04343aa5cbf5b5254ce63cb8af9fc /src/firejail/netfilter.c | |
parent | Document how to access local mail with thunderbird and claws-mail (fixes #1509) (diff) | |
download | firejail-ec7f59b8d370c29bd229fa9124640611c0667159.tar.gz firejail-ec7f59b8d370c29bd229fa9124640611c0667159.tar.zst firejail-ec7f59b8d370c29bd229fa9124640611c0667159.zip |
refactor, check the sandbox status for all join options
Diffstat (limited to 'src/firejail/netfilter.c')
-rw-r--r-- | src/firejail/netfilter.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/firejail/netfilter.c b/src/firejail/netfilter.c index 11c7e9669..8fbd11bba 100644 --- a/src/firejail/netfilter.c +++ b/src/firejail/netfilter.c | |||
@@ -175,6 +175,11 @@ void netfilter_print(pid_t pid, int ipv6) { | |||
175 | exit(1); | 175 | exit(1); |
176 | } | 176 | } |
177 | 177 | ||
178 | if (invalid_sandbox(child)) { | ||
179 | fprintf(stderr, "Error: cannot join the network namespace\n"); | ||
180 | exit(1); | ||
181 | } | ||
182 | |||
178 | EUID_ROOT(); | 183 | EUID_ROOT(); |
179 | if (join_namespace(child, "net")) { | 184 | if (join_namespace(child, "net")) { |
180 | fprintf(stderr, "Error: cannot join the network namespace\n"); | 185 | fprintf(stderr, "Error: cannot join the network namespace\n"); |