]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1242. [bug] named-checkzone failed if a journal existed. [RT #2657]
authorMark Andrews <marka@isc.org>
Tue, 2 Apr 2002 06:54:07 +0000 (06:54 +0000)
committerMark Andrews <marka@isc.org>
Tue, 2 Apr 2002 06:54:07 +0000 (06:54 +0000)
CHANGES
bin/check/check-tool.c
bin/check/check-tool.h
bin/check/named-checkconf.c
bin/check/named-checkconf.docbook
bin/check/named-checkzone.c
bin/check/named-checkzone.docbook
lib/dns/include/dns/zone.h
lib/dns/zone.c

diff --git a/CHANGES b/CHANGES
index 8514dadee941822499b1c86d7cb4ea4c940b2873..e4123d09c6ec6100ea5edf845f2b0f004d7b219a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+1242.  [bug]           named-checkzone failed if a journal existed. [RT #2657]
+
 1241.  [bug]           Drop received UDP messsages with a zero source port
                        as these are invariably forged. [RT #2621]
 
index 722f8d5070f94685c16eefbd7b6b4d23f79dd9a7..cec63c4a4d15cc52e3485da7e00ca8014c2fb579 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: check-tool.c,v 1.6 2001/09/05 21:09:31 bwelling Exp $ */
+/* $Id: check-tool.c,v 1.7 2002/04/02 06:54:00 marka Exp $ */
 
 #include <config.h>
 
@@ -46,6 +46,7 @@
 static const char *dbtype[] = { "rbt" };
 
 int debug = 0;
+isc_boolean_t nomerge = ISC_TRUE;
 
 isc_result_t
 setup_logging(isc_mem_t *mctx, isc_log_t **logp) {
@@ -109,6 +110,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
 
        dns_zone_setclass(zone, rdclass);
        dns_zone_setoption(zone, DNS_ZONEOPT_MANYERRORS, ISC_TRUE);
+       dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge);
 
        CHECK(dns_zone_load(zone));
        if (zonep != NULL){
index 823ea0bc59c3f9f622302cb8541bd5d7fef39ece..9a5efc8a6dc18643c2dbe0eadf6ef68825eeb634 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: check-tool.h,v 1.3 2001/09/03 08:21:46 marka Exp $ */
+/* $Id: check-tool.h,v 1.4 2002/04/02 06:54:02 marka Exp $ */
 
 #ifndef CHECK_TOOL_H
 #define CHECK_TOOL_H
@@ -35,6 +35,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
          const char *classname, dns_zone_t **zonep);
 
 extern int debug;
+extern isc_boolean_t nomerge;
 
 ISC_LANG_ENDDECLS
 
index b82463e33d486648cad232c945a3bc3096873945..c8505a3244b400d7a25c6ab71103399cbf6bf05e 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named-checkconf.c,v 1.22 2002/02/20 03:32:50 marka Exp $ */
+/* $Id: named-checkconf.c,v 1.23 2002/04/02 06:54:03 marka Exp $ */
 
 #include <config.h>
 
@@ -197,6 +197,8 @@ main(int argc, char **argv) {
        isc_result_t result;
        int exit_status = 0;
        isc_boolean_t load_zones = ISC_FALSE;
+       
+       isc_mem_debugging |= ISC_MEM_DEBUGRECORD;
 
        while ((c = isc_commandline_parse(argc, argv, "dt:vz")) != EOF) {
                switch (c) {
@@ -204,6 +206,10 @@ main(int argc, char **argv) {
                        debug++;
                        break;
 
+               case 'm':
+                       nomerge = ISC_FALSE;
+                       break;
+
                case 't':
                        result = isc_dir_chroot(isc_commandline_argument);
                        if (result != ISC_R_SUCCESS) {
index 40a54bb0ac2cc153626678d6840ad9292d15fc46..b50650aecd9b0ace49dada5462cb2fe3544286f7 100644 (file)
@@ -16,7 +16,7 @@
  - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 -->
 
-<!-- $Id: named-checkconf.docbook,v 1.4 2001/09/04 00:32:32 marka Exp $ -->
+<!-- $Id: named-checkconf.docbook,v 1.5 2002/04/02 06:54:05 marka Exp $ -->
 
 <refentry>
   <refentryinfo>
@@ -38,6 +38,7 @@
     <cmdsynopsis>
       <command>named-checkconf</command>
       <arg><option>-v</option></arg>
+      <arg><option>-m</option></arg>
       <arg><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
       <arg choice="req">filename</arg>
       <arg><option>-z</option></arg>
        </listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term>-m</term>
+       <listitem>
+         <para>
+             When loading a zonefile merge the journal if it exists.
+         </para>
+       </listitem>
+      </varlistentry>
+
       <varlistentry>
         <term>filename</term>
        <listitem>
index e1a9cb9607c9fbf0b880a687f4a8f317bd00e9b5..caa11bc08cafea21dea10798408fe03b5f9511a0 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: named-checkzone.c,v 1.20 2002/02/20 03:32:53 marka Exp $ */
+/* $Id: named-checkzone.c,v 1.21 2002/04/02 06:54:06 marka Exp $ */
 
 #include <config.h>
 
@@ -81,7 +81,7 @@ main(int argc, char **argv) {
        char *classname = classname_in;
        const char *workdir = NULL;
 
-       while ((c = isc_commandline_parse(argc, argv, "c:dqist:vw:")) != EOF) {
+       while ((c = isc_commandline_parse(argc, argv, "c:dimqst:vw:")) != EOF) {
                switch (c) {
                case 'c':
                        classname = isc_commandline_argument;
@@ -91,6 +91,10 @@ main(int argc, char **argv) {
                        debug++;
                        break;
 
+               case 'm':
+                       nomerge = ISC_FALSE;
+                       break;
+
                case 'q':
                        quiet++;
                        break;
index 20a8954f6a2e7042481ffebbdcd840516ab83027..9a75546e56a26e050e0286af70da17b42419badf 100644 (file)
@@ -16,7 +16,7 @@
  - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 -->
 
-<!-- $Id: named-checkzone.docbook,v 1.4 2001/09/15 02:05:35 marka Exp $ -->
+<!-- $Id: named-checkzone.docbook,v 1.5 2002/04/02 06:54:07 marka Exp $ -->
 
 <refentry>
   <refentryinfo>
@@ -38,6 +38,7 @@
     <cmdsynopsis>
       <command>named-checkzone</command>
       <arg><option>-d</option></arg>
+      <arg><option>-m</option></arg>
       <arg><option>-q</option></arg>
       <arg><option>-v</option></arg>
       <arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
        </listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term>-m</term>
+        <listitem>
+          <para>
+              When loading the zone file merge the journal if it exists.
+          </para>   
+        </listitem>
+
       <varlistentry>
         <term>-c <replaceable class="parameter">class</replaceable></term>
        <listitem>
index 5b39977f16899fa0f39d128956269279b9c8ba81..0d0263074833e1862c8b0eec621fa08677cfc4b9 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: zone.h,v 1.113 2002/02/20 03:34:42 marka Exp $ */
+/* $Id: zone.h,v 1.114 2002/04/02 06:53:59 marka Exp $ */
 
 #ifndef DNS_ZONE_H
 #define DNS_ZONE_H 1
@@ -45,6 +45,7 @@ typedef enum {
 #define DNS_ZONEOPT_NOTIFY       0x00000008U   /* perform NOTIFY */
 #define DNS_ZONEOPT_MANYERRORS   0x00000010U   /* return many errors on load */
 #define DNS_ZONEOPT_IXFRFROMDIFFS 0x00000020U  /* calculate differences */
+#define DNS_ZONEOPT_NOMERGE      0x00000040U   /* don't merge journal */
 
 #ifndef NOMINUM_PUBLIC
 /*
index 7187eed1d02bd07057d8da25eae77971e2280c26..081aaea60d83d7c10d929225bb8d2cf4a9fdefdd 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: zone.c,v 1.365 2002/03/27 04:48:21 marka Exp $ */
+/* $Id: zone.c,v 1.366 2002/04/02 06:53:58 marka Exp $ */
 
 #include <config.h>
 
@@ -1246,6 +1246,7 @@ zone_postload(dns_zone_t *zone, dns_db_t *db, isc_time_t loadtime,
         * Apply update log, if any, on initial load.
         */
        if (zone->journal != NULL &&
+           ! DNS_ZONE_OPTION(zone, DNS_ZONEOPT_NOMERGE) &&
            ! DNS_ZONE_FLAG(zone, DNS_ZONEFLG_LOADED))
        {
                result = dns_journal_rollforward(zone->mctx, db,