diff options
author | Colin Watson <cjwatson@debian.org> | 2014-02-09 16:10:00 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-06-21 16:14:03 +0100 |
commit | 2cbb28cbd60e1c5c13a8457ad77a62c7787ba4a8 (patch) | |
tree | 2fc6e7fd86ab2dbf30e8e2f064c00b5956baa293 /sshconnect.c | |
parent | 08821a1b464a0d0d62f735d6bf1e6305faf73fa1 (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
Diffstat (limited to 'sshconnect.c')
-rw-r--r-- | sshconnect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sshconnect.c b/sshconnect.c index fdcdcd855..103d84e38 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -257,7 +257,7 @@ ssh_proxy_connect(struct ssh *ssh, const char *host, u_short port, | |||
257 | /* Execute the proxy command. Note that we gave up any | 257 | /* Execute the proxy command. Note that we gave up any |
258 | extra privileges above. */ | 258 | extra privileges above. */ |
259 | signal(SIGPIPE, SIG_DFL); | 259 | signal(SIGPIPE, SIG_DFL); |
260 | execv(argv[0], argv); | 260 | execvp(argv[0], argv); |
261 | perror(argv[0]); | 261 | perror(argv[0]); |
262 | exit(1); | 262 | exit(1); |
263 | } | 263 | } |
@@ -1382,7 +1382,7 @@ ssh_local_cmd(const char *args) | |||
1382 | if (pid == 0) { | 1382 | if (pid == 0) { |
1383 | signal(SIGPIPE, SIG_DFL); | 1383 | signal(SIGPIPE, SIG_DFL); |
1384 | debug3("Executing %s -c \"%s\"", shell, args); | 1384 | debug3("Executing %s -c \"%s\"", shell, args); |
1385 | execl(shell, shell, "-c", args, (char *)NULL); | 1385 | execlp(shell, shell, "-c", args, (char *)NULL); |
1386 | error("Couldn't execute %s -c \"%s\": %s", | 1386 | error("Couldn't execute %s -c \"%s\": %s", |
1387 | shell, args, strerror(errno)); | 1387 | shell, args, strerror(errno)); |
1388 | _exit(1); | 1388 | _exit(1); |