]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
- markus@cvs.openbsd.org 2002/12/10 08:56:00
authorBen Lindstrom <mouring@eviladmin.org>
Mon, 23 Dec 2002 02:26:08 +0000 (02:26 +0000)
committerBen Lindstrom <mouring@eviladmin.org>
Mon, 23 Dec 2002 02:26:08 +0000 (02:26 +0000)
     [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@

ChangeLog
session.c

index 01c24e6b3d3f2164a7c9f8d662e3b69381f319ba..892c87e243088ebea09ef0eaabe26253748318ec 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
      [ssh.c]
      Avoid setting optind to 0 as GNU getopt treats that like we do optreset.
      markus@ OK
+   - 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@
 
 20021205
  - (djm) PERL-free fixpaths from stuge-openssh-unix-dev@cdy.org
      save auth method before monitor_reset_key_state(); bugzilla bug #284;
      ok provos@
 
-$Id: ChangeLog,v 1.2530 2002/12/23 02:24:54 mouring Exp $
+$Id: ChangeLog,v 1.2531 2002/12/23 02:26:08 mouring Exp $
index ac1561756f5e498ce1be652cf792a4d3a8e105aa..dfff9c6bf95cfe249b4c274cb4defd62f9b6afab 100644 (file)
--- 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,