diff options
author | 2016-09-03 09:47:09 -0400 | |
---|---|---|
committer | 2016-09-03 09:47:09 -0400 | |
commit | 984950937821e7dc4484beb20a03e82263b512fd (patch) | |
tree | 6366cb5f9f4aa6acbf4971e943332e7a61c9e88a | |
parent | Merge pull request #761 from reinerh/master (diff) | |
parent | update man (diff) | |
download | firejail-984950937821e7dc4484beb20a03e82263b512fd.tar.gz firejail-984950937821e7dc4484beb20a03e82263b512fd.tar.zst firejail-984950937821e7dc4484beb20a03e82263b512fd.zip |
Merge pull request #763 from manevich/join
small fixes
-rw-r--r-- | src/firejail/main.c | 6 | ||||
-rw-r--r-- | src/man/firejail.txt | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index 391e86907..501bccff2 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -607,6 +607,9 @@ static void run_cmd_and_exit(int i, int argc, char **argv) { | |||
607 | exit(1); | 607 | exit(1); |
608 | } | 608 | } |
609 | 609 | ||
610 | if (!cfg.shell && !arg_shell_none) | ||
611 | cfg.shell = guess_shell(); | ||
612 | |||
610 | // join sandbox by pid or by name | 613 | // join sandbox by pid or by name |
611 | pid_t pid; | 614 | pid_t pid; |
612 | if (read_pid(argv[i] + 15, &pid) == 0) | 615 | if (read_pid(argv[i] + 15, &pid) == 0) |
@@ -630,6 +633,9 @@ static void run_cmd_and_exit(int i, int argc, char **argv) { | |||
630 | exit(1); | 633 | exit(1); |
631 | } | 634 | } |
632 | 635 | ||
636 | if (!cfg.shell && !arg_shell_none) | ||
637 | cfg.shell = guess_shell(); | ||
638 | |||
633 | // join sandbox by pid or by name | 639 | // join sandbox by pid or by name |
634 | pid_t pid; | 640 | pid_t pid; |
635 | if (read_pid(argv[i] + 18, &pid) == 0) | 641 | if (read_pid(argv[i] + 18, &pid) == 0) |
diff --git a/src/man/firejail.txt b/src/man/firejail.txt index 35b84b981..dbb0df233 100644 --- a/src/man/firejail.txt +++ b/src/man/firejail.txt | |||
@@ -578,19 +578,19 @@ $ firejail --net=eth0 --name=browser firefox & | |||
578 | .br | 578 | .br |
579 | # change netfilter configuration | 579 | # change netfilter configuration |
580 | .br | 580 | .br |
581 | $ sudo firejail --join-network=browser "cat /etc/firejail/nolocal.net | /sbin/iptables-restore" | 581 | $ sudo firejail --join-network=browser bash -c "cat /etc/firejail/nolocal.net | /sbin/iptables-restore" |
582 | .br | 582 | .br |
583 | 583 | ||
584 | .br | 584 | .br |
585 | # verify netfilter configuration | 585 | # verify netfilter configuration |
586 | .br | 586 | .br |
587 | $ sudo firejail --join-network=browser "/sbin/iptables -vL" | 587 | $ sudo firejail --join-network=browser /sbin/iptables -vL |
588 | .br | 588 | .br |
589 | 589 | ||
590 | .br | 590 | .br |
591 | # verify IP addresses | 591 | # verify IP addresses |
592 | .br | 592 | .br |
593 | $ sudo firejail --join-network=browser "ip addr" | 593 | $ sudo firejail --join-network=browser ip addr |
594 | .br | 594 | .br |
595 | Switching to pid 1932, the first child process inside the sandbox | 595 | Switching to pid 1932, the first child process inside the sandbox |
596 | .br | 596 | .br |