summaryrefslogtreecommitdiff
path: root/sshconnect.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2008-07-29 09:54:13 +0000
committerColin Watson <cjwatson@debian.org>2008-07-29 09:54:13 +0000
commit1f4da95be05049c3360bf94ba327ad75334b2888 (patch)
treecf020157807749870a896fb8cd6202cf8c2cf7cb /sshconnect.c
parent53824970958de97ab41bfc557ea5d8a6821183b5 (diff)
Look for $SHELL on the path when executing ProxyCommands or
LocalCommands (closes: #492728).
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 01337fe40..0e3001201 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -142,7 +142,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command)
142 142
143 /* Execute the proxy command. Note that we gave up any 143 /* Execute the proxy command. Note that we gave up any
144 extra privileges above. */ 144 extra privileges above. */
145 execv(argv[0], argv); 145 execvp(argv[0], argv);
146 perror(argv[0]); 146 perror(argv[0]);
147 exit(1); 147 exit(1);
148 } 148 }
@@ -1169,7 +1169,7 @@ ssh_local_cmd(const char *args)
1169 pid = fork(); 1169 pid = fork();
1170 if (pid == 0) { 1170 if (pid == 0) {
1171 debug3("Executing %s -c \"%s\"", shell, args); 1171 debug3("Executing %s -c \"%s\"", shell, args);
1172 execl(shell, shell, "-c", args, (char *)NULL); 1172 execlp(shell, shell, "-c", args, (char *)NULL);
1173 error("Couldn't execute %s -c \"%s\": %s", 1173 error("Couldn't execute %s -c \"%s\": %s",
1174 shell, args, strerror(errno)); 1174 shell, args, strerror(errno));
1175 _exit(1); 1175 _exit(1);