diff --git a/CHANGES b/CHANGES index 25bbce650c..8693898cfc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +3874. [test] Check that only "check-names master" is needed for + updates to be accepted. + 3873. [protocol] Only warn for SPF without TXT spf record. [RT #36210] 3872. [bug] Address issues found by static analysis. [RT #36209] diff --git a/bin/tests/system/checknames/clean.sh b/bin/tests/system/checknames/clean.sh index 43b6eacb2d..84fd45777f 100644 --- a/bin/tests/system/checknames/clean.sh +++ b/bin/tests/system/checknames/clean.sh @@ -21,4 +21,6 @@ rm -f nsupdate.out.test* rm -f ns1/*.example.db rm -f ns1/*.update.db rm -f ns1/*.update.db.jnl +rm -f ns4/*.update.db +rm -f ns4/*.update.db.jnl rm -f */named.memstats diff --git a/bin/tests/system/checknames/ns4/master-ignore.update.db.in b/bin/tests/system/checknames/ns4/master-ignore.update.db.in new file mode 100644 index 0000000000..18826bd3d2 --- /dev/null +++ b/bin/tests/system/checknames/ns4/master-ignore.update.db.in @@ -0,0 +1,21 @@ +; Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") +; +; Permission to use, copy, modify, and/or distribute this software for any +; purpose with or without fee is hereby granted, provided that the above +; copyright notice and this permission notice appear in all copies. +; +; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +; AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +; PERFORMANCE OF THIS SOFTWARE. + +; $Id: ignore.update.db.in,v 1.5 2007/06/19 23:47:01 tbox Exp $ + +$TTL 300 +@ SOA ns1.ignore.update. hostmaster.ignore.update. ( + 1 3600 1200 604800 3600 ) + NS ns1.ignore.update. +ns1.ignore.update. A 10.53.0.1 diff --git a/bin/tests/system/checknames/ns4/named.conf b/bin/tests/system/checknames/ns4/named.conf new file mode 100644 index 0000000000..3c5e9d7db2 --- /dev/null +++ b/bin/tests/system/checknames/ns4/named.conf @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/* $Id: named.conf,v 1.7 2007/06/18 23:47:27 tbox Exp $ */ + +controls { /* empty */ }; + +options { + query-source address 10.53.0.4; + notify-source 10.53.0.4; + transfer-source 10.53.0.4; + port 5300; + pid-file "named.pid"; + listen-on { 10.53.0.4; }; + listen-on-v6 { none; }; + recursion yes; + acache-enable yes; + check-names master ignore; + notify yes; +}; + +zone "." { + type hint; + file "root.hints"; +}; + +zone "master-ignore.update" { + type master; + file "master-ignore.update.db"; + allow-update { any; }; +}; diff --git a/bin/tests/system/checknames/ns4/root.hints b/bin/tests/system/checknames/ns4/root.hints new file mode 100644 index 0000000000..712002bf8a --- /dev/null +++ b/bin/tests/system/checknames/ns4/root.hints @@ -0,0 +1,19 @@ +; Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") +; +; Permission to use, copy, modify, and/or distribute this software for any +; purpose with or without fee is hereby granted, provided that the above +; copyright notice and this permission notice appear in all copies. +; +; THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH +; REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +; AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, +; INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +; LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +; PERFORMANCE OF THIS SOFTWARE. + +; $Id: root.hints,v 1.5 2007/06/19 23:47:01 tbox Exp $ + +$TTL 300 +. NS ns1. +ns1. A 10.53.0.1 diff --git a/bin/tests/system/checknames/setup.sh b/bin/tests/system/checknames/setup.sh index de4e7d9cd6..3634ebfbb3 100644 --- a/bin/tests/system/checknames/setup.sh +++ b/bin/tests/system/checknames/setup.sh @@ -21,3 +21,5 @@ cp ns1/fail.example.db.in ns1/fail.example.db cp ns1/ignore.update.db.in ns1/ignore.update.db cp ns1/warn.update.db.in ns1/warn.update.db cp ns1/fail.update.db.in ns1/fail.update.db + +cp ns4/master-ignore.update.db.in ns4/master-ignore.update.db diff --git a/bin/tests/system/checknames/tests.sh b/bin/tests/system/checknames/tests.sh index a596982c67..84f3379414 100644 --- a/bin/tests/system/checknames/tests.sh +++ b/bin/tests/system/checknames/tests.sh @@ -131,4 +131,20 @@ if [ $ret != 0 ]; then echo "I:failed"; fi status=`expr $status + $ret` n=`expr $n + 1` +echo "I: check that updates to 'check-names master ignore;' succeed and are not logged ($n)" +ret=0 +not=1 +$NSUPDATE -d < nsupdate.out.test$n 2>&1 || ret=1 +server 10.53.0.4 5300 +update add xxx_xxx.master-ignore.update. 600 A 10.10.10.1 +send +END +grep "xxx_xxx.master-ignore.update/A.*(check-names)" ns1/named.run > /dev/null || not=0 +if [ $not != 0 ]; then ret=1; fi +$DIG $DIGOPTS xxx_xxx.master-ignore.update @10.53.0.4 A > dig.out.ns4.test$n || ret=1 +grep NOERROR dig.out.ns4.test$n > /dev/null || ret=1 +if [ $ret != 0 ]; then echo "I:failed"; fi +status=`expr $status + $ret` +n=`expr $n + 1` + exit $status