diff --git a/CHANGES b/CHANGES index 2a42430a3a..142e5bdb6e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +3200. [doc] Some rndc functions were undocumented or were + missing from 'rndc -h' output. [RT #25555] + 3198. [doc] Clarified that dnssec-settime can alter keyfile permissions. [RT #24866] diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c index 69ca709bff..5811cfa141 100644 --- a/bin/rndc/rndc.c +++ b/bin/rndc/rndc.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rndc.c,v 1.131.20.2 2011/02/28 01:19:59 tbox Exp $ */ +/* $Id: rndc.c,v 1.131.20.3 2011/11/03 22:06:31 each Exp $ */ /*! \file */ @@ -142,13 +142,17 @@ command is one of the following:\n\ Flush the given name from the server's cache(s)\n\ status Display status of the server.\n\ recursing Dump the queries that are currently recursing (named.recursing)\n\ + tsig-list List all currently active TSIG keys, including both statically\n\ + configured and TKEY-negotiated keys.\n\ + tsig-delete keyname [view] \n\ + Delete a TKEY-negotiated TSIG key.\n\ validation newstate [view]\n\ Enable / disable DNSSEC validation.\n\ - *restart Restart the server.\n\ addzone [\"file\"] zone [class [view]] { zone-options }\n\ Add zone to given view. Requires new-zone-file option.\n\ delzone [\"file\"] zone [class [view]]\n\ Removes zone from given view. Requires new-zone-file option.\n\ + *restart Restart the server.\n\ \n\ * == not yet implemented\n\ Version: %s\n", diff --git a/bin/tests/system/tkey/clean.sh b/bin/tests/system/tkey/clean.sh index 7d64de5c9b..e0f248c488 100644 --- a/bin/tests/system/tkey/clean.sh +++ b/bin/tests/system/tkey/clean.sh @@ -15,8 +15,9 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: clean.sh,v 1.6 2007/09/26 03:22:44 marka Exp $ +# $Id: clean.sh,v 1.6.732.1 2011/11/03 22:06:31 each Exp $ rm -f dig.out.* random.data ns1/named.conf rm -f K* ns1/K* rm -f */named.memstats +rm -f rndc.out diff --git a/bin/tests/system/tkey/ns1/named.conf.in b/bin/tests/system/tkey/ns1/named.conf.in index 5de2e41859..a704509238 100644 --- a/bin/tests/system/tkey/ns1/named.conf.in +++ b/bin/tests/system/tkey/ns1/named.conf.in @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: named.conf.in,v 1.8 2009/01/30 23:47:50 tbox Exp $ */ +/* $Id: named.conf.in,v 1.8.412.1 2011/11/03 22:06:31 each Exp $ */ controls { /* empty */ }; @@ -34,6 +34,15 @@ options { allow-query-cache { any; }; }; +key rndc_key { + secret "1234abcd8765"; + algorithm hmac-md5; +}; + +controls { + inet 10.53.0.1 port 9953 allow { any; } keys { rndc_key; }; +}; + key "tkeytest." { algorithm hmac-md5; secret "0123456789ab"; diff --git a/bin/tests/system/tkey/tests.sh b/bin/tests/system/tkey/tests.sh index d9dd3ec77d..0ea0850957 100644 --- a/bin/tests/system/tkey/tests.sh +++ b/bin/tests/system/tkey/tests.sh @@ -15,7 +15,7 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: tests.sh,v 1.9 2009/07/19 23:47:55 tbox Exp $ +# $Id: tests.sh,v 1.9.368.1 2011/11/03 22:06:31 each Exp $ SYSTEMTESTTOP=.. . $SYSTEMTESTTOP/conf.sh @@ -79,5 +79,34 @@ do status=`expr $status + $ret` done +echo "I:creating new key using owner name bar.example." +ret=0 +keyname=`./keycreate $dhkeyname bar.example.` || ret=1 +if [ $ret != 0 ]; then + echo "I:failed" + echo "I:exit status: $status" + exit $status +fi +status=`expr $status + $ret` + +echo "I:checking the key with 'rndc tsig-list'" +ret=0 +$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 tsig-list > rndc.out +grep "key \"bar.example.server" rndc.out > /dev/null || ret=1 +if [ $ret != 0 ]; then + echo "I:failed" +fi +status=`expr $status + $ret` + +echo "I:deleting the key with 'rndc tsig-delete'" +ret=0 +$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 tsig-delete bar.example.server > /dev/null || ret=1 +$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 tsig-list > rndc.out +grep "key \"bar.example.server" rndc.out > /dev/null && ret=1 +if [ $ret != 0 ]; then + echo "I:failed" +fi +status=`expr $status + $ret` + echo "I:exit status: $status" exit $status diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml index 79c51bec44..c0004d5ff2 100644 --- a/doc/arm/Bv9ARM-book.xml +++ b/doc/arm/Bv9ARM-book.xml @@ -18,7 +18,7 @@ - PERFORMANCE OF THIS SOFTWARE. --> - + BIND 9 Administrator Reference Manual @@ -1461,6 +1461,31 @@ zone "eng.example.com" { + + tsig-list + + + List the names of all TSIG keys currently configured + for use by named in each view. The + list both statically configured keys and dynamic + TKEY-negotiated keys. + + + + + + tsig-delete + keyname + view + + + Delete a given TKEY-negotated key from the server. + (This does not apply to statically configured TSIG + keys.) + + + + addzone zone