- djm@cvs.openbsd.org 2010/10/05 05:13:18
[sftp.c sshconnect.c]
use default shell /bin/sh if $SHELL is ""; ok markus@
diff --git a/sshconnect.c b/sshconnect.c
index 4d3a085..6d2f134 100644
--- a/sshconnect.c
+++ b/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
@@ -87,7 +87,7 @@
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. */
@@ -1237,7 +1237,7 @@
args == NULL || !*args)
return (1);
- if ((shell = getenv("SHELL")) == NULL)
+ if ((shell = getenv("SHELL")) == NULL || *shell == '\0')
shell = _PATH_BSHELL;
pid = fork();