rpms/bind/devel bind-96-db_unregister.patch, NONE, 1.1 bind-96-dyndb.patch, 1.4, 1.5 bind.spec, 1.310, 1.311

Martin Nagy mnagy at fedoraproject.org
Wed Apr 22 15:37:13 UTC 2009


Author: mnagy

Update of /cvs/extras/rpms/bind/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13600

Modified Files:
	bind-96-dyndb.patch bind.spec 
Added Files:
	bind-96-db_unregister.patch 
Log Message:
* Wed Apr 22 2009 Martin Nagy <mnagy redhat com> 32:9.6.1-0.2.b1
- update the patch for dynamic loading of database backends
- fix dns_db_unregister()


bind-96-db_unregister.patch:

--- NEW FILE bind-96-db_unregister.patch ---
diff --git a/lib/dns/db.c b/lib/dns/db.c
index a4c2864..62f461c 100644
--- a/lib/dns/db.c
+++ b/lib/dns/db.c
@@ -860,6 +860,8 @@ dns_db_unregister(dns_dbimplementation_t **dbimp) {
 	isc_mem_put(mctx, imp, sizeof(dns_dbimplementation_t));
 	isc_mem_detach(&mctx);
 	RWUNLOCK(&implock, isc_rwlocktype_write);
+
+	*dbimp = NULL;
 }
 
 isc_result_t

bind-96-dyndb.patch:

Index: bind-96-dyndb.patch
===================================================================
RCS file: /cvs/extras/rpms/bind/devel/bind-96-dyndb.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- bind-96-dyndb.patch	22 Apr 2009 06:47:57 -0000	1.4
+++ bind-96-dyndb.patch	22 Apr 2009 15:37:08 -0000	1.5
@@ -1,5 +1,5 @@
 diff --git a/bin/named/main.c b/bin/named/main.c
-index aa6575a..8030e3d 100644
+index aa6575a..aed2a55 100644
 --- a/bin/named/main.c
 +++ b/bin/named/main.c
 @@ -44,6 +44,7 @@
@@ -14,13 +14,13 @@
  	dlz_drivers_clear();
  #endif
  
-+	dns_dynamic_db_cleanup();
++	dns_dynamic_db_cleanup(ISC_TRUE);
 +
  	dns_name_destroy();
  
  	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..5d4077d 100644
+index 31b2761..7670f1a 100644
 --- a/bin/named/server.c
 +++ b/bin/named/server.c
 @@ -56,6 +56,7 @@
@@ -150,6 +150,23 @@
  	 * Configure the view's cache.  Try to reuse an existing
  	 * cache if possible, otherwise create a new cache.
  	 * Note that the ADB is not preserved in either case.
+@@ -2903,6 +3002,7 @@ load_configuration(const char *filename, ns_server_t *server,
+ 	result = isc_task_beginexclusive(server->task);
+ 	RUNTIME_CHECK(result == ISC_R_SUCCESS);
+ 
++	dns_dynamic_db_cleanup(ISC_FALSE);
+ 	/*
+ 	 * Parse the global default pseudo-config file.
+ 	 */
+@@ -4140,6 +4240,8 @@ loadconfig(ns_server_t *server) {
+ static isc_result_t
+ reload(ns_server_t *server) {
+ 	isc_result_t result;
++
++	dns_dynamic_db_cleanup(ISC_FALSE);
+ 	CHECK(loadconfig(server));
+ 
+ 	result = load_zones(server, ISC_FALSE);
 diff --git a/lib/dns/Makefile.in b/lib/dns/Makefile.in
 index ef5c12a..0f7abba 100644
 --- a/lib/dns/Makefile.in
@@ -175,10 +192,10 @@
  		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..f11584d
+index 0000000..de2daf7
 --- /dev/null
 +++ b/lib/dns/dynamic_db.c
-@@ -0,0 +1,346 @@
+@@ -0,0 +1,347 @@
 +/*
 + * Copyright (C) 2008-2009  Red Hat, Inc.
 + *
@@ -407,25 +424,26 @@
 +}
 +
 +void
-+dns_dynamic_db_cleanup(void)
++dns_dynamic_db_cleanup(isc_boolean_t exiting)
 +{
 +	dyndb_implementation_t *elem;
-+	dyndb_implementation_t *next;
++	dyndb_implementation_t *prev;
 +
 +	RUNTIME_CHECK(isc_once_do(&once, dyndb_initialize) == ISC_R_SUCCESS);
 +
 +	LOCK(&dyndb_lock);
-+	elem = HEAD(dyndb_implementations);
++	elem = TAIL(dyndb_implementations);
 +	while (elem != NULL) {
-+		next = NEXT(elem, link);
++		prev = PREV(elem, link);
 +		UNLINK(dyndb_implementations, elem, link);
 +		elem->destroy_function();
 +		unload_library(&elem);
-+		elem = next;
++		elem = prev;
 +	}
 +	UNLOCK(&dyndb_lock);
 +
-+	isc_mutex_destroy(&dyndb_lock);
++	if (exiting == ISC_TRUE)
++		isc_mutex_destroy(&dyndb_lock);
 +}
 +
 +dns_dyndb_arguments_t *
@@ -540,7 +558,7 @@
  		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..12f7a06
+index 0000000..7b1c1ce
 --- /dev/null
 +++ b/lib/dns/include/dns/dynamic_db.h
 @@ -0,0 +1,50 @@
@@ -578,7 +596,7 @@
 +				 isc_mem_t *mctx, const char * const *argv,
 +				 dns_dyndb_arguments_t *dyndb_args);
 +
-+void dns_dynamic_db_cleanup(void);
++void dns_dynamic_db_cleanup(isc_boolean_t exiting);
 +
 +dns_dyndb_arguments_t *dns_dyndb_arguments_create(isc_mem_t *mctx);
 +void dns_dyndb_arguments_destroy(isc_mem_t *mctx, dns_dyndb_arguments_t *args);


Index: bind.spec
===================================================================
RCS file: /cvs/extras/rpms/bind/devel/bind.spec,v
retrieving revision 1.310
retrieving revision 1.311
diff -u -r1.310 -r1.311
--- bind.spec	22 Apr 2009 06:47:57 -0000	1.310
+++ bind.spec	22 Apr 2009 15:37:08 -0000	1.311
@@ -61,6 +61,7 @@
 # needs inpection
 Patch17: bind-9.3.2b1-fix_sdb_ldap.patch
 Patch104: bind-96-dyndb.patch
+Patch105: bind-96-db_unregister.patch
 
 # IDN paches
 Patch73: bind-9.5-libidn.patch
@@ -168,6 +169,7 @@
 %patch10 -p1 -b .PIE
 %patch16 -p1 -b .redhat_doc
 %patch104 -p1 -b .dyndb
+%patch105 -p1 -b .db_unregister
 %if %{SDB}
 %patch101 -p1 -b .old-api
 mkdir bin/named-sdb
@@ -571,6 +573,7 @@
 %changelog
 * Wed Apr 22 2009 Martin Nagy <mnagy redhat com> 32:9.6.1-0.2.b1
 - update the patch for dynamic loading of database backends
+- fix dns_db_unregister()
 
 * Mon Mar 30 2009 Adam Tkac <atkac redhat com> 32:9.6.1-0.1.b1
 - 9.6.1b1 release




More information about the scm-commits mailing list