summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-12-23 02:26:08 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-12-23 02:26:08 +0000
commit46767607e290343fdd43f6f6b4dc170647700698 (patch)
treea6cc4764ccfa7f695c6ba745ccf07898b26543b2 /session.c
parentb9fa691819cabfeb1a1bc721daa45593e1bb59e2 (diff)
- markus@cvs.openbsd.org 2002/12/10 08:56:00
[session.c] Make sure $SHELL points to the shell from the password file, even if shell is overridden from login.conf; bug#453; semen at online.sinor.ru; ok millert@
Diffstat (limited to 'session.c')
-rw-r--r--session.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/session.c b/session.c
index ac156175..dfff9c6b 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.151 2002/12/04 04:36:47 stevesk Exp $");
+RCSID("$OpenBSD: session.c,v 1.152 2002/12/10 08:56:00 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -1324,12 +1324,17 @@ do_child(Session *s, const char *command)
* legal, and means /bin/sh.
*/
shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell;
+
+ /*
+ * Make sure $SHELL points to the shell from the password file,
+ * even if shell is overridden from login.conf
+ */
+ env = do_setup_env(s, shell);
+
#ifdef HAVE_LOGIN_CAP
shell = login_getcapstr(lc, "shell", (char *)shell, (char *)shell);
#endif
- env = do_setup_env(s, shell);
-
/* we have to stash the hostname before we close our socket. */
if (options.use_login)
hostname = get_remote_name_or_ip(utmp_len,