From 941e94f1d286eaa0c7d745c8b002d6c9161304f7 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Mon, 13 Jun 2011 18:25:51 +0000 Subject: [PATCH] * src/su.c: No need to change the user's shell in case of subsystem root. Update the comments. --- ChangeLog | 2 ++ src/su.c | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index cf02f0b8..7a46c87b 100644 --- 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 diff --git a/src/su.c b/src/su.c index 0abea16a..118cdd05 100644 --- 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 */