summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2010-10-05 05:13:19 +0000
committerDamien Miller <djm@cvs.openbsd.org>2010-10-05 05:13:19 +0000
commit1015b8e62f62ad24d4d7337849f23aef354f4aa6 (patch)
tree820a620b0164f047e0cede4497e712fcdebc2bb1 /usr.bin
parent0324b071dddfa1c938462a0dfdddc755203dd3d0 (diff)
use default shell /bin/sh if $SHELL is ""; ok markus@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/sftp.c4
-rw-r--r--usr.bin/ssh/sshconnect.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c
index c4a5d9e87ff..1ab90cf334b 100644
--- a/usr.bin/ssh/sftp.c
+++ b/usr.bin/ssh/sftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp.c,v 1.129 2010/09/26 22:26:33 djm Exp $ */
+/* $OpenBSD: sftp.c,v 1.130 2010/10/05 05:13:18 djm Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -246,7 +246,7 @@ local_do_shell(const char *args)
if (!*args)
args = NULL;
- if ((shell = getenv("SHELL")) == NULL)
+ if ((shell = getenv("SHELL")) == NULL || *shell == '\0')
shell = _PATH_BSHELL;
if ((pid = fork()) == -1)
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c
index 36b874ec218..540e685d997 100644
--- a/usr.bin/ssh/sshconnect.c
+++ b/usr.bin/ssh/sshconnect.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect.c,v 1.225 2010/08/31 11:54:45 djm Exp $ */
+/* $OpenBSD: sshconnect.c,v 1.226 2010/10/05 05:13:18 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -78,7 +78,7 @@ ssh_proxy_connect(const char *host, u_short port, const char *proxy_command)
pid_t pid;
char *shell, strport[NI_MAXSERV];
- if ((shell = getenv("SHELL")) == NULL)
+ if ((shell = getenv("SHELL")) == NULL || *shell == '\0')
shell = _PATH_BSHELL;
/* Convert the port number into a string. */
@@ -1224,7 +1224,7 @@ ssh_local_cmd(const char *args)
args == NULL || !*args)
return (1);
- if ((shell = getenv("SHELL")) == NULL)
+ if ((shell = getenv("SHELL")) == NULL || *shell == '\0')
shell = _PATH_BSHELL;
pid = fork();