[Pkg-shadow-commits] r3318 - in upstream/trunk: . libmisc

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Thu Jun 2 15:36:30 UTC 2011


Author: nekral-guest
Date: 2011-06-02 15:36:29 +0000 (Thu, 02 Jun 2011)
New Revision: 3318

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/NEWS
   upstream/trunk/libmisc/addgrps.c
Log:
	* NEWS, libmisc/addgrps.c: Fix allocator loop. Continue to
	getgroups() when getgroups fails (-1) with errno==EINVAL.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2011-06-01 12:20:08 UTC (rev 3317)
+++ upstream/trunk/ChangeLog	2011-06-02 15:36:29 UTC (rev 3318)
@@ -1,3 +1,8 @@
+2010-06-02  Cal Peake  <cp at absolutedigital.net>
+
+	* NEWS, libmisc/addgrps.c: Fix allocator loop. Continue to
+	getgroups() when getgroups fails (-1) with errno==EINVAL.
+
 2011-06-01  Simon Brandmair  <sbrandmair at gmx.net>
 
 	* man/newusers.8.xml, man/suauth.5.xml, man/suauth.5.xml,

Modified: upstream/trunk/NEWS
===================================================================
--- upstream/trunk/NEWS	2011-06-01 12:20:08 UTC (rev 3317)
+++ upstream/trunk/NEWS	2011-06-02 15:36:29 UTC (rev 3318)
@@ -27,6 +27,8 @@
     enabled versions only)
   * Fixed infinite loop when CONSOLE is configured with a colon-separated
     list of TTYs.
+  * Fixed warning and support for CONSOLE_GROUPS for users member of more
+    than 16 groups.
 - su
   * Document the su exit values.
   * When su receives a signal, wait for the child to terminate (after
@@ -35,6 +37,8 @@
   * Default ENV_SUPATH is /sbin:/bin:/usr/sbin:/usr/bin
   * Fixed infinite loop when CONSOLE is configured with a colon-separated
     list of TTYs.
+  * Fixed warning and support for CONSOLE_GROUPS for users member of more
+    than 16 groups.
 - newgrp, sg, groupmems
   * Fix parsing of gshadow entries.
 - useradd

Modified: upstream/trunk/libmisc/addgrps.c
===================================================================
--- upstream/trunk/libmisc/addgrps.c	2011-06-01 12:20:08 UTC (rev 3317)
+++ upstream/trunk/libmisc/addgrps.c	2011-06-02 15:36:29 UTC (rev 3318)
@@ -71,7 +71,11 @@
 			return -1;
 		}
 		ngroups = getgroups (i, grouplist);
-		if ((-1 == ngroups) || (i > (size_t)ngroups)) {
+		if (   (   (-1 == ngroups)
+		        && (EINVAL != errno))
+		    || (i > (size_t)ngroups)) {
+			/* Unexpected failure of getgroups or successful
+			 * reception of the groups */
 			break;
 		}
 		/* not enough room, so try allocating a larger buffer */




More information about the Pkg-shadow-commits mailing list