diff options
author | netblue30 <netblue30@protonmail.com> | 2022-06-19 16:21:01 -0400 |
---|---|---|
committer | netblue30 <netblue30@protonmail.com> | 2022-06-19 16:21:01 -0400 |
commit | 28577459cdec0f0fb264c21c1dd7520aeb2c6390 (patch) | |
tree | 749e74e6710a61a317bcc97ab5b78070a85cf928 | |
parent | shell none set as default (2) (diff) | |
download | firejail-28577459cdec0f0fb264c21c1dd7520aeb2c6390.tar.gz firejail-28577459cdec0f0fb264c21c1dd7520aeb2c6390.tar.zst firejail-28577459cdec0f0fb264c21c1dd7520aeb2c6390.zip |
shell none set as default (3)
-rw-r--r-- | src/firejail/main.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index 200a510a3..695f018a5 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -847,7 +847,7 @@ printf("***** %d\n", just_run_the_shell); | |||
847 | exit(1); | 847 | exit(1); |
848 | } | 848 | } |
849 | 849 | ||
850 | if (!cfg.shell && !arg_shell_none) | 850 | if (!cfg.shell) |
851 | cfg.shell = cfg.usershell; | 851 | cfg.shell = cfg.usershell; |
852 | 852 | ||
853 | // join sandbox by pid or by name | 853 | // join sandbox by pid or by name |
@@ -867,7 +867,7 @@ printf("***** %d\n", just_run_the_shell); | |||
867 | exit(1); | 867 | exit(1); |
868 | } | 868 | } |
869 | 869 | ||
870 | if (!cfg.shell && !arg_shell_none) | 870 | if (!cfg.shell) |
871 | cfg.shell = cfg.usershell; | 871 | cfg.shell = cfg.usershell; |
872 | 872 | ||
873 | // join sandbox by pid or by name | 873 | // join sandbox by pid or by name |
@@ -2816,8 +2816,11 @@ int main(int argc, char **argv, char **envp) { | |||
2816 | 2816 | ||
2817 | // prog_index could still be -1 if no program was specified | 2817 | // prog_index could still be -1 if no program was specified |
2818 | if (prog_index == -1 && arg_shell_none) { | 2818 | if (prog_index == -1 && arg_shell_none) { |
2819 | fprintf(stderr, "Error: shell=none configured, but no program specified\n"); | 2819 | just_run_the_shell = 1; |
2820 | exit(1); | 2820 | if (!cfg.shell) |
2821 | cfg.shell = cfg.usershell; | ||
2822 | // fprintf(stderr, "Error: shell=none configured, but no program specified\n"); | ||
2823 | // exit(1); | ||
2821 | } | 2824 | } |
2822 | 2825 | ||
2823 | // check trace configuration | 2826 | // check trace configuration |