summaryrefslogtreecommitdiff
path: root/debian/patches/shell-path.patch
blob: ddae43a45f1b8d5b58ea96fa56f4a33df64e7e0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Description: 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.
Author: Colin Watson <cjwatson@debian.org>
Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1494
Bug-Debian: http://bugs.debian.org/492728
Last-Update: 2010-02-27

Index: b/sshconnect.c
===================================================================
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -141,7 +141,7 @@
 
 		/* Execute the proxy command.  Note that we gave up any
 		   extra privileges above. */
-		execv(argv[0], argv);
+		execvp(argv[0], argv);
 		perror(argv[0]);
 		exit(1);
 	}
@@ -1243,7 +1243,7 @@
 	pid = fork();
 	if (pid == 0) {
 		debug3("Executing %s -c \"%s\"", shell, args);
-		execl(shell, shell, "-c", args, (char *)NULL);
+		execlp(shell, shell, "-c", args, (char *)NULL);
 		error("Couldn't execute %s -c \"%s\": %s",
 		    shell, args, strerror(errno));
 		_exit(1);