2011-11-11 08:25:44 +00:00
|
|
|
diff -up bind-9.9.0b1/bin/named/main.c.dyndb bind-9.9.0b1/bin/named/main.c
|
|
|
|
--- bind-9.9.0b1/bin/named/main.c.dyndb 2011-03-11 07:11:21.000000000 +0100
|
|
|
|
+++ bind-9.9.0b1/bin/named/main.c 2011-11-10 12:47:24.182292777 +0100
|
2009-09-16 11:09:13 +00:00
|
|
|
@@ -45,6 +45,7 @@
|
2008-12-16 13:14:16 +00:00
|
|
|
#include <isccc/result.h>
|
|
|
|
|
|
|
|
#include <dns/dispatch.h>
|
|
|
|
+#include <dns/dynamic_db.h>
|
|
|
|
#include <dns/name.h>
|
|
|
|
#include <dns/result.h>
|
|
|
|
#include <dns/view.h>
|
2011-08-31 12:57:44 +00:00
|
|
|
@@ -884,6 +885,8 @@ setup(void) {
|
2008-12-16 13:14:16 +00:00
|
|
|
|
2009-08-04 05:15:49 +00:00
|
|
|
static void
|
|
|
|
cleanup(void) {
|
2009-04-22 15:37:08 +00:00
|
|
|
+ dns_dynamic_db_cleanup(ISC_TRUE);
|
2008-12-16 13:14:16 +00:00
|
|
|
+
|
2009-08-04 05:15:49 +00:00
|
|
|
destroy_managers();
|
2008-12-16 13:14:16 +00:00
|
|
|
|
2009-08-04 05:15:49 +00:00
|
|
|
ns_server_destroy(&ns_g_server);
|
2011-11-11 08:25:44 +00:00
|
|
|
diff -up bind-9.9.0b1/bin/named/server.c.dyndb bind-9.9.0b1/bin/named/server.c
|
|
|
|
--- bind-9.9.0b1/bin/named/server.c.dyndb 2011-10-28 14:08:04.000000000 +0200
|
|
|
|
+++ bind-9.9.0b1/bin/named/server.c 2011-11-10 12:47:24.185292777 +0100
|
|
|
|
@@ -63,6 +63,7 @@
|
2011-08-31 12:57:44 +00:00
|
|
|
#include <dns/db.h>
|
|
|
|
#include <dns/dispatch.h>
|
2008-12-16 13:14:16 +00:00
|
|
|
#include <dns/dlz.h>
|
|
|
|
+#include <dns/dynamic_db.h>
|
2011-02-21 16:12:57 +00:00
|
|
|
#include <dns/dns64.h>
|
2008-12-16 13:14:16 +00:00
|
|
|
#include <dns/forward.h>
|
|
|
|
#include <dns/journal.h>
|
2011-11-11 08:25:44 +00:00
|
|
|
@@ -1164,6 +1165,72 @@ configure_peer(const cfg_obj_t *cpeer, i
|
2008-12-16 13:14:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static isc_result_t
|
|
|
|
+configure_dynamic_db(const cfg_obj_t *dynamic_db, isc_mem_t *mctx,
|
2009-04-22 06:47:57 +00:00
|
|
|
+ const dns_dyndb_arguments_t *dyndb_args)
|
2008-12-16 13:14:16 +00:00
|
|
|
+{
|
|
|
|
+ isc_result_t result;
|
|
|
|
+ const cfg_obj_t *obj;
|
|
|
|
+ const cfg_obj_t *options;
|
|
|
|
+ const cfg_listelt_t *element;
|
|
|
|
+ const char *name;
|
|
|
|
+ const char *libname;
|
|
|
|
+ const char **argv = NULL;
|
|
|
|
+ unsigned int i;
|
|
|
|
+ unsigned int len;
|
|
|
|
+
|
|
|
|
+ /* Get the name of the database. */
|
|
|
|
+ obj = cfg_tuple_get(dynamic_db, "name");
|
|
|
|
+ name = cfg_obj_asstring(obj);
|
|
|
|
+
|
|
|
|
+ /* Get options. */
|
|
|
|
+ options = cfg_tuple_get(dynamic_db, "options");
|
|
|
|
+
|
|
|
|
+ /* Get library name. */
|
|
|
|
+ obj = NULL;
|
|
|
|
+ CHECK(cfg_map_get(options, "library", &obj));
|
|
|
|
+ libname = cfg_obj_asstring(obj);
|
|
|
|
+
|
|
|
|
+ /* Create a list of arguments. */
|
|
|
|
+ obj = NULL;
|
2009-02-12 15:21:08 +00:00
|
|
|
+ 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;
|
2008-12-16 13:14:16 +00:00
|
|
|
+ }
|
|
|
|
+ for (element = cfg_list_first(obj), i = 0;
|
|
|
|
+ element != NULL;
|
|
|
|
+ element = cfg_list_next(element), i++)
|
|
|
|
+ {
|
|
|
|
+ REQUIRE(i < len);
|
|
|
|
+
|
|
|
|
+ obj = cfg_listelt_value(element);
|
|
|
|
+ argv[i] = cfg_obj_asstring(obj);
|
|
|
|
+ }
|
|
|
|
+ REQUIRE(i < len);
|
|
|
|
+ argv[i] = NULL;
|
|
|
|
+
|
2009-04-22 06:47:57 +00:00
|
|
|
+ CHECK(dns_dynamic_db_load(libname, name, mctx, argv, dyndb_args));
|
2008-12-16 13:14:16 +00:00
|
|
|
+
|
|
|
|
+cleanup:
|
|
|
|
+ if (argv != NULL)
|
|
|
|
+ isc_mem_free(mctx, argv);
|
|
|
|
+
|
|
|
|
+ return result;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+static isc_result_t
|
|
|
|
disable_algorithms(const cfg_obj_t *disabled, dns_resolver_t *resolver) {
|
|
|
|
isc_result_t result;
|
|
|
|
const cfg_obj_t *algorithms;
|
2011-11-11 08:25:44 +00:00
|
|
|
@@ -1575,6 +1642,7 @@ configure_view(dns_view_t *view, cfg_obj
|
2011-08-31 12:57:44 +00:00
|
|
|
const cfg_obj_t *dlz;
|
2008-12-16 13:14:16 +00:00
|
|
|
unsigned int dlzargc;
|
|
|
|
char **dlzargv;
|
|
|
|
+ const cfg_obj_t *dynamic_db_list;
|
|
|
|
const cfg_obj_t *disabled;
|
|
|
|
const cfg_obj_t *obj;
|
|
|
|
const cfg_listelt_t *element;
|
2011-11-11 08:25:44 +00:00
|
|
|
@@ -1805,6 +1873,39 @@ configure_view(dns_view_t *view, cfg_obj
|
2011-08-31 12:57:44 +00:00
|
|
|
}
|
|
|
|
}
|
2008-12-16 13:14:16 +00:00
|
|
|
|
2011-08-31 12:57:44 +00:00
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /*
|
2008-12-16 13:14:16 +00:00
|
|
|
+ * Configure dynamic databases.
|
|
|
|
+ */
|
|
|
|
+ dynamic_db_list = NULL;
|
|
|
|
+ if (voptions != NULL)
|
|
|
|
+ (void)cfg_map_get(voptions, "dynamic-db", &dynamic_db_list);
|
|
|
|
+ else
|
|
|
|
+ (void)cfg_map_get(config, "dynamic-db", &dynamic_db_list);
|
2009-04-22 06:47:57 +00:00
|
|
|
+ element = cfg_list_first(dynamic_db_list);
|
|
|
|
+ if (element != NULL) {
|
|
|
|
+ dns_dyndb_arguments_t *args;
|
|
|
|
+
|
|
|
|
+ args = dns_dyndb_arguments_create(mctx);
|
|
|
|
+ if (args == NULL) {
|
|
|
|
+ result = ISC_R_NOMEMORY;
|
|
|
|
+ goto cleanup;
|
|
|
|
+ }
|
|
|
|
+ dns_dyndb_set_view(args, view);
|
|
|
|
+ dns_dyndb_set_zonemgr(args, ns_g_server->zonemgr);
|
|
|
|
+ dns_dyndb_set_task(args, ns_g_server->task);
|
|
|
|
+ dns_dyndb_set_timermgr(args, ns_g_timermgr);
|
|
|
|
+ while (element != NULL) {
|
|
|
|
+ obj = cfg_listelt_value(element);
|
|
|
|
+ CHECK(configure_dynamic_db(obj, mctx, args));
|
2011-08-31 12:57:44 +00:00
|
|
|
+
|
2009-04-22 06:47:57 +00:00
|
|
|
+ element = cfg_list_next(element);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ dns_dyndb_arguments_destroy(mctx, args);
|
2008-12-16 13:14:16 +00:00
|
|
|
+ }
|
|
|
|
+
|
2011-08-31 12:57:44 +00:00
|
|
|
/*
|
2009-04-28 17:14:02 +00:00
|
|
|
* Obtain configuration parameters that affect the decision of whether
|
|
|
|
* we can reuse/share an existing cache.
|
2011-11-11 08:25:44 +00:00
|
|
|
@@ -4354,6 +4455,7 @@ load_configuration(const char *filename,
|
2011-08-31 12:57:44 +00:00
|
|
|
cfg_aclconfctx_detach(&ns_g_aclconfctx);
|
|
|
|
CHECK(cfg_aclconfctx_create(ns_g_mctx, &ns_g_aclconfctx));
|
2009-04-22 15:37:08 +00:00
|
|
|
|
|
|
|
+ dns_dynamic_db_cleanup(ISC_FALSE);
|
|
|
|
/*
|
|
|
|
* Parse the global default pseudo-config file.
|
|
|
|
*/
|
2011-11-11 08:25:44 +00:00
|
|
|
diff -up bind-9.9.0b1/lib/dns/dynamic_db.c.dyndb bind-9.9.0b1/lib/dns/dynamic_db.c
|
|
|
|
--- bind-9.9.0b1/lib/dns/dynamic_db.c.dyndb 2011-11-10 12:47:24.186292776 +0100
|
|
|
|
+++ bind-9.9.0b1/lib/dns/dynamic_db.c 2011-11-10 12:47:24.186292776 +0100
|
2011-06-02 10:26:12 +00:00
|
|
|
@@ -0,0 +1,366 @@
|
2008-12-16 13:14:16 +00:00
|
|
|
+/*
|
2011-06-02 10:26:12 +00:00
|
|
|
+ * Copyright (C) 2008-2011 Red Hat, Inc.
|
2008-12-16 13:14:16 +00:00
|
|
|
+ *
|
|
|
|
+ * Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
+ * purpose with or without fee is hereby granted, provided that the above
|
|
|
|
+ * copyright notice and this permission notice appear in all copies.
|
|
|
|
+ *
|
2009-04-22 06:47:57 +00:00
|
|
|
+ * THE SOFTWARE IS PROVIDED "AS IS" AND Red Hat DISCLAIMS ALL WARRANTIES WITH
|
2008-12-16 13:14:16 +00:00
|
|
|
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
2009-04-22 06:47:57 +00:00
|
|
|
+ * AND FITNESS. IN NO EVENT SHALL Red Hat BE LIABLE FOR ANY SPECIAL, DIRECT,
|
2008-12-16 13:14:16 +00:00
|
|
|
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
|
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
|
|
|
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
+ * PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+#include <config.h>
|
|
|
|
+
|
2009-04-27 19:35:39 +00:00
|
|
|
+#include <isc/buffer.h>
|
2008-12-16 13:14:16 +00:00
|
|
|
+#include <isc/mem.h>
|
|
|
|
+#include <isc/mutex.h>
|
|
|
|
+#include <isc/once.h>
|
|
|
|
+#include <isc/result.h>
|
2009-04-27 19:35:39 +00:00
|
|
|
+#include <isc/region.h>
|
2009-04-22 06:47:57 +00:00
|
|
|
+#include <isc/task.h>
|
2008-12-16 13:14:16 +00:00
|
|
|
+#include <isc/types.h>
|
|
|
|
+#include <isc/util.h>
|
|
|
|
+
|
|
|
|
+#include <dns/dynamic_db.h>
|
|
|
|
+#include <dns/log.h>
|
|
|
|
+#include <dns/types.h>
|
2009-04-22 06:47:57 +00:00
|
|
|
+#include <dns/view.h>
|
|
|
|
+#include <dns/zone.h>
|
2008-12-16 13:14:16 +00:00
|
|
|
+
|
2009-04-22 06:47:57 +00:00
|
|
|
+#include <string.h>
|
2008-12-16 13:14:16 +00:00
|
|
|
+
|
|
|
|
+#if HAVE_DLFCN_H
|
|
|
|
+#include <dlfcn.h>
|
|
|
|
+#endif
|
|
|
|
+
|
2009-04-27 19:35:39 +00:00
|
|
|
+#ifndef DYNDB_LIBDIR
|
|
|
|
+#define DYNDB_LIBDIR ""
|
|
|
|
+#endif
|
|
|
|
+
|
2008-12-16 13:14:16 +00:00
|
|
|
+#define CHECK(op) \
|
|
|
|
+ do { result = (op); \
|
|
|
|
+ if (result != ISC_R_SUCCESS) goto cleanup; \
|
|
|
|
+ } while (0)
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+typedef isc_result_t (*register_func_t)(isc_mem_t *mctx, const char *name,
|
2011-06-02 10:26:12 +00:00
|
|
|
+ const char * const *argv,
|
|
|
|
+ const dns_dyndb_arguments_t *dyndb_args);
|
2008-12-16 13:14:16 +00:00
|
|
|
+typedef void (*destroy_func_t)(void);
|
|
|
|
+
|
|
|
|
+typedef struct dyndb_implementation dyndb_implementation_t;
|
|
|
|
+
|
|
|
|
+struct dyndb_implementation {
|
|
|
|
+ isc_mem_t *mctx;
|
|
|
|
+ void *handle;
|
|
|
|
+ register_func_t register_function;
|
|
|
|
+ destroy_func_t destroy_function;
|
|
|
|
+ LINK(dyndb_implementation_t) link;
|
|
|
|
+};
|
|
|
|
+
|
2009-04-22 06:47:57 +00:00
|
|
|
+struct dns_dyndb_arguments {
|
|
|
|
+ dns_view_t *view;
|
|
|
|
+ dns_zonemgr_t *zmgr;
|
|
|
|
+ isc_task_t *task;
|
|
|
|
+ isc_timermgr_t *timermgr;
|
|
|
|
+};
|
|
|
|
+
|
2008-12-16 13:14:16 +00:00
|
|
|
+/* List of implementations. Locked by dyndb_lock. */
|
|
|
|
+static LIST(dyndb_implementation_t) dyndb_implementations;
|
|
|
|
+/* Locks dyndb_implementations. */
|
|
|
|
+static isc_mutex_t dyndb_lock;
|
|
|
|
+static isc_once_t once = ISC_ONCE_INIT;
|
|
|
|
+
|
|
|
|
+static void
|
|
|
|
+dyndb_initialize(void) {
|
|
|
|
+ RUNTIME_CHECK(isc_mutex_init(&dyndb_lock) == ISC_R_SUCCESS);
|
|
|
|
+ INIT_LIST(dyndb_implementations);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+#if HAVE_DLFCN_H
|
|
|
|
+static isc_result_t
|
|
|
|
+load_symbol(void *handle, const char *symbol_name, void **symbolp)
|
|
|
|
+{
|
|
|
|
+ const char *errmsg;
|
|
|
|
+ void *symbol;
|
|
|
|
+
|
|
|
|
+ REQUIRE(handle != NULL);
|
|
|
|
+ REQUIRE(symbolp != NULL && *symbolp == NULL);
|
|
|
|
+
|
|
|
|
+ symbol = dlsym(handle, symbol_name);
|
|
|
|
+ if (symbol == NULL) {
|
|
|
|
+ errmsg = dlerror();
|
|
|
|
+ if (errmsg == NULL)
|
|
|
|
+ errmsg = "returned function pointer is NULL";
|
|
|
|
+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
|
|
|
|
+ DNS_LOGMODULE_DYNDB, ISC_LOG_ERROR,
|
|
|
|
+ "failed to lookup symbol %s: %s",
|
|
|
|
+ symbol_name, errmsg);
|
|
|
|
+ return ISC_R_FAILURE;
|
|
|
|
+ }
|
|
|
|
+ dlerror();
|
|
|
|
+
|
|
|
|
+ *symbolp = symbol;
|
|
|
|
+
|
|
|
|
+ return ISC_R_SUCCESS;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static isc_result_t
|
|
|
|
+load_library(isc_mem_t *mctx, const char *filename, dyndb_implementation_t **impp)
|
|
|
|
+{
|
|
|
|
+ isc_result_t result;
|
2009-04-27 19:35:39 +00:00
|
|
|
+ size_t module_size;
|
|
|
|
+ isc_buffer_t *module_buf = NULL;
|
|
|
|
+ isc_region_t module_region;
|
2011-06-02 10:26:12 +00:00
|
|
|
+ void *handle = NULL;
|
2008-12-16 13:14:16 +00:00
|
|
|
+ dyndb_implementation_t *imp;
|
|
|
|
+ register_func_t register_function = NULL;
|
|
|
|
+ destroy_func_t destroy_function = NULL;
|
|
|
|
+
|
|
|
|
+ REQUIRE(impp != NULL && *impp == NULL);
|
|
|
|
+
|
2009-04-27 19:35:39 +00:00
|
|
|
+ /* Build up the full path. */
|
|
|
|
+ module_size = strlen(DYNDB_LIBDIR) + strlen(filename) + 1;
|
|
|
|
+ CHECK(isc_buffer_allocate(mctx, &module_buf, module_size));
|
|
|
|
+ isc_buffer_putstr(module_buf, DYNDB_LIBDIR);
|
|
|
|
+ isc_buffer_putstr(module_buf, filename);
|
|
|
|
+ isc_buffer_putuint8(module_buf, 0);
|
|
|
|
+ isc_buffer_region(module_buf, &module_region);
|
|
|
|
+
|
|
|
|
+ handle = dlopen((char *)module_region.base, RTLD_LAZY);
|
2008-12-16 13:14:16 +00:00
|
|
|
+ if (handle == NULL) {
|
|
|
|
+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
|
|
|
|
+ DNS_LOGMODULE_DYNDB, ISC_LOG_ERROR,
|
|
|
|
+ "failed to dynamically load driver '%s': %s",
|
|
|
|
+ filename, dlerror());
|
|
|
|
+ result = ISC_R_FAILURE;
|
|
|
|
+ goto cleanup;
|
|
|
|
+ }
|
|
|
|
+ dlerror();
|
|
|
|
+
|
|
|
|
+ CHECK(load_symbol(handle, "dynamic_driver_init",
|
|
|
|
+ (void **)®ister_function));
|
|
|
|
+ CHECK(load_symbol(handle, "dynamic_driver_destroy",
|
|
|
|
+ (void **)&destroy_function));
|
|
|
|
+
|
|
|
|
+ imp = isc_mem_get(mctx, sizeof(dyndb_implementation_t));
|
|
|
|
+ if (imp == NULL) {
|
|
|
|
+ result = ISC_R_NOMEMORY;
|
|
|
|
+ goto cleanup;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ imp->mctx = NULL;
|
|
|
|
+ isc_mem_attach(mctx, &imp->mctx);
|
|
|
|
+ imp->handle = handle;
|
|
|
|
+ imp->register_function = register_function;
|
|
|
|
+ imp->destroy_function = destroy_function;
|
|
|
|
+ INIT_LINK(imp, link);
|
|
|
|
+
|
|
|
|
+ *impp = imp;
|
|
|
|
+
|
|
|
|
+cleanup:
|
2009-04-27 19:35:39 +00:00
|
|
|
+ if (result != ISC_R_SUCCESS && handle != NULL)
|
2008-12-16 13:14:16 +00:00
|
|
|
+ dlclose(handle);
|
2009-04-27 19:35:39 +00:00
|
|
|
+ if (module_buf != NULL)
|
|
|
|
+ isc_buffer_free(&module_buf);
|
2008-12-16 13:14:16 +00:00
|
|
|
+
|
|
|
|
+ return result;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static void
|
|
|
|
+unload_library(dyndb_implementation_t **impp)
|
|
|
|
+{
|
|
|
|
+ dyndb_implementation_t *imp;
|
|
|
|
+
|
|
|
|
+ REQUIRE(impp != NULL && *impp != NULL);
|
|
|
|
+
|
|
|
|
+ imp = *impp;
|
|
|
|
+
|
|
|
|
+ isc_mem_putanddetach(&imp->mctx, imp, sizeof(dyndb_implementation_t));
|
|
|
|
+
|
|
|
|
+ *impp = NULL;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+#else /* HAVE_DLFCN_H */
|
|
|
|
+static isc_result_t
|
|
|
|
+load_library(isc_mem_t *mctx, const char *filename, dyndb_implementation_t **impp)
|
|
|
|
+{
|
|
|
|
+ UNUSED(mctx);
|
|
|
|
+ UNUSED(filename);
|
|
|
|
+ UNUSED(impp);
|
|
|
|
+
|
|
|
|
+ isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_DYNDB,
|
|
|
|
+ ISC_LOG_ERROR,
|
|
|
|
+ "dynamic database support is not implemented")
|
|
|
|
+
|
|
|
|
+ return ISC_R_NOTIMPLEMENTED;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static void
|
|
|
|
+unload_library(dyndb_implementation_t **impp)
|
|
|
|
+{
|
|
|
|
+ dyndb_implementation_t *imp;
|
|
|
|
+
|
|
|
|
+ REQUIRE(impp != NULL && *impp != NULL);
|
|
|
|
+
|
|
|
|
+ imp = *impp;
|
|
|
|
+
|
|
|
|
+ isc_mem_putanddetach(&imp->mctx, imp, sizeof(dyndb_implementation_t));
|
|
|
|
+
|
|
|
|
+ *impp = NULL;
|
|
|
|
+}
|
|
|
|
+#endif /* HAVE_DLFCN_H */
|
|
|
|
+
|
|
|
|
+isc_result_t
|
|
|
|
+dns_dynamic_db_load(const char *libname, const char *name, isc_mem_t *mctx,
|
2011-06-02 10:26:12 +00:00
|
|
|
+ const char * const *argv,
|
|
|
|
+ const dns_dyndb_arguments_t *dyndb_args)
|
2008-12-16 13:14:16 +00:00
|
|
|
+{
|
|
|
|
+ isc_result_t result;
|
|
|
|
+ dyndb_implementation_t *implementation = NULL;
|
|
|
|
+
|
|
|
|
+ RUNTIME_CHECK(isc_once_do(&once, dyndb_initialize) == ISC_R_SUCCESS);
|
|
|
|
+
|
|
|
|
+ CHECK(load_library(mctx, libname, &implementation));
|
2009-04-22 06:47:57 +00:00
|
|
|
+ CHECK(implementation->register_function(mctx, name, argv, dyndb_args));
|
2008-12-16 13:14:16 +00:00
|
|
|
+
|
|
|
|
+ LOCK(&dyndb_lock);
|
|
|
|
+ APPEND(dyndb_implementations, implementation, link);
|
|
|
|
+ UNLOCK(&dyndb_lock);
|
|
|
|
+
|
|
|
|
+ return ISC_R_SUCCESS;
|
|
|
|
+
|
|
|
|
+cleanup:
|
|
|
|
+ if (implementation != NULL)
|
|
|
|
+ unload_library(&implementation);
|
|
|
|
+
|
|
|
|
+ return result;
|
|
|
|
+}
|
|
|
|
+
|
2009-02-12 15:21:08 +00:00
|
|
|
+void
|
2009-04-22 15:37:08 +00:00
|
|
|
+dns_dynamic_db_cleanup(isc_boolean_t exiting)
|
2008-12-16 13:14:16 +00:00
|
|
|
+{
|
|
|
|
+ dyndb_implementation_t *elem;
|
2009-04-22 15:37:08 +00:00
|
|
|
+ dyndb_implementation_t *prev;
|
2008-12-16 13:14:16 +00:00
|
|
|
+
|
|
|
|
+ RUNTIME_CHECK(isc_once_do(&once, dyndb_initialize) == ISC_R_SUCCESS);
|
|
|
|
+
|
|
|
|
+ LOCK(&dyndb_lock);
|
2009-04-22 15:37:08 +00:00
|
|
|
+ elem = TAIL(dyndb_implementations);
|
2008-12-16 13:14:16 +00:00
|
|
|
+ while (elem != NULL) {
|
2009-04-22 15:37:08 +00:00
|
|
|
+ prev = PREV(elem, link);
|
2008-12-16 13:14:16 +00:00
|
|
|
+ UNLINK(dyndb_implementations, elem, link);
|
|
|
|
+ elem->destroy_function();
|
|
|
|
+ unload_library(&elem);
|
2009-04-22 15:37:08 +00:00
|
|
|
+ elem = prev;
|
2008-12-16 13:14:16 +00:00
|
|
|
+ }
|
|
|
|
+ UNLOCK(&dyndb_lock);
|
|
|
|
+
|
2009-04-22 15:37:08 +00:00
|
|
|
+ if (exiting == ISC_TRUE)
|
|
|
|
+ isc_mutex_destroy(&dyndb_lock);
|
2008-12-16 13:14:16 +00:00
|
|
|
+}
|
2009-04-22 06:47:57 +00:00
|
|
|
+
|
|
|
|
+dns_dyndb_arguments_t *
|
|
|
|
+dns_dyndb_arguments_create(isc_mem_t *mctx)
|
|
|
|
+{
|
|
|
|
+ dns_dyndb_arguments_t *args;
|
|
|
|
+
|
|
|
|
+ args = isc_mem_get(mctx, sizeof(*args));
|
|
|
|
+ if (args != NULL)
|
|
|
|
+ memset(args, 0, sizeof(*args));
|
|
|
|
+
|
|
|
|
+ return args;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void
|
|
|
|
+dns_dyndb_arguments_destroy(isc_mem_t *mctx, dns_dyndb_arguments_t *args)
|
|
|
|
+{
|
|
|
|
+ REQUIRE(args != NULL);
|
|
|
|
+
|
|
|
|
+ dns_dyndb_set_view(args, NULL);
|
|
|
|
+ dns_dyndb_set_zonemgr(args, NULL);
|
|
|
|
+ dns_dyndb_set_task(args, NULL);
|
|
|
|
+ dns_dyndb_set_timermgr(args, NULL);
|
|
|
|
+
|
|
|
|
+ isc_mem_put(mctx, args, sizeof(*args));
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void
|
|
|
|
+dns_dyndb_set_view(dns_dyndb_arguments_t *args, dns_view_t *view)
|
|
|
|
+{
|
|
|
|
+ REQUIRE(args != NULL);
|
|
|
|
+
|
|
|
|
+ if (args->view != NULL)
|
|
|
|
+ dns_view_detach(&args->view);
|
|
|
|
+ if (view != NULL)
|
|
|
|
+ dns_view_attach(view, &args->view);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+dns_view_t *
|
|
|
|
+dns_dyndb_get_view(dns_dyndb_arguments_t *args)
|
|
|
|
+{
|
|
|
|
+ REQUIRE(args != NULL);
|
|
|
|
+
|
|
|
|
+ return args->view;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void
|
|
|
|
+dns_dyndb_set_zonemgr(dns_dyndb_arguments_t *args, dns_zonemgr_t *zmgr)
|
|
|
|
+{
|
|
|
|
+ REQUIRE(args != NULL);
|
|
|
|
+
|
|
|
|
+ if (args->zmgr != NULL)
|
|
|
|
+ dns_zonemgr_detach(&args->zmgr);
|
|
|
|
+ if (zmgr != NULL)
|
|
|
|
+ dns_zonemgr_attach(zmgr, &args->zmgr);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+dns_zonemgr_t *
|
|
|
|
+dns_dyndb_get_zonemgr(dns_dyndb_arguments_t *args)
|
|
|
|
+{
|
|
|
|
+ REQUIRE(args != NULL);
|
|
|
|
+
|
|
|
|
+ return args->zmgr;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void
|
|
|
|
+dns_dyndb_set_task(dns_dyndb_arguments_t *args, isc_task_t *task)
|
|
|
|
+{
|
|
|
|
+ REQUIRE(args != NULL);
|
|
|
|
+
|
|
|
|
+ if (args->task != NULL)
|
|
|
|
+ isc_task_detach(&args->task);
|
|
|
|
+ if (task != NULL)
|
|
|
|
+ isc_task_attach(task, &args->task);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+isc_task_t *
|
|
|
|
+dns_dyndb_get_task(dns_dyndb_arguments_t *args)
|
|
|
|
+{
|
|
|
|
+ REQUIRE(args != NULL);
|
|
|
|
+
|
|
|
|
+ return args->task;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void
|
|
|
|
+dns_dyndb_set_timermgr(dns_dyndb_arguments_t *args, isc_timermgr_t *timermgr)
|
|
|
|
+{
|
|
|
|
+ REQUIRE(args != NULL);
|
|
|
|
+
|
|
|
|
+ args->timermgr = timermgr;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+isc_timermgr_t *
|
|
|
|
+dns_dyndb_get_timermgr(dns_dyndb_arguments_t *args)
|
|
|
|
+{
|
|
|
|
+ REQUIRE(args != NULL);
|
|
|
|
+
|
|
|
|
+ return args->timermgr;
|
|
|
|
+}
|
2011-11-11 08:25:44 +00:00
|
|
|
diff -up bind-9.9.0b1/lib/dns/include/dns/dynamic_db.h.dyndb bind-9.9.0b1/lib/dns/include/dns/dynamic_db.h
|
|
|
|
--- bind-9.9.0b1/lib/dns/include/dns/dynamic_db.h.dyndb 2011-11-10 12:47:24.186292776 +0100
|
|
|
|
+++ bind-9.9.0b1/lib/dns/include/dns/dynamic_db.h 2011-11-10 12:47:24.186292776 +0100
|
2009-04-22 06:47:57 +00:00
|
|
|
@@ -0,0 +1,50 @@
|
2008-12-16 13:14:16 +00:00
|
|
|
+/*
|
2011-06-02 10:26:12 +00:00
|
|
|
+ * Copyright (C) 2008-2011 Red Hat, Inc.
|
2008-12-16 13:14:16 +00:00
|
|
|
+ *
|
|
|
|
+ * Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
+ * purpose with or without fee is hereby granted, provided that the above
|
|
|
|
+ * copyright notice and this permission notice appear in all copies.
|
|
|
|
+ *
|
2009-04-22 06:47:57 +00:00
|
|
|
+ * THE SOFTWARE IS PROVIDED "AS IS" AND Red Hat DISCLAIMS ALL WARRANTIES WITH
|
2008-12-16 13:14:16 +00:00
|
|
|
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
2009-04-22 06:47:57 +00:00
|
|
|
+ * AND FITNESS. IN NO EVENT SHALL Red Hat BE LIABLE FOR ANY SPECIAL, DIRECT,
|
2008-12-16 13:14:16 +00:00
|
|
|
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
|
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
|
|
|
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
+ * PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+#ifndef DYNAMIC_DB_H
|
|
|
|
+#define DYNAMIC_DB_H
|
|
|
|
+
|
|
|
|
+#include <isc/types.h>
|
2009-02-12 15:21:08 +00:00
|
|
|
+
|
2008-12-16 13:14:16 +00:00
|
|
|
+#include <dns/types.h>
|
|
|
|
+
|
2009-04-22 06:47:57 +00:00
|
|
|
+/*
|
|
|
|
+ * TODO:
|
|
|
|
+ * Reformat the prototypes.
|
|
|
|
+ * Add annotated comments.
|
|
|
|
+ */
|
|
|
|
+
|
2008-12-16 13:14:16 +00:00
|
|
|
+isc_result_t dns_dynamic_db_load(const char *libname, const char *name,
|
|
|
|
+ isc_mem_t *mctx, const char * const *argv,
|
2011-06-02 10:26:12 +00:00
|
|
|
+ const dns_dyndb_arguments_t *dyndb_args);
|
2008-12-16 13:14:16 +00:00
|
|
|
+
|
2009-04-22 15:37:08 +00:00
|
|
|
+void dns_dynamic_db_cleanup(isc_boolean_t exiting);
|
2008-12-16 13:14:16 +00:00
|
|
|
+
|
2009-04-22 06:47:57 +00:00
|
|
|
+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);
|
|
|
|
+
|
|
|
|
+void dns_dyndb_set_view(dns_dyndb_arguments_t *args, dns_view_t *view);
|
|
|
|
+dns_view_t *dns_dyndb_get_view(dns_dyndb_arguments_t *args);
|
|
|
|
+void dns_dyndb_set_zonemgr(dns_dyndb_arguments_t *args, dns_zonemgr_t *zmgr);
|
|
|
|
+dns_zonemgr_t *dns_dyndb_get_zonemgr(dns_dyndb_arguments_t *args);
|
|
|
|
+void dns_dyndb_set_task(dns_dyndb_arguments_t *args, isc_task_t *task);
|
|
|
|
+isc_task_t *dns_dyndb_get_task(dns_dyndb_arguments_t *args);
|
|
|
|
+void dns_dyndb_set_timermgr(dns_dyndb_arguments_t *args,
|
|
|
|
+ isc_timermgr_t *timermgr);
|
|
|
|
+isc_timermgr_t *dns_dyndb_get_timermgr(dns_dyndb_arguments_t *args);
|
|
|
|
+
|
2008-12-16 13:14:16 +00:00
|
|
|
+#endif
|
2011-11-11 08:25:44 +00:00
|
|
|
diff -up bind-9.9.0b1/lib/dns/include/dns/log.h.dyndb bind-9.9.0b1/lib/dns/include/dns/log.h
|
|
|
|
--- bind-9.9.0b1/lib/dns/include/dns/log.h.dyndb 2011-10-14 00:48:24.000000000 +0200
|
|
|
|
+++ bind-9.9.0b1/lib/dns/include/dns/log.h 2011-11-10 12:47:24.187292776 +0100
|
|
|
|
@@ -75,6 +75,7 @@ LIBDNS_EXTERNAL_DATA extern isc_logmodul
|
2008-12-16 13:14:16 +00:00
|
|
|
#define DNS_LOGMODULE_ACACHE (&dns_modules[25])
|
|
|
|
#define DNS_LOGMODULE_DLZ (&dns_modules[26])
|
2010-01-28 11:31:36 +00:00
|
|
|
#define DNS_LOGMODULE_DNSSEC (&dns_modules[27])
|
|
|
|
+#define DNS_LOGMODULE_DYNDB (&dns_modules[28])
|
2008-12-16 13:14:16 +00:00
|
|
|
|
|
|
|
ISC_LANG_BEGINDECLS
|
|
|
|
|
2011-11-11 08:25:44 +00:00
|
|
|
diff -up bind-9.9.0b1/lib/dns/include/dns/Makefile.in.dyndb bind-9.9.0b1/lib/dns/include/dns/Makefile.in
|
|
|
|
--- bind-9.9.0b1/lib/dns/include/dns/Makefile.in.dyndb 2011-03-02 00:48:07.000000000 +0100
|
|
|
|
+++ bind-9.9.0b1/lib/dns/include/dns/Makefile.in 2011-11-10 12:47:24.187292776 +0100
|
2009-11-03 11:06:16 +00:00
|
|
|
@@ -22,7 +22,7 @@ top_srcdir = @top_srcdir@
|
|
|
|
@BIND9_VERSION@
|
2009-09-15 12:56:46 +00:00
|
|
|
|
2009-11-03 11:06:16 +00:00
|
|
|
HEADERS = acl.h adb.h byaddr.h cache.h callbacks.h cert.h compress.h \
|
2009-09-15 12:56:46 +00:00
|
|
|
- db.h dbiterator.h dbtable.h diff.h dispatch.h dlz.h \
|
|
|
|
+ db.h dbiterator.h dbtable.h diff.h dispatch.h dlz.h dynamic_db.h \
|
2009-11-03 11:06:16 +00:00
|
|
|
dnssec.h ds.h events.h fixedname.h iptable.h journal.h \
|
|
|
|
keyflags.h keytable.h keyvalues.h lib.h log.h \
|
|
|
|
master.h masterdump.h message.h name.h ncache.h nsec.h \
|
2011-11-11 08:25:44 +00:00
|
|
|
diff -up bind-9.9.0b1/lib/dns/include/dns/types.h.dyndb bind-9.9.0b1/lib/dns/include/dns/types.h
|
|
|
|
--- bind-9.9.0b1/lib/dns/include/dns/types.h.dyndb 2011-07-02 01:47:44.000000000 +0200
|
|
|
|
+++ bind-9.9.0b1/lib/dns/include/dns/types.h 2011-11-10 12:47:24.187292776 +0100
|
2009-09-16 11:09:13 +00:00
|
|
|
@@ -60,6 +60,7 @@ typedef struct dns_dbtable dns_dbtable
|
2009-04-22 06:47:57 +00:00
|
|
|
typedef void dns_dbversion_t;
|
|
|
|
typedef struct dns_dlzimplementation dns_dlzimplementation_t;
|
|
|
|
typedef struct dns_dlzdb dns_dlzdb_t;
|
|
|
|
+typedef struct dns_dyndb_arguments dns_dyndb_arguments_t;
|
|
|
|
typedef struct dns_sdlzimplementation dns_sdlzimplementation_t;
|
|
|
|
typedef struct dns_decompress dns_decompress_t;
|
|
|
|
typedef struct dns_dispatch dns_dispatch_t;
|
2011-11-11 08:25:44 +00:00
|
|
|
diff -up bind-9.9.0b1/lib/dns/log.c.dyndb bind-9.9.0b1/lib/dns/log.c
|
|
|
|
--- bind-9.9.0b1/lib/dns/log.c.dyndb 2011-10-14 00:48:24.000000000 +0200
|
|
|
|
+++ bind-9.9.0b1/lib/dns/log.c 2011-11-10 12:47:24.188292776 +0100
|
|
|
|
@@ -81,6 +81,7 @@ LIBDNS_EXTERNAL_DATA isc_logmodule_t dns
|
2008-12-16 13:14:16 +00:00
|
|
|
{ "dns/acache", 0 },
|
|
|
|
{ "dns/dlz", 0 },
|
2010-01-28 11:31:36 +00:00
|
|
|
{ "dns/dnssec", 0 },
|
2008-12-16 13:14:16 +00:00
|
|
|
+ { "dns/dynamic_db", 0 },
|
|
|
|
{ NULL, 0 }
|
|
|
|
};
|
|
|
|
|
2011-11-11 08:25:44 +00:00
|
|
|
diff -up bind-9.9.0b1/lib/dns/Makefile.in.dyndb bind-9.9.0b1/lib/dns/Makefile.in
|
|
|
|
--- bind-9.9.0b1/lib/dns/Makefile.in.dyndb 2011-11-10 12:47:24.167292778 +0100
|
|
|
|
+++ bind-9.9.0b1/lib/dns/Makefile.in 2011-11-10 12:48:03.124290065 +0100
|
2011-02-21 16:12:57 +00:00
|
|
|
@@ -58,7 +58,7 @@ DNSOBJS = acache.@O@ acl.@O@ adb.@O@ bya
|
2011-11-11 08:25:44 +00:00
|
|
|
cache.@O@ callbacks.@O@ clientinfo.@O@ compress.@O@ \
|
2009-09-15 12:56:46 +00:00
|
|
|
db.@O@ dbiterator.@O@ dbtable.@O@ diff.@O@ dispatch.@O@ \
|
2011-02-21 16:12:57 +00:00
|
|
|
dlz.@O@ dns64.@O@ dnssec.@O@ ds.@O@ forward.@O@ iptable.@O@ \
|
|
|
|
- journal.@O@ keydata.@O@ keytable.@O@ \
|
|
|
|
+ dynamic_db.@O@ journal.@O@ keydata.@O@ keytable.@O@ \
|
|
|
|
lib.@O@ log.@O@ lookup.@O@ \
|
2009-09-15 12:56:46 +00:00
|
|
|
master.@O@ masterdump.@O@ message.@O@ \
|
|
|
|
name.@O@ ncache.@O@ nsec.@O@ nsec3.@O@ order.@O@ peer.@O@ \
|
2011-11-11 08:25:44 +00:00
|
|
|
@@ -87,7 +87,7 @@ DNSSRCS = acache.c acl.c adb.c byaddr.c
|
|
|
|
cache.c callbacks.c clientinfo.c compress.c \
|
2009-09-15 12:56:46 +00:00
|
|
|
db.c dbiterator.c dbtable.c diff.c dispatch.c \
|
2011-02-21 16:12:57 +00:00
|
|
|
dlz.c dns64.c dnssec.c ds.c forward.c iptable.c journal.c \
|
|
|
|
- keydata.c keytable.c lib.c log.c lookup.c \
|
|
|
|
+ dynamic_db.c keydata.c keytable.c lib.c log.c lookup.c \
|
2009-09-15 12:56:46 +00:00
|
|
|
master.c masterdump.c message.c \
|
|
|
|
name.c ncache.c nsec.c nsec3.c order.c peer.c portlist.c \
|
2011-02-21 16:12:57 +00:00
|
|
|
rbt.c rbtdb.c rbtdb64.c rcode.c rdata.c rdatalist.c \
|
2011-08-31 12:57:44 +00:00
|
|
|
@@ -118,6 +118,11 @@ version.@O@: version.c
|
2009-09-15 12:56:46 +00:00
|
|
|
-DLIBAGE=${LIBAGE} \
|
|
|
|
-c ${srcdir}/version.c
|
|
|
|
|
|
|
|
+dynamic_db.@O@: dynamic_db.c
|
|
|
|
+ ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
|
|
|
|
+ -DDYNDB_LIBDIR=\"@libdir@/bind/\" \
|
|
|
|
+ -c ${srcdir}/dynamic_db.c
|
|
|
|
+
|
|
|
|
libdns.@SA@: ${OBJS}
|
|
|
|
${AR} ${ARFLAGS} $@ ${OBJS}
|
|
|
|
${RANLIB} $@
|
2011-11-11 08:25:44 +00:00
|
|
|
diff -up bind-9.9.0b1/lib/isccfg/namedconf.c.dyndb bind-9.9.0b1/lib/isccfg/namedconf.c
|
|
|
|
--- bind-9.9.0b1/lib/isccfg/namedconf.c.dyndb 2011-10-13 03:32:34.000000000 +0200
|
|
|
|
+++ bind-9.9.0b1/lib/isccfg/namedconf.c 2011-11-10 12:47:24.190292776 +0100
|
2011-02-21 16:12:57 +00:00
|
|
|
@@ -89,6 +89,7 @@ static cfg_type_t cfg_type_controls;
|
2008-12-16 13:14:16 +00:00
|
|
|
static cfg_type_t cfg_type_controls_sockaddr;
|
|
|
|
static cfg_type_t cfg_type_destinationlist;
|
|
|
|
static cfg_type_t cfg_type_dialuptype;
|
|
|
|
+static cfg_type_t cfg_type_dynamic_db;
|
|
|
|
static cfg_type_t cfg_type_ixfrdifftype;
|
|
|
|
static cfg_type_t cfg_type_key;
|
|
|
|
static cfg_type_t cfg_type_logfile;
|
2011-11-11 08:25:44 +00:00
|
|
|
@@ -871,6 +872,7 @@ namedconf_or_view_clauses[] = {
|
2008-12-16 13:14:16 +00:00
|
|
|
{ "zone", &cfg_type_zone, CFG_CLAUSEFLAG_MULTI },
|
|
|
|
/* only 1 DLZ per view allowed */
|
|
|
|
{ "dlz", &cfg_type_dynamically_loadable_zones, 0 },
|
|
|
|
+ { "dynamic-db", &cfg_type_dynamic_db, CFG_CLAUSEFLAG_MULTI },
|
|
|
|
{ "server", &cfg_type_server, CFG_CLAUSEFLAG_MULTI },
|
2009-09-15 12:56:46 +00:00
|
|
|
{ "trusted-keys", &cfg_type_dnsseckeys, CFG_CLAUSEFLAG_MULTI },
|
2009-09-16 11:09:13 +00:00
|
|
|
{ "managed-keys", &cfg_type_managedkeys, CFG_CLAUSEFLAG_MULTI },
|
2011-11-11 08:25:44 +00:00
|
|
|
@@ -1878,6 +1880,40 @@ static cfg_type_t cfg_type_dialuptype =
|
2008-12-16 13:14:16 +00:00
|
|
|
&cfg_rep_string, dialup_enums
|
|
|
|
};
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ * Dynamic database clauses.
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+static cfg_clausedef_t
|
|
|
|
+dynamic_db_clauses[] = {
|
|
|
|
+ { "library", &cfg_type_qstring, 0 },
|
|
|
|
+ { "arg", &cfg_type_qstring, CFG_CLAUSEFLAG_MULTI },
|
|
|
|
+ { NULL, NULL, 0 }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static cfg_clausedef_t *
|
|
|
|
+dynamic_db_clausesets[] = {
|
|
|
|
+ dynamic_db_clauses,
|
|
|
|
+ NULL
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static cfg_type_t cfg_type_dynamic_db_opts = {
|
|
|
|
+ "dynamically_loadable_zones_opts", cfg_parse_map,
|
|
|
|
+ cfg_print_map, cfg_doc_map, &cfg_rep_map,
|
|
|
|
+ dynamic_db_clausesets
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static cfg_tuplefielddef_t dynamic_db_fields[] = {
|
|
|
|
+ { "name", &cfg_type_astring, 0 },
|
|
|
|
+ { "options", &cfg_type_dynamic_db_opts, 0 },
|
|
|
|
+ { NULL, NULL, 0 }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static cfg_type_t cfg_type_dynamic_db = {
|
|
|
|
+ "dynamic_db", cfg_parse_tuple, cfg_print_tuple, cfg_doc_tuple,
|
|
|
|
+ &cfg_rep_tuple, dynamic_db_fields
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
static const char *notify_enums[] = { "explicit", "master-only", NULL };
|
|
|
|
static isc_result_t
|
|
|
|
parse_notify_type(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
|