This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: NSS error reporting (bug 20532)
- From: Florian Weimer <fweimer at redhat dot com>
- To: Zack Weinberg <zackw at panix dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 4 Aug 2017 11:09:03 +0200
- Subject: Re: NSS error reporting (bug 20532)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=fweimer at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D334580468
- References: <c128f474-992e-c7de-5fae-a2437778c1eb@redhat.com> <CAKCAbMjZODzsYcrrxS7tWYBoXJCTQ6JUbto22DPJRGwxv1K59g@mail.gmail.com>
On 08/03/2017 07:09 PM, Zack Weinberg wrote:
> On Thu, Aug 3, 2017 at 12:28 PM, Florian Weimer <fweimer@redhat.com> wrote:
>> I'm looking again at bug 20532 and related issues.
>>
>> The core problem is that the NSS service functions have many different
>> ways of reporting result status:
>
> It might be useful to make a list of _external conditions_, as
> exhaustive as possible, and reason out what the visible results [at
> the level of the documented interface] _should be_ for each one.
>
> For instance, for gethostbyname:
>
> - address records successfully retrieved - returns nonnull, ideally
> h_errno and errno are unmodified
> - configured DNS server returned a NXDOMAIN packet - returns NULL,
> h_errno set to HOST_NOT_FOUND, ideally errno unmodified
> - query to configured DNS server times out - h_errno set to TRY_AGAIN?
> - etc
Interesting idea. But nss_dns is very complex internally, too, so that
would be too many moving parts. But looking at nss_files this way might
be helpful.
Thanks,
Florian