]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1980. [func] dnssec-signzone: output the SOA record as the
authorMark Andrews <marka@isc.org>
Fri, 3 Feb 2006 00:13:57 +0000 (00:13 +0000)
committerMark Andrews <marka@isc.org>
Fri, 3 Feb 2006 00:13:57 +0000 (00:13 +0000)
                        first record in the signed zone. [RT #15758]

CHANGES
bin/dnssec/dnssec-signzone.c

diff --git a/CHANGES b/CHANGES
index 9358dd184d80cb3a53fa5aef237a18c40bec27a9..58f01a9f3dcedef1fdedee4386e8d80cafbfeaf0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+1980.  [func]          dnssec-signzone: output the SOA record as the
+                       first record in the signed zone. [RT #15758]
+
 1979.  [port]          linux: allow named to drop core after changing
                        user ids. [RT #15753]
 
index 158524d794f6f383888915b66abef24e21a755fc..dd3230e30ebbc7301dc43c79731f0a42b341f81b 100644 (file)
@@ -16,7 +16,7 @@
  * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dnssec-signzone.c,v 1.193 2005/11/30 03:33:48 marka Exp $ */
+/* $Id: dnssec-signzone.c,v 1.194 2006/02/03 00:13:57 marka Exp $ */
 
 /*! \file */
 
@@ -1091,6 +1091,32 @@ postsign(void) {
        dns_dbiterator_destroy(&gdbiter);
 }
 
+/*%
+ * Sign the apex of the zone.
+ */
+static void
+signapex(void) {
+       dns_dbnode_t *node = NULL;
+       dns_fixedname_t fixed;
+       dns_name_t *name;
+       isc_result_t result;
+       
+       dns_fixedname_init(&fixed);
+       name = dns_fixedname_name(&fixed);
+       result = dns_dbiterator_current(gdbiter, &node, name);
+       check_result(result, "dns_dbiterator_current()");
+       signname(node, name);
+       dumpnode(name, node);
+       cleannode(gdb, gversion, node);
+       dns_db_detachnode(gdb, &node);
+       result = dns_dbiterator_next(gdbiter);
+       if (result == ISC_R_NOMORE)
+               finished = ISC_TRUE;
+       else if (result != ISC_R_SUCCESS)
+               fatal("failure iterating database: %s",
+                     isc_result_totext(result));
+}
+
 /*%
  * Assigns a node to a worker thread.  This is protected by the master task's
  * lock.
@@ -2088,6 +2114,7 @@ main(int argc, char *argv[]) {
                RUNTIME_CHECK(isc_mutex_init(&statslock) == ISC_R_SUCCESS);
 
        presign();
+       signapex();
        (void)isc_app_run();
        if (!finished)
                fatal("process aborted by user");