]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1694. [bug] Report if the builtin views of "_default" / "_bind"
authorMark Andrews <marka@isc.org>
Thu, 29 Jul 2004 00:08:10 +0000 (00:08 +0000)
committerMark Andrews <marka@isc.org>
Thu, 29 Jul 2004 00:08:10 +0000 (00:08 +0000)
                        are defined in named.conf. [RT #12023]

CHANGES
lib/bind9/check.c

diff --git a/CHANGES b/CHANGES
index b026c7084c6d2936a21ad082f1f7f3fa91dd8f8a..6222456adac3df64970ab38bd6547872e0eef223 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,5 @@
-1694.   [placeholder]  rt12023
+1694.  [bug]           Report if the builtin views of "_default" / "_bind"
+                       are defined in named.conf. [RT #12023]
 
 1693.  [placeholder]   rt12024
 
index 2bca8ab5be192a85241a65a025c9e211289a5ae1..fe2c4512110c5f416fdf6930f7350c787ba44287 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: check.c,v 1.47 2004/06/04 02:31:43 marka Exp $ */
+/* $Id: check.c,v 1.48 2004/07/29 00:08:10 marka Exp $ */
 
 #include <config.h>
 
@@ -1288,8 +1288,17 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
                                            "previous definition: %s:%u",
                                            key, file, line);
                                result = tresult;
-                       } else if (result != ISC_R_SUCCESS)
+                       } else if (result != ISC_R_SUCCESS) {
                                result = tresult;
+                       } else if ((strcasecmp(key, "_bind") == 0 &&
+                                   vclass == dns_rdataclass_ch) ||
+                                  (strcasecmp(key, "_default") == 0 &&
+                                   vclass == dns_rdataclass_in)) {
+                               cfg_obj_log(view, logctx, ISC_LOG_ERROR,
+                                           "attempt to redefine builtin view "
+                                           "'%s'", key);
+                               result = ISC_R_EXISTS;
+                       }
                }
                if (tresult == ISC_R_SUCCESS)
                        tresult = check_viewconf(config, voptions,