mirror of git://sourceware.org/git/glibc.git
[BZ #5378]
* nis/nss_compat/compat-initgroups.c (getgrent_next_nss): Don't use result of nss_getgrgid_r if nothing was found. For other error return with a failure. Partially based on a patch by Petr Baudis <pasky@suse.cz>.
This commit is contained in:
parent
3a63267450
commit
8588312396
|
|
@ -1,5 +1,11 @@
|
|||
2007-11-22 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
[BZ #5378]
|
||||
* nis/nss_compat/compat-initgroups.c (getgrent_next_nss): Don't
|
||||
use result of nss_getgrgid_r if nothing was found. For other
|
||||
error return with a failure.
|
||||
Partially based on a patch by Petr Baudis <pasky@suse.cz>.
|
||||
|
||||
* locale/programs/ld-collate.c (collate_read): Fix loop to match
|
||||
macro name.
|
||||
|
||||
|
|
|
|||
|
|
@ -303,11 +303,20 @@ getgrent_next_nss (ent_t *ent, char *buffer, size_t buflen, const char *user,
|
|||
else
|
||||
tmpbuf = extend_alloca (tmpbuf, tmplen, 2 * tmplen);
|
||||
|
||||
if (__builtin_expect (status != NSS_STATUS_NOTFOUND, 1))
|
||||
{
|
||||
if (__builtin_expect (status != NSS_STATUS_SUCCESS, 0))
|
||||
{
|
||||
free (mygroups);
|
||||
return status;
|
||||
}
|
||||
|
||||
if (!in_blacklist (grpbuf.gr_name,
|
||||
strlen (grpbuf.gr_name), ent))
|
||||
check_and_add_group (user, group, start, size, groupsp,
|
||||
limit, &grpbuf);
|
||||
}
|
||||
}
|
||||
|
||||
free (mygroups);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue