diff options
author | Damien Miller <djm@mindrot.org> | 2010-10-07 22:07:11 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2010-10-07 22:07:11 +1100 |
commit | 38d9a965bfc795fba1c000e0b42e705e2bcd34c9 (patch) | |
tree | d21fcf058b9c991de5c08ef4df8e0a548963765c | |
parent | 9a3d0dc062e4ebcafdc399ed8522df97066b139e (diff) |
- djm@cvs.openbsd.org 2010/10/05 05:13:18
[sftp.c sshconnect.c]
use default shell /bin/sh if $SHELL is ""; ok markus@
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | sftp.c | 4 | ||||
-rw-r--r-- | sshconnect.c | 6 |
3 files changed, 8 insertions, 5 deletions
@@ -27,6 +27,9 @@ | |||
27 | [cipher-3des1.c cipher-bf1.c cipher-ctr.c openbsd-compat/openssl-compat.h] | 27 | [cipher-3des1.c cipher-bf1.c cipher-ctr.c openbsd-compat/openssl-compat.h] |
28 | adapt to API changes in openssl-1.0.0a | 28 | adapt to API changes in openssl-1.0.0a |
29 | NB. contains compat code to select correct API for older OpenSSL | 29 | NB. contains compat code to select correct API for older OpenSSL |
30 | - djm@cvs.openbsd.org 2010/10/05 05:13:18 | ||
31 | [sftp.c sshconnect.c] | ||
32 | use default shell /bin/sh if $SHELL is ""; ok markus@ | ||
30 | 33 | ||
31 | 20100924 | 34 | 20100924 |
32 | - (djm) OpenBSD CVS Sync | 35 | - (djm) OpenBSD CVS Sync |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sftp.c,v 1.129 2010/09/26 22:26:33 djm Exp $ */ | 1 | /* $OpenBSD: sftp.c,v 1.130 2010/10/05 05:13:18 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> | 3 | * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> |
4 | * | 4 | * |
@@ -269,7 +269,7 @@ local_do_shell(const char *args) | |||
269 | if (!*args) | 269 | if (!*args) |
270 | args = NULL; | 270 | args = NULL; |
271 | 271 | ||
272 | if ((shell = getenv("SHELL")) == NULL) | 272 | if ((shell = getenv("SHELL")) == NULL || *shell == '\0') |
273 | shell = _PATH_BSHELL; | 273 | shell = _PATH_BSHELL; |
274 | 274 | ||
275 | if ((pid = fork()) == -1) | 275 | if ((pid = fork()) == -1) |
diff --git a/sshconnect.c b/sshconnect.c index 4d3a08551..6d2f1341c 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshconnect.c,v 1.225 2010/08/31 11:54:45 djm Exp $ */ | 1 | /* $OpenBSD: sshconnect.c,v 1.226 2010/10/05 05:13:18 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -87,7 +87,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command) | |||
87 | pid_t pid; | 87 | pid_t pid; |
88 | char *shell, strport[NI_MAXSERV]; | 88 | char *shell, strport[NI_MAXSERV]; |
89 | 89 | ||
90 | if ((shell = getenv("SHELL")) == NULL) | 90 | if ((shell = getenv("SHELL")) == NULL || *shell == '\0') |
91 | shell = _PATH_BSHELL; | 91 | shell = _PATH_BSHELL; |
92 | 92 | ||
93 | /* Convert the port number into a string. */ | 93 | /* Convert the port number into a string. */ |
@@ -1237,7 +1237,7 @@ ssh_local_cmd(const char *args) | |||
1237 | args == NULL || !*args) | 1237 | args == NULL || !*args) |
1238 | return (1); | 1238 | return (1); |
1239 | 1239 | ||
1240 | if ((shell = getenv("SHELL")) == NULL) | 1240 | if ((shell = getenv("SHELL")) == NULL || *shell == '\0') |
1241 | shell = _PATH_BSHELL; | 1241 | shell = _PATH_BSHELL; |
1242 | 1242 | ||
1243 | pid = fork(); | 1243 | pid = fork(); |