r4392 - in glibc-package/trunk/debian: . patches patches/any
Author: aurel32
Date: 2010-08-31 20:46:26 +0000 (Tue, 31 Aug 2010)
New Revision: 4392
Added:
glibc-package/trunk/debian/patches/any/cvs-etc-resolv.conf.diff
Removed:
glibc-package/trunk/debian/patches/any/submitted-etc-resolv.conf.diff
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/patches/series
Log:
* Replace any/submitted-etc-resolv.conf.diff by upstream version
patches/any/cvs-etc-resolv.conf.diff.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2010-08-31 20:38:43 UTC (rev 4391)
+++ glibc-package/trunk/debian/changelog 2010-08-31 20:46:26 UTC (rev 4392)
@@ -31,6 +31,8 @@
* Look for apache2.2-common instead of apache2-common in nsscheck.
Closes: #586527.
* Update Galician debconf translation, by Jorge Barreiro. Closes: #592807.
+ * Replace any/submitted-etc-resolv.conf.diff by upstream version
+ patches/any/cvs-etc-resolv.conf.diff.
-- Aurelien Jarno <aurel32@debian.org> Fri, 30 Jul 2010 22:18:39 +0200
Added: glibc-package/trunk/debian/patches/any/cvs-etc-resolv.conf.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/cvs-etc-resolv.conf.diff (rev 0)
+++ glibc-package/trunk/debian/patches/any/cvs-etc-resolv.conf.diff 2010-08-31 20:46:26 UTC (rev 4392)
@@ -0,0 +1,104 @@
+2010-08-25 Ulrich Drepper <drepper@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 {
Deleted: glibc-package/trunk/debian/patches/any/submitted-etc-resolv.conf.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/submitted-etc-resolv.conf.diff 2010-08-31 20:38:43 UTC (rev 4391)
+++ glibc-package/trunk/debian/patches/any/submitted-etc-resolv.conf.diff 2010-08-31 20:46:26 UTC (rev 4392)
@@ -1,42 +0,0 @@
-2009-11-08 Aurelien Jarno <aurelien@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-08-31 20:38:43 UTC (rev 4391)
+++ glibc-package/trunk/debian/patches/series 2010-08-31 20:46:26 UTC (rev 4392)
@@ -227,7 +227,6 @@
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
@@ -252,3 +251,4 @@
any/cvs-redirect-throw.diff
any/cvs-flush-cache-textrels.diff
any/cvs-__block.diff
+any/cvs-etc-resolv.conf.diff
Reply to: