summaryrefslogtreecommitdiff
path: root/bin/named/controlconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/named/controlconf.c')
-rw-r--r--bin/named/controlconf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/named/controlconf.c b/bin/named/controlconf.c
index 509a113b3597..a9d498401d49 100644
--- a/bin/named/controlconf.c
+++ b/bin/named/controlconf.c
@@ -24,6 +24,7 @@
#include <isc/base64.h>
#include <isc/buffer.h>
#include <isc/event.h>
+#include <isc/file.h>
#include <isc/mem.h>
#include <isc/net.h>
#include <isc/netaddr.h>
@@ -811,6 +812,13 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
char secret[1024];
isc_buffer_t b;
+ isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
+ NS_LOGMODULE_CONTROL, ISC_LOG_INFO,
+ "configuring command channel from '%s'",
+ ns_g_keyfile);
+ if (! isc_file_exists(ns_g_keyfile))
+ return (ISC_R_FILENOTFOUND);
+
CHECK(cfg_parser_create(mctx, ns_g_lctx, &pctx));
CHECK(cfg_parse_file(pctx, ns_g_keyfile, &cfg_type_rndckey, &config));
CHECK(cfg_map_get(config, "key", &key));