packages: glibc/glibc.spec, glibc/glibc-bug-12684.patch (NEW) - rel 7; reve...

arekm arekm at pld-linux.org
Fri Jun 10 09:48:41 CEST 2011


Author: arekm                        Date: Fri Jun 10 07:48:41 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 7; revert fix for bug 12684 (causes segfaults in resolver code when ns is not reachable) - waiting for proper fix

---- Files affected:
packages/glibc:
   glibc.spec (1.914 -> 1.915) , glibc-bug-12684.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/glibc/glibc.spec
diff -u packages/glibc/glibc.spec:1.914 packages/glibc/glibc.spec:1.915
--- packages/glibc/glibc.spec:1.914	Tue Jun  7 15:04:51 2011
+++ packages/glibc/glibc.spec	Fri Jun 10 09:48:35 2011
@@ -36,7 +36,7 @@
 Summary(uk.UTF-8):	GNU libc версії
 Name:		glibc
 Version:	2.14
-Release:	6
+Release:	7
 Epoch:		6
 License:	LGPL v2.1+
 Group:		Libraries
@@ -85,6 +85,7 @@
 Patch38:	1055_all_glibc-resolv-dynamic.patch
 Patch39:	%{name}-git.patch
 Patch40:	%{name}-bad-fix.patch
+Patch41:	%{name}-bug-12684.patch
 URL:		http://www.gnu.org/software/libc/
 %{?with_selinux:BuildRequires:	audit-libs-devel}
 BuildRequires:	autoconf
@@ -951,6 +952,8 @@
 %patch38 -p1
 %patch39 -p1
 %patch40 -p1
+# revert broken fix
+%patch41 -p1 -R
 
 # cleanup backups after patching
 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
@@ -1742,6 +1745,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.915  2011/06/10 07:48:35  arekm
+- rel 7; revert fix for bug 12684 (causes segfaults in resolver code when ns is not reachable) - waiting for proper fix
+
 Revision 1.914  2011/06/07 13:04:51  arekm
 - eq fixed
 

================================================================
Index: packages/glibc/glibc-bug-12684.patch
diff -u /dev/null packages/glibc/glibc-bug-12684.patch:1.1
--- /dev/null	Fri Jun 10 09:48:41 2011
+++ packages/glibc/glibc-bug-12684.patch	Fri Jun 10 09:48:35 2011
@@ -0,0 +1,68 @@
+commit 4769ae77fc6c8dacea6476addb015c8797848cdd
+Author: Ulrich Drepper <drepper at gmail.com>
+Date:   Mon May 30 22:48:47 2011 -0400
+
+    Handle DNS server failures in case of AF_UNSPEC lookups correctly
+
+diff --git a/ChangeLog b/ChangeLog
+index 31719ab..dd4ad9e 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,5 +1,10 @@
+ 2011-05-30  Ulrich Drepper  <drepper at gmail.com>
+ 
++	[BZ #12684]
++	* resolv/res_send.c (__libc_res_nsend): Only go to the next name server
++	if both request failed.
++	(send_dg): In case of server errors clear resplen or *resplen2.
++
+ 	[BZ #12454]
+ 	* elf/dl-deps.c (_dl_map_object_deps): Run initializer sorting only
+ 	when there are multiple maps.
+diff --git a/resolv/res_send.c b/resolv/res_send.c
+index 845b658..97142b7 100644
+--- a/resolv/res_send.c
++++ b/resolv/res_send.c
+@@ -549,7 +549,7 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
+ 				    ns, ansp, ansp2, nansp2, resplen2);
+ 			if (n < 0)
+ 				return (-1);
+-			if (n == 0)
++			if (n == 0 && (buf2 == NULL || resplen2 == 0))
+ 				goto next_ns;
+ 		} else {
+ 			/* Use datagrams. */
+@@ -559,7 +559,7 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
+ 				    ansp2, nansp2, resplen2);
+ 			if (n < 0)
+ 				return (-1);
+-			if (n == 0)
++			if (n == 0 && (buf2 == NULL || resplen2 == 0))
+ 				goto next_ns;
+ 			if (v_circuit)
+ 			  // XXX Check whether both requests failed or
+@@ -1275,10 +1275,14 @@ send_dg(res_state statp,
+ 				(*thisresplenp > *thisanssizp)
+ 				? *thisanssizp : *thisresplenp);
+ 
+-			if (recvresp1 || (buf2 != NULL && recvresp2))
++			if (recvresp1 || (buf2 != NULL && recvresp2)) {
++			  *resplen2 = 0;
+ 			  return resplen;
++			}
+ 			if (buf2 != NULL)
+ 			  {
++			    /* No data from the first reply.  */
++			    resplen = 0;
+ 			    /* We are waiting for a possible second reply.  */
+ 			    if (hp->id == anhp->id)
+ 			      recvresp1 = 1;
+@@ -1344,7 +1348,7 @@ send_dg(res_state statp,
+ 		goto err_out;
+ 	}
+ 	else {
+-	  	/* poll should not have returned > 0 in this case.  */
++		/* poll should not have returned > 0 in this case.  */
+ 		abort ();
+ 	}
+ }
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/glibc/glibc.spec?r1=1.914&r2=1.915&f=u



More information about the pld-cvs-commit mailing list