diff options
Diffstat (limited to 'src/firejail/main.c')
-rw-r--r-- | src/firejail/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index 84bf5e8e6..9c6b6e001 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -85,6 +85,7 @@ int arg_netfilter; // enable netfilter | |||
85 | int arg_netfilter6; // enable netfilter6 | 85 | int arg_netfilter6; // enable netfilter6 |
86 | char *arg_netfilter_file = NULL; // netfilter file | 86 | char *arg_netfilter_file = NULL; // netfilter file |
87 | char *arg_netfilter6_file = NULL; // netfilter6 file | 87 | char *arg_netfilter6_file = NULL; // netfilter6 file |
88 | char *arg_netns = NULL; // "ip netns"-created network namespace to use | ||
88 | int arg_doubledash = 0; // double dash | 89 | int arg_doubledash = 0; // double dash |
89 | int arg_shell_none = 0; // run the program directly without a shell | 90 | int arg_shell_none = 0; // run the program directly without a shell |
90 | int arg_private_dev = 0; // private dev directory | 91 | int arg_private_dev = 0; // private dev directory |
@@ -1999,6 +2000,15 @@ int main(int argc, char **argv) { | |||
1999 | else | 2000 | else |
2000 | exit_err_feature("networking"); | 2001 | exit_err_feature("networking"); |
2001 | } | 2002 | } |
2003 | |||
2004 | else if (strncmp(argv[i], "--netns=", 8) == 0) { | ||
2005 | if (checkcfg(CFG_NETWORK)) { | ||
2006 | arg_netns = argv[i] + 8; | ||
2007 | check_netns(arg_netns); | ||
2008 | } | ||
2009 | else | ||
2010 | exit_err_feature("networking"); | ||
2011 | } | ||
2002 | #endif | 2012 | #endif |
2003 | //************************************* | 2013 | //************************************* |
2004 | // command | 2014 | // command |