From 03f646e50fa5a93225ecc80e904b01d62c84486c Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Apr 24 2007 11:12:38 +0000 Subject: - cleanup in caching-nameserver config file - zone-freeze patch has been improved --- diff --git a/bind-9.4.0-zone-freeze.patch b/bind-9.4.0-zone-freeze.patch index dc5fb6a..3091d72 100644 --- a/bind-9.4.0-zone-freeze.patch +++ b/bind-9.4.0-zone-freeze.patch @@ -1,46 +1,50 @@ ---- bind-9.4.0/lib/dns/view.c.freeze 2007-04-18 11:51:02.000000000 +0200 -+++ bind-9.4.0/lib/dns/view.c 2007-04-18 12:50:30.000000000 +0200 -@@ -1140,6 +1140,28 @@ +--- bind-9.4.0/lib/dns/view.c.freeze 2007-04-24 12:35:03.000000000 +0200 ++++ bind-9.4.0/lib/dns/view.c 2007-04-24 12:52:02.000000000 +0200 +@@ -1140,6 +1140,32 @@ } isc_result_t -+dns_viewlist_findzone(dns_viewlist_t *list, const char* name, ++dns_viewlist_findzone(dns_viewlist_t *list, dns_name_t *name, isc_boolean_t allclasses, + dns_rdataclass_t rdclass, dns_zone_t **zonep) +{ + dns_view_t *view; + isc_result_t result; ++ isc_boolean_t match = isc_boolean_false; + + REQUIRE(list != NULL); + + for (view = ISC_LIST_HEAD(*list); + view != NULL; + view = ISC_LIST_NEXT(view, link)) { -+ if (view->rdclass != rdclass) ++ if (allclasses == isc_boolean_false && view->rdclass != rdclass ) + continue; + result = dns_zt_find(view->zonetable, name, + 0, NULL, zonep); -+ if (result == ISC_R_SUCCESS) -+ return ISC_R_SUCCESS; ++ if(result == ISC_R_SUCCESS) { ++ if (match != isc_boolean_false) ++ return ISC_R_NOTFOUND; ++ match = isc_boolean_true; ++ } + } -+ return ISC_R_NOTFOUND; ++ return (match == isc_boolean_false) ? ISC_R_NOTFOUND : ISC_R_SUCCESS; +} + +isc_result_t dns_view_load(dns_view_t *view, isc_boolean_t stop) { REQUIRE(DNS_VIEW_VALID(view)); ---- bind-9.4.0/lib/dns/include/dns/view.h.freeze 2007-04-18 12:03:13.000000000 +0200 -+++ bind-9.4.0/lib/dns/include/dns/view.h 2007-04-18 12:49:47.000000000 +0200 +--- bind-9.4.0/lib/dns/include/dns/view.h.freeze 2007-04-24 12:35:03.000000000 +0200 ++++ bind-9.4.0/lib/dns/include/dns/view.h 2007-04-24 12:35:03.000000000 +0200 @@ -592,6 +592,19 @@ */ isc_result_t -+dns_viewlist_findzone(dns_viewlist_t *list, const char* name, ++dns_viewlist_findzone(dns_viewlist_t *list, dns_name_t *name, isc_boolean_t allclasses, + dns_rdataclass_t rdclass, dns_zone_t **zonep); + +/*%< + * Search zone with 'name' in view with 'rdclass' in viewlist 'list' -+ * If found, zone is returned in *zonep ++ * If found, zone is returned in *zonep. If allclasses is set rdclass is ignored + * + * Returns: + *\li #ISC_R_SUCCESS A matching zone was found. @@ -51,9 +55,9 @@ dns_view_findzone(dns_view_t *view, dns_name_t *name, dns_zone_t **zonep); /*%< * Search for the zone 'name' in the zone table of 'view'. ---- bind-9.4.0/bin/named/server.c.freeze 2007-04-18 12:44:26.000000000 +0200 -+++ bind-9.4.0/bin/named/server.c 2007-04-18 12:48:02.000000000 +0200 -@@ -3922,19 +3922,23 @@ +--- bind-9.4.0/bin/named/server.c.freeze 2007-04-24 12:35:03.000000000 +0200 ++++ bind-9.4.0/bin/named/server.c 2007-04-24 12:35:03.000000000 +0200 +@@ -3922,19 +3922,24 @@ rdclass = dns_rdataclass_in; } @@ -65,6 +69,7 @@ - goto fail1; + if (viewtxt == NULL) { + result = dns_viewlist_findzone(&server->viewlist, dns_fixedname_name(&name), ++ (classtxt == NULL) ? isc_boolean_true : isc_boolean_false, + rdclass, zonep); + } + else { @@ -86,9 +91,9 @@ fail1: return (result); } ---- bind-9.4.0/bin/named_sdb/server.c.freeze 2007-04-18 12:52:58.000000000 +0200 -+++ bind-9.4.0/bin/named_sdb/server.c 2007-04-18 12:54:29.000000000 +0200 -@@ -3917,15 +3917,20 @@ +--- bind-9.4.0/bin/named_sdb/server.c.freeze 2007-04-24 12:35:03.000000000 +0200 ++++ bind-9.4.0/bin/named_sdb/server.c 2007-04-24 12:35:03.000000000 +0200 +@@ -3917,19 +3917,24 @@ rdclass = dns_rdataclass_in; } @@ -103,6 +108,7 @@ - 0, NULL, zonep); + if (viewtxt == NULL) { + result = dns_viewlist_findzone(&server->viewlist, dns_fixedname_name(&name), ++ (classtxt == NULL) ? isc_boolean_true : isc_boolean_false, + rdclass, zonep); + } + else { @@ -118,3 +124,7 @@ /* Partial match? */ if (result != ISC_R_SUCCESS && *zonep != NULL) dns_zone_detach(zonep); +- dns_view_detach(&view); + fail1: + return (result); + } diff --git a/bind.spec b/bind.spec index 226ff71..4f52c0b 100644 --- a/bind.spec +++ b/bind.spec @@ -17,7 +17,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv Name: bind License: BSD-like Version: 9.4.0 -Release: 7%{?dist} +Release: 8%{?dist} Epoch: 31 Url: http://www.isc.org/products/BIND/ Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -82,6 +82,7 @@ Patch64: bind-9.4.0-idnkit-autotools.patch Patch65: bind-9.4.0-dig-idn.patch %endif Patch66: bind-9.4.0-zone-freeze.patch +#Patch67: bind-9.4.0-dbus-race-condition.patch # Requires: bind-libs = %{epoch}:%{version}-%{release}, glibc >= 2.2, mktemp Requires(post): grep, chkconfig >= 1.3.26 @@ -287,6 +288,7 @@ cp -fp contrib/sdb/sqlite/zone2sqlite.c bin/sdb_tools # # this must follow all dbus patches: # +#%patch67 -p1 -b .race-condition cp -fp contrib/dbus/{dbus_mgr.c,dbus_service.c} bin/named cp -fp contrib/dbus/{dbus_mgr.h,dbus_service.h} bin/named/include/named %if %{SDB} @@ -806,6 +808,11 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Tue Apr 24 2007 Adam Tkac 31:9.4.0-8.fc7 +- improved "zone freeze patch" - if multiple zone with same name exists + no zone is freezed +- minor cleanup in caching-nameserver's config file + * Tue Apr 17 2007 Adam Tkac 31:9.4.0-7.fc7 - removed DEBUGINFO option because with this option (default) was bind builded with -O0 and without this flag no debuginfo package was produced. diff --git a/named.caching-nameserver.conf b/named.caching-nameserver.conf index ba67295..03dbbef 100644 --- a/named.caching-nameserver.conf +++ b/named.caching-nameserver.conf @@ -19,6 +19,7 @@ options { statistics-file "/var/named/data/named_stats.txt"; memstatistics-file "/var/named/data/named_mem_stats.txt"; allow-query { localhost; }; + recursion yes; }; logging { channel default_debug { @@ -26,9 +27,4 @@ logging { severity dynamic; }; }; -view localhost_resolver { - match-clients { localhost; }; - match-destinations { localhost; }; - recursion yes; - include "/etc/named.rfc1912.zones"; -}; +include "/etc/named.rfc1912.zones";