Fix compilation of libdns-export.so

Signed-off-by: Adam Tkac <atkac@redhat.com>
This commit is contained in:
Adam Tkac 2011-05-27 11:07:36 +02:00
parent 136022b9f3
commit 36ea44a658
2 changed files with 63 additions and 1 deletions

View File

@ -22,7 +22,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
Name: bind
License: ISC
Version: 9.8.0
Release: 4.%{PATCHVER}%{?dist}
Release: 5.%{PATCHVER}%{?dist}
Epoch: 32
Url: http://www.isc.org/products/BIND/
Buildroot:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -64,6 +64,7 @@ Patch112:bind97-rh645544.patch
Patch113:bind97-rh674334.patch
Patch115:bind97-cleanup.patch
Patch116:bind98-includes.patch
Patch117:bind98-libdns-export.patch
# SDB patches
Patch11: bind-9.3.2b2-sdbsrc.patch
@ -302,6 +303,7 @@ mkdir m4
%patch113 -p1 -b .rh674334
%patch115 -p1 -b .cleanup
%patch116 -p1 -b .includes
%patch117 -p1 -b .libdns-export
# Sparc and s390 arches need to use -fPIE
%ifarch sparcv9 sparc64 s390 s390x
@ -770,6 +772,9 @@ rm -rf ${RPM_BUILD_ROOT}
%endif
%changelog
* Fri May 27 2011 Adam Tkac <atkac redhat com> 32:9.8.0-5.P2
- fix compilation of libdns-export.so
* Fri May 27 2011 Adam Tkac <atkac redhat com> 32:9.8.0-4.P2
- update to 9.8.0-P2 (CVE-2011-1910)

View File

@ -0,0 +1,57 @@
diff -up bind-9.8.0-P2/lib/dns/masterdump.c.libdns-export bind-9.8.0-P2/lib/dns/masterdump.c
--- bind-9.8.0-P2/lib/dns/masterdump.c.libdns-export 2011-05-27 10:48:10.216765461 +0200
+++ bind-9.8.0-P2/lib/dns/masterdump.c 2011-05-27 10:48:50.428765471 +0200
@@ -700,6 +700,26 @@ dns_master_questiontotext(dns_name_t *ow
ISC_FALSE, target));
}
+static const char *trustnames[] = {
+ "none",
+ "pending-additional",
+ "pending-answer",
+ "additional",
+ "glue",
+ "answer",
+ "authauthority",
+ "authanswer",
+ "secure",
+ "local" /* aka ultimate */
+};
+
+const char *
+dns_trust_totext(dns_trust_t trust) {
+ if (trust >= sizeof(trustnames)/sizeof(*trustnames))
+ return ("bad");
+ return (trustnames[trust]);
+}
+
#ifdef BIND9
/*
* Print an rdataset. 'buffer' is a scratch buffer, which must have been
@@ -835,26 +855,6 @@ dump_order_compare(const void *a, const
#define MAXSORT 64
-static const char *trustnames[] = {
- "none",
- "pending-additional",
- "pending-answer",
- "additional",
- "glue",
- "answer",
- "authauthority",
- "authanswer",
- "secure",
- "local" /* aka ultimate */
-};
-
-const char *
-dns_trust_totext(dns_trust_t trust) {
- if (trust >= sizeof(trustnames)/sizeof(*trustnames))
- return ("bad");
- return (trustnames[trust]);
-}
-
static isc_result_t
dump_rdatasets_text(isc_mem_t *mctx, dns_name_t *name,
dns_rdatasetiter_t *rdsiter, dns_totext_ctx_t *ctx,