From fc2af5dc6eb2fa2f60c63820849ea4a43126bb80 Mon Sep 17 00:00:00 2001 From: rusty-snake <41237666+rusty-snake@users.noreply.github.com> Date: Tue, 29 Dec 2020 12:13:24 +0100 Subject: Implement netns in profiles, closes #3846 --- src/firejail/profile.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') 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 @@ -616,6 +616,17 @@ int profile_check_line(char *ptr, int lineno, const char *fname) { } else warning_feature_disabled("networking"); +#endif + return 0; + } + else if (strncmp(ptr, "netns ", 6) == 0) { +#ifdef HAVE_NETWORK + if (checkcfg(CFG_NETWORK)) { + arg_netns = ptr + 6; + check_netns(arg_netns); + } + else + warning_feature_disabled("networking"); #endif return 0; } -- cgit v1.2.3-54-g00ecf