diff options
-rw-r--r-- | sshconnect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sshconnect.c b/sshconnect.c index 6d819279e..700ea6c3c 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 | } |
@@ -1534,7 +1534,7 @@ ssh_local_cmd(const char *args) | |||
1534 | if (pid == 0) { | 1534 | if (pid == 0) { |
1535 | signal(SIGPIPE, SIG_DFL); | 1535 | signal(SIGPIPE, SIG_DFL); |
1536 | debug3("Executing %s -c \"%s\"", shell, args); | 1536 | debug3("Executing %s -c \"%s\"", shell, args); |
1537 | execl(shell, shell, "-c", args, (char *)NULL); | 1537 | execlp(shell, shell, "-c", args, (char *)NULL); |
1538 | error("Couldn't execute %s -c \"%s\": %s", | 1538 | error("Couldn't execute %s -c \"%s\": %s", |
1539 | shell, args, strerror(errno)); | 1539 | shell, args, strerror(errno)); |
1540 | _exit(1); | 1540 | _exit(1); |