static void
update_listener(named_controls_t *cp, controllistener_t **listenerp,
const cfg_obj_t *control, const cfg_obj_t *config,
- isc_sockaddr_t *addr, cfg_aclconfctx_t *aclconfctx,
+ isc_sockaddr_t *addr, cfg_aclconfctx_t *aclctx,
const char *socktext, isc_socktype_t type) {
controllistener_t *listener = NULL;
const cfg_obj_t *allow = NULL;
*/
if (control != NULL && type == isc_socktype_tcp) {
allow = cfg_tuple_get(control, "allow");
- result = cfg_acl_fromconfig(allow, config, aclconfctx,
+ result = cfg_acl_fromconfig(allow, config, aclctx,
listener->mctx, 0, &new_acl);
} else {
result = dns_acl_any(listener->mctx, &new_acl);
static void
add_listener(named_controls_t *cp, controllistener_t **listenerp,
const cfg_obj_t *control, const cfg_obj_t *config,
- isc_sockaddr_t *addr, cfg_aclconfctx_t *aclconfctx,
+ isc_sockaddr_t *addr, cfg_aclconfctx_t *aclctx,
const char *socktext, isc_socktype_t type) {
isc_mem_t *mctx = cp->server->mctx;
controllistener_t *listener = NULL;
const cfg_obj_t *readonly = NULL;
allow = cfg_tuple_get(control, "allow");
- CHECK(cfg_acl_fromconfig(allow, config, aclconfctx, mctx, 0,
+ CHECK(cfg_acl_fromconfig(allow, config, aclctx, mctx, 0,
&new_acl));
readonly = cfg_tuple_get(control, "read-only");
isc_result_t
named_controls_configure(named_controls_t *cp, const cfg_obj_t *config,
- cfg_aclconfctx_t *aclconfctx) {
+ cfg_aclconfctx_t *aclctx) {
controllistener_t *listener = NULL;
controllistenerlist_t new_listeners;
const cfg_obj_t *controlslist = NULL;
socktext);
update_listener(cp, &listener, control, config,
- &addr, aclconfctx, socktext,
+ &addr, aclctx, socktext,
isc_socktype_tcp);
if (listener != NULL) {
* This is a new listener.
*/
add_listener(cp, &listener, control,
- config, &addr, aclconfctx,
+ config, &addr, aclctx,
socktext,
isc_socktype_tcp);
}
isc_result_t
named_controls_configure(named_controls_t *controls, const cfg_obj_t *config,
- cfg_aclconfctx_t *aclconfctx);
+ cfg_aclconfctx_t *aclctx);
/*%<
* Configure zero or more command channels into 'controls'
* as defined in the configuration parse tree 'config'.
* The channels will evaluate ACLs in the context of
- * 'aclconfctx'.
+ * 'aclctx'.
*/
void
isc_signal_t *sighup;
isc_signal_t *sigusr1;
- cfg_aclconfctx_t *aclconfctx;
+ cfg_aclconfctx_t *aclctx;
};
#define NAMED_SERVER_MAGIC ISC_MAGIC('S', 'V', 'E', 'R')
*/
isc_result_t
named_register_one_plugin(const cfg_obj_t *config, const cfg_obj_t *obj,
- cfg_aclconfctx_t *actx, const char *plugin_path,
+ cfg_aclconfctx_t *aclctx, const char *plugin_path,
const char *parameters, void *callback_data);
isc_result_t
named_statschannels_configure(named_server_t *server, const cfg_obj_t *config,
- cfg_aclconfctx_t *aclconfctx);
+ cfg_aclconfctx_t *aclctx);
/*%<
* [Re]configure the statistics channels.
*
isc_result_t
named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
- const cfg_obj_t *zconfig, cfg_aclconfctx_t *ac,
+ const cfg_obj_t *zconfig, cfg_aclconfctx_t *aclctx,
dns_kasplist_t *kasplist, dns_zone_t *zone,
dns_zone_t *raw);
/*%<
* at zone creation time.
*
* Require:
- * \li 'ac' to point to an initialized cfg_aclconfctx_t.
+ * \li 'aclctx' to point to an initialized cfg_aclconfctx_t.
* \li 'kasplist' to be initialized.
* \li 'zone' to be initialized.
*/
isc_result_t
named_zone_loadplugins(dns_zone_t *zone, const cfg_obj_t *config,
const cfg_obj_t *toptions, const cfg_obj_t *zoptions,
- cfg_aclconfctx_t *actx);
+ cfg_aclconfctx_t *aclctx);
/*%<
* Load plugins that should run for this specific zone. Take care of cleaning
* up any pre-existing plugins first, if the zone is re-used.
* \li 'zoptions' to be a valid zone configuration tree
* \li 'toptions' to be NULL or valid template configuration tree
* \li 'zoptions' to be NULL or a valid zone configuration tree
- * \li 'actx' to be NULL (confcheck case only) or a valid acl conf ctx
+ * \li 'aclctx' to be NULL (confcheck case only) or a valid acl conf ctx
*/
cfg_obj_t *config;
cfg_obj_t *vconfig;
cfg_obj_t *nzf_config;
- cfg_aclconfctx_t *actx;
+ cfg_aclconfctx_t *aclctx;
} ns_cfgctx_t;
/*%
static isc_result_t
listenelt_fromconfig(const cfg_obj_t *listener, const cfg_obj_t *config,
- cfg_aclconfctx_t *actx, isc_mem_t *mctx, uint16_t family,
+ cfg_aclconfctx_t *aclctx, isc_mem_t *mctx, uint16_t family,
isc_tlsctx_cache_t *tlsctx_cache, ns_listenelt_t **target);
static isc_result_t
listenlist_fromconfig(const cfg_obj_t *listenlist, const cfg_obj_t *config,
- cfg_aclconfctx_t *actx, isc_mem_t *mctx, uint16_t family,
- isc_tlsctx_cache_t *tlsctx_cache,
+ cfg_aclconfctx_t *aclctx, isc_mem_t *mctx,
+ uint16_t family, isc_tlsctx_cache_t *tlsctx_cache,
ns_listenlist_t **target);
static isc_result_t
static isc_result_t
configure_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
- cfg_aclconfctx_t *actx, dns_kasplist_t *kasplist);
+ cfg_aclconfctx_t *aclctx, dns_kasplist_t *kasplist);
static const cfg_obj_t *
find_maplist(const cfg_obj_t *config, const char *listname, const char *name);
static isc_result_t
configure_view_acl(const cfg_obj_t *vconfig, const cfg_obj_t *config,
const cfg_obj_t *gconfig, const char *aclname,
- const char *acltuplename, cfg_aclconfctx_t *actx,
+ const char *acltuplename, cfg_aclconfctx_t *aclctx,
isc_mem_t *mctx, dns_acl_t **aclp) {
isc_result_t result;
const cfg_obj_t *maps[4];
aclobj = cfg_tuple_get(aclobj, acltuplename);
}
- result = cfg_acl_fromconfig(aclobj, config, actx, mctx, 0, aclp);
+ result = cfg_acl_fromconfig(aclobj, config, aclctx, mctx, 0, aclp);
return result;
}
dns_view_thaw(cz->view);
result = configure_zone(cfg->config, zoneobj, cfg->vconfig, cz->view,
&cz->cbd->server->viewlist,
- &cz->cbd->server->kasplist, cfg->actx, true,
+ &cz->cbd->server->kasplist, cfg->aclctx, true,
false, true, cz->mod);
dns_view_freeze(cz->view);
isc_loopmgr_resume();
result = configure_zone(data->config, zoneobj, cfg->vconfig, view,
&data->cbd->server->viewlist,
- &data->cbd->server->kasplist, cfg->actx, true,
+ &data->cbd->server->kasplist, cfg->aclctx, true,
false, true, true);
if (result != ISC_R_SUCCESS) {
isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
static isc_result_t
configure_rrl(dns_view_t *view, const cfg_obj_t *config, const cfg_obj_t *map,
- cfg_aclconfctx_t *actx) {
+ cfg_aclconfctx_t *aclctx) {
const cfg_obj_t *obj;
dns_rrl_t *rrl;
isc_result_t result;
obj = NULL;
result = cfg_map_get(map, "exempt-clients", &obj);
if (result == ISC_R_SUCCESS) {
- result = cfg_acl_fromconfig(obj, config, actx, isc_g_mctx, 0,
+ result = cfg_acl_fromconfig(obj, config, aclctx, isc_g_mctx, 0,
&rrl->exempt);
CHECK_RRL(result == ISC_R_SUCCESS, "invalid %s%s",
"address match list", "");
isc_result_t
named_register_one_plugin(const cfg_obj_t *config, const cfg_obj_t *obj,
- cfg_aclconfctx_t *actx, const char *plugin_path,
+ cfg_aclconfctx_t *aclctx, const char *plugin_path,
const char *parameters, void *callback_data) {
char full_path[PATH_MAX];
isc_result_t result;
result = ns_plugin_register(full_path, parameters, config,
cfg_obj_file(obj), cfg_obj_line(obj),
- isc_g_mctx, actx, hookdata);
+ isc_g_mctx, aclctx, hookdata);
if (result != ISC_R_SUCCESS) {
isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
ISC_LOG_ERROR,
cfg_obj_t *vconfig, named_cachelist_t *cachelist,
named_cachelist_t *oldcachelist, dns_kasplist_t *kasplist,
const cfg_obj_t *bindkeys, isc_mem_t *mctx,
- cfg_aclconfctx_t *actx, isc_tlsctx_cache_t *tlsctx_client_cache,
- bool need_hints, bool first_time) {
+ cfg_aclconfctx_t *aclctx,
+ isc_tlsctx_cache_t *tlsctx_client_cache, bool need_hints,
+ bool first_time) {
const cfg_obj_t *maps[4];
const cfg_obj_t *cfgmaps[3];
const cfg_obj_t *optionmaps[3];
CFG_LIST_FOREACH(zonelist, element) {
const cfg_obj_t *zconfig = cfg_listelt_value(element);
CHECK(configure_zone(config, zconfig, vconfig, view, viewlist,
- kasplist, actx, false, old_rpz_ok, false,
+ kasplist, aclctx, false, old_rpz_ok, false,
false));
zone_element_latest = element;
}
* from the newzone file for zones that were added during previous
* runs.
*/
- CHECK(configure_newzones(view, config, vconfig, actx, kasplist));
+ CHECK(configure_newzones(view, config, vconfig, aclctx, kasplist));
/*
* Create Dynamically Loadable Zone driver.
obj = NULL;
(void)cfg_map_get(map, "clients", &obj);
if (obj != NULL) {
- result = cfg_acl_fromconfig(obj, config, actx,
+ result = cfg_acl_fromconfig(obj, config, aclctx,
mctx, 0, &clients);
if (result != ISC_R_SUCCESS) {
goto cleanup;
obj = NULL;
(void)cfg_map_get(map, "mapped", &obj);
if (obj != NULL) {
- result = cfg_acl_fromconfig(obj, config, actx,
+ result = cfg_acl_fromconfig(obj, config, aclctx,
mctx, 0, &mapped);
if (result != ISC_R_SUCCESS) {
goto cleanup;
obj = NULL;
(void)cfg_map_get(map, "exclude", &obj);
if (obj != NULL) {
- result = cfg_acl_fromconfig(obj, config, actx,
+ result = cfg_acl_fromconfig(obj, config, aclctx,
mctx, 0, &excluded);
if (result != ISC_R_SUCCESS) {
goto cleanup;
* can be retrieved.)
*/
CHECK(configure_view_acl(vconfig, config, NULL, "match-clients", NULL,
- actx, isc_g_mctx, &view->matchclients));
+ aclctx, isc_g_mctx, &view->matchclients));
CHECK(configure_view_acl(vconfig, config, NULL, "match-destinations",
- NULL, actx, isc_g_mctx,
+ NULL, aclctx, isc_g_mctx,
&view->matchdestinations));
/*
/* named.conf only */
CHECK(configure_view_acl(vconfig, config, NULL, "allow-query", NULL,
- actx, isc_g_mctx, &view->queryacl));
+ aclctx, isc_g_mctx, &view->queryacl));
/* named.conf only */
CHECK(configure_view_acl(vconfig, config, NULL, "allow-query-cache",
- NULL, actx, isc_g_mctx, &view->cacheacl));
+ NULL, aclctx, isc_g_mctx, &view->cacheacl));
/* named.conf only */
CHECK(configure_view_acl(vconfig, config, NULL, "allow-query-cache-on",
- NULL, actx, isc_g_mctx, &view->cacheonacl));
+ NULL, aclctx, isc_g_mctx, &view->cacheonacl));
CHECK(configure_view_acl(vconfig, config, named_g_defaultconfig,
- "allow-query-on", NULL, actx, isc_g_mctx,
+ "allow-query-on", NULL, aclctx, isc_g_mctx,
&view->queryonacl));
CHECK(configure_view_acl(vconfig, config, named_g_defaultconfig,
- "allow-proxy", NULL, actx, isc_g_mctx,
+ "allow-proxy", NULL, aclctx, isc_g_mctx,
&view->proxyacl));
CHECK(configure_view_acl(vconfig, config, named_g_defaultconfig,
- "allow-proxy-on", NULL, actx, isc_g_mctx,
+ "allow-proxy-on", NULL, aclctx, isc_g_mctx,
&view->proxyonacl));
if (strcmp(view->name, "_bind") != 0 &&
{
/* named.conf only */
CHECK(configure_view_acl(vconfig, config, NULL,
- "allow-recursion", NULL, actx,
+ "allow-recursion", NULL, aclctx,
isc_g_mctx, &view->recursionacl));
/* named.conf only */
CHECK(configure_view_acl(vconfig, config, NULL,
- "allow-recursion-on", NULL, actx,
+ "allow-recursion-on", NULL, aclctx,
isc_g_mctx, &view->recursiononacl));
}
/* global default only */
CHECK(configure_view_acl(
NULL, NULL, named_g_defaultconfig,
- "allow-recursion", NULL, actx, isc_g_mctx,
+ "allow-recursion", NULL, aclctx, isc_g_mctx,
&view->recursionacl));
}
if (view->recursiononacl == NULL) {
/* global default only */
CHECK(configure_view_acl(
NULL, NULL, named_g_defaultconfig,
- "allow-recursion-on", NULL, actx, isc_g_mctx,
+ "allow-recursion-on", NULL, aclctx, isc_g_mctx,
&view->recursiononacl));
}
if (view->cacheacl == NULL) {
/* global default only */
CHECK(configure_view_acl(
NULL, NULL, named_g_defaultconfig,
- "allow-query-cache", NULL, actx, isc_g_mctx,
+ "allow-query-cache", NULL, aclctx, isc_g_mctx,
&view->cacheacl));
}
if (view->cacheonacl == NULL) {
/* global default only */
CHECK(configure_view_acl(
NULL, NULL, named_g_defaultconfig,
- "allow-query-cache-on", NULL, actx, isc_g_mctx,
- &view->cacheonacl));
+ "allow-query-cache-on", NULL, aclctx,
+ isc_g_mctx, &view->cacheonacl));
}
} else {
/*
if (view->queryacl == NULL) {
/* global default only */
CHECK(configure_view_acl(NULL, NULL, named_g_defaultconfig,
- "allow-query", NULL, actx, isc_g_mctx,
- &view->queryacl));
+ "allow-query", NULL, aclctx,
+ isc_g_mctx, &view->queryacl));
}
/*
* and is needed by some broken clients.
*/
CHECK(configure_view_acl(vconfig, config, named_g_defaultconfig,
- "no-case-compress", NULL, actx, isc_g_mctx,
+ "no-case-compress", NULL, aclctx, isc_g_mctx,
&view->nocasecompress));
/*
* Filter setting on addresses in the answer section.
*/
CHECK(configure_view_acl(vconfig, config, named_g_defaultconfig,
- "deny-answer-addresses", "acl", actx,
+ "deny-answer-addresses", "acl", aclctx,
isc_g_mctx, &view->denyansweracl));
CHECK(configure_view_nametable(vconfig, config, "deny-answer-addresses",
"except-from", isc_g_mctx,
*/
if (view->updateacl == NULL) {
CHECK(configure_view_acl(NULL, NULL, named_g_defaultconfig,
- "allow-update", NULL, actx, isc_g_mctx,
- &view->updateacl));
+ "allow-update", NULL, aclctx,
+ isc_g_mctx, &view->updateacl));
}
if (view->upfwdacl == NULL) {
CHECK(configure_view_acl(NULL, NULL, named_g_defaultconfig,
- "allow-update-forwarding", NULL, actx,
- isc_g_mctx, &view->upfwdacl));
+ "allow-update-forwarding", NULL,
+ aclctx, isc_g_mctx, &view->upfwdacl));
}
/*
*/
if (view->transferacl == NULL) {
CHECK(configure_view_acl(vconfig, config, named_g_defaultconfig,
- "allow-transfer", NULL, actx,
+ "allow-transfer", NULL, aclctx,
isc_g_mctx, &view->transferacl));
}
if (view->notifyacl == NULL) {
CHECK(configure_view_acl(vconfig, config, named_g_defaultconfig,
- "allow-notify", NULL, actx, isc_g_mctx,
- &view->notifyacl));
+ "allow-notify", NULL, aclctx,
+ isc_g_mctx, &view->notifyacl));
}
obj = NULL;
padding = 512U;
}
view->padding = (uint16_t)padding;
- CHECK(cfg_acl_fromconfig(aclobj, config, actx, isc_g_mctx, 0,
+ CHECK(cfg_acl_fromconfig(aclobj, config, aclctx, isc_g_mctx, 0,
&view->pad_acl));
}
view->plugins = hookdata.plugins;
view->plugins_free = ns_plugins_free;
- CHECK(cfg_pluginlist_foreach(config, plugin_list, actx,
+ CHECK(cfg_pluginlist_foreach(config, plugin_list, aclctx,
named_register_one_plugin,
&hookdata));
}
obj = NULL;
result = named_config_get(maps, "rate-limit", &obj);
if (result == ISC_R_SUCCESS) {
- result = configure_rrl(view, config, obj, actx);
+ result = configure_rrl(view, config, obj, aclctx);
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
const cfg_obj_t *vconfig, dns_view_t *view,
dns_viewlist_t *viewlist, dns_kasplist_t *kasplist,
- cfg_aclconfctx_t *actx, bool added, bool old_rpz_ok,
+ cfg_aclconfctx_t *aclctx, bool added, bool old_rpz_ok,
bool is_catz_member, bool modify) {
dns_view_t *pview = NULL; /* Production view */
dns_zone_t *zone = NULL; /* New or reused zone */
zone));
dns_zone_setstats(zone, named_g_server->zonestats);
}
- CHECK(named_zone_configure(config, vconfig, zconfig, actx,
+ CHECK(named_zone_configure(config, vconfig, zconfig, aclctx,
kasplist, zone, NULL));
dns_zone_attach(zone, &view->redirect);
goto cleanup;
/*
* Configure the zone.
*/
- CHECK(named_zone_configure(config, vconfig, zconfig, actx, kasplist,
+ CHECK(named_zone_configure(config, vconfig, zconfig, aclctx, kasplist,
zone, raw));
/*
dns_zone_rekey(zone, fullsign, false);
}
- result = named_zone_loadplugins(zone, config, toptions, zoptions, actx);
+ result = named_zone_loadplugins(zone, config, toptions, zoptions,
+ aclctx);
cleanup:
if (zone != NULL) {
static isc_result_t
setup_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
- cfg_parser_t *config_parser, cfg_aclconfctx_t *actx) {
+ cfg_parser_t *config_parser, cfg_aclconfctx_t *aclctx) {
isc_result_t result = ISC_R_SUCCESS;
bool allow = false;
ns_cfgctx_t *nzcfg = NULL;
isc_mem_attach(view->mctx, &nzcfg->mctx);
cfg_parser_attach(config_parser, &nzcfg->conf_parser);
cfg_parser_attach(named_g_addparser, &nzcfg->add_parser);
- cfg_aclconfctx_attach(actx, &nzcfg->actx);
+ cfg_aclconfctx_attach(aclctx, &nzcfg->aclctx);
result = dns_view_setnewzones(view, true, nzcfg, newzone_cfgctx_destroy,
mapsize);
if (result != ISC_R_SUCCESS) {
- cfg_aclconfctx_detach(&nzcfg->actx);
+ cfg_aclconfctx_detach(&nzcfg->aclctx);
cfg_parser_destroy(&nzcfg->conf_parser);
cfg_parser_destroy(&nzcfg->add_parser);
isc_mem_putanddetach(&nzcfg->mctx, nzcfg, sizeof(*nzcfg));
static isc_result_t
configure_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
- cfg_aclconfctx_t *actx, dns_kasplist_t *kasplist) {
+ cfg_aclconfctx_t *aclctx, dns_kasplist_t *kasplist) {
isc_result_t result;
ns_cfgctx_t *nzctx = NULL;
const cfg_obj_t *zonelist = NULL;
CFG_LIST_FOREACH(zonelist, element) {
const cfg_obj_t *zconfig = cfg_listelt_value(element);
CHECK(configure_zone(config, zconfig, vconfig, view,
- &named_g_server->viewlist, kasplist, actx,
- true, false, false, false));
+ &named_g_server->viewlist, kasplist,
+ aclctx, true, false, false, false));
}
result = ISC_R_SUCCESS;
typedef isc_result_t (*newzone_cfg_cb_t)(const cfg_obj_t *zconfig,
cfg_obj_t *config, cfg_obj_t *vconfig,
dns_view_t *view,
- cfg_aclconfctx_t *actx,
+ cfg_aclconfctx_t *aclctx,
dns_kasplist_t *kasplist);
/*%
* For each zone found in a NZD opened by the caller, create an object
* representing its configuration and invoke "callback" with the created
- * object, "config", "vconfig", "mctx", "view" and "actx" as arguments (all
+ * object, "config", "vconfig", "mctx", "view" and "aclctx" as arguments (all
* these are non-global variables required to invoke configure_zone()).
* Immediately interrupt processing if an error is encountered while
* transforming NZD data into a zone configuration object or if "callback"
static isc_result_t
for_all_newzone_cfgs(newzone_cfg_cb_t callback, cfg_obj_t *config,
cfg_obj_t *vconfig, dns_view_t *view,
- cfg_aclconfctx_t *actx, dns_kasplist_t *kasplist,
+ cfg_aclconfctx_t *aclctx, dns_kasplist_t *kasplist,
MDB_txn *txn, MDB_dbi dbi) {
const cfg_obj_t *zconfig, *zlist;
isc_result_t result = ISC_R_SUCCESS;
/*
* Invoke callback.
*/
- result = callback(zconfig, config, vconfig, view, actx,
+ result = callback(zconfig, config, vconfig, view, aclctx,
kasplist);
if (result != ISC_R_SUCCESS) {
break;
*/
static isc_result_t
configure_newzone(const cfg_obj_t *zconfig, cfg_obj_t *config,
- cfg_obj_t *vconfig, dns_view_t *view, cfg_aclconfctx_t *actx,
- dns_kasplist_t *kasplist) {
+ cfg_obj_t *vconfig, dns_view_t *view,
+ cfg_aclconfctx_t *aclctx, dns_kasplist_t *kasplist) {
return configure_zone(config, zconfig, vconfig, view,
- &named_g_server->viewlist, kasplist, actx, true,
+ &named_g_server->viewlist, kasplist, aclctx, true,
false, false, false);
}
static isc_result_t
configure_newzone_revert(const cfg_obj_t *zconfig, cfg_obj_t *config,
cfg_obj_t *vconfig, dns_view_t *view,
- cfg_aclconfctx_t *actx, dns_kasplist_t *kasplist) {
+ cfg_aclconfctx_t *aclctx, dns_kasplist_t *kasplist) {
UNUSED(config);
UNUSED(vconfig);
- UNUSED(actx);
+ UNUSED(aclctx);
UNUSED(kasplist);
configure_zone_setviewcommit(ISC_R_FAILURE, zconfig, view);
static isc_result_t
configure_newzones(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
- cfg_aclconfctx_t *actx, dns_kasplist_t *kasplist) {
+ cfg_aclconfctx_t *aclctx, dns_kasplist_t *kasplist) {
isc_result_t result;
MDB_txn *txn = NULL;
MDB_dbi dbi;
view->new_zone_db, view->name);
result = for_all_newzone_cfgs(configure_newzone, config, vconfig, view,
- actx, kasplist, txn, dbi);
+ aclctx, kasplist, txn, dbi);
if (result != ISC_R_SUCCESS) {
/*
* An error was encountered while attempting to configure zones
* terms of trying to make things right.
*/
(void)for_all_newzone_cfgs(configure_newzone_revert, config,
- vconfig, view, actx, kasplist, txn,
+ vconfig, view, aclctx, kasplist, txn,
dbi);
}
ISC_LOG_DEBUG(1), "apply_configuration: %s", __func__);
static isc_result_t
-create_views(cfg_obj_t *config, cfg_parser_t *parser,
- cfg_aclconfctx_t *aclconfctx, dns_viewlist_t *viewlist) {
+create_views(cfg_obj_t *config, cfg_parser_t *parser, cfg_aclconfctx_t *aclctx,
+ dns_viewlist_t *viewlist) {
isc_result_t result = ISC_R_SUCCESS;
const cfg_obj_t *views = NULL;
}
INSIST(view != NULL);
- result = setup_newzones(view, config, vconfig, parser,
- aclconfctx);
+ result = setup_newzones(view, config, vconfig, parser, aclctx);
dns_view_detach(&view);
if (result != ISC_R_SUCCESS) {
}
INSIST(view != NULL);
- result = setup_newzones(view, config, NULL, parser, aclconfctx);
+ result = setup_newzones(view, config, NULL, parser, aclctx);
dns_view_detach(&view);
}
static isc_result_t
configure_views(cfg_obj_t *config, const cfg_obj_t *bindkeys,
- cfg_aclconfctx_t *aclconfctx,
+ cfg_aclconfctx_t *aclctx,
isc_tlsctx_cache_t *tlsctx_client_cache,
dns_viewlist_t *viewlist, named_cachelist_t *cachelist,
dns_kasplist_t *kasplist, named_server_t *server,
result = configure_view(view, viewlist, config, vconfig,
cachelist, &server->cachelist, kasplist,
- bindkeys, isc_g_mctx, aclconfctx,
+ bindkeys, isc_g_mctx, aclctx,
tlsctx_client_cache, true, first_time);
if (result != ISC_R_SUCCESS) {
dns_view_detach(&view);
}
result = configure_view(view, viewlist, config, NULL, cachelist,
&server->cachelist, kasplist, bindkeys,
- isc_g_mctx, aclconfctx,
- tlsctx_client_cache, true, first_time);
+ isc_g_mctx, aclctx, tlsctx_client_cache,
+ true, first_time);
if (result != ISC_R_SUCCESS) {
dns_view_detach(&view);
return result;
result = configure_view(view, viewlist, config, vconfig,
cachelist, &server->cachelist, kasplist,
- bindkeys, isc_g_mctx, aclconfctx,
+ bindkeys, isc_g_mctx, aclctx,
tlsctx_client_cache, false, first_time);
if (result != ISC_R_SUCCESS) {
dns_view_detach(&view);
bool exclusive = true;
dns_aclenv_t *env =
ns_interfacemgr_getaclenv(named_g_server->interfacemgr);
- cfg_aclconfctx_t *tmpaclconfctx, *aclconfctx = NULL;
+ cfg_aclconfctx_t *tmpaclctx, *aclctx = NULL;
isc_tlsctx_cache_t *tlsctx_client_cache = NULL;
isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
maps[i] = NULL;
/* Create the ACL configuration context */
- result = cfg_aclconfctx_create(isc_g_mctx, &aclconfctx);
+ result = cfg_aclconfctx_create(isc_g_mctx, &aclctx);
if (result != ISC_R_SUCCESS) {
- goto cleanup_aclconfctx;
+ goto cleanup_aclctx;
}
result = configure_keystores(config, &keystorelist);
goto cleanup_kasplist;
}
- result = create_views(config, configparser, aclconfctx, &viewlist);
+ result = create_views(config, configparser, aclctx, &viewlist);
if (result != ISC_R_SUCCESS) {
goto cleanup_viewlist;
}
char *dir = UNCONST(cfg_obj_asstring(obj));
named_geoip_load(dir);
}
- aclconfctx->geoip = named_g_geoip;
+ aclctx->geoip = named_g_geoip;
#endif /* HAVE_GEOIP2 */
/*
result = named_config_get(maps, "sig0checks-quota-exempt", &obj);
if (result == ISC_R_SUCCESS) {
result = cfg_acl_fromconfig(
- obj, config, aclconfctx, isc_g_mctx, 0,
+ obj, config, aclctx, isc_g_mctx, 0,
&server->sctx->sig0checksquota_exempt);
INSIST(result == ISC_R_SUCCESS);
}
* no default.
*/
result = configure_view_acl(NULL, config, NULL, "blackhole", NULL,
- aclconfctx, isc_g_mctx,
+ aclctx, isc_g_mctx,
&server->sctx->blackholeacl);
if (result != ISC_R_SUCCESS) {
goto cleanup_bindkeys_parser;
goto cleanup_portsets;
}
result = listenlist_fromconfig(
- clistenon, config, aclconfctx, isc_g_mctx, AF_INET,
+ clistenon, config, aclctx, isc_g_mctx, AF_INET,
server->tlsctx_server_cache, &listenon);
if (result != ISC_R_SUCCESS) {
goto cleanup_portsets;
goto cleanup_portsets;
}
result = listenlist_fromconfig(
- clistenon, config, aclconfctx, isc_g_mctx, AF_INET6,
+ clistenon, config, aclctx, isc_g_mctx, AF_INET6,
server->tlsctx_server_cache, &listenon);
if (result != ISC_R_SUCCESS) {
goto cleanup_portsets;
*/
(void)configure_session_key(maps, server, isc_g_mctx, first_time);
- result = configure_views(config, bindkeys, aclconfctx,
- tlsctx_client_cache, &viewlist, &cachelist,
- &kasplist, server, first_time);
+ result = configure_views(config, bindkeys, aclctx, tlsctx_client_cache,
+ &viewlist, &cachelist, &kasplist, server,
+ first_time);
if (result != ISC_R_SUCCESS) {
goto cleanup_cachelist;
}
/*
* Swap server aclconfctx
*/
- tmpaclconfctx = server->aclconfctx;
- server->aclconfctx = aclconfctx;
- aclconfctx = tmpaclconfctx;
+ tmpaclctx = server->aclctx;
+ server->aclctx = aclctx;
+ aclctx = tmpaclctx;
/*
* Swap client TLS context
/* Configure the statistics channel(s) */
result = named_statschannels_configure(named_g_server, config,
- server->aclconfctx);
+ server->aclctx);
if (result != ISC_R_SUCCESS) {
isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
ISC_LOG_ERROR,
* Bind the control port(s).
*/
result = named_controls_configure(named_g_server->controls, config,
- server->aclconfctx);
+ server->aclctx);
if (result != ISC_R_SUCCESS) {
isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
ISC_LOG_ERROR, "binding control channel(s): %s",
dns_keystore_detach(&keystore);
}
-cleanup_aclconfctx:
- if (aclconfctx != NULL) {
- cfg_aclconfctx_detach(&aclconfctx);
+cleanup_aclctx:
+ if (aclctx != NULL) {
+ cfg_aclconfctx_detach(&aclctx);
}
isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
cleanup_session_key(server, server->mctx);
- if (server->aclconfctx != NULL) {
- cfg_aclconfctx_detach(&server->aclconfctx);
+ if (server->aclctx != NULL) {
+ cfg_aclconfctx_detach(&server->aclctx);
}
cfg_obj_destroy(named_g_parser, &named_g_defaultconfig);
static isc_result_t
listenlist_fromconfig(const cfg_obj_t *listenlist, const cfg_obj_t *config,
- cfg_aclconfctx_t *actx, isc_mem_t *mctx, uint16_t family,
- isc_tlsctx_cache_t *tlsctx_cache,
+ cfg_aclconfctx_t *aclctx, isc_mem_t *mctx,
+ uint16_t family, isc_tlsctx_cache_t *tlsctx_cache,
ns_listenlist_t **target) {
isc_result_t result;
ns_listenlist_t *dlist = NULL;
CFG_LIST_FOREACH(listenlist, element) {
ns_listenelt_t *delt = NULL;
const cfg_obj_t *listener = cfg_listelt_value(element);
- result = listenelt_fromconfig(listener, config, actx, mctx,
+ result = listenelt_fromconfig(listener, config, aclctx, mctx,
family, tlsctx_cache, &delt);
if (result != ISC_R_SUCCESS) {
goto cleanup;
*/
static isc_result_t
listenelt_fromconfig(const cfg_obj_t *listener, const cfg_obj_t *config,
- cfg_aclconfctx_t *actx, isc_mem_t *mctx, uint16_t family,
+ cfg_aclconfctx_t *aclctx, isc_mem_t *mctx, uint16_t family,
isc_tlsctx_cache_t *tlsctx_cache,
ns_listenelt_t **target) {
isc_result_t result;
}
result = cfg_acl_fromconfig(cfg_tuple_get(listener, "acl"), config,
- actx, mctx, family, &delt->acl);
+ aclctx, mctx, family, &delt->acl);
if (result != ISC_R_SUCCESS) {
ns_listenelt_destroy(delt);
return result;
result = isccfg_check_zoneconf(zoneobj, voptions, cfg->config, NULL,
NULL, NULL, NULL, view->name,
view->rdclass, BIND_CHECK_PLUGINS,
- cfg->actx, cfg->mctx);
+ cfg->aclctx, cfg->mctx);
if (result != ISC_R_SUCCESS) {
isc_loopmgr_resume();
goto cleanup;
/* Mark view unfrozen and configure zone */
dns_view_thaw(view);
result = configure_zone(cfg->config, zoneobj, cfg->vconfig, view,
- &server->viewlist, &server->kasplist, cfg->actx,
- true, false, false, false);
+ &server->viewlist, &server->kasplist,
+ cfg->aclctx, true, false, false, false);
dns_view_freeze(view);
isc_loopmgr_resume();
result = isccfg_check_zoneconf(zoneobj, voptions, cfg->config, NULL,
NULL, NULL, NULL, view->name,
view->rdclass, BIND_CHECK_PLUGINS,
- cfg->actx, cfg->mctx);
+ cfg->aclctx, cfg->mctx);
if (result != ISC_R_SUCCESS) {
isc_loopmgr_resume();
goto cleanup;
/* Reconfigure the zone */
dns_view_thaw(view);
result = configure_zone(cfg->config, zoneobj, cfg->vconfig, view,
- &server->viewlist, &server->kasplist, cfg->actx,
- true, false, false, true);
+ &server->viewlist, &server->kasplist,
+ cfg->aclctx, true, false, false, true);
dns_view_freeze(view);
isc_loopmgr_resume();
cfg_parser_destroy(&cfg->add_parser);
}
- if (cfg->actx != NULL) {
- cfg_aclconfctx_detach(&cfg->actx);
+ if (cfg->aclctx != NULL) {
+ cfg_aclconfctx_detach(&cfg->aclctx);
}
isc_mem_putanddetach(&cfg->mctx, cfg, sizeof(*cfg));
static isc_result_t
add_listener(named_server_t *server, named_statschannel_t **listenerp,
const cfg_obj_t *listen_params, const cfg_obj_t *config,
- isc_sockaddr_t *addr, cfg_aclconfctx_t *aclconfctx,
+ isc_sockaddr_t *addr, cfg_aclconfctx_t *aclctx,
const char *socktext) {
#if !defined(HAVE_LIBXML2) && !defined(HAVE_JSON_C)
UNUSED(server);
UNUSED(listen_params);
UNUSED(config);
UNUSED(addr);
- UNUSED(aclconfctx);
+ UNUSED(aclctx);
UNUSED(socktext);
return ISC_R_NOTIMPLEMENTED;
allow = cfg_tuple_get(listen_params, "allow");
if (allow != NULL && cfg_obj_islist(allow)) {
- result = cfg_acl_fromconfig(allow, config, aclconfctx,
+ result = cfg_acl_fromconfig(allow, config, aclctx,
listener->mctx, 0, &new_acl);
} else {
result = dns_acl_any(listener->mctx, &new_acl);
static void
update_listener(named_server_t *server, named_statschannel_t **listenerp,
const cfg_obj_t *listen_params, const cfg_obj_t *config,
- isc_sockaddr_t *addr, cfg_aclconfctx_t *aclconfctx,
+ isc_sockaddr_t *addr, cfg_aclconfctx_t *aclctx,
const char *socktext) {
named_statschannel_t *listener = NULL;
const cfg_obj_t *allow = NULL;
*/
allow = cfg_tuple_get(listen_params, "allow");
if (allow != NULL && cfg_obj_islist(allow)) {
- result = cfg_acl_fromconfig(allow, config, aclconfctx,
+ result = cfg_acl_fromconfig(allow, config, aclctx,
listener->mctx, 0, &new_acl);
} else {
result = dns_acl_any(listener->mctx, &new_acl);
isc_result_t
named_statschannels_configure(named_server_t *server, const cfg_obj_t *config,
- cfg_aclconfctx_t *aclconfctx) {
+ cfg_aclconfctx_t *aclctx) {
named_statschannellist_t new_listeners;
const cfg_obj_t *statschannellist = NULL;
char socktext[ISC_SOCKADDR_FORMATSIZE];
update_listener(server, &listener,
listen_params, config, &addr,
- aclconfctx, socktext);
+ aclctx, socktext);
if (listener != NULL) {
/*
r = add_listener(server, &listener,
listen_params, config,
- &addr, aclconfctx,
+ &addr, aclctx,
socktext);
if (r != ISC_R_SUCCESS) {
cfg_obj_log(
static isc_result_t
configure_zone_acl(const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
const cfg_obj_t *config, acl_type_t acltype,
- cfg_aclconfctx_t *actx, dns_zone_t *zone,
+ cfg_aclconfctx_t *aclctx, dns_zone_t *zone,
void (*setzacl)(dns_zone_t *, dns_acl_t *),
void (*clearzacl)(dns_zone_t *)) {
isc_result_t result;
}
parse_acl:
- result = cfg_acl_fromconfig(aclobj, config, actx, isc_g_mctx, 0, &acl);
+ result = cfg_acl_fromconfig(aclobj, config, aclctx, isc_g_mctx, 0,
+ &acl);
if (result != ISC_R_SUCCESS) {
return result;
}
isc_result_t
named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
- const cfg_obj_t *zconfig, cfg_aclconfctx_t *ac,
+ const cfg_obj_t *zconfig, cfg_aclconfctx_t *aclctx,
dns_kasplist_t *kasplist, dns_zone_t *zone,
dns_zone_t *raw) {
isc_result_t result;
*/
if (ztype == dns_zone_secondary || ztype == dns_zone_mirror) {
CHECK(configure_zone_acl(zconfig, vconfig, config, allow_notify,
- ac, mayberaw, dns_zone_setnotifyacl,
+ aclctx, mayberaw,
+ dns_zone_setnotifyacl,
dns_zone_clearnotifyacl));
}
/*
* XXXAG This probably does not make sense for stubs.
*/
- CHECK(configure_zone_acl(zconfig, vconfig, config, allow_query, ac,
+ CHECK(configure_zone_acl(zconfig, vconfig, config, allow_query, aclctx,
zone, dns_zone_setqueryacl,
dns_zone_clearqueryacl));
- CHECK(configure_zone_acl(zconfig, vconfig, config, allow_query_on, ac,
- zone, dns_zone_setqueryonacl,
+ CHECK(configure_zone_acl(zconfig, vconfig, config, allow_query_on,
+ aclctx, zone, dns_zone_setqueryonacl,
dns_zone_clearqueryonacl));
obj = NULL;
dns_zone_setisself(zone, isself, NULL);
CHECK(configure_zone_acl(
- zconfig, vconfig, config, allow_transfer, ac, zone,
+ zconfig, vconfig, config, allow_transfer, aclctx, zone,
dns_zone_setxfracl, dns_zone_clearxfracl));
obj = NULL;
dns_acl_t *updateacl;
CHECK(configure_zone_acl(zconfig, vconfig, config, allow_update,
- ac, mayberaw, dns_zone_setupdateacl,
+ aclctx, mayberaw,
+ dns_zone_setupdateacl,
dns_zone_clearupdateacl));
updateacl = dns_zone_getupdateacl(mayberaw);
if (ztype == dns_zone_secondary || ztype == dns_zone_mirror) {
CHECK(configure_zone_acl(zconfig, vconfig, config,
- allow_update_forwarding, ac, mayberaw,
- dns_zone_setforwardacl,
+ allow_update_forwarding, aclctx,
+ mayberaw, dns_zone_setforwardacl,
dns_zone_clearforwardacl));
}
isc_result_t
named_zone_loadplugins(dns_zone_t *zone, const cfg_obj_t *config,
const cfg_obj_t *toptions, const cfg_obj_t *zoptions,
- cfg_aclconfctx_t *actx) {
+ cfg_aclconfctx_t *aclctx) {
isc_result_t result = ISC_R_SUCCESS;
const cfg_obj_t *zpluginlist = NULL;
const cfg_obj_t *tpluginlist = NULL;
ns_plugins_create(zmctx, &hookdata.plugins);
dns_zone_setplugins(zone, hookdata.plugins, ns_plugins_free);
- result = cfg_pluginlist_foreach(config, tpluginlist, actx,
+ result = cfg_pluginlist_foreach(config, tpluginlist, aclctx,
named_register_one_plugin,
&hookdata);
if (result != ISC_R_SUCCESS) {
return result;
}
- result = cfg_pluginlist_foreach(config, zpluginlist, actx,
+ result = cfg_pluginlist_foreach(config, zpluginlist, aclctx,
named_register_one_plugin,
&hookdata);
}
}
static isc_result_t
-check_syntax(cfg_obj_t *fmap, const void *cfg, isc_mem_t *mctx, void *actx) {
+check_syntax(cfg_obj_t *fmap, const void *cfg, isc_mem_t *mctx, void *aclctx) {
isc_result_t result = ISC_R_SUCCESS;
const cfg_obj_t *aclobj = NULL;
dns_acl_t *acl = NULL;
}
CHECK(cfg_acl_fromconfig(aclobj, (const cfg_obj_t *)cfg,
- (cfg_aclconfctx_t *)actx, mctx, 0, &acl));
+ (cfg_aclconfctx_t *)aclctx, mctx, 0, &acl));
CHECK(parse_filter_a_on(fmap, "filter-a-on-v6", &f6));
CHECK(parse_filter_a_on(fmap, "filter-a-on-v4", &f4));
static isc_result_t
parse_parameters(filter_instance_t *inst, const char *parameters,
const void *cfg, const char *cfg_file, unsigned long cfg_line,
- isc_mem_t *mctx, void *actx) {
+ isc_mem_t *mctx, void *aclctx) {
isc_result_t result = ISC_R_SUCCESS;
cfg_parser_t *parser = NULL;
cfg_obj_t *param_obj = NULL;
CHECK(cfg_parse_buffer(parser, &b, cfg_file, cfg_line,
&cfg_type_parameters, 0, ¶m_obj));
- CHECK(check_syntax(param_obj, cfg, mctx, actx));
+ CHECK(check_syntax(param_obj, cfg, mctx, aclctx));
CHECK(parse_filter_a_on(param_obj, "filter-a-on-v6", &inst->v6_a));
CHECK(parse_filter_a_on(param_obj, "filter-a-on-v4", &inst->v4_a));
result = cfg_map_get(param_obj, "filter-a", &obj);
if (result == ISC_R_SUCCESS) {
CHECK(cfg_acl_fromconfig(obj, (const cfg_obj_t *)cfg,
- (cfg_aclconfctx_t *)actx, mctx, 0,
+ (cfg_aclconfctx_t *)aclctx, mctx, 0,
&inst->a_acl));
} else {
CHECK(dns_acl_any(mctx, &inst->a_acl));
*/
isc_result_t
plugin_register(const char *parameters, const void *cfg, const char *cfg_file,
- unsigned long cfg_line, isc_mem_t *mctx, void *actx,
+ unsigned long cfg_line, isc_mem_t *mctx, void *aclctx,
ns_hooktable_t *hooktable, ns_hooksource_t source,
void **instp) {
filter_instance_t *inst = NULL;
if (parameters != NULL) {
CHECK(parse_parameters(inst, parameters, cfg, cfg_file,
- cfg_line, mctx, actx));
+ cfg_line, mctx, aclctx));
}
isc_ht_init(&inst->ht, mctx, 1, ISC_HT_CASE_SENSITIVE);
isc_result_t
plugin_check(const char *parameters, const void *cfg, const char *cfg_file,
- unsigned long cfg_line, isc_mem_t *mctx, void *actx) {
+ unsigned long cfg_line, isc_mem_t *mctx, void *aclctx) {
isc_result_t result = ISC_R_SUCCESS;
cfg_parser_t *parser = NULL;
cfg_obj_t *param_obj = NULL;
CHECK(cfg_parse_buffer(parser, &b, cfg_file, cfg_line,
&cfg_type_parameters, 0, ¶m_obj));
- CHECK(check_syntax(param_obj, cfg, mctx, actx));
+ CHECK(check_syntax(param_obj, cfg, mctx, aclctx));
cleanup:
if (param_obj != NULL) {
}
static isc_result_t
-check_syntax(cfg_obj_t *fmap, const void *cfg, isc_mem_t *mctx, void *actx) {
+check_syntax(cfg_obj_t *fmap, const void *cfg, isc_mem_t *mctx, void *aclctx) {
isc_result_t result = ISC_R_SUCCESS;
const cfg_obj_t *aclobj = NULL;
dns_acl_t *acl = NULL;
}
CHECK(cfg_acl_fromconfig(aclobj, (const cfg_obj_t *)cfg,
- (cfg_aclconfctx_t *)actx, mctx, 0, &acl));
+ (cfg_aclconfctx_t *)aclctx, mctx, 0, &acl));
CHECK(parse_filter_aaaa_on(fmap, "filter-aaaa-on-v4", &f4));
CHECK(parse_filter_aaaa_on(fmap, "filter-aaaa-on-v6", &f6));
static isc_result_t
parse_parameters(filter_instance_t *inst, const char *parameters,
const void *cfg, const char *cfg_file, unsigned long cfg_line,
- isc_mem_t *mctx, void *actx) {
+ isc_mem_t *mctx, void *aclctx) {
isc_result_t result = ISC_R_SUCCESS;
cfg_parser_t *parser = NULL;
cfg_obj_t *param_obj = NULL;
CHECK(cfg_parse_buffer(parser, &b, cfg_file, cfg_line,
&cfg_type_parameters, 0, ¶m_obj));
- CHECK(check_syntax(param_obj, cfg, mctx, actx));
+ CHECK(check_syntax(param_obj, cfg, mctx, aclctx));
CHECK(parse_filter_aaaa_on(param_obj, "filter-aaaa-on-v4",
&inst->v4_aaaa));
result = cfg_map_get(param_obj, "filter-aaaa", &obj);
if (result == ISC_R_SUCCESS) {
CHECK(cfg_acl_fromconfig(obj, (const cfg_obj_t *)cfg,
- (cfg_aclconfctx_t *)actx, mctx, 0,
+ (cfg_aclconfctx_t *)aclctx, mctx, 0,
&inst->aaaa_acl));
} else {
CHECK(dns_acl_any(mctx, &inst->aaaa_acl));
*/
isc_result_t
plugin_register(const char *parameters, const void *cfg, const char *cfg_file,
- unsigned long cfg_line, isc_mem_t *mctx, void *actx,
+ unsigned long cfg_line, isc_mem_t *mctx, void *aclctx,
ns_hooktable_t *hooktable, ns_hooksource_t source,
void **instp) {
filter_instance_t *inst = NULL;
if (parameters != NULL) {
CHECK(parse_parameters(inst, parameters, cfg, cfg_file,
- cfg_line, mctx, actx));
+ cfg_line, mctx, aclctx));
}
isc_ht_init(&inst->ht, mctx, 1, ISC_HT_CASE_SENSITIVE);
isc_result_t
plugin_check(const char *parameters, const void *cfg, const char *cfg_file,
- unsigned long cfg_line, isc_mem_t *mctx, void *actx) {
+ unsigned long cfg_line, isc_mem_t *mctx, void *aclctx) {
isc_result_t result = ISC_R_SUCCESS;
cfg_parser_t *parser = NULL;
cfg_obj_t *param_obj = NULL;
CHECK(cfg_parse_buffer(parser, &b, cfg_file, cfg_line,
&cfg_type_parameters, 0, ¶m_obj));
- CHECK(check_syntax(param_obj, cfg, mctx, actx));
+ CHECK(check_syntax(param_obj, cfg, mctx, aclctx));
cleanup:
if (param_obj != NULL) {
*/
isc_result_t
plugin_register(const char *parameters, const void *cfg, const char *cfg_file,
- unsigned long cfg_line, isc_mem_t *mctx, void *actx,
+ unsigned long cfg_line, isc_mem_t *mctx, void *aclctx,
ns_hooktable_t *hooktable, ns_hooksource_t source,
void **instp) {
async_instance_t *inst = NULL;
UNUSED(source);
UNUSED(parameters);
UNUSED(cfg);
- UNUSED(actx);
+ UNUSED(aclctx);
isc_log_write(NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_HOOKS, ISC_LOG_INFO,
"registering 'test-async' module from %s:%lu", cfg_file,
isc_result_t
plugin_check(const char *parameters, const void *cfg, const char *cfg_file,
- unsigned long cfg_line, isc_mem_t *mctx, void *actx) {
+ unsigned long cfg_line, isc_mem_t *mctx, void *aclctx) {
UNUSED(parameters);
UNUSED(cfg);
UNUSED(cfg_file);
UNUSED(cfg_line);
UNUSED(mctx);
- UNUSED(actx);
+ UNUSED(aclctx);
return ISC_R_SUCCESS;
}
isc_result_t
plugin_register(const char *parameters, const void *cfg, const char *cfgfile,
- unsigned long cfgline, isc_mem_t *mctx, void *actx,
+ unsigned long cfgline, isc_mem_t *mctx, void *aclctx,
ns_hooktable_t *hooktable, ns_hooksource_t source,
void **instp) {
isc_result_t result;
char *sourcestr = NULL;
UNUSED(cfg);
- UNUSED(actx);
+ UNUSED(aclctx);
UNUSED(source);
inst = isc_mem_get(mctx, sizeof(*inst));
isc_result_t
plugin_check(const char *parameters, const void *cfg, const char *cfgfile,
- unsigned long cfgline, isc_mem_t *mctx, void *actx) {
+ unsigned long cfgline, isc_mem_t *mctx, void *aclctx) {
UNUSED(parameters);
UNUSED(cfg);
UNUSED(cfgfile);
UNUSED(cfgline);
UNUSED(mctx);
- UNUSED(actx);
+ UNUSED(aclctx);
return ISC_R_SUCCESS;
}
#endif /* if defined(HAVE_GEOIP2) */
isc_result_t
-cfg_aclconfctx_create(isc_mem_t *mctx, cfg_aclconfctx_t **ret) {
- cfg_aclconfctx_t *actx;
+cfg_aclconfctx_create(isc_mem_t *mctx, cfg_aclconfctx_t **aclctxp) {
+ cfg_aclconfctx_t *aclctx;
REQUIRE(mctx != NULL);
- REQUIRE(ret != NULL && *ret == NULL);
+ REQUIRE(aclctxp != NULL && *aclctxp == NULL);
- actx = isc_mem_get(mctx, sizeof(*actx));
+ aclctx = isc_mem_get(mctx, sizeof(*aclctx));
- isc_refcount_init(&actx->references, 1);
+ isc_refcount_init(&aclctx->references, 1);
- actx->mctx = NULL;
- isc_mem_attach(mctx, &actx->mctx);
- ISC_LIST_INIT(actx->named_acl_cache);
+ aclctx->mctx = NULL;
+ isc_mem_attach(mctx, &aclctx->mctx);
+ ISC_LIST_INIT(aclctx->named_acl_cache);
#if defined(HAVE_GEOIP2)
- actx->geoip = NULL;
+ aclctx->geoip = NULL;
#endif /* if defined(HAVE_GEOIP2) */
- *ret = actx;
+ *aclctxp = aclctx;
return ISC_R_SUCCESS;
}
}
void
-cfg_aclconfctx_detach(cfg_aclconfctx_t **actxp) {
- REQUIRE(actxp != NULL && *actxp != NULL);
+cfg_aclconfctx_detach(cfg_aclconfctx_t **aclctxp) {
+ REQUIRE(aclctxp != NULL && *aclctxp != NULL);
- cfg_aclconfctx_t *actx = *actxp;
- *actxp = NULL;
+ cfg_aclconfctx_t *aclctx = *aclctxp;
+ *aclctxp = NULL;
- if (isc_refcount_decrement(&actx->references) == 1) {
- isc_refcount_destroy(&actx->references);
- ISC_LIST_FOREACH(actx->named_acl_cache, dacl, nextincache) {
- ISC_LIST_UNLINK(actx->named_acl_cache, dacl,
+ if (isc_refcount_decrement(&aclctx->references) == 1) {
+ isc_refcount_destroy(&aclctx->references);
+ ISC_LIST_FOREACH(aclctx->named_acl_cache, dacl, nextincache) {
+ ISC_LIST_UNLINK(aclctx->named_acl_cache, dacl,
nextincache);
dns_acl_detach(&dacl);
}
- isc_mem_putanddetach(&actx->mctx, actx, sizeof(*actx));
+ isc_mem_putanddetach(&aclctx->mctx, aclctx, sizeof(*aclctx));
}
}
}
static isc_result_t
-checkacl(const char *aclname, cfg_aclconfctx_t *actx, const cfg_obj_t *zconfig,
- const cfg_obj_t *voptions, const cfg_obj_t *config, isc_mem_t *mctx) {
+checkacl(const char *aclname, cfg_aclconfctx_t *aclctx,
+ const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
+ const cfg_obj_t *config, isc_mem_t *mctx) {
isc_result_t result = ISC_R_SUCCESS;
const cfg_obj_t *aclobj = NULL;
const cfg_obj_t *options;
if (aclobj == NULL) {
return ISC_R_SUCCESS;
}
- result = cfg_acl_fromconfig(aclobj, config, actx, mctx, 0, &acl);
+ result = cfg_acl_fromconfig(aclobj, config, aclctx, mctx, 0, &acl);
if (acl != NULL) {
dns_acl_detach(&acl);
}
}
static isc_result_t
-check_viewacls(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
+check_viewacls(cfg_aclconfctx_t *aclctx, const cfg_obj_t *voptions,
const cfg_obj_t *config, isc_mem_t *mctx) {
isc_result_t result = ISC_R_SUCCESS, tresult;
int i = 0;
};
while (acls[i] != NULL) {
- tresult = checkacl(acls[i++], actx, NULL, voptions, config,
+ tresult = checkacl(acls[i++], aclctx, NULL, voptions, config,
mctx);
if (tresult != ISC_R_SUCCESS) {
result = tresult;
}
static isc_result_t
-check_dns64(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
+check_dns64(cfg_aclconfctx_t *aclctx, const cfg_obj_t *voptions,
const cfg_obj_t *config, isc_mem_t *mctx) {
isc_result_t result = ISC_R_SUCCESS;
const cfg_obj_t *dns64 = NULL;
dns_acl_t *acl = NULL;
isc_result_t tresult;
- tresult = cfg_acl_fromconfig(obj, config, actx,
- mctx, 0, &acl);
+ tresult = cfg_acl_fromconfig(
+ obj, config, aclctx, mctx, 0, &acl);
if (acl != NULL) {
dns_acl_detach(&acl);
}
} while (0)
static isc_result_t
-check_ratelimit(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
+check_ratelimit(cfg_aclconfctx_t *aclctx, const cfg_obj_t *voptions,
const cfg_obj_t *config, isc_mem_t *mctx) {
isc_result_t result = ISC_R_SUCCESS;
isc_result_t mresult;
dns_acl_t *acl = NULL;
isc_result_t tresult;
- tresult = cfg_acl_fromconfig(obj, config, actx, mctx, 0, &acl);
+ tresult = cfg_acl_fromconfig(obj, config, aclctx, mctx, 0,
+ &acl);
if (acl != NULL) {
dns_acl_detach(&acl);
}
* warning if they're inconsistent with the "recursion" option.
*/
static isc_result_t
-check_recursionacls(cfg_aclconfctx_t *actx, const cfg_obj_t *voptions,
+check_recursionacls(cfg_aclconfctx_t *aclctx, const cfg_obj_t *voptions,
const char *viewname, const cfg_obj_t *config,
isc_mem_t *mctx) {
const cfg_obj_t *options, *aclobj, *obj = NULL;
continue;
}
- tresult = cfg_acl_fromconfig(aclobj, config, actx, mctx, 0,
+ tresult = cfg_acl_fromconfig(aclobj, config, aclctx, mctx, 0,
&acl);
if (tresult != ISC_R_SUCCESS) {
static isc_result_t
check_listener(const cfg_obj_t *listener, const cfg_obj_t *config,
- cfg_aclconfctx_t *actx, isc_mem_t *mctx) {
+ cfg_aclconfctx_t *aclctx, isc_mem_t *mctx) {
isc_result_t tresult, result = ISC_R_SUCCESS;
const cfg_obj_t *ltup = NULL;
const cfg_obj_t *tlsobj = NULL, *httpobj = NULL;
}
tresult = cfg_acl_fromconfig(cfg_tuple_get(listener, "acl"), config,
- actx, mctx, 0, &acl);
+ aclctx, mctx, 0, &acl);
if (result == ISC_R_SUCCESS) {
result = tresult;
}
static isc_result_t
check_listeners(const cfg_obj_t *list, const cfg_obj_t *config,
- cfg_aclconfctx_t *actx, isc_mem_t *mctx) {
+ cfg_aclconfctx_t *aclctx, isc_mem_t *mctx) {
isc_result_t tresult, result = ISC_R_SUCCESS;
CFG_LIST_FOREACH(list, elt) {
const cfg_obj_t *obj = cfg_listelt_value(elt);
- tresult = check_listener(obj, config, actx, mctx);
+ tresult = check_listener(obj, config, aclctx, mctx);
if (result == ISC_R_SUCCESS) {
result = tresult;
}
uint32_t lifetime = 3600;
dns_keystorelist_t kslist;
const char *ccalg = "siphash24";
- cfg_aclconfctx_t *actx = NULL;
+ cfg_aclconfctx_t *aclctx = NULL;
static const char *sources[] = {
"query-source",
"query-source-v6",
}
}
- cfg_aclconfctx_create(mctx, &actx);
+ cfg_aclconfctx_create(mctx, &aclctx);
obj = NULL;
(void)cfg_map_get(options, "sig0checks-quota-exempt", &obj);
if (obj != NULL) {
dns_acl_t *acl = NULL;
- tresult = cfg_acl_fromconfig(obj, config, actx, mctx, 0, &acl);
+ tresult = cfg_acl_fromconfig(obj, config, aclctx, mctx, 0,
+ &acl);
if (acl != NULL) {
dns_acl_detach(&acl);
}
(void)cfg_map_get(options, "listen-on", &obj);
if (obj != NULL) {
INSIST(config != NULL);
- tresult = check_listeners(obj, config, actx, mctx);
+ tresult = check_listeners(obj, config, aclctx, mctx);
if (result == ISC_R_SUCCESS) {
result = tresult;
}
(void)cfg_map_get(options, "listen-on-v6", &obj);
if (obj != NULL) {
INSIST(config != NULL);
- tresult = check_listeners(obj, config, actx, mctx);
+ tresult = check_listeners(obj, config, aclctx, mctx);
if (result == ISC_R_SUCCESS) {
result = tresult;
}
}
}
- if (actx != NULL) {
- cfg_aclconfctx_detach(&actx);
+ if (aclctx != NULL) {
+ cfg_aclconfctx_detach(&aclctx);
}
return result;
*/
static bool
check_recursion(const cfg_obj_t *config, const cfg_obj_t *voptions,
- const cfg_obj_t *goptions, cfg_aclconfctx_t *actx,
+ const cfg_obj_t *goptions, cfg_aclconfctx_t *aclctx,
isc_mem_t *mctx) {
dns_acl_t *acl = NULL;
const cfg_obj_t *obj;
result = cfg_map_get(goptions, "allow-recursion", &obj);
}
if (result == ISC_R_SUCCESS) {
- result = cfg_acl_fromconfig(obj, config, actx, mctx, 0, &acl);
+ result = cfg_acl_fromconfig(obj, config, aclctx, mctx, 0, &acl);
if (result != ISC_R_SUCCESS) {
goto cleanup;
}
*/
struct check_one_plugin_data {
isc_mem_t *mctx;
- cfg_aclconfctx_t *actx;
+ cfg_aclconfctx_t *aclctx;
isc_result_t *check_result;
};
*/
static isc_result_t
check_one_plugin(const cfg_obj_t *config, const cfg_obj_t *obj,
- cfg_aclconfctx_t *actx, const char *plugin_path,
+ cfg_aclconfctx_t *aclctx, const char *plugin_path,
const char *parameters, void *callback_data) {
struct check_one_plugin_data *data = callback_data;
char full_path[PATH_MAX];
isc_result_t result = ISC_R_SUCCESS;
- UNUSED(actx);
+ UNUSED(aclctx);
result = ns_plugin_expandpath(plugin_path, full_path,
sizeof(full_path));
result = ns_plugin_check(full_path, parameters, config,
cfg_obj_file(obj), cfg_obj_line(obj),
- data->mctx, data->actx);
+ data->mctx, data->aclctx);
if (result != ISC_R_SUCCESS) {
cfg_obj_log(obj, ISC_LOG_ERROR, "%s: plugin check failed: %s",
full_path, isc_result_totext(result));
static isc_result_t
check_plugins(const cfg_obj_t *plugins, const cfg_obj_t *config,
- cfg_aclconfctx_t *actx, isc_mem_t *mctx) {
+ cfg_aclconfctx_t *aclctx, isc_mem_t *mctx) {
isc_result_t result = ISC_R_SUCCESS;
struct check_one_plugin_data check_one_plugin_data = {
.mctx = mctx,
- .actx = actx,
+ .aclctx = aclctx,
.check_result = &result,
};
- (void)cfg_pluginlist_foreach(config, plugins, actx, check_one_plugin,
+ (void)cfg_pluginlist_foreach(config, plugins, aclctx, check_one_plugin,
&check_one_plugin_data);
return result;
isc_symtab_t *files, isc_symtab_t *keydirs,
isc_symtab_t *inview, const char *viewname,
dns_rdataclass_t defclass, unsigned int flags,
- cfg_aclconfctx_t *actx, isc_mem_t *mctx) {
+ cfg_aclconfctx_t *aclctx, isc_mem_t *mctx) {
const char *znamestr = NULL;
const char *typestr = NULL;
const char *target = NULL;
* Check that ACLs expand correctly.
*/
for (i = 0; i < ARRAY_SIZE(acls); i++) {
- tresult = checkacl(acls[i], actx, zconfig, voptions, config,
+ tresult = checkacl(acls[i], aclctx, zconfig, voptions, config,
mctx);
if (tresult != ISC_R_SUCCESS) {
result = tresult;
* contradicts the purpose of the former.
*/
if (ztype == CFG_ZONE_MIRROR &&
- !check_recursion(config, voptions, goptions, actx, mctx))
+ !check_recursion(config, voptions, goptions, aclctx, mctx))
{
cfg_obj_log(zoptions, ISC_LOG_ERROR,
"zone '%s': mirror zones cannot be used if "
ddns = true;
} else if (au != NULL) {
dns_acl_t *acl = NULL;
- tresult = cfg_acl_fromconfig(au, config, actx, mctx, 0,
- &acl);
+ tresult = cfg_acl_fromconfig(au, config, aclctx, mctx,
+ 0, &acl);
if (tresult != ISC_R_SUCCESS) {
cfg_obj_log(au, ISC_LOG_ERROR,
"acl expansion failed: %s",
const cfg_obj_t *plugins = NULL;
(void)cfg_map_get(zoptions, "plugin", &plugins);
- tresult = check_plugins(plugins, config, actx, mctx);
+ tresult = check_plugins(plugins, config, aclctx, mctx);
if (tresult != ISC_R_SUCCESS) {
result = tresult;
}
isc_symtab_t *symtab = NULL;
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult = ISC_R_SUCCESS;
- cfg_aclconfctx_t *actx = NULL;
+ cfg_aclconfctx_t *aclctx = NULL;
const cfg_obj_t *obj = NULL;
const cfg_obj_t *options = NULL;
const cfg_obj_t *opts = NULL;
*/
isc_symtab_create(mctx, freekey, mctx, false, &symtab);
- cfg_aclconfctx_create(mctx, &actx);
+ cfg_aclconfctx_create(mctx, &aclctx);
if (voptions != NULL) {
(void)cfg_map_get(voptions, "zone", &zones);
tresult = isccfg_check_zoneconf(
zone, voptions, config, symtab, files, keydirs, inview,
- viewname, vclass, flags, actx, mctx);
+ viewname, vclass, flags, aclctx, mctx);
if (tresult != ISC_R_SUCCESS) {
result = ISC_R_FAILURE;
}
result = tresult;
}
- tresult = check_viewacls(actx, voptions, config, mctx);
+ tresult = check_viewacls(aclctx, voptions, config, mctx);
if (tresult != ISC_R_SUCCESS) {
result = tresult;
}
- tresult = check_recursionacls(actx, voptions, viewname, config, mctx);
+ tresult = check_recursionacls(aclctx, voptions, viewname, config, mctx);
if (tresult != ISC_R_SUCCESS) {
result = tresult;
}
- tresult = check_dns64(actx, voptions, config, mctx);
+ tresult = check_dns64(aclctx, voptions, config, mctx);
if (tresult != ISC_R_SUCCESS) {
result = tresult;
}
- tresult = check_ratelimit(actx, voptions, config, mctx);
+ tresult = check_ratelimit(aclctx, voptions, config, mctx);
if (tresult != ISC_R_SUCCESS) {
result = tresult;
}
(void)cfg_map_get(config, "plugin", &plugins);
}
- tresult = check_plugins(plugins, config, actx, mctx);
+ tresult = check_plugins(plugins, config, aclctx, mctx);
if (tresult != ISC_R_SUCCESS) {
result = tresult;
}
if (symtab != NULL) {
isc_symtab_destroy(&symtab);
}
- if (actx != NULL) {
- cfg_aclconfctx_detach(&actx);
+ if (aclctx != NULL) {
+ cfg_aclconfctx_detach(&aclctx);
}
return result;
static isc_result_t
check_controls(const cfg_obj_t *config, isc_mem_t *mctx) {
isc_result_t result = ISC_R_SUCCESS, tresult;
- cfg_aclconfctx_t *actx = NULL;
+ cfg_aclconfctx_t *aclctx = NULL;
const cfg_obj_t *allow = NULL;
const cfg_obj_t *control = NULL;
const cfg_obj_t *controls = NULL;
(void)cfg_map_get(config, "key", &keylist);
- cfg_aclconfctx_create(mctx, &actx);
+ cfg_aclconfctx_create(mctx, &aclctx);
isc_symtab_create(mctx, freekey, mctx, true, &symtab);
control = cfg_listelt_value(element2);
allow = cfg_tuple_get(control, "allow");
- tresult = cfg_acl_fromconfig(allow, config, actx, mctx,
- 0, &acl);
+ tresult = cfg_acl_fromconfig(allow, config, aclctx,
+ mctx, 0, &acl);
if (acl != NULL) {
dns_acl_detach(&acl);
}
}
}
- cfg_aclconfctx_detach(&actx);
+ cfg_aclconfctx_detach(&aclctx);
if (symtab != NULL) {
isc_symtab_destroy(&symtab);
}
***/
isc_result_t
-cfg_aclconfctx_create(isc_mem_t *mctx, cfg_aclconfctx_t **ret);
+cfg_aclconfctx_create(isc_mem_t *mctx, cfg_aclconfctx_t **aclctxp);
/*
* Creates and initializes an ACL configuration context.
*/
void
-cfg_aclconfctx_detach(cfg_aclconfctx_t **actxp);
+cfg_aclconfctx_detach(cfg_aclconfctx_t **aclctxp);
/*
* Removes a reference to an ACL configuration context; when references
* reaches zero, clears the contents and deallocate the structure.
unsigned int *idx);
typedef isc_result_t(pluginlist_cb_t)(
- const cfg_obj_t *config, const cfg_obj_t *obj, cfg_aclconfctx_t *actx,
+ const cfg_obj_t *config, const cfg_obj_t *obj, cfg_aclconfctx_t *aclctx,
const char *plugin_path, const char *parameters, void *callback_data);
/*%<
* Function prototype for the callback used with cfg_pluginlist_foreach().
isc_result_t
cfg_pluginlist_foreach(const cfg_obj_t *config, const cfg_obj_t *list,
- cfg_aclconfctx_t *actx, pluginlist_cb_t *callback,
+ cfg_aclconfctx_t *aclctx, pluginlist_cb_t *callback,
void *callback_data);
/*%<
* For every "plugin" stanza present in 'list' (which in turn is a part of
isc_symtab_t *files, isc_symtab_t *keydirs,
isc_symtab_t *inview, const char *viewname,
dns_rdataclass_t defclass, unsigned int flags,
- cfg_aclconfctx_t *actx, isc_mem_t *mctx);
+ cfg_aclconfctx_t *aclctx, isc_mem_t *mctx);
/*%<
* Check the syntactic validity of a zone statement, either in a
* named.conf file or in an "rndc addzone" or "rndc modzone" command.
isc_result_t
cfg_pluginlist_foreach(const cfg_obj_t *config, const cfg_obj_t *list,
- cfg_aclconfctx_t *actx, pluginlist_cb_t *callback,
+ cfg_aclconfctx_t *aclctx, pluginlist_cb_t *callback,
void *callback_data) {
isc_result_t result = ISC_R_SUCCESS;
parameters = cfg_obj_asstring(obj);
}
- result = callback(config, obj, actx, library, parameters,
+ result = callback(config, obj, aclctx, library, parameters,
callback_data);
if (result != ISC_R_SUCCESS) {
break;
isc_result_t
ns_plugin_register(const char *modpath, const char *parameters, const void *cfg,
const char *cfg_file, unsigned long cfg_line,
- isc_mem_t *mctx, void *actx, ns_hook_data_t *hookdata) {
+ isc_mem_t *mctx, void *aclctx, ns_hook_data_t *hookdata) {
isc_result_t result;
ns_plugin_t *plugin = NULL;
INSIST(hookdata->source != NS_HOOKSOURCE_UNDEFINED);
CHECK(plugin->register_func(parameters, cfg, cfg_file, cfg_line, mctx,
- actx, hookdata->hooktable, hookdata->source,
- &plugin->inst));
+ aclctx, hookdata->hooktable,
+ hookdata->source, &plugin->inst));
ISC_LIST_APPEND(*hookdata->plugins, plugin, link);
isc_result_t
ns_plugin_check(const char *modpath, const char *parameters, const void *cfg,
const char *cfg_file, unsigned long cfg_line, isc_mem_t *mctx,
- void *actx) {
+ void *aclctx) {
isc_result_t result;
ns_plugin_t *plugin = NULL;
CHECK(load_plugin(mctx, modpath, &plugin));
result = plugin->check_func(parameters, cfg, cfg_file, cfg_line, mctx,
- actx);
+ aclctx);
cleanup:
if (plugin != NULL) {
typedef isc_result_t
ns_plugin_register_t(const char *parameters, const void *cfg, const char *file,
- unsigned long line, isc_mem_t *mctx, void *actx,
+ unsigned long line, isc_mem_t *mctx, void *aclctx,
ns_hooktable_t *hooktable, ns_hooksource_t source,
void **instp);
/*%<
typedef isc_result_t
ns_plugin_check_t(const char *parameters, const void *cfg, const char *file,
- unsigned long line, isc_mem_t *mctx, void *actx);
+ unsigned long line, isc_mem_t *mctx, void *aclctx);
/*%<
* Check the validity of 'parameters'.
*/
isc_result_t
ns_plugin_register(const char *modpath, const char *parameters, const void *cfg,
const char *cfg_file, unsigned long cfg_line,
- isc_mem_t *mctx, void *actx, ns_hook_data_t *hookdata);
+ isc_mem_t *mctx, void *aclctx, ns_hook_data_t *hookdata);
/*%<
* Load the plugin module specified from the file 'modpath', and
* register an instance using 'parameters'.
* 'cfg_file' and 'cfg_line' specify the location of the plugin
* declaration in the configuration file.
*
- * 'cfg' and 'actx' are the configuration context and ACL configuration
+ * 'cfg' and 'aclctx' are the configuration context and ACL configuration
* context, respectively; they are passed as void * here in order to
* prevent this library from having a dependency on libisccfg).
*
isc_result_t
ns_plugin_check(const char *modpath, const char *parameters, const void *cfg,
const char *cfg_file, unsigned long cfg_line, isc_mem_t *mctx,
- void *actx);
+ void *aclctx);
/*%<
* Open the plugin module at 'modpath' and check the validity of
* 'parameters', logging any errors or warnings found, then
bool authdbset;
bool isreferral;
isc_mutex_t fetchlock;
- ns_hookasync_t *hookactx;
+ ns_hookasync_t *hookaclctx;
dns_rpz_st_t *rpz_st;
isc_bufferlist_t namebufs;
ISC_LIST(ns_dbversion_t) activeversions;
*fetchp = NULL;
}
}
- if (client->query.hookactx != NULL) {
- client->query.hookactx->cancel(client->query.hookactx);
- client->query.hookactx = NULL;
+ if (client->query.hookaclctx != NULL) {
+ client->query.hookaclctx->cancel(client->query.hookaclctx);
+ client->query.hookaclctx = NULL;
}
UNLOCK(&client->query.fetchlock);
}
REQUIRE(NS_CLIENT_VALID(client));
LOCK(&client->query.fetchlock);
- if (client->query.hookactx != NULL) {
- INSIST(rev->ctx == client->query.hookactx);
- client->query.hookactx = NULL;
+ if (client->query.hookaclctx != NULL) {
+ INSIST(rev->ctx == client->query.hookaclctx);
+ client->query.hookaclctx = NULL;
canceled = false;
client->inner.now = isc_stdtime_now();
} else {
CTRACE(ISC_LOG_DEBUG(3), "ns_query_hookasync");
REQUIRE(NS_CLIENT_VALID(client));
- REQUIRE(client->query.hookactx == NULL);
+ REQUIRE(client->query.hookaclctx == NULL);
REQUIRE(FETCH_RECTYPE_NORMAL(client) == NULL);
result = acquire_recursionquota(client);
qctx_save(qctx, &saved_qctx);
result = runasync(saved_qctx, client->manager->mctx, arg,
client->manager->loop, query_hookresume, client,
- &client->query.hookactx);
+ &client->query.hookaclctx);
if (result != ISC_R_SUCCESS) {
goto cleanup_and_detach_from_quota;
}
* this is actually called; otherwise tests would fail due to memory leak.
*/
static void
-destroy_hookactx(ns_hookasync_t **ctxp) {
+destroy_hookaclctx(ns_hookasync_t **ctxp) {
ns_hookasync_t *ctx = *ctxp;
*ctxp = NULL;
/* 'cancel' callback of hook recursion ctx. */
static void
-cancel_hookactx(ns_hookasync_t *ctx) {
+cancel_hookaclctx(ns_hookasync_t *ctx) {
/* Mark the hook data so the test can confirm this is called. */
((hookasync_data_t *)ctx->private)->canceled = true;
}
asdata->rev = rev;
*ctx = (ns_hookasync_t){
- .destroy = destroy_hookactx,
- .cancel = cancel_hookactx,
+ .destroy = destroy_hookaclctx,
+ .cancel = cancel_hookaclctx,
.private = asdata,
};
isc_mem_attach(mctx, &ctx->mctx);
asdata.rev->cb(asdata.rev);
/* Confirm necessary cleanup has been performed. */
- INSIST(qctx->client->query.hookactx == NULL);
+ INSIST(qctx->client->query.hookaclctx == NULL);
INSIST(qctx->client->inner.state == NS_CLIENTSTATE_WORKING);
INSIST(ns_stats_get_counter(
qctx->client->manager->sctx->nsstats,
INSIST(asdata.lasthookpoint == test->hookpoint2);
}
} else {
- INSIST(qctx->client->query.hookactx == NULL);
+ INSIST(qctx->client->query.hookaclctx == NULL);
}
/*
/* Cancel callback. Just need to be defined, it doesn't have to do anything. */
static void
-cancel_e2ehookactx(ns_hookasync_t *ctx) {
+cancel_e2ehookaclctx(ns_hookasync_t *ctx) {
UNUSED(ctx);
}
asdata->rev = rev;
*ctx = (ns_hookasync_t){
- .destroy = destroy_hookactx,
- .cancel = cancel_e2ehookactx,
+ .destroy = destroy_hookaclctx,
+ .cancel = cancel_e2ehookaclctx,
.private = asdata,
};
isc_mem_attach(mctx, &ctx->mctx);