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

Florian Weimer fweimer@redhat.com
Tue Jun 28 13:16:00 GMT 2016


On 06/27/2016 09:17 AM, Andreas Schwab wrote:
> 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.

Silent truncation still seems to be wrong.  But it's an unrelated issue.

>> Is the internal initgroups_dyn interface used by anything else but nscd?
>
> This is about NSS, nscd is just the cache.

I'm trying to figure out what the impact is.  Is it restricted to 
incorrect merging of data with the next service module, even in 
situations where NIS should be the sole data source?

Thanks,
Florian



More information about the Libc-alpha mailing list