]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pass the correct object to cfg_obj_log
authorMark Andrews <marka@isc.org>
Fri, 14 Dec 2018 05:29:02 +0000 (16:29 +1100)
committerMark Andrews <marka@isc.org>
Fri, 14 Dec 2018 22:38:42 +0000 (09:38 +1100)
(cherry picked from commit 53a33f736547e0bafae9b6228107e09592b98f17)

CHANGES
bin/tests/system/checkconf/bad-stub-masters-dialup.conf [new file with mode: 0644]
lib/bind9/check.c
util/copyrights

diff --git a/CHANGES b/CHANGES
index 02915a303bc4d13c9ca5d9babc2e187737995be6..4e23fa28adc47d0e9e5ea91f2cd64477d383d4c0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+5112.  [bug]           Named/named-checkconf could dump core if there was
+                       a missing masters clause and a bad notify clause.
+                       [GL #779]
+
 5111.  [bug]           Occluded DNSKEY records could make it into the
                        delegating NSEC/NSEC3 bitmap. [GL #742]
 
diff --git a/bin/tests/system/checkconf/bad-stub-masters-dialup.conf b/bin/tests/system/checkconf/bad-stub-masters-dialup.conf
new file mode 100644 (file)
index 0000000..3b19323
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * See the COPYRIGHT file distributed with this work for additional
+ * information regarding copyright ownership.
+ */
+
+controls { /* empty */ };
+options {
+       query-source address 10.53.0.2;
+       notify-source 10.53.0.2;
+       transfer-source 10.53.0.2;
+       port 5300;
+       pid-file "named.pid";
+       listen-on { 10.53.0.2; };
+       listen-on-v6 { none; };
+       heartbeat-interval 2;
+       recursion no;
+};
+zone "." {
+       type hint;
+       file "hint";
+};
+zone "example." {
+       type stub;
+       dialup notify;
+       notify no;
+       file "example.bk";
+       // masters { 10.53.0.1; };
+};
index d8352910ce097d187eae4c741c76aeda16d5023a..d6fba22500ec35b6c450621ae14c15cd67cef4b5 100644 (file)
@@ -2276,10 +2276,10 @@ check_zoneconf(const cfg_obj_t *zconfig, const cfg_obj_t *voptions,
        if (ztype == CFG_ZONE_MASTER || ztype == CFG_ZONE_SLAVE ||
            ztype == CFG_ZONE_STUB)
        {
-               const cfg_obj_t *dialup = NULL;
-               (void)cfg_map_get(zoptions, "dialup", &dialup);
-               if (dialup != NULL && cfg_obj_isstring(dialup)) {
-                       const char *str = cfg_obj_asstring(dialup);
+               obj = NULL;
+               (void)cfg_map_get(zoptions, "dialup", &obj);
+               if (obj != NULL && cfg_obj_isstring(obj)) {
+                       const char *str = cfg_obj_asstring(obj);
                        for (i = 0;
                             i < sizeof(dialups) / sizeof(dialups[0]);
                             i++)
index 67b432cfc0d27aa53b47b69380f57e281def0b0a..4fa7bb345c353090ee732a500db425efcb4aef34 100644 (file)
 ./bin/tests/system/checkconf/bad-sharedzone1.conf      CONF-C  2013,2016,2018
 ./bin/tests/system/checkconf/bad-sharedzone2.conf      CONF-C  2013,2016,2018
 ./bin/tests/system/checkconf/bad-sharedzone3.conf      CONF-C  2018
+./bin/tests/system/checkconf/bad-stub-masters-dialup.conf      CONF-C  2018
 ./bin/tests/system/checkconf/bad-tsig.conf     CONF-C  2012,2013,2016,2018
 ./bin/tests/system/checkconf/bad-update-policy1.conf   CONF-C  2018
 ./bin/tests/system/checkconf/bad-update-policy10.conf  CONF-C  2018