summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2014-02-09 16:10:00 +0000
committerColin Watson <cjwatson@debian.org>2020-02-21 12:07:14 +0000
commitc19bcc02b07b450d585d0fd10ccd96174aeb3b7c (patch)
tree319f14e3bd6abc41376f42d603bec40556adfcf2
parent5166a6af68da4778c7e2c2d117bb56361c7aa361 (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: 2020-02-21 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 4711af782..4a5d4a003 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -260,7 +260,7 @@ ssh_proxy_connect(struct ssh *ssh, const char *host, const char *host_arg,
260 /* Execute the proxy command. Note that we gave up any 260 /* Execute the proxy command. Note that we gave up any
261 extra privileges above. */ 261 extra privileges above. */
262 ssh_signal(SIGPIPE, SIG_DFL); 262 ssh_signal(SIGPIPE, SIG_DFL);
263 execv(argv[0], argv); 263 execvp(argv[0], argv);
264 perror(argv[0]); 264 perror(argv[0]);
265 exit(1); 265 exit(1);
266 } 266 }
@@ -1388,7 +1388,7 @@ ssh_local_cmd(const char *args)
1388 if (pid == 0) { 1388 if (pid == 0) {
1389 ssh_signal(SIGPIPE, SIG_DFL); 1389 ssh_signal(SIGPIPE, SIG_DFL);
1390 debug3("Executing %s -c \"%s\"", shell, args); 1390 debug3("Executing %s -c \"%s\"", shell, args);
1391 execl(shell, shell, "-c", args, (char *)NULL); 1391 execlp(shell, shell, "-c", args, (char *)NULL);
1392 error("Couldn't execute %s -c \"%s\": %s", 1392 error("Couldn't execute %s -c \"%s\": %s",
1393 shell, args, strerror(errno)); 1393 shell, args, strerror(errno));
1394 _exit(1); 1394 _exit(1);