summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2014-02-09 16:10:00 +0000
committerColin Watson <cjwatson@debian.org>2014-10-07 14:27:21 +0100
commit66377fbb52584b41bd7f6f19116107fbbad41058 (patch)
tree4e2a7257f25c2dcee332a10c1aa824a40fcdf64f
parentfd174c13c46191abdb33c0a45545573a8e06b061 (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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sshconnect.c b/sshconnect.c
index ac09eae67..26116d24b 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -228,7 +228,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command)
228 /* Execute the proxy command. Note that we gave up any 228 /* Execute the proxy command. Note that we gave up any
229 extra privileges above. */ 229 extra privileges above. */
230 signal(SIGPIPE, SIG_DFL); 230 signal(SIGPIPE, SIG_DFL);
231 execv(argv[0], argv); 231 execvp(argv[0], argv);
232 perror(argv[0]); 232 perror(argv[0]);
233 exit(1); 233 exit(1);
234 } 234 }
@@ -1416,7 +1416,7 @@ ssh_local_cmd(const char *args)
1416 if (pid == 0) { 1416 if (pid == 0) {
1417 signal(SIGPIPE, SIG_DFL); 1417 signal(SIGPIPE, SIG_DFL);
1418 debug3("Executing %s -c \"%s\"", shell, args); 1418 debug3("Executing %s -c \"%s\"", shell, args);
1419 execl(shell, shell, "-c", args, (char *)NULL); 1419 execlp(shell, shell, "-c", args, (char *)NULL);
1420 error("Couldn't execute %s -c \"%s\": %s", 1420 error("Couldn't execute %s -c \"%s\": %s",
1421 shell, args, strerror(errno)); 1421 shell, args, strerror(errno));
1422 _exit(1); 1422 _exit(1);