diff options
author | Colin Watson <cjwatson@debian.org> | 2014-02-09 16:10:00 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2014-02-10 02:40:16 +0000 |
commit | 95e6f7afe0ca1c16c31845d6fa30453b45b73e0e (patch) | |
tree | d6c3e73faf08b75129d9c8d1d1a756db47208fb6 | |
parent | 52d571e95114cd6d63b5dc4829f87fd55213c828 (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 d21781ea4..ef4d9e04f 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -227,7 +227,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command) | |||
227 | /* Execute the proxy command. Note that we gave up any | 227 | /* Execute the proxy command. Note that we gave up any |
228 | extra privileges above. */ | 228 | extra privileges above. */ |
229 | signal(SIGPIPE, SIG_DFL); | 229 | signal(SIGPIPE, SIG_DFL); |
230 | execv(argv[0], argv); | 230 | execvp(argv[0], argv); |
231 | perror(argv[0]); | 231 | perror(argv[0]); |
232 | exit(1); | 232 | exit(1); |
233 | } | 233 | } |
@@ -1384,7 +1384,7 @@ ssh_local_cmd(const char *args) | |||
1384 | if (pid == 0) { | 1384 | if (pid == 0) { |
1385 | signal(SIGPIPE, SIG_DFL); | 1385 | signal(SIGPIPE, SIG_DFL); |
1386 | debug3("Executing %s -c \"%s\"", shell, args); | 1386 | debug3("Executing %s -c \"%s\"", shell, args); |
1387 | execl(shell, shell, "-c", args, (char *)NULL); | 1387 | execlp(shell, shell, "-c", args, (char *)NULL); |
1388 | error("Couldn't execute %s -c \"%s\": %s", | 1388 | error("Couldn't execute %s -c \"%s\": %s", |
1389 | shell, args, strerror(errno)); | 1389 | shell, args, strerror(errno)); |
1390 | _exit(1); | 1390 | _exit(1); |