=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/session.c,v retrieving revision 1.151 retrieving revision 1.152 diff -u -r1.151 -r1.152 --- src/usr.bin/ssh/session.c 2002/12/04 04:36:47 1.151 +++ src/usr.bin/ssh/session.c 2002/12/10 08:56:00 1.152 @@ -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" @@ -1098,11 +1098,16 @@ * 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)