This commit is contained in:
parent
7cbd74fda2
commit
a0d24f0eb9
39
glibc-nis-initgroups.diff
Normal file
39
glibc-nis-initgroups.diff
Normal file
@ -0,0 +1,39 @@
|
||||
2010-05-31 Petr Baudis <pasky@suse.cz>
|
||||
|
||||
* nis/nss_compat/compat-initgroups.c (internal_getgrent_r): Fix
|
||||
initialization of skip_initgroups_dyn.
|
||||
|
||||
diff --git a/nis/nss_compat/compat-initgroups.c b/nis/nss_compat/compat-initgroups.c
|
||||
index 07a3b92..de8d95c 100644
|
||||
--- a/nis/nss_compat/compat-initgroups.c
|
||||
+++ b/nis/nss_compat/compat-initgroups.c
|
||||
@@ -474,18 +474,21 @@ internal_getgrent_r (ent_t *ent, char *buffer, size_t buflen, const char *user,
|
||||
/* If the selected module does not support getgrent_r or
|
||||
initgroups_dyn, abort. We cannot find the needed group
|
||||
entries. */
|
||||
- if (nss_getgrent_r == NULL && nss_initgroups_dyn == NULL)
|
||||
+ if (nss_initgroups_dyn == NULL || nss_getgrgid_r == NULL)
|
||||
+ {
|
||||
+ if (nss_setgrent != NULL)
|
||||
+ {
|
||||
+ nss_setgrent (1);
|
||||
+ ent->need_endgrent = true;
|
||||
+ }
|
||||
+ ent->skip_initgroups_dyn = true;
|
||||
+ }
|
||||
+
|
||||
+ if (ent->skip_initgroups_dyn && nss_getgrent_r == NULL)
|
||||
return NSS_STATUS_UNAVAIL;
|
||||
|
||||
ent->files = false;
|
||||
|
||||
- if (nss_initgroups_dyn == NULL && nss_setgrent != NULL)
|
||||
- {
|
||||
- nss_setgrent (1);
|
||||
- ent->need_endgrent = true;
|
||||
- }
|
||||
- ent->skip_initgroups_dyn = true;
|
||||
-
|
||||
return getgrent_next_nss (ent, buffer, buflen, user, group,
|
||||
start, size, groupsp, limit, errnop);
|
||||
}
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 7 04:12:05 CEST 2010 - pbaudis@suse.cz
|
||||
|
||||
- Fix NIS-compat initgroups routine to work reliably over multiple
|
||||
invocations [bnc#607064]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 1 19:52:56 UTC 2010 - jengelh@medozas.de
|
||||
|
||||
|
@ -137,6 +137,7 @@ Patch61: glibc-ppc64-vdso-time.diff
|
||||
Patch64: glibc-gai-private4.diff
|
||||
Patch65: glibc-resolv-mdnshint.diff
|
||||
Patch66: glibc-ldconfigr-aux.diff
|
||||
Patch67: glibc-nis-initgroups.diff
|
||||
Patch500: ARM_glibc-2.10.1-local-eabi-wchar.diff
|
||||
Patch501: ARM_glibc-2.10.1-local-hwcap-updates.diff
|
||||
Patch502: ARM_glibc-2.10.1-local-lowlevellock.diff
|
||||
@ -359,6 +360,7 @@ rm nscd/s-stamp
|
||||
%patch64
|
||||
%patch65 -p1
|
||||
%patch66 -p1
|
||||
%patch67 -p1
|
||||
%ifarch %arm armv5tel armv7l
|
||||
%patch500
|
||||
%patch501
|
||||
|
Loading…
Reference in New Issue
Block a user