diff options
author | 2020-12-30 08:40:40 -0500 | |
---|---|---|
committer | 2020-12-30 08:40:40 -0500 | |
commit | 6d6a1f7d9307c4a92bbc47f7d3fc4a2241e7e3fe (patch) | |
tree | 778f6fe6a7d89ac87295322a4bb2d8cbf38c4ed9 | |
parent | Merge pull request #3848 from bbhtt/browsers (diff) | |
parent | Implement netns in profiles, closes #3846 (diff) | |
download | firejail-6d6a1f7d9307c4a92bbc47f7d3fc4a2241e7e3fe.tar.gz firejail-6d6a1f7d9307c4a92bbc47f7d3fc4a2241e7e3fe.tar.zst firejail-6d6a1f7d9307c4a92bbc47f7d3fc4a2241e7e3fe.zip |
Merge pull request #3852 from rusty-snake/fix-3846
Implement netns in profiles, closes #3846
-rw-r--r-- | src/firejail/profile.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/firejail/profile.c b/src/firejail/profile.c index 4172c96f7..1ee8cdfcb 100644 --- a/src/firejail/profile.c +++ b/src/firejail/profile.c | |||
@@ -619,6 +619,17 @@ int profile_check_line(char *ptr, int lineno, const char *fname) { | |||
619 | #endif | 619 | #endif |
620 | return 0; | 620 | return 0; |
621 | } | 621 | } |
622 | else if (strncmp(ptr, "netns ", 6) == 0) { | ||
623 | #ifdef HAVE_NETWORK | ||
624 | if (checkcfg(CFG_NETWORK)) { | ||
625 | arg_netns = ptr + 6; | ||
626 | check_netns(arg_netns); | ||
627 | } | ||
628 | else | ||
629 | warning_feature_disabled("networking"); | ||
630 | #endif | ||
631 | return 0; | ||
632 | } | ||
622 | else if (strcmp(ptr, "net none") == 0) { | 633 | else if (strcmp(ptr, "net none") == 0) { |
623 | arg_nonetwork = 1; | 634 | arg_nonetwork = 1; |
624 | cfg.bridge0.configured = 0; | 635 | cfg.bridge0.configured = 0; |