diff --git a/bind-96-dyndb.patch b/bind-96-dyndb.patch index 35397c9..73746d7 100644 --- a/bind-96-dyndb.patch +++ b/bind-96-dyndb.patch @@ -20,7 +20,7 @@ index aa6575a..8030e3d 100644 isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_MAIN, diff --git a/bin/named/server.c b/bin/named/server.c -index 31b2761..12ac597 100644 +index 31b2761..b76f3ce 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -56,6 +56,7 @@ @@ -31,12 +31,12 @@ index 31b2761..12ac597 100644 #include #include #include -@@ -849,6 +850,67 @@ configure_peer(const cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) { +@@ -849,6 +850,72 @@ configure_peer(const cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) { } static isc_result_t +configure_dynamic_db(const cfg_obj_t *dynamic_db, isc_mem_t *mctx, -+ dns_view_t *view) ++ dns_view_t *view, dns_zonemgr_t *zmgr) +{ + isc_result_t result; + const cfg_obj_t *obj; @@ -62,16 +62,21 @@ index 31b2761..12ac597 100644 + + /* Create a list of arguments. */ + obj = NULL; -+ CHECK(cfg_map_get(options, "arg", &obj)); -+ -+ len = cfg_list_length(obj, isc_boolean_false); -+ if (len == 0) { -+ argv = NULL; -+ } else { -+ len++; -+ argv = isc_mem_allocate(mctx, len * sizeof(const char *)); -+ if (argv == NULL) -+ CHECK(ISC_R_NOMEMORY); ++ result = cfg_map_get(options, "arg", &obj); ++ if (result == ISC_R_NOTFOUND) ++ len = 0; ++ else if (result == ISC_R_SUCCESS) ++ len = cfg_list_length(obj, isc_boolean_false); ++ else ++ goto cleanup; ++ ++ /* Account for the last terminating NULL. */ ++ len++; ++ ++ argv = isc_mem_allocate(mctx, len * sizeof(const char *)); ++ if (argv == NULL) { ++ result = ISC_R_NOMEMORY; ++ goto cleanup; + } + for (element = cfg_list_first(obj), i = 0; + element != NULL; @@ -85,7 +90,7 @@ index 31b2761..12ac597 100644 + REQUIRE(i < len); + argv[i] = NULL; + -+ CHECK(dns_dynamic_db_load(libname, name, mctx, argv, view)); ++ CHECK(dns_dynamic_db_load(libname, name, mctx, argv, view, zmgr)); + +cleanup: + if (argv != NULL) @@ -99,7 +104,7 @@ index 31b2761..12ac597 100644 disable_algorithms(const cfg_obj_t *disabled, dns_resolver_t *resolver) { isc_result_t result; const cfg_obj_t *algorithms; -@@ -999,6 +1061,7 @@ configure_view(dns_view_t *view, const cfg_obj_t *config, +@@ -999,6 +1066,7 @@ configure_view(dns_view_t *view, const cfg_obj_t *config, unsigned int dlzargc; char **dlzargv; #endif @@ -107,7 +112,7 @@ index 31b2761..12ac597 100644 const cfg_obj_t *disabled; const cfg_obj_t *obj; const cfg_listelt_t *element; -@@ -1171,6 +1234,22 @@ configure_view(dns_view_t *view, const cfg_obj_t *config, +@@ -1171,6 +1239,22 @@ configure_view(dns_view_t *view, const cfg_obj_t *config, #endif /* @@ -123,7 +128,7 @@ index 31b2761..12ac597 100644 + element = cfg_list_next(element)) + { + obj = cfg_listelt_value(element); -+ CHECK(configure_dynamic_db(obj, mctx, view)); ++ CHECK(configure_dynamic_db(obj, mctx, view, ns_g_server->zonemgr)); + } + + /* @@ -155,7 +160,7 @@ index ef5c12a..0f7abba 100644 name.c ncache.c nsec.c nsec3.c order.c peer.c portlist.c \ diff --git a/lib/dns/dynamic_db.c b/lib/dns/dynamic_db.c new file mode 100644 -index 0000000..220db68 +index 0000000..b95b1fe --- /dev/null +++ b/lib/dns/dynamic_db.c @@ -0,0 +1,240 @@ @@ -202,7 +207,8 @@ index 0000000..220db68 + + +typedef isc_result_t (*register_func_t)(isc_mem_t *mctx, const char *name, -+ const char * const *argv, dns_view_t *view); ++ const char * const *argv, dns_view_t *view, ++ dns_zonemgr_t *zmgr); +typedef void (*destroy_func_t)(void); + +typedef struct dyndb_implementation dyndb_implementation_t; @@ -316,8 +322,6 @@ index 0000000..220db68 + + imp = *impp; + -+ dlclose(imp->handle); -+ + isc_mem_putanddetach(&imp->mctx, imp, sizeof(dyndb_implementation_t)); + + *impp = NULL; @@ -355,7 +359,8 @@ index 0000000..220db68 + +isc_result_t +dns_dynamic_db_load(const char *libname, const char *name, isc_mem_t *mctx, -+ const char * const *argv, dns_view_t *view) ++ const char * const *argv, dns_view_t *view, ++ dns_zonemgr_t *zmgr) +{ + isc_result_t result; + dyndb_implementation_t *implementation = NULL; @@ -363,7 +368,7 @@ index 0000000..220db68 + RUNTIME_CHECK(isc_once_do(&once, dyndb_initialize) == ISC_R_SUCCESS); + + CHECK(load_library(mctx, libname, &implementation)); -+ CHECK(implementation->register_function(mctx, name, argv, view)); ++ CHECK(implementation->register_function(mctx, name, argv, view, zmgr)); + + LOCK(&dyndb_lock); + APPEND(dyndb_implementations, implementation, link); @@ -378,7 +383,7 @@ index 0000000..220db68 + return result; +} + -+isc_result_t ++void +dns_dynamic_db_cleanup(void) +{ + dyndb_implementation_t *elem; @@ -414,10 +419,10 @@ index e9e049e..27fdc45 100644 message.h name.h ncache.h \ diff --git a/lib/dns/include/dns/dynamic_db.h b/lib/dns/include/dns/dynamic_db.h new file mode 100644 -index 0000000..151103f +index 0000000..03339e6 --- /dev/null +++ b/lib/dns/include/dns/dynamic_db.h -@@ -0,0 +1,31 @@ +@@ -0,0 +1,32 @@ +/* + * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 1996-2003 Internet Software Consortium. @@ -440,13 +445,14 @@ index 0000000..151103f +#define DYNAMIC_DB_H + +#include ++ +#include + +isc_result_t dns_dynamic_db_load(const char *libname, const char *name, + isc_mem_t *mctx, const char * const *argv, -+ dns_view_t *view); ++ dns_view_t *view, dns_zonemgr_t *zmgr); + -+isc_result_t dns_dynamic_db_cleanup(void); ++void dns_dynamic_db_cleanup(void); + +#endif diff --git a/lib/dns/include/dns/log.h b/lib/dns/include/dns/log.h diff --git a/bind-96-isc_header.patch b/bind-96-isc_header.patch new file mode 100644 index 0000000..10fc7c7 --- /dev/null +++ b/bind-96-isc_header.patch @@ -0,0 +1,12 @@ +diff -up bind-9.6.0rc1/lib/isc/include/isc/Makefile.in.isc_header bind-9.6.0rc1/lib/isc/include/isc/Makefile.in +--- bind-9.6.0rc1/lib/isc/include/isc/Makefile.in.isc_header 2009-01-14 09:23:35.000000000 +0100 ++++ bind-9.6.0rc1/lib/isc/include/isc/Makefile.in 2009-02-02 08:47:56.000000000 +0100 +@@ -31,7 +31,7 @@ HEADERS = app.h assertions.h base64.h bi + eventclass.h file.h formatcheck.h fsaccess.h \ + hash.h heap.h hex.h hmacmd5.h \ + httpd.h \ +- interfaceiter.h @ISC_IPV6_H@ lang.h lex.h \ ++ interfaceiter.h @ISC_IPV6_H@ iterated_hash.h lang.h lex.h \ + lfsr.h lib.h list.h log.h \ + magic.h md5.h mem.h msgcat.h msgs.h \ + mutexblock.h netaddr.h ondestroy.h os.h parseint.h \ diff --git a/bind.spec b/bind.spec index 4e72d12..5a16471 100644 --- a/bind.spec +++ b/bind.spec @@ -21,7 +21,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv Name: bind License: ISC Version: 9.6.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) @@ -75,6 +75,7 @@ Patch62: bind-9.5-sdb-sqlite-bld.patch # needs inpection Patch17: bind-9.3.2b1-fix_sdb_ldap.patch Patch104: bind-96-dyndb.patch +Patch105: bind-96-isc_header.patch # IDN paches Patch73: bind-9.5-libidn.patch @@ -189,6 +190,7 @@ sed -i 's/SUBDIRS\(.*\)/SUBDIRS\1 lib\/bind/' Makefile.in %patch10 -p1 -b .PIE %patch16 -p1 -b .redhat_doc %patch104 -p1 -b .dyndb +%patch105 -p1 -b .isc_header %if %{SDB} %patch101 -p1 -b .old-api mkdir bin/named-sdb @@ -602,6 +604,10 @@ rm -rf ${RPM_BUILD_ROOT} %ghost %{chroot_prefix}/etc/localtime %changelog +* Thu Feb 12 2009 Martin Nagy 32:9.6.0-5.P1 +- update the patch for dynamic loading of database backends +- include iterated_hash.h + * Sat Jan 24 2009 Caolán McNamara 32:9.6.0-4.P1 - rebuild for dependencies