diff options
author | Colin Watson <cjwatson@debian.org> | 2014-02-09 16:10:00 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2018-04-03 08:21:37 +0100 |
commit | 72fead7f622b074c9b92dbdb8ae745faf2702b3d (patch) | |
tree | 607baab096bee9318a6bef29dc1cd9f38ac521a9 | |
parent | e800454207f4d7a0c402f129029b8282209cdf74 (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 3805d35d9..8ab01c0ef 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -239,7 +239,7 @@ ssh_proxy_connect(struct ssh *ssh, const char *host, u_short port, | |||
239 | /* Execute the proxy command. Note that we gave up any | 239 | /* Execute the proxy command. Note that we gave up any |
240 | extra privileges above. */ | 240 | extra privileges above. */ |
241 | signal(SIGPIPE, SIG_DFL); | 241 | signal(SIGPIPE, SIG_DFL); |
242 | execv(argv[0], argv); | 242 | execvp(argv[0], argv); |
243 | perror(argv[0]); | 243 | perror(argv[0]); |
244 | exit(1); | 244 | exit(1); |
245 | } | 245 | } |
@@ -1554,7 +1554,7 @@ ssh_local_cmd(const char *args) | |||
1554 | if (pid == 0) { | 1554 | if (pid == 0) { |
1555 | signal(SIGPIPE, SIG_DFL); | 1555 | signal(SIGPIPE, SIG_DFL); |
1556 | debug3("Executing %s -c \"%s\"", shell, args); | 1556 | debug3("Executing %s -c \"%s\"", shell, args); |
1557 | execl(shell, shell, "-c", args, (char *)NULL); | 1557 | execlp(shell, shell, "-c", args, (char *)NULL); |
1558 | error("Couldn't execute %s -c \"%s\": %s", | 1558 | error("Couldn't execute %s -c \"%s\": %s", |
1559 | shell, args, strerror(errno)); | 1559 | shell, args, strerror(errno)); |
1560 | _exit(1); | 1560 | _exit(1); |