getgroups() when getgroups fails (-1) with errno==EINVAL.
+2010-06-02 Cal Peake <cp@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@gmx.net>
* man/newusers.8.xml, man/suauth.5.xml, man/suauth.5.xml,
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
* 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
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 */