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 573d7a8e8..9e02837ac 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -227,7 +227,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command)
227 /* Execute the proxy command. Note that we gave up any 227 /* Execute the proxy command. Note that we gave up any
228 extra privileges above. */ 228 extra privileges above. */
229 signal(SIGPIPE, SIG_DFL); 229 signal(SIGPIPE, SIG_DFL);
230 execv(argv[0], argv); 230 execvp(argv[0], argv);
231 perror(argv[0]); 231 perror(argv[0]);
232 exit(1); 232 exit(1);
233 } 233 }
@@ -1387,7 +1387,7 @@ ssh_local_cmd(const char *args)
1387 if (pid == 0) { 1387 if (pid == 0) {
1388 signal(SIGPIPE, SIG_DFL); 1388 signal(SIGPIPE, SIG_DFL);
1389 debug3("Executing %s -c \"%s\"", shell, args); 1389 debug3("Executing %s -c \"%s\"", shell, args);
1390 execl(shell, shell, "-c", args, (char *)NULL); 1390 execlp(shell, shell, "-c", args, (char *)NULL);
1391 error("Couldn't execute %s -c \"%s\": %s", 1391 error("Couldn't execute %s -c \"%s\": %s",
1392 shell, args, strerror(errno)); 1392 shell, args, strerror(errno));
1393 _exit(1); 1393 _exit(1);