From: nekral-guest Date: Wed, 30 Jul 2008 14:11:09 +0000 (+0000) Subject: * src/groupmems.c: Only check if the adduser user exists when an X-Git-Tag: 4.1.3~305 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6713942f8322cddaa20a33751eebb707b2de82b7;p=thirdparty%2Fshadow.git * src/groupmems.c: Only check if the adduser user exists when an user is specified with -a. --- diff --git a/ChangeLog b/ChangeLog index 1943d84c9..a1b6578ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-30 Lukáš Kuklínek + + * src/groupmems.c: Only check if the adduser user exists when an + user is specified with -a. + 2008-07-30 Nicolas François * src/groupmems.c: Fix the groupmems' usage message. The -D option diff --git a/src/groupmems.c b/src/groupmems.c index 48ed34fcc..e4948a23e 100644 --- a/src/groupmems.c +++ b/src/groupmems.c @@ -163,7 +163,8 @@ static void process_flags (int argc, char **argv) } /* local, no need for xgetpwnam */ - if (getpwnam (adduser) == NULL) { + if ( (NULL != adduser) + && (getpwnam (adduser) == NULL)) { fprintf (stderr, _("%s: user `%s' does not exist\n"), Prog, adduser); fail_exit (EXIT_INVALID_USER);