aboutsummaryrefslogtreecommitdiffstats
path: root/src/firejail/no_sandbox.c
diff options
context:
space:
mode:
authorLibravatar smitsohu <smitsohu@gmail.com>2020-12-28 21:06:52 +0100
committerLibravatar smitsohu <smitsohu@gmail.com>2020-12-29 23:47:05 +0100
commit4df931507606a0a1ee2d0e916d027d01c801d926 (patch)
tree73f0e2b5eefdc2471ec2c446970edfc1dc299f6d /src/firejail/no_sandbox.c
parentNew profiles for alacarte,tootle,photoflare (#3816) (diff)
downloadfirejail-4df931507606a0a1ee2d0e916d027d01c801d926.tar.gz
firejail-4df931507606a0a1ee2d0e916d027d01c801d926.tar.zst
firejail-4df931507606a0a1ee2d0e916d027d01c801d926.zip
join: add fexecve fallback for shells
Allows users to join a sandbox and get a shell even if there is none in the sandbox mount namespace. There are few limitations: 1. This will fail with scripted shells (see man 3 fexecve for an explanation) 2. Shell process names are not user friendly
Diffstat (limited to 'src/firejail/no_sandbox.c')
-rw-r--r--src/firejail/no_sandbox.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/firejail/no_sandbox.c b/src/firejail/no_sandbox.c
index 01df77ee6..22f36ef07 100644
--- a/src/firejail/no_sandbox.c
+++ b/src/firejail/no_sandbox.c
@@ -211,7 +211,7 @@ void run_no_sandbox(int argc, char **argv) {
211 } 211 }
212 212
213 if (prog_index == 0) { 213 if (prog_index == 0) {
214 cfg.command_line = cfg.shell; 214 assert(cfg.command_line == NULL); // runs cfg.shell
215 cfg.window_title = cfg.shell; 215 cfg.window_title = cfg.shell;
216 } else { 216 } else {
217 build_cmdline(&cfg.command_line, &cfg.window_title, argc, argv, prog_index); 217 build_cmdline(&cfg.command_line, &cfg.window_title, argc, argv, prog_index);
@@ -230,5 +230,5 @@ void run_no_sandbox(int argc, char **argv) {
230 230
231 arg_quiet = 1; 231 arg_quiet = 1;
232 232
233 start_application(1, NULL); 233 start_application(1, -1, NULL);
234} 234}