aboutsummaryrefslogtreecommitdiffstats
path: root/src/firejail/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/firejail/main.c')
-rw-r--r--src/firejail/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c
index 2f4a78d4b..cda9e788e 100644
--- a/src/firejail/main.c
+++ b/src/firejail/main.c
@@ -806,7 +806,7 @@ int main(int argc, char **argv) {
806 } 806 }
807 } 807 }
808 808
809 // is this a login shell, or a command passed by sshd insert command line options from /etc/firejail/login.users 809 // is this a login shell, or a command passed by sshd, insert command line options from /etc/firejail/login.users
810 if (*argv[0] == '-' || parent_sshd) { 810 if (*argv[0] == '-' || parent_sshd) {
811 fullargc = restricted_shell(cfg.username); 811 fullargc = restricted_shell(cfg.username);
812 if (fullargc) { 812 if (fullargc) {
@@ -825,6 +825,11 @@ int main(int argc, char **argv) {
825 check_user(argc, argv); // the function will not return if --user option was found 825 check_user(argc, argv); // the function will not return if --user option was found
826 } 826 }
827 827
828
829 // check for force-nonewprivs in /etc/firejail/firejail.config file
830 if (!option_force && checkcfg(CFG_FORCE_NONEWPRIVS))
831 arg_nonewprivs = 1;
832
828 // parse arguments 833 // parse arguments
829 for (i = 1; i < argc; i++) { 834 for (i = 1; i < argc; i++) {
830 run_cmd_and_exit(i, argc, argv); // will exit if the command is recognized 835 run_cmd_and_exit(i, argc, argv); // will exit if the command is recognized