[Pkg-shadow-commits] r1352 - in upstream/trunk: . src

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Fri Nov 16 23:05:24 UTC 2007


Author: nekral-guest
Date: 2007-11-16 23:05:24 +0000 (Fri, 16 Nov 2007)
New Revision: 1352

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/useradd.c
Log:
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().


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2007-11-16 22:59:14 UTC (rev 1351)
+++ upstream/trunk/ChangeLog	2007-11-16 23:05:24 UTC (rev 1352)
@@ -1,3 +1,9 @@
+2007-11-17  Nicolas François  <nicolas.francois at 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 at centraliens.net>
 
 	* lib/commonio.c (next_entry_by_name): New function.

Modified: upstream/trunk/src/useradd.c
===================================================================
--- upstream/trunk/src/useradd.c	2007-11-16 22:59:14 UTC (rev 1351)
+++ upstream/trunk/src/useradd.c	2007-11-16 23:05:24 UTC (rev 1352)
@@ -706,30 +706,6 @@
 	struct sgrp *nsgrp;
 #endif
 
-	/*
-	 * Test for unique entries of user_groups in /etc/group
-	 * pvrabec at 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 */
 
 	/*




More information about the Pkg-shadow-commits mailing list