3171. [bug] Exclusively lock the task when adding a zone using

'rndc addzone'.  [RT #25600]
This commit is contained in:
Mark Andrews
2011-10-14 05:38:50 +00:00
parent b4a5220650
commit 0a1009ae64
2 changed files with 7 additions and 3 deletions

View File

@@ -1,3 +1,6 @@
3171. [bug] Exclusively lock the task when adding a zone using
'rndc addzone'. [RT #25600]
--- 9.9.0a3 released ---
3170. [func] RPZ update:

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: server.c,v 1.621 2011/10/11 00:09:01 each Exp $ */
/* $Id: server.c,v 1.622 2011/10/14 05:38:49 marka Exp $ */
/*! \file */
@@ -7579,13 +7579,14 @@ ns_server_add_zone(ns_server_t *server, char *args) {
CHECK(isc_stdio_open(view->new_zone_file, "a", &fp));
/* Mark view unfrozen so that zone can be added */
isc_task_beginexclusive(server->task);
dns_view_thaw(view);
result = configure_zone(cfg->config, parms, vconfig,
server->mctx, view, cfg->actx, ISC_FALSE);
dns_view_freeze(view);
if (result != ISC_R_SUCCESS) {
isc_task_endexclusive(server->task);
if (result != ISC_R_SUCCESS)
goto cleanup;
}
/* Is it there yet? */
CHECK(dns_zt_find(view->zonetable, &dnsname, 0, NULL, &zone));