diff options
author | Colin Watson <cjwatson@debian.org> | 2014-02-09 16:10:00 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2017-01-16 15:02:54 +0000 |
commit | 5ec0d5f79166a7e2aeab5c7f13d64bb08c4621bd (patch) | |
tree | 4f1e83a210b0490a1cf3e00bf5b8a8e1ccaf9de0 | |
parent | cfc11fb9604f8049957a409ff0835f642a047496 (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 96b91ce1a..698a07114 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -231,7 +231,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command) | |||
231 | /* Execute the proxy command. Note that we gave up any | 231 | /* Execute the proxy command. Note that we gave up any |
232 | extra privileges above. */ | 232 | extra privileges above. */ |
233 | signal(SIGPIPE, SIG_DFL); | 233 | signal(SIGPIPE, SIG_DFL); |
234 | execv(argv[0], argv); | 234 | execvp(argv[0], argv); |
235 | perror(argv[0]); | 235 | perror(argv[0]); |
236 | exit(1); | 236 | exit(1); |
237 | } | 237 | } |
@@ -1498,7 +1498,7 @@ ssh_local_cmd(const char *args) | |||
1498 | if (pid == 0) { | 1498 | if (pid == 0) { |
1499 | signal(SIGPIPE, SIG_DFL); | 1499 | signal(SIGPIPE, SIG_DFL); |
1500 | debug3("Executing %s -c \"%s\"", shell, args); | 1500 | debug3("Executing %s -c \"%s\"", shell, args); |
1501 | execl(shell, shell, "-c", args, (char *)NULL); | 1501 | execlp(shell, shell, "-c", args, (char *)NULL); |
1502 | error("Couldn't execute %s -c \"%s\": %s", | 1502 | error("Couldn't execute %s -c \"%s\": %s", |
1503 | shell, args, strerror(errno)); | 1503 | shell, args, strerror(errno)); |
1504 | _exit(1); | 1504 | _exit(1); |