1:5.8.1p1-3
[openssh.git] / debian / patches / shell-path.patch
1 Description: Look for $SHELL on the path for ProxyCommand/LocalCommand
2  There's some debate on the upstream bug about whether POSIX requires this.
3  I (Colin Watson) agree with Vincent and think it does.
4 Author: Colin Watson <cjwatson@debian.org>
5 Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1494
6 Bug-Debian: http://bugs.debian.org/492728
7 Last-Update: 2010-02-27
8
9 Index: b/sshconnect.c
10 ===================================================================
11 --- a/sshconnect.c
12 +++ b/sshconnect.c
13 @@ -144,7 +144,7 @@
14                 /* Execute the proxy command.  Note that we gave up any
15                    extra privileges above. */
16                 signal(SIGPIPE, SIG_DFL);
17 -               execv(argv[0], argv);
18 +               execvp(argv[0], argv);
19                 perror(argv[0]);
20                 exit(1);
21         }
22 @@ -1274,7 +1274,7 @@
23         if (pid == 0) {
24                 signal(SIGPIPE, SIG_DFL);
25                 debug3("Executing %s -c \"%s\"", shell, args);
26 -               execl(shell, shell, "-c", args, (char *)NULL);
27 +               execlp(shell, shell, "-c", args, (char *)NULL);
28                 error("Couldn't execute %s -c \"%s\": %s",
29                     shell, args, strerror(errno));
30                 _exit(1);