aboutsummaryrefslogtreecommitdiffstats
path: root/main/libc0.9.32/0002-resolv-res_query-for-CNAMEs.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-12-23 16:30:18 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2011-12-23 16:33:50 +0100
commit293f29e8c45ca0fcb064107e275a477ad1913106 (patch)
treea79d2b2b93af581c861488f2bca773e4751288f0 /main/libc0.9.32/0002-resolv-res_query-for-CNAMEs.patch
parent453d9efbeb9055b3762960fb09894a04ded1495f (diff)
downloadaports-293f29e8c45ca0fcb064107e275a477ad1913106.tar.bz2
aports-293f29e8c45ca0fcb064107e275a477ad1913106.tar.xz
main/libc0.9.32: reorganize patches
We keep track of our patches in git now: http://git.alpinelinux.org/cgit/uClibc-alpine This is so its easier to keep track of upstream and make sure that our patches are upstreamed. we also bump pkgrel so we make sure we get the patches tested properly
Diffstat (limited to 'main/libc0.9.32/0002-resolv-res_query-for-CNAMEs.patch')
-rw-r--r--main/libc0.9.32/0002-resolv-res_query-for-CNAMEs.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/main/libc0.9.32/0002-resolv-res_query-for-CNAMEs.patch b/main/libc0.9.32/0002-resolv-res_query-for-CNAMEs.patch
new file mode 100644
index 0000000000..74cd37c505
--- /dev/null
+++ b/main/libc0.9.32/0002-resolv-res_query-for-CNAMEs.patch
@@ -0,0 +1,41 @@
+From 811e804c7a403783b0c4cc5eb75f24da809081d8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Fri, 23 Dec 2011 14:15:16 +0100
+Subject: [PATCH] resolv: res_query for CNAMEs
+
+From: http://lists.busybox.net/pipermail/uclibc/2009-June/042583.html
+
+I had postfix failing for domains with MX->CNAME->A chain. In glibc it works.
+I tracked it to be a problem in uclibc res_query. It returns bogus data
+for CNAME entries, apparently intentionally, which is wrong.
+
+glibc return CNAME entries even for CNAME queries and most applications rely
+on this. So we should do the same in uclibc.
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ libc/inet/resolv.c | 8 +++-----
+ 1 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c
+index 021d5bf..2371fb9 100644
+--- a/libc/inet/resolv.c
++++ b/libc/inet/resolv.c
+@@ -3099,11 +3099,9 @@ int res_query(const char *dname, int class, int type,
+
+ free(a.dotted);
+
+- if (a.atype == type) { /* CNAME */
+- if (i > anslen)
+- i = anslen;
+- memcpy(answer, packet, i);
+- }
++ i = MIN(anslen, i);
++ memcpy(answer, packet, i);
++
+ free(packet);
+ return i;
+ }
+--
+1.7.8
+