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>2018-08-24 17:49:07 +0100
commit0e7d3495f758a4ecccc14eda31845ea0efc89251 (patch)
tree959082a7972dcb78626e67e7dd408cc94d25ce58 /sshconnect.c
parentf14447b774639c6de52f452e5a0e012939832855 (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 78813c164..a2efe6d15 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 }
@@ -1525,7 +1525,7 @@ ssh_local_cmd(const char *args)
1525 if (pid == 0) { 1525 if (pid == 0) {
1526 signal(SIGPIPE, SIG_DFL); 1526 signal(SIGPIPE, SIG_DFL);
1527 debug3("Executing %s -c \"%s\"", shell, args); 1527 debug3("Executing %s -c \"%s\"", shell, args);
1528 execl(shell, shell, "-c", args, (char *)NULL); 1528 execlp(shell, shell, "-c", args, (char *)NULL);
1529 error("Couldn't execute %s -c \"%s\": %s", 1529 error("Couldn't execute %s -c \"%s\": %s",
1530 shell, args, strerror(errno)); 1530 shell, args, strerror(errno));
1531 _exit(1); 1531 _exit(1);