This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Return proper status from _nss_nis_initgroups_dyn (bug 20262)
- From: Andreas Schwab <schwab at suse dot de>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 27 Jun 2016 09:17:35 +0200
- Subject: Re: [PATCH] Return proper status from _nss_nis_initgroups_dyn (bug 20262)
- Authentication-results: sourceware.org; auth=none
- References: <54EF320A dot 90409 at redhat dot com> <mvmr3bxw7m8 dot fsf at hawking dot suse dot de> <2827f318-c970-7108-1ecd-c2a73aaa66e1 at redhat dot com>
Florian Weimer <fweimer@redhat.com> writes:
> On 06/16/2016 04:06 PM, Andreas Schwab wrote:
>> [BZ #20262]
>> * nis/nss_nis/nis-initgroups.c (_nss_nis_initgroups_dyn): Return
>> NSS_STATUS_SUCCESS when done. Return NSS_STATUS_TRYAGAIN when out
>> of memory.
>
> Thanks for the patch.
>
> What about this loop exit?
>
> if (limit > 0 && *size == limit)
> /* We reached the maximum. */
> goto done;
>
> Shouldn't the caller somehow learn about truncation?
This is a system limit (NGROUPS_MAX), so I don't think the caller can do
anything about it anyway.
> Is the internal initgroups_dyn interface used by anything else but nscd?
This is about NSS, nscd is just the cache.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."