]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
4384. [bug] Change 4256 accidentally disabled logging of the
authorMark Andrews <marka@isc.org>
Fri, 17 Jun 2016 14:10:51 +0000 (00:10 +1000)
committerMark Andrews <marka@isc.org>
Fri, 17 Jun 2016 14:10:51 +0000 (00:10 +1000)
                        rndc command. [RT #42654]

CHANGES
bin/named/control.c
bin/tests/system/rndc/tests.sh

diff --git a/CHANGES b/CHANGES
index 4b8db33e571ce780258b77643d10436fc3c974ce..8befc560d4ca730d50ab1c95b25bfd49c0ed2eb1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+4384.  [bug]           Change 4256 accidentally disabled logging of the
+                       rndc command. [RT #42654]
+
 4383.  [bug]           Correct spelling error in stats channel description of
                        "EDNS client subnet option received". [RT #42633]
 
index 75fc2783342791411c140a12fe6516c3e5ee9e77..d947ebbfcae1ed60d6cce61e071c33bae852169e 100644 (file)
@@ -147,7 +147,7 @@ ns_control_docommand(isccc_sexpr_t *message, isc_boolean_t readonly,
                isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
                              NS_LOGMODULE_CONTROL, log_level,
                              "rejecting restricted control channel "
-                             "command '%s'", command);
+                             "command '%s'", cmdline);
                result = ISC_R_FAILURE;
                goto cleanup;
        }
@@ -155,7 +155,7 @@ ns_control_docommand(isccc_sexpr_t *message, isc_boolean_t readonly,
        isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
                      NS_LOGMODULE_CONTROL, log_level,
                      "received control channel command '%s'",
-                     command);
+                     cmdline);
 
        if (command_compare(command, NS_COMMAND_RELOAD)) {
                result = ns_server_reloadcommand(ns_g_server, lex, text);
index 232dde7d59079891d274a90cf5370943108a8df9..3b9f7453b75004d59151239c3f0a15093e0a619b 100644 (file)
@@ -481,7 +481,7 @@ status=`expr $status + $ret`
 n=`expr $n + 1`
 echo "I:test rndc status shows running on ($n)"
 ret=0
-$RNDC -s 10.53.0.5 -p 9953 -c ../common/rndc.conf status > rndc.output.test$n /dev/null 2>&1 || ret=1
+$RNDC -s 10.53.0.5 -p 9953 -c ../common/rndc.conf status > rndc.output.test$n 2>&1 || ret=1
 grep "^running on " rndc.output.test$n > /dev/null || ret=1
 if [ $ret != 0 ]; then echo "I:failed"; fi
 status=`expr $status + $ret`
@@ -533,6 +533,14 @@ grep "NOERROR" dig.out.test$n > /dev/null || ret=1
 if [ $ret != 0 ]; then echo " I:failed"; fi
 status=`expr $status + $ret`
 
+n=`expr $n + 1`
+echo "I:verify that the full command is logged ($n)"
+ret=0
+$RNDCCMD null with extra arguments > /dev/null 2>&1
+grep "received control channel command 'null with extra arguments'" ns2/named.run > /dev/null || ret=1
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+
 mv ns6/named.conf.save ns6/named.conf
 sleep 1
 $RNDC -s 10.53.0.6 -p 9953 -c ../common/rndc.conf reconfig > /dev/null || ret=1