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 ac09eae67..26116d24b 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -228,7 +228,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command)
228 /* Execute the proxy command. Note that we gave up any 228 /* Execute the proxy command. Note that we gave up any
229 extra privileges above. */ 229 extra privileges above. */
230 signal(SIGPIPE, SIG_DFL); 230 signal(SIGPIPE, SIG_DFL);
231 execv(argv[0], argv); 231 execvp(argv[0], argv);
232 perror(argv[0]); 232 perror(argv[0]);
233 exit(1); 233 exit(1);
234 } 234 }
@@ -1416,7 +1416,7 @@ ssh_local_cmd(const char *args)
1416 if (pid == 0) { 1416 if (pid == 0) {
1417 signal(SIGPIPE, SIG_DFL); 1417 signal(SIGPIPE, SIG_DFL);
1418 debug3("Executing %s -c \"%s\"", shell, args); 1418 debug3("Executing %s -c \"%s\"", shell, args);
1419 execl(shell, shell, "-c", args, (char *)NULL); 1419 execlp(shell, shell, "-c", args, (char *)NULL);
1420 error("Couldn't execute %s -c \"%s\": %s", 1420 error("Couldn't execute %s -c \"%s\": %s",
1421 shell, args, strerror(errno)); 1421 shell, args, strerror(errno));
1422 _exit(1); 1422 _exit(1);