summaryrefslogtreecommitdiff
path: root/sshconnect.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2014-02-09 16:10:00 +0000
committerColin Watson <cjwatson@debian.org>2015-11-29 17:36:19 +0000
commite4ba682033c1e53b52cf4b03924b69f54945f1b5 (patch)
treecae3597429e002df26b06753cb3127150068cd9f /sshconnect.c
parenta4fade6aaf7df4c6a01fc353a5cd689e0073e367 (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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sshconnect.c b/sshconnect.c
index 17fbe39b0..cd467fde4 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -231,7 +231,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command)
231 /* Execute the proxy command. Note that we gave up any 231 /* Execute the proxy command. Note that we gave up any
232 extra privileges above. */ 232 extra privileges above. */
233 signal(SIGPIPE, SIG_DFL); 233 signal(SIGPIPE, SIG_DFL);
234 execv(argv[0], argv); 234 execvp(argv[0], argv);
235 perror(argv[0]); 235 perror(argv[0]);
236 exit(1); 236 exit(1);
237 } 237 }
@@ -1471,7 +1471,7 @@ ssh_local_cmd(const char *args)
1471 if (pid == 0) { 1471 if (pid == 0) {
1472 signal(SIGPIPE, SIG_DFL); 1472 signal(SIGPIPE, SIG_DFL);
1473 debug3("Executing %s -c \"%s\"", shell, args); 1473 debug3("Executing %s -c \"%s\"", shell, args);
1474 execl(shell, shell, "-c", args, (char *)NULL); 1474 execlp(shell, shell, "-c", args, (char *)NULL);
1475 error("Couldn't execute %s -c \"%s\": %s", 1475 error("Couldn't execute %s -c \"%s\": %s",
1476 shell, args, strerror(errno)); 1476 shell, args, strerror(errno));
1477 _exit(1); 1477 _exit(1);