mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
4530. [bug] "dyndb" is dependent on dlopen existing / being
enabled. [RT #45291]
This commit is contained in:
@@ -1496,6 +1496,7 @@ configure_peer(const cfg_obj_t *cpeer, isc_mem_t *mctx, dns_peer_t **peerp) {
|
|||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_DLOPEN
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
configure_dyndb(const cfg_obj_t *dyndb, isc_mem_t *mctx,
|
configure_dyndb(const cfg_obj_t *dyndb, isc_mem_t *mctx,
|
||||||
const dns_dyndbctx_t *dctx)
|
const dns_dyndbctx_t *dctx)
|
||||||
@@ -1521,6 +1522,7 @@ configure_dyndb(const cfg_obj_t *dyndb, isc_mem_t *mctx,
|
|||||||
name, isc_result_totext(result));
|
name, isc_result_totext(result));
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
@@ -4669,6 +4671,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
|||||||
else
|
else
|
||||||
(void)cfg_map_get(config, "dyndb", &dyndb_list);
|
(void)cfg_map_get(config, "dyndb", &dyndb_list);
|
||||||
|
|
||||||
|
#ifdef HAVE_DLOPEN
|
||||||
for (element = cfg_list_first(dyndb_list);
|
for (element = cfg_list_first(dyndb_list);
|
||||||
element != NULL;
|
element != NULL;
|
||||||
element = cfg_list_next(element))
|
element = cfg_list_next(element))
|
||||||
@@ -4686,6 +4689,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
|||||||
|
|
||||||
CHECK(configure_dyndb(dyndb, mctx, dctx));
|
CHECK(configure_dyndb(dyndb, mctx, dctx));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Setup automatic empty zones. If recursion is off then
|
* Setup automatic empty zones. If recursion is off then
|
||||||
|
@@ -2988,6 +2988,9 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
|
|||||||
{
|
{
|
||||||
const cfg_obj_t *zones = NULL;
|
const cfg_obj_t *zones = NULL;
|
||||||
const cfg_obj_t *keys = NULL;
|
const cfg_obj_t *keys = NULL;
|
||||||
|
#ifndef HAVE_DLOPEN
|
||||||
|
const cfg_obj_t *dyndb = NULL;
|
||||||
|
#endif
|
||||||
const cfg_listelt_t *element, *element2;
|
const cfg_listelt_t *element, *element2;
|
||||||
isc_symtab_t *symtab = NULL;
|
isc_symtab_t *symtab = NULL;
|
||||||
isc_result_t result = ISC_R_SUCCESS;
|
isc_result_t result = ISC_R_SUCCESS;
|
||||||
@@ -3041,6 +3044,20 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
|
|||||||
result = ISC_R_FAILURE;
|
result = ISC_R_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef HAVE_DLOPEN
|
||||||
|
if (voptions != NULL)
|
||||||
|
(void)cfg_map_get(voptions, "dyndb", &dyndb);
|
||||||
|
else
|
||||||
|
(void)cfg_map_get(config, "dyndb", &dyndb);
|
||||||
|
|
||||||
|
if (dyndb != NULL) {
|
||||||
|
cfg_obj_log(dyndb, logctx, ISC_LOG_ERROR,
|
||||||
|
"dynamic loading of databases is not supported");
|
||||||
|
if (tresult != ISC_R_SUCCESS)
|
||||||
|
result = ISC_R_NOTIMPLEMENTED;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check that the response-policy and catalog-zones options
|
* Check that the response-policy and catalog-zones options
|
||||||
* refer to zones that exist.
|
* refer to zones that exist.
|
||||||
|
Reference in New Issue
Block a user