diff options
author | Antonio Russo <antonio.e.russo@gmail.com> | 2018-04-23 02:21:02 -0400 |
---|---|---|
committer | Antonio Russo <antonio.e.russo@gmail.com> | 2018-04-23 02:28:39 -0400 |
commit | 01129ad401b7020b6d7b5270e450729c36f4444e (patch) | |
tree | 34e84b833090bd03c05c7a3ed9e3d67bf8180c50 | |
parent | Implemenent require_pid (diff) | |
download | firejail-01129ad401b7020b6d7b5270e450729c36f4444e.tar.gz firejail-01129ad401b7020b6d7b5270e450729c36f4444e.tar.zst firejail-01129ad401b7020b6d7b5270e450729c36f4444e.zip |
Re-enable join-or-start
Use read_pid in place of name2pid, and re-enable the join-or-start
code block.
Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com>
-rw-r--r-- | src/firejail/main.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index 017c6c843..1a37aca2f 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -701,17 +701,15 @@ static void run_cmd_and_exit(int i, int argc, char **argv) { | |||
701 | cfg.original_program_index = i + 1; | 701 | cfg.original_program_index = i + 1; |
702 | } | 702 | } |
703 | 703 | ||
704 | #if 0 // todo: redo it | ||
705 | // try to join by name only | 704 | // try to join by name only |
706 | pid_t pid; | 705 | pid_t pid; |
707 | if (!name2pid(argv[i] + 16, &pid)) { | 706 | if (!read_pid(argv[i] + 16, &pid)) { |
708 | if (!cfg.shell && !arg_shell_none) | 707 | if (!cfg.shell && !arg_shell_none) |
709 | cfg.shell = guess_shell(); | 708 | cfg.shell = guess_shell(); |
710 | 709 | ||
711 | join(pid, argc, argv, i + 1); | 710 | join(pid, argc, argv, i + 1); |
712 | exit(0); | 711 | exit(0); |
713 | } | 712 | } |
714 | #endif | ||
715 | // if there no such sandbox continue argument processing | 713 | // if there no such sandbox continue argument processing |
716 | } | 714 | } |
717 | #ifdef HAVE_NETWORK | 715 | #ifdef HAVE_NETWORK |