]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] log when using rndc.key
authorEvan Hunt <each@isc.org>
Fri, 28 Feb 2014 01:55:04 +0000 (17:55 -0800)
committerEvan Hunt <each@isc.org>
Fri, 28 Feb 2014 01:55:04 +0000 (17:55 -0800)
3767. [func] Log explicitly when using rndc.key to configure
command channel. [RT #35316]

CHANGES
bin/named/controlconf.c

diff --git a/CHANGES b/CHANGES
index d6a1716bf5d41165fa4de947dc91ed72f2f585b5..1208bffc6bb7798d8378150a1cf2931a5444a1af 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+3767.  [func]          Log explicitly when using rndc.key to configure
+                       command channel. [RT #35316]
+
 3766.  [cleanup]       Fixed problems with building outside the source
                        tree when using native PKCS#11. [RT #35459]
 
                             when queryperf is available.
                         - the encoding of PASSTHRU action to "rpz-passthru".
                             (The old encoding is still accepted.)
-                      [RT #26172]
+                       [RT #26172]
 
 
 3329.  [bug]           Handle RRSIG signer-name case consistently: We
index 02acb4ea0297daf8b842bb936f0fd92eeea7d94c..765afdd9662aa351281ff4544f34f0612825a1c5 100644 (file)
@@ -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>
@@ -823,6 +824,13 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
        unsigned int algtype;
        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));