This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Return proper status from _nss_nis_initgroups_dyn (bug 20262)


On 06/28/2016 04:40 PM, Andreas Schwab wrote:
Florian Weimer <fweimer@redhat.com> writes:

Now I'm really confused.  You are changing the group enumeration code,
after the potential call to initgroups_netid.

I don't understand this sentence at all.

For context, I've been trying to reproduce these issue and how it affects results returned by “id” and “getent initgroups”.

Regarding the most recent discussion, I believe the direct query support for NIS is in the function initgroups_netid (starting around line 150 in nis/nss_nis/nis-initgroups.c). If this cannot be used, nss_nis falls back to enumeration of the group database (lines 256 onwards, in _nss_nis_initgroups_dyn), gathering group IDs of those groups which contain the user (check is at line 287).

The broken status handling only affects this fallback code (group enumeration). Based on how this is called, I do not see any other forms of fallback. So I found your comment that the existing bug causes fallback to group enumeration most puzzling.

Rather, it seems to me that the caller ignores the error code and proceeds to merge the results even if _nss_nis_initgroups_dyn returned NSS_STATUS_NOTFOUND.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]