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

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Sat Mar 21 19:42:49 UTC 2009


Author: nekral-guest
Date: 2009-03-21 19:42:48 +0000 (Sat, 21 Mar 2009)
New Revision: 2577

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/grpck.c
Log:
	* src/grpck.c (check_members): When a member is removed, do not
	increase the index.
	* src/grpck.c: Fix typo in messages and comments.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2009-03-21 19:32:14 UTC (rev 2576)
+++ upstream/trunk/ChangeLog	2009-03-21 19:42:48 UTC (rev 2577)
@@ -1,5 +1,11 @@
 2009-03-21  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* src/grpck.c (check_members): When a member is removed, do not
+	increase the index.
+	* src/grpck.c: Fix typo in messages and comments.
+
+2009-03-21  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* lib/commonio.c: Call fsync before closing the backup file. This
 	ensures that the backup file is flushed to the storage medium.
 	* src/useradd.c: Likewise for the default file, faillog, lastlog,

Modified: upstream/trunk/src/grpck.c
===================================================================
--- upstream/trunk/src/grpck.c	2009-03-21 19:32:14 UTC (rev 2576)
+++ upstream/trunk/src/grpck.c	2009-03-21 19:42:48 UTC (rev 2577)
@@ -146,6 +146,8 @@
 
 /*
  * delete_member - delete an entry in a list of members
+ *
+ * It only deletes the first entry with the given name.
  */
 static void delete_member (char **list, const char *member)
 {
@@ -389,6 +391,9 @@
 		SYSLOG ((LOG_INFO, fmt_syslog, members[i], groupname));
 		members_changed = 1;
 		delete_member (members, members[i]);
+
+		/* Rewind in case of removal */
+		i--;
 	}
 
 	return members_changed;
@@ -543,10 +548,10 @@
 		}
 
 		/*
-		 * Check for invalid user ID.
+		 * Check for invalid group ID.
 		 */
 		if (grp->gr_gid == (gid_t)-1) {
-			printf (_("invalid user ID '%lu'\n"), (long unsigned int)grp->gr_gid);
+			printf (_("invalid group ID '%lu'\n"), (long unsigned int)grp->gr_gid);
 			*errors += 1;
 		}
 
@@ -582,7 +587,7 @@
 				printf (_
 				        ("no matching group file entry in %s\n"),
 				        sgr_file);
-				printf (_("add group '%s' in %s ?"),
+				printf (_("add group '%s' in %s?"),
 				        grp->gr_name, sgr_file);
 				*errors += 1;
 				if (yes_or_no (read_only)) {




More information about the Pkg-shadow-commits mailing list