diff --git a/bin/delv/delv.c b/bin/delv/delv.c index 9fc62331cc..ac3b11f149 100644 --- a/bin/delv/delv.c +++ b/bin/delv/delv.c @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -2218,17 +2219,17 @@ init_cfgmgr(void) { * here depending on param args (as the code run by delv is the same * than named one). */ - REQUIRE(isc_cfgmgr_init(mctx, "/tmp/delv-cfgmgr-lmdb") == ISC_R_SUCCESS); + dns_cfgmgr_init(mctx); - isc_cfgmgr_mode(ISC_CFGMGR_MODEBUILTIN); - REQUIRE(isc_cfgmgr_rwtxn() == ISC_R_SUCCESS); - REQUIRE(isc_cfgmgr_commit() == ISC_R_SUCCESS); + dns_cfgmgr_mode(DNS_CFGMGR_MODEBUILTIN); + dns_cfgmgr_rwtxn(); + dns_cfgmgr_commit(); - isc_cfgmgr_mode(ISC_CFGMGR_MODEUSER); - REQUIRE(isc_cfgmgr_rwtxn() == ISC_R_SUCCESS); - REQUIRE(isc_cfgmgr_commit() == ISC_R_SUCCESS); + dns_cfgmgr_mode(DNS_CFGMGR_MODEUSER); + dns_cfgmgr_rwtxn(); + dns_cfgmgr_commit(); - isc_cfgmgr_mode(ISC_CFGMGR_MODERUNNING); + dns_cfgmgr_mode(DNS_CFGMGR_MODERUNNING); } int @@ -2290,7 +2291,7 @@ cleanup: dns_master_styledestroy(&style, mctx); } - isc_cfgmgr_deinit(); + dns_cfgmgr_deinit(); isc_managers_destroy(&mctx, &loopmgr, &netmgr); return 0; diff --git a/bin/named/main.c b/bin/named/main.c index e89523a84f..c4b53d9ba6 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -26,7 +26,6 @@ #include #include -#include #include #include #include @@ -46,6 +45,7 @@ #include #include +#include #include #include #include @@ -1224,7 +1224,7 @@ setup(void) { isc_result_totext(result)); } - REQUIRE(isc_cfgmgr_init(named_g_mctx, "/tmp/cfgmgr") == ISC_R_SUCCESS); + dns_cfgmgr_init(named_g_mctx); named_server_create(named_g_mctx, &named_g_server); ENSURE(named_g_server != NULL); sctx = named_g_server->sctx; @@ -1294,7 +1294,7 @@ cleanup(void) { } named_server_destroy(&named_g_server); - isc_cfgmgr_deinit(); + dns_cfgmgr_deinit(); named_builtin_deinit(); /* diff --git a/bin/named/server.c b/bin/named/server.c index 920e0bf76e..19e2fea19b 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -62,6 +61,7 @@ #include #include #include +#include #include #include #include @@ -612,7 +612,7 @@ configure_view_acl(dns_view_t *view, const cfg_obj_t *vconfig, * need to use something else to configure its ACL. */ if (view != NULL) { - result = dns_view_setacl(view, aclname, acl); + dns_view_setacl(view, aclname, acl); } if (aclp) { @@ -3824,12 +3824,12 @@ configure_view_acls(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig, */ if (cacheacl == NULL) { if (recursionacl != NULL) { - CHECK(dns_view_setacl(view, "allow-query-cache", - recursionacl)); + dns_view_setacl(view, "allow-query-cache", + recursionacl); cacheacl = recursionacl; } else if (queryacl != NULL) { - CHECK(dns_view_setacl(view, "allow-query-cache", - queryacl)); + dns_view_setacl(view, "allow-query-cache", + queryacl); cacheacl = queryacl; } } @@ -3840,12 +3840,12 @@ configure_view_acls(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig, */ if (recursionacl == NULL) { if (cacheacl != NULL) { - CHECK(dns_view_setacl(view, "allow-recursion", - cacheacl)); + dns_view_setacl(view, "allow-recursion", + cacheacl); recursionacl = cacheacl; } else if (queryacl != NULL) { - CHECK(dns_view_setacl(view, "allow-recursion", - queryacl)); + dns_view_setacl(view, "allow-recursion", + queryacl); recursionacl = queryacl; } } @@ -3855,8 +3855,8 @@ configure_view_acls(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig, * if set. */ if (cacheonacl == NULL && recursiononacl != NULL) { - CHECK(dns_view_setacl(view, "allow-query-cache-on", - recursiononacl)); + dns_view_setacl(view, "allow-query-cache-on", + recursiononacl); cacheonacl = recursiononacl; } @@ -3865,8 +3865,7 @@ configure_view_acls(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig, * if set. */ if (recursiononacl == NULL && cacheonacl != NULL) { - CHECK(dns_view_setacl(view, "allow-recursion-on", - cacheonacl)); + dns_view_setacl(view, "allow-recursion-on", cacheonacl); recursiononacl = cacheonacl; } @@ -3910,13 +3909,12 @@ configure_view_acls(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig, */ if (cacheacl == NULL) { CHECK(dns_acl_none(mctx, &cacheacl)); - CHECK(dns_view_setacl(view, "allow-query-cache", - cacheacl)); + dns_view_setacl(view, "allow-query-cache", cacheacl); } if (cacheonacl == NULL) { CHECK(dns_acl_none(mctx, &cacheonacl)); - CHECK(dns_view_setacl(view, "allow-query-cache-on", - cacheonacl)); + dns_view_setacl(view, "allow-query-cache-on", + cacheonacl); } } @@ -5209,7 +5207,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config, view->padding = (uint16_t)padding; CHECK(cfg_acl_fromconfig(aclobj, config, actx, named_g_mctx, 0, &acl)); - CHECK(dns_view_setacl(view, "response-padding", acl)); + dns_view_setacl(view, "response-padding", acl); dns_acl_detach(&acl); } @@ -7916,13 +7914,13 @@ apply_configuration(cfg_parser_t *configparser, cfg_obj_t *config, "the initial working directory is '%s'", cwd); } - isc_cfgmgr_mode(ISC_CFGMGR_MODEBUILTIN); - REQUIRE(isc_cfgmgr_rwtxn() == ISC_R_SUCCESS); - REQUIRE(isc_cfgmgr_commit() == ISC_R_SUCCESS); + dns_cfgmgr_mode(DNS_CFGMGR_MODEBUILTIN); + dns_cfgmgr_rwtxn(); + REQUIRE(dns_cfgmgr_commit() == ISC_R_SUCCESS); - isc_cfgmgr_mode(ISC_CFGMGR_MODEUSER); - REQUIRE(isc_cfgmgr_rwtxn() == ISC_R_SUCCESS); - REQUIRE(isc_cfgmgr_commit() == ISC_R_SUCCESS); + dns_cfgmgr_mode(DNS_CFGMGR_MODEUSER); + dns_cfgmgr_rwtxn(); + REQUIRE(dns_cfgmgr_commit() == ISC_R_SUCCESS); } /* @@ -7930,7 +7928,7 @@ apply_configuration(cfg_parser_t *configparser, cfg_obj_t *config, * user configuration. This is just a workaround until there is a clear * lifecycle model. */ - isc_cfgmgr_mode(ISC_CFGMGR_MODERUNNING); + dns_cfgmgr_mode(DNS_CFGMGR_MODERUNNING); /* Let's recreate the TLS context cache */ if (server->tlsctx_server_cache != NULL) { diff --git a/bin/named/statschannel.c b/bin/named/statschannel.c index fa7e5920ca..0fd33da533 100644 --- a/bin/named/statschannel.c +++ b/bin/named/statschannel.c @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -27,6 +26,7 @@ #include #include +#include #include #include #include @@ -3504,7 +3504,7 @@ struct cfgmgr_dumpctx { static void statschannel__cfgmgr_dumpprop(void *state, const char *name, - const isc_cfgmgr_val_t *val) { + const dns_cfgmgr_val_t *val) { cfgmgr_dumpctx_t *ctx = state; for (size_t i = 0; i < ctx->lvl * ctx->indent; i++) { @@ -3513,13 +3513,13 @@ statschannel__cfgmgr_dumpprop(void *state, const char *name, isc_buffer_printf(ctx->buffer, "%s ", name); switch (val->type) { - case ISC_CFGMGR_UINT32: + case DNS_CFGMGR_UINT32: isc_buffer_printf(ctx->buffer, "%u", val->uint32); break; - case ISC_CFGMGR_STRING: + case DNS_CFGMGR_STRING: isc_buffer_printf(ctx->buffer, "%s", val->string); break; - case ISC_CFGMGR_REF: + case DNS_CFGMGR_REF: isc_buffer_printf(ctx->buffer, "%p", val->ptr); break; default: @@ -3554,15 +3554,15 @@ statschannel__cfgmgr_dumplabelup(void *state) { } static void -statschannel__cfgmgr_dump(isc_cfgmgr_mode_t mode, isc_buffer_t *buffer) { +statschannel__cfgmgr_dump(dns_cfgmgr_mode_t mode, isc_buffer_t *buffer) { cfgmgr_dumpctx_t ctx = { .lvl = 0, .indent = 8, .buffer = buffer }; - isc_cfgmgr_mode(mode); - isc_cfgmgr_txn(); - isc_cfgmgr_foreach("/", 0, &ctx, statschannel__cfgmgr_dumpprop, + dns_cfgmgr_mode(mode); + dns_cfgmgr_txn(); + dns_cfgmgr_foreach("/", 0, &ctx, statschannel__cfgmgr_dumpprop, statschannel__cfgmgr_dumplabeldown, statschannel__cfgmgr_dumplabelup); - isc_cfgmgr_closetxn(); + dns_cfgmgr_closetxn(); } static void @@ -3597,13 +3597,13 @@ render_cfgmgr_dump(const isc_httpd_t *httpd, const isc_httpdurl_t *urlinfo, isc_buffer_putstr(b, "
");
 
 	isc_buffer_putstr(b, "# Builtin config dump\n\n");
-	statschannel__cfgmgr_dump(ISC_CFGMGR_MODEBUILTIN, b);
+	statschannel__cfgmgr_dump(DNS_CFGMGR_MODEBUILTIN, b);
 
 	isc_buffer_putstr(b, "\n\n\n\n# User/named.conf config dump\n\n");
-        statschannel__cfgmgr_dump(ISC_CFGMGR_MODEUSER, b);
+        statschannel__cfgmgr_dump(DNS_CFGMGR_MODEUSER, b);
 
 	isc_buffer_putstr(b, "\n\n\n\n# Running config dump\n\n");
-	statschannel__cfgmgr_dump(ISC_CFGMGR_MODERUNNING, b);
+	statschannel__cfgmgr_dump(DNS_CFGMGR_MODERUNNING, b);
 
 	isc_buffer_putstr(b, "
"); @@ -3614,7 +3614,7 @@ static isc_result_t cfgmgr_write(const isc_httpd_t *httpd, const isc_httpdurl_t *urlinfo, void *arg, unsigned int *retcode, const char **retmsg, const char **mimetype, isc_buffer_t *b, isc_httpdfree_t **freecb, void **freecb_args) { - isc_cfgmgr_val_t val; + dns_cfgmgr_val_t val; const char *base; uint16_t len; @@ -3651,14 +3651,14 @@ cfgmgr_write(const isc_httpd_t *httpd, const isc_httpdurl_t *urlinfo, void *arg, value = strtok(NULL, "&"); REQUIRE(name != NULL); - REQUIRE(isc_cfgmgr_rwtxn() == ISC_R_SUCCESS); + dns_cfgmgr_rwtxn(); if (value != NULL) { - val.type = ISC_CFGMGR_STRING; + val.type = DNS_CFGMGR_STRING; val.string = value; - REQUIRE(isc_cfgmgr_write(name, &val) == ISC_R_SUCCESS); + dns_cfgmgr_write(name, &val); } else { - isc_cfgmgr_write(name, NULL); + dns_cfgmgr_write(name, NULL); } if (strcmp(name, "/options/allow-query") == 0) { @@ -3676,7 +3676,7 @@ cfgmgr_write(const isc_httpd_t *httpd, const isc_httpdurl_t *urlinfo, void *arg, dns_view_setacl(view, "allow-query", newacl); } - REQUIRE(isc_cfgmgr_commit() == ISC_R_SUCCESS); + REQUIRE(dns_cfgmgr_commit() == ISC_R_SUCCESS); } return ISC_R_SUCCESS; diff --git a/bin/tests/system/pipelined/pipequeries.c b/bin/tests/system/pipelined/pipequeries.c index b8b1cdbf6e..6b0bafca7a 100644 --- a/bin/tests/system/pipelined/pipequeries.c +++ b/bin/tests/system/pipelined/pipequeries.c @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -218,17 +219,16 @@ init_cfgmgr(void) { /* * TODO temporary quick fix */ - REQUIRE(isc_cfgmgr_init(mctx, "/tmp/delv-cfgmgr-lmdb") == ISC_R_SUCCESS); + dns_cfgmgr_init(mctx); + dns_cfgmgr_mode(DNS_CFGMGR_MODEBUILTIN); + dns_cfgmgr_rwtxn(); + dns_cfgmgr_commit(); - isc_cfgmgr_mode(ISC_CFGMGR_MODEBUILTIN); - REQUIRE(isc_cfgmgr_rwtxn() == ISC_R_SUCCESS); - REQUIRE(isc_cfgmgr_commit() == ISC_R_SUCCESS); + dns_cfgmgr_mode(DNS_CFGMGR_MODEUSER); + dns_cfgmgr_rwtxn(); + dns_cfgmgr_commit(); - isc_cfgmgr_mode(ISC_CFGMGR_MODEUSER); - REQUIRE(isc_cfgmgr_rwtxn() == ISC_R_SUCCESS); - REQUIRE(isc_cfgmgr_commit() == ISC_R_SUCCESS); - - isc_cfgmgr_mode(ISC_CFGMGR_MODERUNNING); + dns_cfgmgr_mode(DNS_CFGMGR_MODERUNNING); } int @@ -309,7 +309,7 @@ main(int argc, char *argv[]) { isc_loopmgr_run(loopmgr); - isc_cfgmgr_deinit(); + dns_cfgmgr_deinit(); isc_managers_destroy(&mctx, &loopmgr, &netmgr); return 0; diff --git a/bin/tools/mdig.c b/bin/tools/mdig.c index c01f50c5b9..0c084c7309 100644 --- a/bin/tools/mdig.c +++ b/bin/tools/mdig.c @@ -39,6 +39,7 @@ #include #include +#include #include #include #include @@ -2085,17 +2086,17 @@ init_cfgmgr(void) { * unloading flow which run at some point (so it uses cfgmgr to reset * properties, and it crashes it cfgmgr is not initialized) */ - REQUIRE(isc_cfgmgr_init(mctx, "/tmp/mdig-cfgmgr-lmdb") == ISC_R_SUCCESS); + dns_cfgmgr_init(mctx); - isc_cfgmgr_mode(ISC_CFGMGR_MODEBUILTIN); - REQUIRE(isc_cfgmgr_rwtxn() == ISC_R_SUCCESS); - REQUIRE(isc_cfgmgr_commit() == ISC_R_SUCCESS); + dns_cfgmgr_mode(DNS_CFGMGR_MODEBUILTIN); + dns_cfgmgr_rwtxn(); + dns_cfgmgr_commit(); - isc_cfgmgr_mode(ISC_CFGMGR_MODEUSER); - REQUIRE(isc_cfgmgr_rwtxn() == ISC_R_SUCCESS); - REQUIRE(isc_cfgmgr_commit() == ISC_R_SUCCESS); + dns_cfgmgr_mode(DNS_CFGMGR_MODEUSER); + dns_cfgmgr_rwtxn(); + dns_cfgmgr_commit(); - isc_cfgmgr_mode(ISC_CFGMGR_MODERUNNING); + dns_cfgmgr_mode(DNS_CFGMGR_MODERUNNING); } /*% Main processing routine for mdig */ @@ -2198,7 +2199,7 @@ main(int argc, char *argv[]) { isc_mem_free(mctx, default_query.ecs_addr); } - isc_cfgmgr_deinit(); + dns_cfgmgr_deinit(); isc_managers_destroy(&mctx, &loopmgr, &netmgr); return 0; } diff --git a/lib/dns/acl.c b/lib/dns/acl.c index 8b53ed6e99..3b735550fa 100644 --- a/lib/dns/acl.c +++ b/lib/dns/acl.c @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -24,6 +23,7 @@ #include #include +#include #include #include "acl_p.h" @@ -799,9 +799,9 @@ dns__acl_cfgmgrdetach(void *ptr) { dns_acl_unref((dns_acl_t *)ptr); } -isc_cfgmgr_val_t +dns_cfgmgr_val_t dns_acl_cfgmgrval(const dns_acl_t *acl) { - return (isc_cfgmgr_val_t){ .type = ISC_CFGMGR_REF, + return (dns_cfgmgr_val_t){ .type = DNS_CFGMGR_REF, .ptr = (void *)acl, .attach = dns__acl_cfgmgrattach, .detach = dns__acl_cfgmgrdetach }; diff --git a/lib/dns/include/dns/acl.h b/lib/dns/include/dns/acl.h index 3971855ed4..c96934c187 100644 --- a/lib/dns/include/dns/acl.h +++ b/lib/dns/include/dns/acl.h @@ -30,11 +30,11 @@ #include -#include #include #include #include +#include #include #include #include @@ -311,5 +311,5 @@ dns_acl_merge_ports_transports(dns_acl_t *dest, dns_acl_t *source, bool pos); *\li 'source' is a valid ACL object. */ -isc_cfgmgr_val_t +dns_cfgmgr_val_t dns_acl_cfgmgrval(const dns_acl_t *acl); diff --git a/lib/dns/include/dns/view.h b/lib/dns/include/dns/view.h index e70c553a02..362460eb33 100644 --- a/lib/dns/include/dns/view.h +++ b/lib/dns/include/dns/view.h @@ -1326,5 +1326,5 @@ dns_view_setmaxqueries(dns_view_t *view, uint16_t max_queries); dns_acl_t * dns_view_getacl(dns_view_t *view, const char *name); -isc_result_t +void dns_view_setacl(dns_view_t *view, const char *name, const dns_acl_t *acl); diff --git a/lib/dns/view.c b/lib/dns/view.c index feac54cc67..fb17220cbf 100644 --- a/lib/dns/view.c +++ b/lib/dns/view.c @@ -22,7 +22,6 @@ #endif /* ifdef HAVE_LMDB */ #include -#include #include #include #include @@ -38,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -2367,32 +2367,31 @@ dns_view_setmaxqueries(dns_view_t *view, uint16_t max_queries) { dns_acl_t * dns_view_getacl(dns_view_t *view, const char *name) { char path[512]; - isc_cfgmgr_val_t val; + dns_cfgmgr_val_t val; dns_acl_t *acl = NULL; /* * Temporary work around until there is a clear life-cycle model of the * transaction */ - REQUIRE(isc_cfgmgr_txn() == ISC_R_SUCCESS); + dns_cfgmgr_txn(); sprintf(path, "/views/%s%p/%s-computed", view->name, view, name); - if (isc_cfgmgr_read(path, &val) == ISC_R_SUCCESS) { - INSIST(val.type == ISC_CFGMGR_REF); + if (dns_cfgmgr_read(path, &val) == ISC_R_SUCCESS) { + INSIST(val.type == DNS_CFGMGR_REF); acl = val.ptr; } - isc_cfgmgr_closetxn(); + dns_cfgmgr_closetxn(); return acl; } -isc_result_t +void dns_view_setacl(dns_view_t *view, const char *name, const dns_acl_t *acl) { char path[512]; - isc_cfgmgr_val_t val = dns_acl_cfgmgrval(acl); - isc_result_t result; + dns_cfgmgr_val_t val = dns_acl_cfgmgrval(acl); REQUIRE(acl == NULL || DNS_ACL_VALID(acl)); @@ -2400,7 +2399,7 @@ dns_view_setacl(dns_view_t *view, const char *name, const dns_acl_t *acl) { * Temporary work around until there is a clear life-cycle model of the * transaction */ - REQUIRE(isc_cfgmgr_rwtxn() == ISC_R_SUCCESS); + dns_cfgmgr_rwtxn(); /* * View pointer is part of the key because when named is @@ -2415,9 +2414,7 @@ dns_view_setacl(dns_view_t *view, const char *name, const dns_acl_t *acl) { * let's keep this in mind... */ sprintf(path, "/views/%s%p/%s-computed", view->name, view, name); - result = isc_cfgmgr_write(path, &val); + dns_cfgmgr_write(path, &val); - REQUIRE(isc_cfgmgr_commit() == ISC_R_SUCCESS); - - return result; + REQUIRE(dns_cfgmgr_commit() == ISC_R_SUCCESS); } diff --git a/lib/dns/zone.c b/lib/dns/zone.c index 32952ff2b5..c0fb50132d 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -19,7 +19,6 @@ #include #include -#include #include #include #include @@ -50,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -24381,8 +24381,7 @@ dns_zone_setrad(dns_zone_t *zone, dns_name_t *name) { void dns_zone_setacl(dns_zone_t *zone, const char *name, const dns_acl_t *acl) { char path[512]; - isc_cfgmgr_val_t val = dns_acl_cfgmgrval(acl); - isc_result_t result; + dns_cfgmgr_val_t val = dns_acl_cfgmgrval(acl); if (zone->view == NULL) { return; @@ -24394,20 +24393,19 @@ dns_zone_setacl(dns_zone_t *zone, const char *name, const dns_acl_t *acl) { * Temporary work around until there is a clear life-cycle model of the * transaction */ - REQUIRE(isc_cfgmgr_rwtxn() == ISC_R_SUCCESS); + dns_cfgmgr_rwtxn(); sprintf(path, "/views/%s%p/zones/%s-%d/%s-computed", zone->view->name, zone->view, zone->strname, zone->type, name); - result = isc_cfgmgr_write(path, &val); - INSIST(result == ISC_R_SUCCESS || result == ISC_R_NOTFOUND); + dns_cfgmgr_write(path, &val); - REQUIRE(isc_cfgmgr_commit() == ISC_R_SUCCESS); + REQUIRE(dns_cfgmgr_commit() == ISC_R_SUCCESS); } dns_acl_t * dns_zone_getacl(dns_zone_t *zone, const char *name) { char path[512]; - isc_cfgmgr_val_t val; + dns_cfgmgr_val_t val; dns_acl_t *acl = NULL; if (zone->view == NULL) { @@ -24418,7 +24416,7 @@ dns_zone_getacl(dns_zone_t *zone, const char *name) { * Temporary work around until there is a clear life-cycle model of the * transaction */ - REQUIRE(isc_cfgmgr_txn() == ISC_R_SUCCESS); + dns_cfgmgr_txn(); /* * Zone type needs to be part of the key, as, for instance, it is @@ -24428,12 +24426,12 @@ dns_zone_getacl(dns_zone_t *zone, const char *name) { sprintf(path, "/views/%s%p/zones/%s-%d/%s-computed", zone->view->name, zone->view, zone->strname, zone->type, name); - if (isc_cfgmgr_read(path, &val) == ISC_R_SUCCESS) { - INSIST(val.type == ISC_CFGMGR_REF); + if (dns_cfgmgr_read(path, &val) == ISC_R_SUCCESS) { + INSIST(val.type == DNS_CFGMGR_REF); acl = val.ptr; } - isc_cfgmgr_closetxn(); + dns_cfgmgr_closetxn(); return acl; } diff --git a/lib/ns/query.c b/lib/ns/query.c index f79aac5658..4c0b57b200 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -20,7 +20,6 @@ #include #include -#include #include #include #include @@ -40,6 +39,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/ns/update.c b/lib/ns/update.c index e0223bec52..52f1d9b27a 100644 --- a/lib/ns/update.c +++ b/lib/ns/update.c @@ -15,7 +15,6 @@ #include #include -#include #include #include #include @@ -23,6 +22,7 @@ #include #include +#include #include #include #include diff --git a/tests/libtest/isc.c b/tests/libtest/isc.c index 2004d7c47c..78f070747e 100644 --- a/tests/libtest/isc.c +++ b/tests/libtest/isc.c @@ -21,7 +21,6 @@ #include #include -#include #include #include #include @@ -31,6 +30,8 @@ #include #include +#include + #include isc_mem_t *mctx = NULL; @@ -133,24 +134,23 @@ setup_cfgmgr(void **state ISC_ATTR_UNUSED) { * TODO: there is probably a working directory that can be used instead * of /tmp */ - REQUIRE(isc_cfgmgr_init(mctx, "/tmp/named-cfgmgr-lmdb") == ISC_R_SUCCESS); + dns_cfgmgr_init(mctx); + dns_cfgmgr_mode(DNS_CFGMGR_MODEBUILTIN); + dns_cfgmgr_rwtxn(); + dns_cfgmgr_commit(); - isc_cfgmgr_mode(ISC_CFGMGR_MODEBUILTIN); - REQUIRE(isc_cfgmgr_rwtxn() == ISC_R_SUCCESS); - REQUIRE(isc_cfgmgr_commit() == ISC_R_SUCCESS); + dns_cfgmgr_mode(DNS_CFGMGR_MODEUSER); + dns_cfgmgr_rwtxn(); + dns_cfgmgr_commit(); - isc_cfgmgr_mode(ISC_CFGMGR_MODEUSER); - REQUIRE(isc_cfgmgr_rwtxn() == ISC_R_SUCCESS); - REQUIRE(isc_cfgmgr_commit() == ISC_R_SUCCESS); - - isc_cfgmgr_mode(ISC_CFGMGR_MODERUNNING); + dns_cfgmgr_mode(DNS_CFGMGR_MODERUNNING); return 0; } int teardown_cfgmgr(void **state ISC_ATTR_UNUSED) { - isc_cfgmgr_deinit(); + dns_cfgmgr_deinit(); return 0; }