Author: aurel32
Date: 2009-12-25 13:59:35 +0000 (Fri, 25 Dec 2009)
New Revision: 4035

Added:
   glibc-package/trunk/debian/patches/any/cvs-nis-not-configured.diff
Removed:
   glibc-package/trunk/debian/patches/any/submitted-nis-not-configured.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
  * Replace debian/any/submitted-nis-not-configured.diff by upstream patch
    debian/any/cvs-nis-not-configured.diff.



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog        2009-12-25 03:40:59 UTC (rev 
4034)
+++ glibc-package/trunk/debian/changelog        2009-12-25 13:59:35 UTC (rev 
4035)
@@ -12,6 +12,8 @@
     buildds kernels now that they have been upgraded.
   * debian/control.in/main: add a Homepage: pseudo header.  Closes: #561034.
   * debian/local/manpages/gai.conf.5: fix a typo.  Closes: #560144. 
+  * Replace debian/any/submitted-nis-not-configured.diff by upstream patch
+    debian/any/cvs-nis-not-configured.diff.
 
   [ Samuel Thibault ]
   * testsuite-checking/expected-results-i486-linux-gnu-libc: Add hurd-i386
@@ -25,7 +27,7 @@
   [ Petr Salinger]
   * kfreebsd/local-sysdeps.diff: update to revision 2904 (from glibc-bsd).
 
- -- Aurelien Jarno <aure...@debian.org>  Wed, 23 Dec 2009 15:44:38 +0100
+ -- Aurelien Jarno <aure...@debian.org>  Fri, 25 Dec 2009 14:58:49 +0100
 
 eglibc (2.10.2-2) unstable; urgency=low
 

Added: glibc-package/trunk/debian/patches/any/cvs-nis-not-configured.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/cvs-nis-not-configured.diff          
                (rev 0)
+++ glibc-package/trunk/debian/patches/any/cvs-nis-not-configured.diff  
2009-12-25 13:59:35 UTC (rev 4035)
@@ -0,0 +1,269 @@
+2009-12-10  Ulrich Drepper  <drep...@redhat.com>
+
+       [BZ #11000]
+       * nis/nss_nis/nis-hosts.c (_nss_nis_gethostbyname4_r): Always set
+       *herrnop before returning.
+       * nis/nss_nisplus/nisplus-hosts.c (internal_gethostbyname2_r):
+       Likewise.
+       * nss/nss_files/files-hosts.c (_nss_files_gethostbyname4_r): Handle
+       TRYAGAIN errors separately.
+       * sysdeps/posix/getaddrinfo.c (gaih_inet): Fix error handling of
+       *name4_r after functions.
+
+
+--- a/nis/nss_nis/nis-hosts.c
++++ b/nis/nss_nis/nis-hosts.c
+@@ -70,20 +70,20 @@ LINE_PARSER
+      {
+        assert ((flags & AI_V4MAPPED) == 0 || af != AF_UNSPEC);
+        if (flags & AI_V4MAPPED)
+-         {
+-           map_v4v6_address ((char *) entdata->host_addr,
+-                             (char *) entdata->host_addr);
+-           result->h_addrtype = AF_INET6;
+-           result->h_length = IN6ADDRSZ;
+-         }
++       {
++         map_v4v6_address ((char *) entdata->host_addr,
++                           (char *) entdata->host_addr);
++         result->h_addrtype = AF_INET6;
++         result->h_length = IN6ADDRSZ;
++       }
+        else
+-         {
+-           result->h_addrtype = AF_INET;
+-           result->h_length = INADDRSZ;
+-         }
++       {
++         result->h_addrtype = AF_INET;
++         result->h_length = INADDRSZ;
++       }
+      }
+    else if (af != AF_INET
+-            && inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
++          && inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
+      {
+        result->h_addrtype = AF_INET6;
+        result->h_length = IN6ADDRSZ;
+@@ -164,14 +164,14 @@ internal_nis_gethostent_r (struct hostent *host, char 
*buffer,
+       int keylen;
+       int yperr;
+       if (new_start)
+-        yperr = yp_first (domain, "hosts.byname", &outkey, &keylen, &result,
++      yperr = yp_first (domain, "hosts.byname", &outkey, &keylen, &result,
+                         &len);
+       else
+-        yperr = yp_next (domain, "hosts.byname", oldkey, oldkeylen, &outkey,
++      yperr = yp_next (domain, "hosts.byname", oldkey, oldkeylen, &outkey,
+                        &keylen, &result, &len);
+ 
+       if (__builtin_expect (yperr != YPERR_SUCCESS, 0))
+-        {
++      {
+         enum nss_status retval = yperr2nss (yperr);
+ 
+         switch (retval)
+@@ -191,12 +191,12 @@ internal_nis_gethostent_r (struct hostent *host, char 
*buffer,
+       }
+ 
+       if (__builtin_expect ((size_t) (len + 1) > linebuflen, 0))
+-        {
+-          free (result);
++      {
++        free (result);
+         *h_errnop = NETDB_INTERNAL;
+-          *errnop = ERANGE;
+-          return NSS_STATUS_TRYAGAIN;
+-        }
++        *errnop = ERANGE;
++        return NSS_STATUS_TRYAGAIN;
++      }
+ 
+       char *p = strncpy (data->linebuffer, result, len);
+       data->linebuffer[len] = '\0';
+@@ -233,7 +233,7 @@ _nss_nis_gethostent_r (struct hostent *host, char *buffer, 
size_t buflen,
+   __libc_lock_lock (lock);
+ 
+   status = internal_nis_gethostent_r (host, buffer, buflen, errnop, h_errnop,
+-                      ((_res.options & RES_USE_INET6) ? AF_INET6 : AF_INET),
++                      ((_res.options & RES_USE_INET6) ? AF_INET6 : AF_INET),
+                       ((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0 ));
+ 
+   __libc_lock_unlock (lock);
+@@ -346,7 +346,7 @@ _nss_nis_gethostbyname2_r (const char *name, int af, 
struct hostent *host,
+ 
+   return internal_gethostbyname2_r (name, af, host, buffer, buflen, errnop,
+                                   h_errnop,
+-                      ((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0));
++                      ((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0));
+ }
+ 
+ 
+@@ -456,7 +456,10 @@ _nss_nis_gethostbyname4_r (const char *name, struct 
gaih_addrtuple **pat,
+ {
+   char *domain;
+   if (yp_get_default_domain (&domain))
+-    return NSS_STATUS_UNAVAIL;
++    {
++      *herrnop = NO_DATA;
++      return NSS_STATUS_UNAVAIL;
++    }
+ 
+   /* Convert name to lowercase.  */
+   size_t namlen = strlen (name);
+--- a/nis/nss_nisplus/nisplus-hosts.c
++++ b/nis/nss_nisplus/nisplus-hosts.c
+@@ -1,4 +1,4 @@
+-/* Copyright (C) 1997-2003, 2005, 2006, 2008 Free Software Foundation, Inc.
++/* Copyright (C) 1997-2003, 2005, 2006, 2008, 2009 Free Software Foundation, 
Inc.
+    This file is part of the GNU C Library.
+    Contributed by Thorsten Kukuk <ku...@suse.de>, 1997.
+ 
+@@ -38,10 +38,10 @@ static nis_name tablename_val;
+ static u_long tablename_len;
+ 
+ #define NISENTRYVAL(idx, col, res) \
+-        (NIS_RES_OBJECT 
(res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val)
++      (NIS_RES_OBJECT 
(res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val)
+ 
+ #define NISENTRYLEN(idx, col, res) \
+-        (NIS_RES_OBJECT 
(res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len)
++      (NIS_RES_OBJECT 
(res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len)
+ 
+ /* Get implementation for some internal functions. */
+ #include <resolv/mapv4v6addr.h>
+@@ -287,15 +287,15 @@ internal_nisplus_gethostent_r (struct hostent *host, 
char *buffer,
+             return NSS_STATUS_TRYAGAIN;
+           }
+         if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
+-            {
+-              enum nss_status retval = niserr2nss (result->status);
+-              if (retval == NSS_STATUS_TRYAGAIN)
+-                {
+-                  *herrnop = NETDB_INTERNAL;
+-                  *errnop = errno;
+-                }
+-              return retval;
+-            }
++          {
++            enum nss_status retval = niserr2nss (result->status);
++            if (retval == NSS_STATUS_TRYAGAIN)
++              {
++                *herrnop = NETDB_INTERNAL;
++                *errnop = errno;
++              }
++            return retval;
++          }
+ 
+       }
+       else
+@@ -308,18 +308,18 @@ internal_nisplus_gethostent_r (struct hostent *host, 
char *buffer,
+             return NSS_STATUS_TRYAGAIN;
+           }
+         if (niserr2nss (result->status) != NSS_STATUS_SUCCESS)
+-            {
+-              enum nss_status retval= niserr2nss (result->status);
++          {
++            enum nss_status retval= niserr2nss (result->status);
+ 
+             nis_freeresult (result);
+             result = saved_res;
+-              if (retval == NSS_STATUS_TRYAGAIN)
+-                {
+-                  *herrnop = NETDB_INTERNAL;
++            if (retval == NSS_STATUS_TRYAGAIN)
++              {
++                *herrnop = NETDB_INTERNAL;
+                 *errnop = errno;
+-                }
+-              return retval;
+-            }
++              }
++            return retval;
++          }
+       }
+ 
+       if (_res.options & RES_USE_INET6)
+@@ -330,13 +330,13 @@ internal_nisplus_gethostent_r (struct hostent *host, 
char *buffer,
+                                               buflen, errnop, 0);
+ 
+       if (parse_res == -1)
+-        {
++      {
+         nis_freeresult (result);
+         result = saved_res;
+-          *herrnop = NETDB_INTERNAL;
++        *herrnop = NETDB_INTERNAL;
+         *errnop = ERANGE;
+-          return NSS_STATUS_TRYAGAIN;
+-        }
++        return NSS_STATUS_TRYAGAIN;
++      }
+       if (saved_res != NULL)
+       nis_freeresult (saved_res);
+ 
+@@ -435,6 +435,7 @@ internal_gethostbyname2_r (const char *name, int af, 
struct hostent *host,
+   if (result == NULL)
+     {
+       *errnop = ENOMEM;
++      *herrnop = NETDB_INTERNAL;
+       return NSS_STATUS_TRYAGAIN;
+     }
+ 
+@@ -444,10 +445,13 @@ internal_gethostbyname2_r (const char *name, int af, 
struct hostent *host,
+       if (retval == NSS_STATUS_TRYAGAIN)
+       {
+         *errnop = errno;
+-        *herrnop = NETDB_INTERNAL;
++        *herrnop = TRY_AGAIN;
+       }
+       else
+-      __set_errno (olderr);
++      {
++        __set_errno (olderr);
++        *herrnop = NETDB_INTERNAL;
++      }
+       nis_freeresult (result);
+       return retval;
+     }
+@@ -502,7 +506,7 @@ _nss_nisplus_gethostbyname_r (const char *name, struct 
hostent *host,
+                                         buflen, errnop, h_errnop,
+                                         AI_V4MAPPED);
+       if (status == NSS_STATUS_SUCCESS)
+-        return status;
++      return status;
+     }
+ 
+   return internal_gethostbyname2_r (name, AF_INET, host, buffer,
+--- a/nss/nss_files/files-hosts.c
++++ b/nss/nss_files/files-hosts.c
+@@ -423,6 +423,11 @@ _nss_files_gethostbyname4_r (const char *name, struct 
gaih_addrtuple **pat,
+       if (! keep_stream)
+       internal_endent ();
+     }
++  else if (status == NSS_STATUS_TRYAGAIN)
++    {
++      *errnop = errno;
++      *herrnop = TRY_AGAIN;
++    }
+   else
+     {
+       *errnop = errno;
+--- a/sysdeps/posix/getaddrinfo.c
++++ b/sysdeps/posix/getaddrinfo.c
+@@ -719,13 +719,8 @@ gaih_inet (const char *name, const struct gaih_service 
*service,
+                     if (status != NSS_STATUS_TRYAGAIN
+                         || rc != ERANGE || herrno != NETDB_INTERNAL)
+                       {
+-                        if (herrno == NETDB_INTERNAL)
+-                          {
+-                            __set_h_errno (herrno);
+-                            _res.options = old_res_options;
+-                            return -EAI_SYSTEM;
+-                          }
+-                        if (herrno == TRY_AGAIN)
++                        if (status == NSS_STATUS_TRYAGAIN
++                            && herrno == TRY_AGAIN)
+                           no_data = EAI_AGAIN;
+                         else
+                           no_data = herrno == NO_DATA;

Deleted: 
glibc-package/trunk/debian/patches/any/submitted-nis-not-configured.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/submitted-nis-not-configured.diff    
2009-12-25 03:40:59 UTC (rev 4034)
+++ glibc-package/trunk/debian/patches/any/submitted-nis-not-configured.diff    
2009-12-25 13:59:35 UTC (rev 4035)
@@ -1,20 +0,0 @@
-2009-11-22  Aurelien Jarno  <aurel...@aurel32.net>
-
-       * nis/nss_nis/nis-hosts.c (_nss_nis_gethostbyname4_r): If
-       NIS is not configured, set errnop and herrnop appropriately.
-
---- a/nis/nss_nis/nis-hosts.c
-+++ b/nis/nss_nis/nis-hosts.c
-@@ -456,7 +456,11 @@ _nss_nis_gethostbyname4_r (const char *name, struct 
gaih_addrtuple **pat,
- {
-   char *domain;
-   if (yp_get_default_domain (&domain))
--    return NSS_STATUS_UNAVAIL;
-+    {
-+      *herrnop = HOST_NOT_FOUND;
-+      *errnop = errno;
-+      return NSS_STATUS_UNAVAIL;
-+    }
- 
-   /* Convert name to lowercase.  */
-   size_t namlen = strlen (name);

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series   2009-12-25 03:40:59 UTC (rev 
4034)
+++ glibc-package/trunk/debian/patches/series   2009-12-25 13:59:35 UTC (rev 
4035)
@@ -215,6 +215,6 @@
 any/cvs-ksm.diff
 any/submitted-bits-fcntl_h-at.diff
 any/cvs-sched_h.diff
-any/submitted-nis-not-configured.diff
+any/cvs-nis-not-configured.diff
 any/submitted-getaddrinfo-nodata.diff
 any/submitted-gethostbyname3.diff


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to