mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-09 02:40:08 +00:00
Correctly handle missing initgroups database
This commit is contained in:
parent
aa78043a4a
commit
629f62ef0f
@ -1,3 +1,8 @@
|
|||||||
|
2011-10-17 Andreas Schwab <schwab@redhat.com>
|
||||||
|
|
||||||
|
* grp/initgroups.c (internal_getgrouplist): Fix initgroups
|
||||||
|
database lookup.
|
||||||
|
|
||||||
2011-10-16 Ulrich Drepper <drepper@gmail.com>
|
2011-10-16 Ulrich Drepper <drepper@gmail.com>
|
||||||
|
|
||||||
* misc/sys/cdefs.h: Use leaf function attribute in __THROW.
|
* misc/sys/cdefs.h: Use leaf function attribute in __THROW.
|
||||||
|
@ -82,9 +82,8 @@ internal_getgrouplist (const char *user, gid_t group, long int *size,
|
|||||||
|
|
||||||
if (__nss_initgroups_database == NULL)
|
if (__nss_initgroups_database == NULL)
|
||||||
{
|
{
|
||||||
no_more = __nss_database_lookup ("initgroups", NULL, "",
|
if (__nss_database_lookup ("initgroups", NULL, "",
|
||||||
&__nss_initgroups_database);
|
&__nss_initgroups_database) < 0)
|
||||||
if (no_more == 0 && __nss_initgroups_database == NULL)
|
|
||||||
{
|
{
|
||||||
if (__nss_group_database == NULL)
|
if (__nss_group_database == NULL)
|
||||||
no_more = __nss_database_lookup ("group", NULL, "compat files",
|
no_more = __nss_database_lookup ("group", NULL, "compat files",
|
||||||
@ -92,11 +91,8 @@ internal_getgrouplist (const char *user, gid_t group, long int *size,
|
|||||||
|
|
||||||
__nss_initgroups_database = __nss_group_database;
|
__nss_initgroups_database = __nss_group_database;
|
||||||
}
|
}
|
||||||
else if (__nss_initgroups_database != NULL)
|
else
|
||||||
{
|
use_initgroups_entry = true;
|
||||||
assert (no_more == 0);
|
|
||||||
use_initgroups_entry = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
/* __nss_initgroups_database might have been set through
|
/* __nss_initgroups_database might have been set through
|
||||||
|
Loading…
Reference in New Issue
Block a user