This is the mail archive of the glibc-bugs@sourceware.org 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]

[Bug nss/21915] nss_files can return with NSS_STATUS_SUCCESS and a clobbered errno value, causing getaddrinfo to fail


https://sourceware.org/bugzilla/show_bug.cgi?id=21915

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, release/2.26/master has been updated
       via  a71a3374cd8cf53776c33994f69ec184c26f2129 (commit)
       via  7966331555df43bb7e2a55ce5a17a330e57f487f (commit)
       via  7ab87bccb657b02cac5a3360b11c67aff901de2e (commit)
       via  8f46c6052408a23a77ecf46aa378120c1a4afe37 (commit)
       via  701f7873da013fb19d9120317322cd78333e63c2 (commit)
       via  bdd8422cfb1fe04cb20617495156fb232b00d23c (commit)
      from  5253749232749adb535d9b2bf7d43173b191ebef (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a71a3374cd8cf53776c33994f69ec184c26f2129

commit a71a3374cd8cf53776c33994f69ec184c26f2129
Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon Sep 4 11:27:24 2017 +0200

    getaddrinfo: Fix error handling in gethosts [BZ #21915] [BZ #21922]

    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.

    (cherry picked from commit f4a6be2582b8dfe8adfa68da3dd8decf566b3983)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7966331555df43bb7e2a55ce5a17a330e57f487f

commit 7966331555df43bb7e2a55ce5a17a330e57f487f
Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon Sep 4 11:25:34 2017 +0200

    getaddrinfo: Return EAI_NODATA if gethostbyname2_r reports NO_DATA [BZ
#21922]

    (cherry picked from commit 5f8340f583fe3d4f5734bd2371c5a45ecff2db0d)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7ab87bccb657b02cac5a3360b11c67aff901de2e

commit 7ab87bccb657b02cac5a3360b11c67aff901de2e
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Sep 1 08:57:52 2017 +0200

    getaddrinfo: In gaih_inet, use h_errno for certain status values only

    h_errno is not set for NSS_STATUS_SUCCESS, so its value might not be
    accurate at this point.

    (cherry picked from commit a2881ef01450295782b065f2f850f340d5c12c14)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8f46c6052408a23a77ecf46aa378120c1a4afe37

commit 8f46c6052408a23a77ecf46aa378120c1a4afe37
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Sep 1 08:57:28 2017 +0200

    getaddrinfo: Properly set errno for NSS function lookup failure

    (cherry picked from commit ad816a5e00ce891a2cea8187638fa0e00f83aaf6)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=701f7873da013fb19d9120317322cd78333e63c2

commit 701f7873da013fb19d9120317322cd78333e63c2
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Sep 1 08:57:07 2017 +0200

    getaddrinfo: Use &h_errno has the h_errno pointer

    This simplifies the code because it is not necessary to propagate the
    temporary h_errno value to the thread-local variable.  It also increases
    compatibility with NSS modules which update only one of the two places.

    (cherry picked from commit 53250a21b81474ef4e78090a4a9a63d8471e1091)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bdd8422cfb1fe04cb20617495156fb232b00d23c

commit bdd8422cfb1fe04cb20617495156fb232b00d23c
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Sep 1 08:56:46 2017 +0200

    getaddrinfo: Use &errno has the errno pointer

    Similar code in nss/getXXbyYY_r.c is already using &errno as the
    argument.

    (cherry picked from commit 924b121c5978689001ae28cf1c8497371dad4f71)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                        |   42 +++++++++++++
 NEWS                             |    2 +
 nss/Makefile                     |    7 ++
 nss/tst-nss-files-hosts-erange.c |  109 ++++++++++++++++++++++++++++++++++
 resolv/tst-resolv-basic.c        |   78 +++++++++++++++++-------
 sysdeps/posix/getaddrinfo.c      |  122 +++++++++++++++++++-------------------
 6 files changed, 276 insertions(+), 84 deletions(-)
 create mode 100644 nss/tst-nss-files-hosts-erange.c

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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