]> granicus.if.org Git - shadow/commitdiff
* src/su.c: No need to change the user's shell in case of
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 13 Jun 2011 18:25:51 +0000 (18:25 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 13 Jun 2011 18:25:51 +0000 (18:25 +0000)
subsystem root. Update the comments.

ChangeLog
src/su.c

index cf02f0b8ecb23f60329c5610fc9db1484fa3ddd5..7a46c87b04530591e84c219776db4d25883b84f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@
        not change environ) the authentication. And the authentication
        does not overwrite those definitions. This will ease an extraction
        from the big main() function.
+       * src/su.c: No need to change the user's shell in case of
+       subsystem root. Update the comments.
 
 2011-06-10  Nicolas François  <nicolas.francois@centraliens.net>
 
index 0abea16a75bc4de15cf787b96409f95333bff52c..118cdd05dc26054b41cd1937ec5cd76e4596db0e 100644 (file)
--- a/src/su.c
+++ b/src/su.c
@@ -908,11 +908,10 @@ int main (int argc, char **argv)
         * --shell, which will be the one executed in the chroot later).
         */
        if ('*' == pwent.pw_shell[0]) { /* subsystem root required */
-               pwent.pw_shell++;       /* skip the '*' */
-               subsystem (&pwent);     /* figure out what to execute */
-               endpwent ();
+               subsystem (&pwent);     /* change to the subsystem root */
+               endpwent ();            /* close the old password databases */
                endspent ();
-               goto top;
+               goto top;               /* authenticate in the subsystem */
        }
 
        sulog (tty, true, oldname, name);       /* save SU information */