diff options
author | Colin Watson <cjwatson@debian.org> | 2014-02-09 16:10:00 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2020-06-07 10:25:35 +0100 |
commit | b78e6371a98460f5d12683406674e117d64b35f2 (patch) | |
tree | 8d795f138dc61050c201ea62be10dec53acb79a0 | |
parent | 2520672d1ccfd88744c93bac102f461f9b1e0cf3 (diff) |
Look for $SHELL on the path for ProxyCommand/LocalCommand
There's some debate on the upstream bug about whether POSIX requires this.
I (Colin Watson) agree with Vincent and think it does.
Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1494
Bug-Debian: http://bugs.debian.org/492728
Last-Update: 2020-02-21
Patch-Name: shell-path.patch
-rw-r--r-- | sshconnect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sshconnect.c b/sshconnect.c index af08be415..bfbf80e92 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -260,7 +260,7 @@ ssh_proxy_connect(struct ssh *ssh, const char *host, const char *host_arg, | |||
260 | /* Execute the proxy command. Note that we gave up any | 260 | /* Execute the proxy command. Note that we gave up any |
261 | extra privileges above. */ | 261 | extra privileges above. */ |
262 | ssh_signal(SIGPIPE, SIG_DFL); | 262 | ssh_signal(SIGPIPE, SIG_DFL); |
263 | execv(argv[0], argv); | 263 | execvp(argv[0], argv); |
264 | perror(argv[0]); | 264 | perror(argv[0]); |
265 | exit(1); | 265 | exit(1); |
266 | } | 266 | } |
@@ -1389,7 +1389,7 @@ ssh_local_cmd(const char *args) | |||
1389 | if (pid == 0) { | 1389 | if (pid == 0) { |
1390 | ssh_signal(SIGPIPE, SIG_DFL); | 1390 | ssh_signal(SIGPIPE, SIG_DFL); |
1391 | debug3("Executing %s -c \"%s\"", shell, args); | 1391 | debug3("Executing %s -c \"%s\"", shell, args); |
1392 | execl(shell, shell, "-c", args, (char *)NULL); | 1392 | execlp(shell, shell, "-c", args, (char *)NULL); |
1393 | error("Couldn't execute %s -c \"%s\": %s", | 1393 | error("Couldn't execute %s -c \"%s\": %s", |
1394 | shell, args, strerror(errno)); | 1394 | shell, args, strerror(errno)); |
1395 | _exit(1); | 1395 | _exit(1); |