It is no more needed to check that the user's groups are specified only

once in the group file. This is checked by gr_update().
This commit is contained in:
nekral-guest 2007-11-16 23:05:24 +00:00
parent 07c2610170
commit b370e1502e
2 changed files with 6 additions and 24 deletions

View File

@ -1,3 +1,9 @@
2007-11-17 Nicolas François <nicolas.francois@centraliens.net>
* src/useradd.c: It is no more needed to check that the user's
groups are specified only once in the group file. This is checked
by gr_update().
2007-11-16 Nicolas François <nicolas.francois@centraliens.net>
* lib/commonio.c (next_entry_by_name): New function.

View File

@ -706,30 +706,6 @@ static void grp_update (void)
struct sgrp *nsgrp;
#endif
/*
* Test for unique entries of user_groups in /etc/group
* pvrabec@redhat.com
*/
char **user_groups_tmp = user_groups;
while (*user_groups_tmp) {
int count = 0;
for (gr_rewind (), grp = gr_next (); grp && count < 2;
grp = gr_next ()) {
if (strcmp (*user_groups_tmp, grp->gr_name) == 0) {
count++;
}
}
if (count > 1) {
fprintf (stderr,
"%s: error not unique group names in group file\n",
Prog);
fail_exit (E_GRP_UPDATE);
}
user_groups_tmp++;
}
/* Locking and opening of the group files moved to open_files() --gafton */
/*