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 libc/11001] New: getaddrinfo if a nss plugin returns NSS_STATUS_UNAVAIL with herrno = TRY_AGAIN or NO_DATA


When a nss plugin returns NSS_STATUS_UNAVAIL with herrno = TRY_AGAIN or NO_DATA,
the no_data variable in gaih_inet() is set to a non-zero value. This variable is
used to signal to the rest of the gaih_inet procedure that no results are
available, which ignores the results of the other plugins.

This value should be reset upon success, like in the patch below:
--- a/sysdeps/posix/getaddrinfo.c       2010-11-22 16:21:19.000000000 -0500
+++ b/sysdeps/posix/getaddrinfo.c       2009-11-22 16:28:26.000000000 -0500
@@ -715,7 +715,10 @@ gaih_inet (const char *name, const struc
                                                   tmpbuflen, &rc, &herrno,
                                                   NULL));
                      if (status == NSS_STATUS_SUCCESS)
-                       break;
+                       {
+                         no_data = 0;
+                         break;
+                       }
                      if (status != NSS_STATUS_TRYAGAIN
                          || rc != ERANGE || herrno != NETDB_INTERNAL)
                        {

-- 
           Summary: getaddrinfo if a nss plugin returns NSS_STATUS_UNAVAIL
                    with herrno = TRY_AGAIN or NO_DATA
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: aurelien at aurel32 dot net
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=11001

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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