diff options
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -33,7 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include "includes.h" | 35 | #include "includes.h" |
36 | RCSID("$OpenBSD: session.c,v 1.151 2002/12/04 04:36:47 stevesk Exp $"); | 36 | RCSID("$OpenBSD: session.c,v 1.152 2002/12/10 08:56:00 markus Exp $"); |
37 | 37 | ||
38 | #include "ssh.h" | 38 | #include "ssh.h" |
39 | #include "ssh1.h" | 39 | #include "ssh1.h" |
@@ -1324,12 +1324,17 @@ do_child(Session *s, const char *command) | |||
1324 | * legal, and means /bin/sh. | 1324 | * legal, and means /bin/sh. |
1325 | */ | 1325 | */ |
1326 | shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell; | 1326 | shell = (pw->pw_shell[0] == '\0') ? _PATH_BSHELL : pw->pw_shell; |
1327 | |||
1328 | /* | ||
1329 | * Make sure $SHELL points to the shell from the password file, | ||
1330 | * even if shell is overridden from login.conf | ||
1331 | */ | ||
1332 | env = do_setup_env(s, shell); | ||
1333 | |||
1327 | #ifdef HAVE_LOGIN_CAP | 1334 | #ifdef HAVE_LOGIN_CAP |
1328 | shell = login_getcapstr(lc, "shell", (char *)shell, (char *)shell); | 1335 | shell = login_getcapstr(lc, "shell", (char *)shell, (char *)shell); |
1329 | #endif | 1336 | #endif |
1330 | 1337 | ||
1331 | env = do_setup_env(s, shell); | ||
1332 | |||
1333 | /* we have to stash the hostname before we close our socket. */ | 1338 | /* we have to stash the hostname before we close our socket. */ |
1334 | if (options.use_login) | 1339 | if (options.use_login) |
1335 | hostname = get_remote_name_or_ip(utmp_len, | 1340 | hostname = get_remote_name_or_ip(utmp_len, |