]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
4. [test] Check that only "check-names master" is needed for
authorMark Andrews <marka@isc.org>
Tue, 10 Jun 2014 03:48:57 +0000 (13:48 +1000)
committerMark Andrews <marka@isc.org>
Tue, 10 Jun 2014 03:49:16 +0000 (13:49 +1000)
                        updates to be accepted.

CHANGES
bin/tests/system/checknames/clean.sh
bin/tests/system/checknames/ns4/master-ignore.update.db.in [new file with mode: 0644]
bin/tests/system/checknames/ns4/named.conf [new file with mode: 0644]
bin/tests/system/checknames/ns4/root.hints [new file with mode: 0644]
bin/tests/system/checknames/setup.sh
bin/tests/system/checknames/tests.sh

diff --git a/CHANGES b/CHANGES
index 6fdb5a8c557370c016b0ef6d6fec61e02f32fb7c..23eb12605a5702930dea5602d26323b5bdeef275 100644 (file)
--- 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]
index 43b6eacb2d118a8f110026c9eea030b0fb8c58a0..84fd45777f63c173dc7b8b8813ef19550733be2c 100644 (file)
@@ -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 (file)
index 0000000..18826bd
--- /dev/null
@@ -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 (file)
index 0000000..3c5e9d7
--- /dev/null
@@ -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 (file)
index 0000000..712002b
--- /dev/null
@@ -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
index de4e7d9cd600ac849e8c846db8e43371a823eda5..3634ebfbb33fd843461bc965cab89d7c9e33631a 100644 (file)
@@ -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
index a596982c67a65b33633cffc98f154bf29a126a3e..84f33794140153a393289848b6b1b23b6dda7e06 100644 (file)
@@ -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 <<END> 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