NSS error reporting (bug 20532)

Florian Weimer fweimer@redhat.com
Thu Aug 3 17:18:00 GMT 2017


On 08/03/2017 06:49 PM, Carlos O'Donell wrote:
> On 08/03/2017 12:28 PM, Florian Weimer wrote:
>> (L) Carlos added NSS_STATUS_NOTFOUND with *errnop equals 0 as a
>> documented special case to the manual, in commit
>> d4e301c5c65393837e438b6d81feabfbfde7b9c7.  This contradicts (A).
>> NSS_STATUS_NOTFOUND is handled implicitly by __nss_next2, which does not
>> have access to the errno value, so I do not understand how this could work.

> I must assume that (A) is not quite correct. I had two reproducers where
> errno was propagated to the caller, and did result in observable differences?

Can you dig up the details?  And what was fixed in response to this
clarification?

Are you sure this wasn't due to a NSS framework bug?

If errno is indeed propagated, then setting it 0 is probably wrong
because POSIX does not allow setting it to 0.

Thanks,
Florian



More information about the Libc-alpha mailing list