[glibc/f17] Resolves: 808014 - Do not override TTL of CNAME with TTL of its alias. (#808014)
Patsy Franklin
pfrankli at fedoraproject.org
Thu Jun 7 14:26:17 UTC 2012
commit 6bc5e7da110639040b163700dd2349c25d4c53d8
Author: Patsy Franklin <pfrankli at redhat.com>
Date: Thu Jun 7 10:24:35 2012 -0400
Resolves: 808014
- Do not override TTL of CNAME with TTL of its alias. (#808014)
glibc-rh808014.patch | 23 +++++++++++++++++++++++
glibc.spec | 7 ++++++-
2 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/glibc-rh808014.patch b/glibc-rh808014.patch
new file mode 100644
index 0000000..9292659
--- /dev/null
+++ b/glibc-rh808014.patch
@@ -0,0 +1,23 @@
+diff -Nrup a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
+--- a/resolv/nss_dns/dns-host.c 2012-06-07 09:10:06.145448414 -0400
++++ b/resolv/nss_dns/dns-host.c 2012-06-07 09:18:40.850019678 -0400
+@@ -745,6 +745,10 @@ getanswer_r (const querybuf *answer, int
+
+ if ((qtype == T_A || qtype == T_AAAA) && type == T_CNAME)
+ {
++ /* A CNAME could also have a TTL entry. */
++ if (ttlp != NULL && ttl < *ttlp)
++ *ttlp = ttl;
++
+ if (ap >= &host_data->aliases[MAX_NR_ALIASES - 1])
+ continue;
+ n = dn_expand (answer->buf, end_of_message, cp, tbuf, sizeof tbuf);
+@@ -906,7 +910,7 @@ getanswer_r (const querybuf *answer, int
+ {
+ register int nn;
+
+- if (ttlp != NULL)
++ if (ttlp != NULL && ttl != 0 && ttl < *ttlp)
+ *ttlp = ttl;
+ if (canonp != NULL)
+ *canonp = bp;
diff --git a/glibc.spec b/glibc.spec
index 96c4331..ddb363a 100644
--- a/glibc.spec
+++ b/glibc.spec
@@ -28,7 +28,7 @@
Summary: The GNU libc libraries
Name: glibc
Version: %{glibcversion}
-Release: 42%{?dist}
+Release: 43%{?dist}
# GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
# Things that are linked directly into dynamically linked programs
# and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
@@ -114,6 +114,7 @@ Patch1046: %{name}-rh806403.patch
Patch1048: %{name}-rh804792.patch
Patch1052: %{name}-sw13979.patch
Patch1053: %{name}-rh817276.patch
+Patch1054: %{name}-rh808014.patch
#
# Patches submitted, but not yet approved upstream.
@@ -475,6 +476,7 @@ pushd ../%{glibcportsdir}
%patch2055 -p1
popd
+%patch1054 -p1
%patch2056 -p1
%patch2057 -p1
%patch2058 -p1
@@ -1331,6 +1333,9 @@ rm -f *.filelist*
%endif
%changelog
+* Thu Jun 7 2012 Patsy Franklin <patsy at redhat.com> - 2.15.43
+ - Do not override TTL of CNAME with TTL of its alias. (#808014)
+
* Tue Jun 5 2012 Patsy Franklin <patsy at redhat.com> - 2.15.42
- Last edit accidently removed %patch2058.
More information about the scm-commits
mailing list