summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2014-02-09 16:10:00 +0000
committerColin Watson <cjwatson@debian.org>2019-06-05 13:11:52 +0100
commitb019e32a0ee7a79c0a08cb1199229d03b16934a7 (patch)
tree2fc6e7fd86ab2dbf30e8e2f064c00b5956baa293
parent76a51e544a6a6a674ff1dddf4bb6da05d9cce774 (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 fdcdcd855..103d84e38 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -257,7 +257,7 @@ ssh_proxy_connect(struct ssh *ssh, const char *host, u_short port,
257 /* Execute the proxy command. Note that we gave up any 257 /* Execute the proxy command. Note that we gave up any
258 extra privileges above. */ 258 extra privileges above. */
259 signal(SIGPIPE, SIG_DFL); 259 signal(SIGPIPE, SIG_DFL);
260 execv(argv[0], argv); 260 execvp(argv[0], argv);
261 perror(argv[0]); 261 perror(argv[0]);
262 exit(1); 262 exit(1);
263 } 263 }
@@ -1382,7 +1382,7 @@ ssh_local_cmd(const char *args)
1382 if (pid == 0) { 1382 if (pid == 0) {
1383 signal(SIGPIPE, SIG_DFL); 1383 signal(SIGPIPE, SIG_DFL);
1384 debug3("Executing %s -c \"%s\"", shell, args); 1384 debug3("Executing %s -c \"%s\"", shell, args);
1385 execl(shell, shell, "-c", args, (char *)NULL); 1385 execlp(shell, shell, "-c", args, (char *)NULL);
1386 error("Couldn't execute %s -c \"%s\": %s", 1386 error("Couldn't execute %s -c \"%s\": %s",
1387 shell, args, strerror(errno)); 1387 shell, args, strerror(errno));
1388 _exit(1); 1388 _exit(1);