Author: aurel32
Date: 2010-09-02 18:36:03 +0000 (Thu, 02 Sep 2010)
New Revision: 4414

Added:
   glibc-package/trunk/debian/patches/any/submitted-etc-resolv.conf.diff
Removed:
   glibc-package/trunk/debian/patches/any/cvs-etc-resolv.conf.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
  * Replace any/cvs-etc-resolv.conf.diff by my previous version 
    any/submitted-etc-resolv.conf.diff. At least it really fixes the
    original issue.  Closes: bug#595269.



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog        2010-09-02 05:18:56 UTC (rev 
4413)
+++ glibc-package/trunk/debian/changelog        2010-09-02 18:36:03 UTC (rev 
4414)
@@ -3,8 +3,13 @@
   [ Samuel Thibault ]
   * mv patches/hurd-i386/{submitted,cvs}-sched_param.diff.
 
- -- Samuel Thibault <sthiba...@debian.org>  Thu, 02 Sep 2010 03:57:04 +0200
+  [ Aurelien Jarno ]
+  * Replace any/cvs-etc-resolv.conf.diff by my previous version 
+    any/submitted-etc-resolv.conf.diff. At least it really fixes the
+    original issue.  Closes: bug#595269.
 
+ -- Aurelien Jarno <aure...@debian.org>  Thu, 02 Sep 2010 20:34:51 +0200
+
 eglibc (2.11.2-4) unstable; urgency=low
 
   [ Samuel Thibault ]

Deleted: glibc-package/trunk/debian/patches/any/cvs-etc-resolv.conf.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/cvs-etc-resolv.conf.diff     
2010-09-02 05:18:56 UTC (rev 4413)
+++ glibc-package/trunk/debian/patches/any/cvs-etc-resolv.conf.diff     
2010-09-02 18:36:03 UTC (rev 4414)
@@ -1,104 +0,0 @@
-2010-08-25  Ulrich Drepper  <drep...@redhat.com>
-
-       [BZ #10851]
-       * resolv/res_init.c (__res_vinit): When no server address at all
-       is given default to loopback.
-
-diff --git a/resolv/res_init.c b/resolv/res_init.c
-index 40dbe7d..202569d 100644
---- a/resolv/res_init.c
-+++ b/resolv/res_init.c
-@@ -176,13 +176,6 @@ __res_vinit(res_state statp, int preinit) {
-               statp->id = res_randomid();
-       }
- 
--#ifdef USELOOPBACK
--      statp->nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1);
--#else
--      statp->nsaddr.sin_addr.s_addr = INADDR_ANY;
--#endif
--      statp->nsaddr.sin_family = AF_INET;
--      statp->nsaddr.sin_port = htons(NAMESERVER_PORT);
-       statp->nscount = 0;
-       statp->ndots = 1;
-       statp->pfcode = 0;
-@@ -321,24 +314,24 @@ __res_vinit(res_state statp, int preinit) {
-                       nserv++;
- #ifdef _LIBC
-                       nservall++;
--                    } else {
--                        struct in6_addr a6;
--                        char *el;
-+                  } else {
-+                      struct in6_addr a6;
-+                      char *el;
- 
--                        if ((el = strchr(cp, '\n')) != NULL)
--                            *el = '\0';
-+                      if ((el = strchr(cp, '\n')) != NULL)
-+                          *el = '\0';
-                       if ((el = strchr(cp, SCOPE_DELIMITER)) != NULL)
-                           *el = '\0';
--                        if ((*cp != '\0') &&
--                            (inet_pton(AF_INET6, cp, &a6) > 0)) {
--                            struct sockaddr_in6 *sa6;
--
--                            sa6 = malloc(sizeof(*sa6));
--                            if (sa6 != NULL) {
--                                sa6->sin6_family = AF_INET6;
--                                sa6->sin6_port = htons(NAMESERVER_PORT);
-+                      if ((*cp != '\0') &&
-+                          (inet_pton(AF_INET6, cp, &a6) > 0)) {
-+                          struct sockaddr_in6 *sa6;
-+
-+                          sa6 = malloc(sizeof(*sa6));
-+                          if (sa6 != NULL) {
-+                              sa6->sin6_family = AF_INET6;
-+                              sa6->sin6_port = htons(NAMESERVER_PORT);
-                               sa6->sin6_flowinfo = 0;
--                                sa6->sin6_addr = a6;
-+                              sa6->sin6_addr = a6;
- 
-                               if (__builtin_expect (el == NULL, 1))
-                                   sa6->sin6_scope_id = 0;
-@@ -365,9 +358,9 @@ __res_vinit(res_state statp, int preinit) {
-                               statp->_u._ext.nsaddrs[nservall] = sa6;
-                               statp->_u._ext.nssocks[nservall] = -1;
-                               statp->_u._ext.nsmap[nservall] = MAXNS + 1;
--                                nservall++;
--                            }
--                        }
-+                              nservall++;
-+                          }
-+                      }
- #endif
-                   }
-                   continue;
-@@ -433,6 +426,11 @@ __res_vinit(res_state statp, int preinit) {
- #endif
-           (void) fclose(fp);
-       }
-+      if (__builtin_expect(statp->nscount == 0, 0)) {
-+          statp->nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1);
-+          statp->nsaddr.sin_family = AF_INET;
-+          statp->nsaddr.sin_port = htons(NAMESERVER_PORT);
-+      }
-       if (statp->defdname[0] == 0 &&
-           __gethostname(buf, sizeof(statp->defdname) - 1) == 0 &&
-           (cp = strchr(buf, '.')) != NULL)
-@@ -538,12 +536,12 @@ res_setoptions(res_state statp, const char *options, 
const char *source) {
-               } else if (!strncmp(cp, "no-check-names",
-                                   sizeof("no-check-names") - 1)) {
-                       statp->options |= RES_NOCHECKNAME;
--                } else if (!strncmp(cp, "edns0", sizeof("edns0") - 1)) {
-+              } else if (!strncmp(cp, "edns0", sizeof("edns0") - 1)) {
-                       statp->options |= RES_USE_EDNS0;
--                } else if (!strncmp(cp, "single-request-reopen",
-+              } else if (!strncmp(cp, "single-request-reopen",
-                                   sizeof("single-request-reopen") - 1)) {
-                       statp->options |= RES_SNGLKUPREOP;
--                } else if (!strncmp(cp, "single-request",
-+              } else if (!strncmp(cp, "single-request",
-                                   sizeof("single-request") - 1)) {
-                       statp->options |= RES_SNGLKUP;
-               } else {

Added: glibc-package/trunk/debian/patches/any/submitted-etc-resolv.conf.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/submitted-etc-resolv.conf.diff       
                        (rev 0)
+++ glibc-package/trunk/debian/patches/any/submitted-etc-resolv.conf.diff       
2010-09-02 18:36:03 UTC (rev 4414)
@@ -0,0 +1,42 @@
+2009-11-08  Aurelien Jarno  <aurel...@aurel32.net>
+
+       * resolv/res_init.c (__res_vinit): Initialize nameserver to the
+       loopback address if none specified.
+
+---
+ resolv/res_init.c |   17 ++++++++++-------
+ 1 file changed, 10 insertions(+), 7 deletions(-)
+
+--- a/resolv/res_init.c
++++ b/resolv/res_init.c
+@@ -176,13 +176,6 @@
+               statp->id = res_randomid();
+       }
+ 
+-#ifdef USELOOPBACK
+-      statp->nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1);
+-#else
+-      statp->nsaddr.sin_addr.s_addr = INADDR_ANY;
+-#endif
+-      statp->nsaddr.sin_family = AF_INET;
+-      statp->nsaddr.sin_port = htons(NAMESERVER_PORT);
+       statp->nscount = 0;
+       statp->ndots = 1;
+       statp->pfcode = 0;
+@@ -433,6 +426,16 @@
+ #endif
+           (void) fclose(fp);
+       }
++      if (statp->nscount == 0) {
++          statp->nscount = 1;
++#ifdef USELOOPBACK
++          statp->nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1);
++#else
++          statp->nsaddr.sin_addr.s_addr = INADDR_ANY;
++#endif
++          statp->nsaddr.sin_family = AF_INET;
++          statp->nsaddr.sin_port = htons(NAMESERVER_PORT);
++      }
+       if (statp->defdname[0] == 0 &&
+           __gethostname(buf, sizeof(statp->defdname) - 1) == 0 &&
+           (cp = strchr(buf, '.')) != NULL)

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series   2010-09-02 05:18:56 UTC (rev 
4413)
+++ glibc-package/trunk/debian/patches/series   2010-09-02 18:36:03 UTC (rev 
4414)
@@ -234,6 +234,7 @@
 any/local-getaddrinfo-interface.diff
 any/submitted-autotools.diff
 any/submitted-accept4-hidden.diff
+any/submitted-etc-resolv.conf.diff
 any/submitted-localedef-mmap.diff
 any/submitted-missing-etc-hosts.diff
 any/submitted-bits-fcntl_h-at.diff
@@ -258,5 +259,4 @@
 any/cvs-redirect-throw.diff
 #any/cvs-flush-cache-textrels.diff
 any/cvs-__block.diff
-any/cvs-etc-resolv.conf.diff
 any/cvs-sunrpc-license.diff


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1oredr-0000mq...@alioth.debian.org

Reply via email to