This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: NSS error reporting (bug 20532)

On 08/03/2017 07:09 PM, Zack Weinberg wrote:
> On Thu, Aug 3, 2017 at 12:28 PM, Florian Weimer <> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]