summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2014-02-09 16:10:00 +0000
committerColin Watson <cjwatson@debian.org>2018-10-20 22:54:09 +0100
commitcabad6b7182cd6eaa8b760718200a316e7f578ed (patch)
treec0b9ec9263e9617835357233a0250b4647c4d317
parenteefdc7046766b52e39f1b6eafcde22c1e013ce9f (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 6d819279e..700ea6c3c 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -229,7 +229,7 @@ ssh_proxy_connect(struct ssh *ssh, const char *host, u_short port,
229 /* Execute the proxy command. Note that we gave up any 229 /* Execute the proxy command. Note that we gave up any
230 extra privileges above. */ 230 extra privileges above. */
231 signal(SIGPIPE, SIG_DFL); 231 signal(SIGPIPE, SIG_DFL);
232 execv(argv[0], argv); 232 execvp(argv[0], argv);
233 perror(argv[0]); 233 perror(argv[0]);
234 exit(1); 234 exit(1);
235 } 235 }
@@ -1534,7 +1534,7 @@ ssh_local_cmd(const char *args)
1534 if (pid == 0) { 1534 if (pid == 0) {
1535 signal(SIGPIPE, SIG_DFL); 1535 signal(SIGPIPE, SIG_DFL);
1536 debug3("Executing %s -c \"%s\"", shell, args); 1536 debug3("Executing %s -c \"%s\"", shell, args);
1537 execl(shell, shell, "-c", args, (char *)NULL); 1537 execlp(shell, shell, "-c", args, (char *)NULL);
1538 error("Couldn't execute %s -c \"%s\": %s", 1538 error("Couldn't execute %s -c \"%s\": %s",
1539 shell, args, strerror(errno)); 1539 shell, args, strerror(errno));
1540 _exit(1); 1540 _exit(1);