diff options
author | Colin Watson <cjwatson@debian.org> | 2014-02-09 16:10:00 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2020-10-18 12:07:21 +0100 |
commit | a7d2f23b7b86f97749856482233cdc9dd970d1d3 (patch) | |
tree | 25888e228cdd1c5f370bf65a5d4577cb89e9a035 | |
parent | 94f06f8888f2e11267120eeebdb931d95bbfb7fd (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: 2020-02-21
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 9ec0618a9..5f8c81b84 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -263,7 +263,7 @@ ssh_proxy_connect(struct ssh *ssh, const char *host, const char *host_arg, | |||
263 | /* Execute the proxy command. Note that we gave up any | 263 | /* Execute the proxy command. Note that we gave up any |
264 | extra privileges above. */ | 264 | extra privileges above. */ |
265 | ssh_signal(SIGPIPE, SIG_DFL); | 265 | ssh_signal(SIGPIPE, SIG_DFL); |
266 | execv(argv[0], argv); | 266 | execvp(argv[0], argv); |
267 | perror(argv[0]); | 267 | perror(argv[0]); |
268 | exit(1); | 268 | exit(1); |
269 | } | 269 | } |
@@ -1392,7 +1392,7 @@ ssh_local_cmd(const char *args) | |||
1392 | if (pid == 0) { | 1392 | if (pid == 0) { |
1393 | ssh_signal(SIGPIPE, SIG_DFL); | 1393 | ssh_signal(SIGPIPE, SIG_DFL); |
1394 | debug3("Executing %s -c \"%s\"", shell, args); | 1394 | debug3("Executing %s -c \"%s\"", shell, args); |
1395 | execl(shell, shell, "-c", args, (char *)NULL); | 1395 | execlp(shell, shell, "-c", args, (char *)NULL); |
1396 | error("Couldn't execute %s -c \"%s\": %s", | 1396 | error("Couldn't execute %s -c \"%s\": %s", |
1397 | shell, args, strerror(errno)); | 1397 | shell, args, strerror(errno)); |
1398 | _exit(1); | 1398 | _exit(1); |