summaryrefslogtreecommitdiff
path: root/debian/patches/shell-path.patch
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-06-21 12:18:30 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-06-21 12:18:30 +0300
commit31684bbc19b57842dfb8285f69ab3d19f9d0f0b5 (patch)
tree9fdea5fc4fe6929b92492c6da7929b742ce260d8 /debian/patches/shell-path.patch
downloadopenssh-debian.tar.gz
Imported openssh 1:7.4p1-10debian/7.4p1-10debian
Diffstat (limited to 'debian/patches/shell-path.patch')
-rw-r--r--debian/patches/shell-path.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/debian/patches/shell-path.patch b/debian/patches/shell-path.patch
new file mode 100644
index 0000000..c263dd7
--- /dev/null
+++ b/debian/patches/shell-path.patch
@@ -0,0 +1,39 @@
+From 5ec0d5f79166a7e2aeab5c7f13d64bb08c4621bd Mon Sep 17 00:00:00 2001
+From: Colin Watson <cjwatson@debian.org>
+Date: Sun, 9 Feb 2014 16:10:00 +0000
+Subject: 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
+---
+ sshconnect.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sshconnect.c b/sshconnect.c
+index 96b91ce1..698a0711 100644
+--- a/sshconnect.c
++++ b/sshconnect.c
+@@ -231,7 +231,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command)
+ /* Execute the proxy command. Note that we gave up any
+ extra privileges above. */
+ signal(SIGPIPE, SIG_DFL);
+- execv(argv[0], argv);
++ execvp(argv[0], argv);
+ perror(argv[0]);
+ exit(1);
+ }
+@@ -1498,7 +1498,7 @@ ssh_local_cmd(const char *args)
+ if (pid == 0) {
+ signal(SIGPIPE, SIG_DFL);
+ 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);