* src/groupmems.c: Only check if the adduser user exists when an

user is specified with -a.
This commit is contained in:
nekral-guest 2008-07-30 14:11:09 +00:00
parent c6f5ce280f
commit 6713942f83
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-07-30 Lukáš Kuklínek <lkukline@redhat.com>
* src/groupmems.c: Only check if the adduser user exists when an
user is specified with -a.
2008-07-30 Nicolas François <nicolas.francois@centraliens.net>
* src/groupmems.c: Fix the groupmems' usage message. The -D option

View File

@ -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);