This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: nscd_getnetgrent in inet/getnetgrent_r.c
> Roland McGrath <roland@hack.frob.com> writes:
>
> > Can someone explain the function nscd_getnetgrent and its use to me?
>
> I think it's for parsing the data received from nscd.
Yes, I think so too. But I don't understand exactly how it fits in.
So it's not very clear to me how it could be disabled without affecting
non-nscd cases at all. That's why I was asking.
nss_files, nss_nis, and nss_nisplus also set the data/data_size fields of
struct __netgroup to nonzero values. I can't quite tell if that is just
their own internal use of the same data structure, or if it's meant to be
used generically for state between multiple getnetgrent_r calls, not just
for nscd. The real question is when __netgroup.nip is ever set to
(service_user *) -1l, as that's the condition when nscd_getnetgrent is
used. Looking closer, __nscd_setnetgrent seems to be the only place that
sets that value, so in fact this is only for nscd.
Please verify my analysis.
Thanks,
Roland