diff options
Diffstat (limited to 'sshconnect.c')
-rw-r--r-- | sshconnect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sshconnect.c b/sshconnect.c index 3805d35d9..8ab01c0ef 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -239,7 +239,7 @@ ssh_proxy_connect(struct ssh *ssh, const char *host, u_short port, | |||
239 | /* Execute the proxy command. Note that we gave up any | 239 | /* Execute the proxy command. Note that we gave up any |
240 | extra privileges above. */ | 240 | extra privileges above. */ |
241 | signal(SIGPIPE, SIG_DFL); | 241 | signal(SIGPIPE, SIG_DFL); |
242 | execv(argv[0], argv); | 242 | execvp(argv[0], argv); |
243 | perror(argv[0]); | 243 | perror(argv[0]); |
244 | exit(1); | 244 | exit(1); |
245 | } | 245 | } |
@@ -1554,7 +1554,7 @@ ssh_local_cmd(const char *args) | |||
1554 | if (pid == 0) { | 1554 | if (pid == 0) { |
1555 | signal(SIGPIPE, SIG_DFL); | 1555 | signal(SIGPIPE, SIG_DFL); |
1556 | debug3("Executing %s -c \"%s\"", shell, args); | 1556 | debug3("Executing %s -c \"%s\"", shell, args); |
1557 | execl(shell, shell, "-c", args, (char *)NULL); | 1557 | execlp(shell, shell, "-c", args, (char *)NULL); |
1558 | error("Couldn't execute %s -c \"%s\": %s", | 1558 | error("Couldn't execute %s -c \"%s\": %s", |
1559 | shell, args, strerror(errno)); | 1559 | shell, args, strerror(errno)); |
1560 | _exit(1); | 1560 | _exit(1); |