This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] getaddrinfo: Fix error handling in gethosts [BZ #21915] [BZ #21922]
- From: Florian Weimer <fweimer at redhat dot com>
- To: libc-alpha at sourceware dot org
- Date: Thu, 31 Aug 2017 11:55:10 +0200
- Subject: Re: [PATCH] getaddrinfo: Fix error handling in gethosts [BZ #21915] [BZ #21922]
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx02.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 84176883C4
- References: <20170808170148.218B74029923B@oldenburg.str.redhat.com>
On 08/08/2017 07:01 PM, Florian Weimer wrote:
> The old code uses errno as the primary indicator for success or
> failure. This is wrong because errno is only set for specific
> combinations of the status return value and the h_errno variable.
>
> 2017-08-08 Florian Weimer <fweimer@redhat.com>
>
> [BZ #21915]
> [BZ #21922]
> * sysdeps/posix/getaddrinfo.c (gethosts): Look at NSS function
> result to determine success or failure, not the errno value.
> * nss/Makefile (tests): Add tst-nss-files-hosts-erange.
> (tst-nss-files-hosts-erange): Link with -ldl.
> * nss/tst-nss-files-hosts-erange.c: New file.
> * nss/tst-resolv-basic.c (response): Handle nodata.example.
> (do_test): Add NO_DATA tests.
> * resolv/tst-resolv-basic.c (test_nodata_nxdomain): New function.
> (do_test): Call it.
Ping? I'd really like to have a second take on this patch and its
precursors.
<https://sourceware.org/ml/libc-alpha/2017-08/msg00292.html>
Thanks,
Florian