diff options
author | 2016-08-15 07:24:11 -0400 | |
---|---|---|
committer | 2016-08-15 07:24:11 -0400 | |
commit | 87f450843f70211c9d7d95de61aab504afe0e778 (patch) | |
tree | 07b9cfd69e2ec848a26a4b0297c175595ffb1b5f /src | |
parent | README (diff) | |
download | firejail-87f450843f70211c9d7d95de61aab504afe0e778.tar.gz firejail-87f450843f70211c9d7d95de61aab504afe0e778.tar.zst firejail-87f450843f70211c9d7d95de61aab504afe0e778.zip |
ssh fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/main.c | 5 | ||||
-rw-r--r-- | src/firejail/sandbox.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/firejail/main.c b/src/firejail/main.c index 3e5663a9b..c6c1bc866 100644 --- a/src/firejail/main.c +++ b/src/firejail/main.c | |||
@@ -892,7 +892,7 @@ if (fp) { | |||
892 | EUID_USER(); | 892 | EUID_USER(); |
893 | #endif | 893 | #endif |
894 | 894 | ||
895 | // run sftp and ssh directly without any sandboxing | 895 | // run sftp and scp directly without any sandboxing |
896 | // regular login has argv[0] == "-firejail" | 896 | // regular login has argv[0] == "-firejail" |
897 | if (*argv[0] != '-') { | 897 | if (*argv[0] != '-') { |
898 | if (strcmp(argv[1], "-c") == 0 && argc > 2) { | 898 | if (strcmp(argv[1], "-c") == 0 && argc > 2) { |
@@ -910,7 +910,8 @@ EUID_USER(); | |||
910 | 910 | ||
911 | // is this a login shell, or a command passed by sshd, insert command line options from /etc/firejail/login.users | 911 | // is this a login shell, or a command passed by sshd, insert command line options from /etc/firejail/login.users |
912 | if (*argv[0] == '-' || parent_sshd) { | 912 | if (*argv[0] == '-' || parent_sshd) { |
913 | login_shell = 1; | 913 | if (argc == 1) |
914 | login_shell = 1; | ||
914 | fullargc = restricted_shell(cfg.username); | 915 | fullargc = restricted_shell(cfg.username); |
915 | if (fullargc) { | 916 | if (fullargc) { |
916 | int j; | 917 | int j; |
diff --git a/src/firejail/sandbox.c b/src/firejail/sandbox.c index 6b3d5ea89..8178cfc8e 100644 --- a/src/firejail/sandbox.c +++ b/src/firejail/sandbox.c | |||
@@ -331,7 +331,7 @@ static void start_application(void) { | |||
331 | char *arg[5]; | 331 | char *arg[5]; |
332 | int index = 0; | 332 | int index = 0; |
333 | arg[index++] = cfg.shell; | 333 | arg[index++] = cfg.shell; |
334 | if (login_shell && cfg.shell == cfg.command_line) { | 334 | if (login_shell) { |
335 | arg[index++] = "-l"; | 335 | arg[index++] = "-l"; |
336 | if (arg_debug) | 336 | if (arg_debug) |
337 | printf("Starting %s login shell\n", cfg.shell); | 337 | printf("Starting %s login shell\n", cfg.shell); |