diff options
author | Colin Watson <cjwatson@debian.org> | 2014-02-09 16:10:00 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2017-10-04 13:54:48 +0100 |
commit | c239ba6fa4560704a237779f82445d5f125847e1 (patch) | |
tree | dc907da1e4930c3bcbd4607f229beb2503db9c85 | |
parent | ef7aa8189491e0b43f14f7f15fb5e66903f7e185 (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 dc7a704d2..5eed58809 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -235,7 +235,7 @@ ssh_proxy_connect(struct ssh *ssh, const char *host, u_short port, | |||
235 | /* Execute the proxy command. Note that we gave up any | 235 | /* Execute the proxy command. Note that we gave up any |
236 | extra privileges above. */ | 236 | extra privileges above. */ |
237 | signal(SIGPIPE, SIG_DFL); | 237 | signal(SIGPIPE, SIG_DFL); |
238 | execv(argv[0], argv); | 238 | execvp(argv[0], argv); |
239 | perror(argv[0]); | 239 | perror(argv[0]); |
240 | exit(1); | 240 | exit(1); |
241 | } | 241 | } |
@@ -1435,7 +1435,7 @@ ssh_local_cmd(const char *args) | |||
1435 | if (pid == 0) { | 1435 | if (pid == 0) { |
1436 | signal(SIGPIPE, SIG_DFL); | 1436 | signal(SIGPIPE, SIG_DFL); |
1437 | debug3("Executing %s -c \"%s\"", shell, args); | 1437 | debug3("Executing %s -c \"%s\"", shell, args); |
1438 | execl(shell, shell, "-c", args, (char *)NULL); | 1438 | execlp(shell, shell, "-c", args, (char *)NULL); |
1439 | error("Couldn't execute %s -c \"%s\": %s", | 1439 | error("Couldn't execute %s -c \"%s\": %s", |
1440 | shell, args, strerror(errno)); | 1440 | shell, args, strerror(errno)); |
1441 | _exit(1); | 1441 | _exit(1); |