diff options
author | 2020-12-29 12:13:24 +0100 | |
---|---|---|
committer | 2020-12-29 12:13:24 +0100 | |
commit | fc2af5dc6eb2fa2f60c63820849ea4a43126bb80 (patch) | |
tree | fea7a217f8b451131a04c1c2bcd944cda1bb5d0d | |
parent | remove trailing whitespaces (diff) | |
download | firejail-fc2af5dc6eb2fa2f60c63820849ea4a43126bb80.tar.gz firejail-fc2af5dc6eb2fa2f60c63820849ea4a43126bb80.tar.zst firejail-fc2af5dc6eb2fa2f60c63820849ea4a43126bb80.zip |
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 ff8b47102..fe9d27ff1 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; |