summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sshconnect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sshconnect.c b/sshconnect.c
index 78813c164..a2efe6d15 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -229,7 +229,7 @@ ssh_proxy_connect(struct ssh *ssh, const char *host, u_short port,
229 /* Execute the proxy command. Note that we gave up any 229 /* Execute the proxy command. Note that we gave up any
230 extra privileges above. */ 230 extra privileges above. */
231 signal(SIGPIPE, SIG_DFL); 231 signal(SIGPIPE, SIG_DFL);
232 execv(argv[0], argv); 232 execvp(argv[0], argv);
233 perror(argv[0]); 233 perror(argv[0]);
234 exit(1); 234 exit(1);
235 } 235 }
@@ -1525,7 +1525,7 @@ ssh_local_cmd(const char *args)
1525 if (pid == 0) { 1525 if (pid == 0) {
1526 signal(SIGPIPE, SIG_DFL); 1526 signal(SIGPIPE, SIG_DFL);
1527 debug3("Executing %s -c \"%s\"", shell, args); 1527 debug3("Executing %s -c \"%s\"", shell, args);
1528 execl(shell, shell, "-c", args, (char *)NULL); 1528 execlp(shell, shell, "-c", args, (char *)NULL);
1529 error("Couldn't execute %s -c \"%s\": %s", 1529 error("Couldn't execute %s -c \"%s\": %s",
1530 shell, args, strerror(errno)); 1530 shell, args, strerror(errno));
1531 _exit(1); 1531 _exit(1);