diff options
author | Colin Watson <cjwatson@debian.org> | 2014-02-09 16:10:00 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2016-02-29 12:33:29 +0000 |
commit | 434f7bc6f37b86a449d3d975fad53233f4c141f2 (patch) | |
tree | 0ba940b580b4adf1c0559269d8a6bea212da4a0d | |
parent | c2c79a52f66eee7b85b5241d08a70b2593a9bc9e (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: 2013-09-14
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 356ec79f0..8b8e7608c 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -232,7 +232,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command) | |||
232 | /* Execute the proxy command. Note that we gave up any | 232 | /* Execute the proxy command. Note that we gave up any |
233 | extra privileges above. */ | 233 | extra privileges above. */ |
234 | signal(SIGPIPE, SIG_DFL); | 234 | signal(SIGPIPE, SIG_DFL); |
235 | execv(argv[0], argv); | 235 | execvp(argv[0], argv); |
236 | perror(argv[0]); | 236 | perror(argv[0]); |
237 | exit(1); | 237 | exit(1); |
238 | } | 238 | } |
@@ -1499,7 +1499,7 @@ ssh_local_cmd(const char *args) | |||
1499 | if (pid == 0) { | 1499 | if (pid == 0) { |
1500 | signal(SIGPIPE, SIG_DFL); | 1500 | signal(SIGPIPE, SIG_DFL); |
1501 | debug3("Executing %s -c \"%s\"", shell, args); | 1501 | debug3("Executing %s -c \"%s\"", shell, args); |
1502 | execl(shell, shell, "-c", args, (char *)NULL); | 1502 | execlp(shell, shell, "-c", args, (char *)NULL); |
1503 | error("Couldn't execute %s -c \"%s\": %s", | 1503 | error("Couldn't execute %s -c \"%s\": %s", |
1504 | shell, args, strerror(errno)); | 1504 | shell, args, strerror(errno)); |
1505 | _exit(1); | 1505 | _exit(1); |