#include <config.h>
#include <isc/mem.h>
#include <isc/string.h>
#include <isc/util.h>
#include <isccfg/namedconf.h>
#include <isccfg/aclconf.h>
#include <dns/acl.h>
#include <dns/iptable.h>
#include <dns/fixedname.h>
#include <dns/log.h>
Go to the source code of this file.
#define LOOP_MAGIC ISC_MAGIC('L','O','O','P') |
isc_result_t cfg_aclconfctx_create | ( | isc_mem_t * | mctx, | |
cfg_aclconfctx_t ** | ret | |||
) |
Definition at line 42 of file aclconf.c.
References cleanup(), ISC_LIST_INIT, isc_mem_attach(), isc_mem_get, isc_mem_put, ISC_R_NOMEMORY, ISC_R_SUCCESS, isc_refcount_init(), cfg_aclconfctx::mctx, cfg_aclconfctx::references, and REQUIRE.
Referenced by bind9_check_controls(), check_viewconf(), and load_configuration().
void cfg_aclconfctx_attach | ( | cfg_aclconfctx_t * | src, | |
cfg_aclconfctx_t ** | dest | |||
) |
Definition at line 74 of file aclconf.c.
References isc_refcount_increment, cfg_aclconfctx::references, and REQUIRE.
Referenced by setup_newzones().
void cfg_aclconfctx_detach | ( | cfg_aclconfctx_t ** | actxp | ) |
Definition at line 83 of file aclconf.c.
References dns_acl_detach(), ISC_LIST_HEAD, ISC_LIST_NEXT, ISC_LIST_UNLINK, isc_mem_putanddetach, isc_refcount_decrement, cfg_aclconfctx::mctx, cfg_aclconfctx::references, and REQUIRE.
Referenced by bind9_check_controls(), check_viewconf(), load_configuration(), newzone_cfgctx_destroy(), and shutdown_server().
static isc_result_t get_acl_def | ( | const cfg_obj_t * | cctx, | |
const char * | name, | |||
const cfg_obj_t ** | ret | |||
) | [static] |
Definition at line 113 of file aclconf.c.
References cfg_list_first(), cfg_list_next(), cfg_listelt_value(), cfg_map_get(), cfg_obj_asstring(), cfg_tuple_get(), ISC_R_NOTFOUND, and ISC_R_SUCCESS.
Referenced by convert_named_acl().
static isc_result_t convert_named_acl | ( | const cfg_obj_t * | nameobj, | |
const cfg_obj_t * | cctx, | |||
isc_log_t * | lctx, | |||
cfg_aclconfctx_t * | ctx, | |||
isc_mem_t * | mctx, | |||
unsigned int | nest_level, | |||
dns_acl_t ** | target | |||
) | [static] |
Definition at line 137 of file aclconf.c.
References cfg_acl_fromconfig(), cfg_obj_asstring(), cfg_obj_log(), DE_CONST, dns_acl_attach(), get_acl_def(), ISC_LINK_INIT, ISC_LIST_APPEND, ISC_LIST_HEAD, ISC_LIST_NEXT, ISC_LIST_UNLINK, ISC_LOG_ERROR, ISC_LOG_WARNING, ISC_MAGIC_VALID, isc_mem_strdup, ISC_R_FAILURE, ISC_R_NOMEMORY, ISC_R_SUCCESS, LOOP_MAGIC, dns_acl::magic, dns_acl::mctx, and dns_acl::name.
Referenced by cfg_acl_fromconfig2(), and count_acl_elements().
static isc_result_t convert_keyname | ( | const cfg_obj_t * | keyobj, | |
isc_log_t * | lctx, | |||
isc_mem_t * | mctx, | |||
dns_name_t * | dnsname | |||
) | [static] |
Definition at line 194 of file aclconf.c.
References cfg_obj_asstring(), cfg_obj_log(), dns_fixedname_init, dns_fixedname_name, dns_name_dup(), dns_name_fromtext(), dns_rootname, isc_buffer_add, isc_buffer_constinit, ISC_LOG_WARNING, and ISC_R_SUCCESS.
Referenced by cfg_acl_fromconfig2().
static isc_result_t count_acl_elements | ( | const cfg_obj_t * | caml, | |
const cfg_obj_t * | cctx, | |||
isc_log_t * | lctx, | |||
cfg_aclconfctx_t * | ctx, | |||
isc_mem_t * | mctx, | |||
isc_uint32_t * | count, | |||
isc_boolean_t * | has_negative | |||
) | [static] |
Definition at line 226 of file aclconf.c.
References cfg_list_first(), cfg_list_next(), cfg_listelt_value(), cfg_obj_asstring(), cfg_obj_islist(), cfg_obj_isstring(), cfg_obj_istuple(), cfg_obj_istype(), cfg_obj_isvoid(), cfg_tuple_get(), cfg_type_keyref, convert_named_acl(), dns_acl_detach(), dns_acl::has_negatives, ISC_FALSE, ISC_R_SUCCESS, ISC_TRUE, dns_acl::length, name, and REQUIRE.
Referenced by cfg_acl_fromconfig2().
isc_result_t cfg_acl_fromconfig | ( | const cfg_obj_t * | caml, | |
const cfg_obj_t * | cctx, | |||
isc_log_t * | lctx, | |||
cfg_aclconfctx_t * | ctx, | |||
isc_mem_t * | mctx, | |||
unsigned int | nest_level, | |||
dns_acl_t ** | target | |||
) |
Definition at line 600 of file aclconf.c.
References cfg_acl_fromconfig2().
Referenced by add_listener(), bind9_check_controls(), cfg_acl_fromconfig2(), check_dns64(), check_filteraaaa(), check_recursionacls(), check_zoneconf(), checkacl(), configure_rrl(), configure_view(), configure_view_acl(), configure_view_sortlist(), configure_zone_acl(), convert_named_acl(), and update_listener().
isc_result_t cfg_acl_fromconfig2 | ( | const cfg_obj_t * | caml, | |
const cfg_obj_t * | cctx, | |||
isc_log_t * | lctx, | |||
cfg_aclconfctx_t * | ctx, | |||
isc_mem_t * | mctx, | |||
unsigned int | nest_level, | |||
isc_uint16_t | family, | |||
dns_acl_t ** | target | |||
) |
Definition at line 610 of file aclconf.c.
References dns_acl::alloc, cfg_acl_fromconfig(), cfg_list_first(), cfg_list_length(), cfg_list_next(), cfg_listelt_value(), cfg_obj_asnetprefix(), cfg_obj_asstring(), cfg_obj_islist(), cfg_obj_isnetprefix(), cfg_obj_isstring(), cfg_obj_istuple(), cfg_obj_istype(), cfg_obj_isvoid(), cfg_obj_log(), cfg_tuple_get(), cfg_type_ecsprefix, cfg_type_keyref, cleanup(), convert_keyname(), convert_named_acl(), count_acl_elements(), dns_acl_attach(), dns_acl_create(), dns_acl_detach(), dns_acl_merge(), DNS_ACL_VALID, dns_aclelementtype_keyname, dns_aclelementtype_localhost, dns_aclelementtype_localnets, dns_aclelementtype_nestedacl, dns_iptable_addprefix(), dns_iptable_addprefix2(), dns_name_init(), dns_acl::elements, isc_netaddr::family, dns_acl::has_negatives, INSIST, dns_acl::iptable, ISC_FALSE, ISC_LOG_WARNING, isc_netaddr_format(), ISC_NETADDR_FORMATSIZE, ISC_R_FAILURE, ISC_R_SUCCESS, ISC_TF, ISC_TRUE, dns_aclelement::keyname, dns_acl::length, name, dns_aclelement::negative, dns_aclelement::nestedacl, dns_aclelement::node_num, REQUIRE, and dns_aclelement::type.
Referenced by cfg_acl_fromconfig(), and ns_listenelt_fromconfig().