[PATCH 1/1] nss: files-initgroups.c use shared nss parse tools
Florian Weimer
fweimer@redhat.com
Mon Mar 9 13:43:25 GMT 2026
* Carlos O'Donell:
> On 3/5/26 9:17 AM, Patrick Riehecky wrote:
>>> In general, getline is more efficient than retrying
>>> __nss_readline, even with an exponential buffer resizing policy.
>>
>> It sounds like I headed in the wrong direction... I'm fine to
>> abandon this plan rather than perform more invasive work on the
>> resolver. The current release works fine.
>>
>> My environment doesn't have very large group files, so I don't have
>> a great way to test those regressions.
>>
>> Thanks for the prompt review!
>
> Please note that pre-commit CI fails for this patch on the nscd-tst-nscd-basic.
> https://patchwork.sourceware.org/project/glibc/patch/20260304221715.1703198-3-riehecky@fnal.gov/
Yeah, was worring if we had a test for the error condition I mentioned
above. And indeed this test covers the scenario:
tst-nscd-basic.c:228: numeric comparison failure
left: 1 (0x1); from: getgrouplist ("user3", 1500, groups, &n)
right: 8998 (0x2326); from: expected
tst-nscd-basic.c:229: numeric comparison failure
left: 1 (0x1); from: n
right: 8998 (0x2326); from: expected
error: tst-nscd-basic.c:235: not true: found[i]
error: tst-nscd-basic.c:235: not true: found[i]
error: tst-nscd-basic.c:235: not true: found[i]
[…]
Thanks,
Florian
More information about the Libc-alpha
mailing list