* NEWS, libmisc/addgrps.c: Fix allocator loop. Continue to

getgroups() when getgroups fails (-1) with errno==EINVAL.
This commit is contained in:
nekral-guest 2011-06-02 15:36:29 +00:00
parent 99d0164837
commit f140c3a0e5
3 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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,

4
NEWS
View File

@ -27,6 +27,8 @@ shadow-4.1.4.3 -> shadow-4.1.5 UNRELEASED
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 @@ shadow-4.1.4.3 -> shadow-4.1.5 UNRELEASED
* 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

View File

@ -71,7 +71,11 @@ int add_groups (const char *list)
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 */