summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2014-02-09 16:10:00 +0000
committerColin Watson <cjwatson@debian.org>2014-02-09 16:18:24 +0000
commitb5f3be892e6d7150e7885133228fd03af69a11bc (patch)
tree7d1d6b00a5bac8c8d0a8c66531009b5b7bedd1b0
parent7531f41888f9e40be95a319fb325f6f05dd50751 (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 483eb85ac..91fd59a94 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -151,7 +151,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command)
151 /* Execute the proxy command. Note that we gave up any 151 /* Execute the proxy command. Note that we gave up any
152 extra privileges above. */ 152 extra privileges above. */
153 signal(SIGPIPE, SIG_DFL); 153 signal(SIGPIPE, SIG_DFL);
154 execv(argv[0], argv); 154 execvp(argv[0], argv);
155 perror(argv[0]); 155 perror(argv[0]);
156 exit(1); 156 exit(1);
157 } 157 }
@@ -1298,7 +1298,7 @@ ssh_local_cmd(const char *args)
1298 if (pid == 0) { 1298 if (pid == 0) {
1299 signal(SIGPIPE, SIG_DFL); 1299 signal(SIGPIPE, SIG_DFL);
1300 debug3("Executing %s -c \"%s\"", shell, args); 1300 debug3("Executing %s -c \"%s\"", shell, args);
1301 execl(shell, shell, "-c", args, (char *)NULL); 1301 execlp(shell, shell, "-c", args, (char *)NULL);
1302 error("Couldn't execute %s -c \"%s\": %s", 1302 error("Couldn't execute %s -c \"%s\": %s",
1303 shell, args, strerror(errno)); 1303 shell, args, strerror(errno));
1304 _exit(1); 1304 _exit(1);