]> granicus.if.org Git - shadow/commitdiff
It is no more needed to check that the user's groups are specified only
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 16 Nov 2007 23:05:24 +0000 (23:05 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 16 Nov 2007 23:05:24 +0000 (23:05 +0000)
once in the group file. This is checked by gr_update().

ChangeLog
src/useradd.c

index 4e9943adb0d9f6db3112137961bd8ceea6027683..82fbc25395f7bbd3779a87a124c661caf3517974 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index 53026af9e6046ad47a3d399d54a388577388541e..77f30dd3eae6932a8471550612638398cc022ae0 100644 (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 */
 
        /*