summaryrefslogtreecommitdiff
path: root/contrib/bind9/bin/check
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bind9/bin/check')
-rw-r--r--contrib/bind9/bin/check/Makefile.in95
-rw-r--r--contrib/bind9/bin/check/check-tool.c162
-rw-r--r--contrib/bind9/bin/check/check-tool.h46
-rw-r--r--contrib/bind9/bin/check/named-checkconf.870
-rw-r--r--contrib/bind9/bin/check/named-checkconf.c297
-rw-r--r--contrib/bind9/bin/check/named-checkconf.docbook163
-rw-r--r--contrib/bind9/bin/check/named-checkconf.html92
-rw-r--r--contrib/bind9/bin/check/named-checkzone.8111
-rw-r--r--contrib/bind9/bin/check/named-checkzone.c214
-rw-r--r--contrib/bind9/bin/check/named-checkzone.docbook254
-rw-r--r--contrib/bind9/bin/check/named-checkzone.html135
11 files changed, 0 insertions, 1639 deletions
diff --git a/contrib/bind9/bin/check/Makefile.in b/contrib/bind9/bin/check/Makefile.in
deleted file mode 100644
index 5fdf4637afe6e..0000000000000
--- a/contrib/bind9/bin/check/Makefile.in
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
-# Copyright (C) 2000-2003 Internet Software Consortium.
-#
-# Permission to use, copy, modify, and 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: Makefile.in,v 1.15.2.3.8.6 2004/07/20 07:01:48 marka Exp $
-
-srcdir = @srcdir@
-VPATH = @srcdir@
-top_srcdir = @top_srcdir@
-
-@BIND9_VERSION@
-
-@BIND9_MAKE_INCLUDES@
-
-CINCLUDES = ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \
- ${ISC_INCLUDES}
-
-CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
-CWARNINGS =
-
-DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
-ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
-ISCLIBS = ../../lib/isc/libisc.@A@
-BIND9LIBS = ../../lib/bind9/libbind9.@A@
-
-DNSDEPLIBS = ../../lib/dns/libdns.@A@
-ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
-ISCDEPLIBS = ../../lib/isc/libisc.@A@
-BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
-
-LIBS = @LIBS@
-
-SUBDIRS =
-
-# Alphabetically
-TARGETS = named-checkconf@EXEEXT@ named-checkzone@EXEEXT@
-
-# Alphabetically
-SRCS = named-checkconf.c named-checkzone.c check-tool.c
-
-MANPAGES = named-checkconf.8 named-checkzone.8
-
-HTMLPAGES = named-checkconf.html named-checkzone.html
-
-MANOBJS = ${MANPAGES} ${HTMLPAGES}
-
-@BIND9_MAKE_RULES@
-
-named-checkconf.@O@: named-checkconf.c
- ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
- -DVERSION=\"${VERSION}\" \
- -c ${srcdir}/named-checkconf.c
-
-named-checkzone.@O@: named-checkzone.c
- ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
- -DVERSION=\"${VERSION}\" \
- -c ${srcdir}/named-checkzone.c
-
-named-checkconf@EXEEXT@: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \
- ${ISCCFGDEPLIBS} ${BIND9DEPLIBS}
- ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
- named-checkconf.@O@ check-tool.@O@ ${BIND9LIBS} ${ISCCFGLIBS} \
- ${DNSLIBS} ${ISCLIBS} ${LIBS}
-
-named-checkzone@EXEEXT@: named-checkzone.@O@ check-tool.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
- ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
- named-checkzone.@O@ check-tool.@O@ ${DNSLIBS} ${ISCLIBS} ${LIBS}
-
-doc man:: ${MANOBJS}
-
-docclean manclean maintainer-clean::
- rm -f ${MANOBJS}
-
-installdirs:
- $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}
- $(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
-
-install:: named-checkconf@EXEEXT@ named-checkzone@EXEEXT@ installdirs
- ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkconf@EXEEXT@ ${DESTDIR}${sbindir}
- ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkzone@EXEEXT@ ${DESTDIR}${sbindir}
- for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8; done
-
-clean distclean::
- rm -f ${TARGETS} r1.htm
diff --git a/contrib/bind9/bin/check/check-tool.c b/contrib/bind9/bin/check/check-tool.c
deleted file mode 100644
index 1b67ca88596f5..0000000000000
--- a/contrib/bind9/bin/check/check-tool.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000-2002 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and 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: check-tool.c,v 1.4.12.7 2004/11/30 01:15:40 marka Exp $ */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <string.h>
-
-#include "check-tool.h"
-#include <isc/util.h>
-
-#include <isc/buffer.h>
-#include <isc/log.h>
-#include <isc/region.h>
-#include <isc/stdio.h>
-#include <isc/types.h>
-
-#include <dns/fixedname.h>
-#include <dns/log.h>
-#include <dns/name.h>
-#include <dns/rdataclass.h>
-#include <dns/types.h>
-#include <dns/zone.h>
-
-#define CHECK(r) \
- do { \
- result = (r); \
- if (result != ISC_R_SUCCESS) \
- goto cleanup; \
- } while (0)
-
-static const char *dbtype[] = { "rbt" };
-
-int debug = 0;
-isc_boolean_t nomerge = ISC_TRUE;
-unsigned int zone_options = DNS_ZONEOPT_CHECKNS |
- DNS_ZONEOPT_MANYERRORS |
- DNS_ZONEOPT_CHECKNAMES;
-
-isc_result_t
-setup_logging(isc_mem_t *mctx, isc_log_t **logp) {
- isc_logdestination_t destination;
- isc_logconfig_t *logconfig = NULL;
- isc_log_t *log = NULL;
-
- RUNTIME_CHECK(isc_log_create(mctx, &log, &logconfig) == ISC_R_SUCCESS);
- isc_log_setcontext(log);
-
- destination.file.stream = stdout;
- destination.file.name = NULL;
- destination.file.versions = ISC_LOG_ROLLNEVER;
- destination.file.maximum_size = 0;
- RUNTIME_CHECK(isc_log_createchannel(logconfig, "stderr",
- ISC_LOG_TOFILEDESC,
- ISC_LOG_DYNAMIC,
- &destination, 0) == ISC_R_SUCCESS);
- RUNTIME_CHECK(isc_log_usechannel(logconfig, "stderr",
- NULL, NULL) == ISC_R_SUCCESS);
-
- *logp = log;
- return (ISC_R_SUCCESS);
-}
-
-isc_result_t
-load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
- const char *classname, dns_zone_t **zonep)
-{
- isc_result_t result;
- dns_rdataclass_t rdclass;
- isc_textregion_t region;
- isc_buffer_t buffer;
- dns_fixedname_t fixorigin;
- dns_name_t *origin;
- dns_zone_t *zone = NULL;
-
- REQUIRE(zonep == NULL || *zonep == NULL);
-
- if (debug)
- fprintf(stderr, "loading \"%s\" from \"%s\" class \"%s\"\n",
- zonename, filename, classname);
-
- CHECK(dns_zone_create(&zone, mctx));
-
- dns_zone_settype(zone, dns_zone_master);
-
- isc_buffer_init(&buffer, zonename, strlen(zonename));
- isc_buffer_add(&buffer, strlen(zonename));
- dns_fixedname_init(&fixorigin);
- origin = dns_fixedname_name(&fixorigin);
- CHECK(dns_name_fromtext(origin, &buffer, dns_rootname,
- ISC_FALSE, NULL));
- CHECK(dns_zone_setorigin(zone, origin));
- CHECK(dns_zone_setdbtype(zone, 1, (const char * const *) dbtype));
- CHECK(dns_zone_setfile(zone, filename));
-
- DE_CONST(classname, region.base);
- region.length = strlen(classname);
- CHECK(dns_rdataclass_fromtext(&rdclass, &region));
-
- dns_zone_setclass(zone, rdclass);
- dns_zone_setoption(zone, zone_options, ISC_TRUE);
- dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge);
-
- CHECK(dns_zone_load(zone));
- if (zonep != NULL){
- *zonep = zone;
- zone = NULL;
- }
-
- cleanup:
- if (zone != NULL)
- dns_zone_detach(&zone);
- return (result);
-}
-
-isc_result_t
-dump_zone(const char *zonename, dns_zone_t *zone, const char *filename)
-{
- isc_result_t result;
- FILE *output = stdout;
-
- if (debug) {
- if (filename != NULL)
- fprintf(stderr, "dumping \"%s\" to \"%s\"\n",
- zonename, filename);
- else
- fprintf(stderr, "dumping \"%s\"\n", zonename);
- }
-
- if (filename != NULL) {
- result = isc_stdio_open(filename, "w+", &output);
-
- if (result != ISC_R_SUCCESS) {
- fprintf(stderr, "could not open output "
- "file \"%s\" for writing\n", filename);
- return (ISC_R_FAILURE);
- }
- }
-
- result = dns_zone_fulldumptostream(zone, output);
-
- if (filename != NULL)
- (void)isc_stdio_close(output);
-
- return (result);
-}
diff --git a/contrib/bind9/bin/check/check-tool.h b/contrib/bind9/bin/check/check-tool.h
deleted file mode 100644
index 105cd258ca3d6..0000000000000
--- a/contrib/bind9/bin/check/check-tool.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 2000-2002 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and 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: check-tool.h,v 1.2.12.5 2004/03/08 04:04:13 marka Exp $ */
-
-#ifndef CHECK_TOOL_H
-#define CHECK_TOOL_H
-
-#include <isc/lang.h>
-
-#include <isc/types.h>
-#include <dns/types.h>
-
-ISC_LANG_BEGINDECLS
-
-isc_result_t
-setup_logging(isc_mem_t *mctx, isc_log_t **logp);
-
-isc_result_t
-load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
- const char *classname, dns_zone_t **zonep);
-
-isc_result_t
-dump_zone(const char *zonename, dns_zone_t *zone, const char *filename);
-
-extern int debug;
-extern isc_boolean_t nomerge;
-extern unsigned int zone_options;
-
-ISC_LANG_ENDDECLS
-
-#endif
diff --git a/contrib/bind9/bin/check/named-checkconf.8 b/contrib/bind9/bin/check/named-checkconf.8
deleted file mode 100644
index 68b745aed2906..0000000000000
--- a/contrib/bind9/bin/check/named-checkconf.8
+++ /dev/null
@@ -1,70 +0,0 @@
-.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (C) 2000-2002 Internet Software Consortium.
-.\"
-.\" Permission to use, copy, modify, and 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-checkconf.8,v 1.11.12.7 2005/10/13 02:33:41 marka Exp $
-.\"
-.hy 0
-.ad l
-.\" ** You probably do not want to edit this file directly **
-.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-.\" Instead of manually editing it, you probably should edit the DocBook XML
-.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
-.TH "NAMED\-CHECKCONF" "8" "June 14, 2000" "BIND9" "BIND9"
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.SH "NAME"
-named\-checkconf \- named configuration file syntax checking tool
-.SH "SYNOPSIS"
-.HP 16
-\fBnamed\-checkconf\fR [\fB\-v\fR] [\fB\-j\fR] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename} [\fB\-z\fR]
-.SH "DESCRIPTION"
-.PP
-\fBnamed\-checkconf\fR
-checks the syntax, but not the semantics, of a named configuration file.
-.SH "OPTIONS"
-.TP
-\-t \fIdirectory\fR
-chroot to
-\fIdirectory\fR
-so that include directives in the configuration file are processed as if run by a similarly chrooted named.
-.TP
-\-v
-Print the version of the
-\fBnamed\-checkconf\fR
-program and exit.
-.TP
-\-z
-Perform a check load the master zonefiles found in
-\fInamed.conf\fR.
-.TP
-\-j
-When loading a zonefile read the journal if it exists.
-.TP
-filename
-The name of the configuration file to be checked. If not specified, it defaults to
-\fI/etc/named.conf\fR.
-.SH "RETURN VALUES"
-.PP
-\fBnamed\-checkconf\fR
-returns an exit status of 1 if errors were detected and 0 otherwise.
-.SH "SEE ALSO"
-.PP
-\fBnamed\fR(8),
-BIND 9 Administrator Reference Manual.
-.SH "AUTHOR"
-.PP
-Internet Systems Consortium
diff --git a/contrib/bind9/bin/check/named-checkconf.c b/contrib/bind9/bin/check/named-checkconf.c
deleted file mode 100644
index e7f91386ff0ea..0000000000000
--- a/contrib/bind9/bin/check/named-checkconf.c
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2002 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and 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-checkconf.c,v 1.12.12.9 2005/03/03 06:33:38 marka Exp $ */
-
-#include <config.h>
-
-#include <errno.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#include <isc/commandline.h>
-#include <isc/dir.h>
-#include <isc/entropy.h>
-#include <isc/hash.h>
-#include <isc/log.h>
-#include <isc/mem.h>
-#include <isc/result.h>
-#include <isc/string.h>
-#include <isc/util.h>
-
-#include <isccfg/namedconf.h>
-
-#include <bind9/check.h>
-
-#include <dns/fixedname.h>
-#include <dns/log.h>
-#include <dns/result.h>
-
-#include "check-tool.h"
-
-isc_log_t *logc = NULL;
-
-#define CHECK(r)\
- do { \
- result = (r); \
- if (result != ISC_R_SUCCESS) \
- goto cleanup; \
- } while (0)
-
-static void
-usage(void) {
- fprintf(stderr, "usage: named-checkconf [-j] [-v] [-z] [-t directory] "
- "[named.conf]\n");
- exit(1);
-}
-
-static isc_result_t
-directory_callback(const char *clausename, cfg_obj_t *obj, void *arg) {
- isc_result_t result;
- char *directory;
-
- REQUIRE(strcasecmp("directory", clausename) == 0);
-
- UNUSED(arg);
- UNUSED(clausename);
-
- /*
- * Change directory.
- */
- directory = cfg_obj_asstring(obj);
- result = isc_dir_chdir(directory);
- if (result != ISC_R_SUCCESS) {
- cfg_obj_log(obj, logc, ISC_LOG_ERROR,
- "change directory to '%s' failed: %s\n",
- directory, isc_result_totext(result));
- return (result);
- }
-
- return (ISC_R_SUCCESS);
-}
-
-static isc_result_t
-configure_zone(const char *vclass, const char *view, cfg_obj_t *zconfig,
- isc_mem_t *mctx)
-{
- isc_result_t result;
- const char *zclass;
- const char *zname;
- const char *zfile;
- cfg_obj_t *zoptions = NULL;
- cfg_obj_t *classobj = NULL;
- cfg_obj_t *typeobj = NULL;
- cfg_obj_t *fileobj = NULL;
- cfg_obj_t *dbobj = NULL;
-
- zname = cfg_obj_asstring(cfg_tuple_get(zconfig, "name"));
- classobj = cfg_tuple_get(zconfig, "class");
- if (!cfg_obj_isstring(classobj))
- zclass = vclass;
- else
- zclass = cfg_obj_asstring(classobj);
- zoptions = cfg_tuple_get(zconfig, "options");
- cfg_map_get(zoptions, "type", &typeobj);
- if (typeobj == NULL)
- return (ISC_R_FAILURE);
- if (strcasecmp(cfg_obj_asstring(typeobj), "master") != 0)
- return (ISC_R_SUCCESS);
- cfg_map_get(zoptions, "database", &dbobj);
- if (dbobj != NULL)
- return (ISC_R_SUCCESS);
- cfg_map_get(zoptions, "file", &fileobj);
- if (fileobj == NULL)
- return (ISC_R_FAILURE);
- zfile = cfg_obj_asstring(fileobj);
- result = load_zone(mctx, zname, zfile, zclass, NULL);
- if (result != ISC_R_SUCCESS)
- fprintf(stderr, "%s/%s/%s: %s\n", view, zname, zclass,
- dns_result_totext(result));
- return(result);
-}
-
-static isc_result_t
-configure_view(const char *vclass, const char *view, cfg_obj_t *config,
- cfg_obj_t *vconfig, isc_mem_t *mctx)
-{
- cfg_listelt_t *element;
- cfg_obj_t *voptions;
- cfg_obj_t *zonelist;
- isc_result_t result = ISC_R_SUCCESS;
- isc_result_t tresult;
-
- voptions = NULL;
- if (vconfig != NULL)
- voptions = cfg_tuple_get(vconfig, "options");
-
- zonelist = NULL;
- if (voptions != NULL)
- (void)cfg_map_get(voptions, "zone", &zonelist);
- else
- (void)cfg_map_get(config, "zone", &zonelist);
-
- for (element = cfg_list_first(zonelist);
- element != NULL;
- element = cfg_list_next(element))
- {
- cfg_obj_t *zconfig = cfg_listelt_value(element);
- tresult = configure_zone(vclass, view, zconfig, mctx);
- if (tresult != ISC_R_SUCCESS)
- result = tresult;
- }
- return (result);
-}
-
-
-static isc_result_t
-load_zones_fromconfig(cfg_obj_t *config, isc_mem_t *mctx) {
- cfg_listelt_t *element;
- cfg_obj_t *classobj;
- cfg_obj_t *views;
- cfg_obj_t *vconfig;
- const char *vclass;
- isc_result_t result = ISC_R_SUCCESS;
- isc_result_t tresult;
-
- views = NULL;
-
- (void)cfg_map_get(config, "view", &views);
- for (element = cfg_list_first(views);
- element != NULL;
- element = cfg_list_next(element))
- {
- const char *vname;
-
- vclass = "IN";
- vconfig = cfg_listelt_value(element);
- if (vconfig != NULL) {
- classobj = cfg_tuple_get(vconfig, "class");
- if (cfg_obj_isstring(classobj))
- vclass = cfg_obj_asstring(classobj);
- }
- vname = cfg_obj_asstring(cfg_tuple_get(vconfig, "name"));
- tresult = configure_view(vclass, vname, config, vconfig, mctx);
- if (tresult != ISC_R_SUCCESS)
- result = tresult;
- }
-
- if (views == NULL) {
- tresult = configure_view("IN", "_default", config, NULL, mctx);
- if (tresult != ISC_R_SUCCESS)
- result = tresult;
- }
- return (result);
-}
-
-int
-main(int argc, char **argv) {
- int c;
- cfg_parser_t *parser = NULL;
- cfg_obj_t *config = NULL;
- const char *conffile = NULL;
- isc_mem_t *mctx = NULL;
- isc_result_t result;
- int exit_status = 0;
- isc_entropy_t *ectx = NULL;
- isc_boolean_t load_zones = ISC_FALSE;
-
- while ((c = isc_commandline_parse(argc, argv, "djt:vz")) != EOF) {
- switch (c) {
- case 'd':
- debug++;
- break;
-
- case 'j':
- nomerge = ISC_FALSE;
- break;
-
- case 't':
- result = isc_dir_chroot(isc_commandline_argument);
- if (result != ISC_R_SUCCESS) {
- fprintf(stderr, "isc_dir_chroot: %s\n",
- isc_result_totext(result));
- exit(1);
- }
- result = isc_dir_chdir("/");
- if (result != ISC_R_SUCCESS) {
- fprintf(stderr, "isc_dir_chdir: %s\n",
- isc_result_totext(result));
- exit(1);
- }
- break;
-
- case 'v':
- printf(VERSION "\n");
- exit(0);
-
- case 'z':
- load_zones = ISC_TRUE;
- break;
-
- default:
- usage();
- }
- }
-
- if (argv[isc_commandline_index] != NULL)
- conffile = argv[isc_commandline_index];
- if (conffile == NULL || conffile[0] == '\0')
- conffile = NAMED_CONFFILE;
-
- RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
-
- RUNTIME_CHECK(setup_logging(mctx, &logc) == ISC_R_SUCCESS);
-
- RUNTIME_CHECK(isc_entropy_create(mctx, &ectx) == ISC_R_SUCCESS);
- RUNTIME_CHECK(isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE)
- == ISC_R_SUCCESS);
-
- dns_result_register();
-
- RUNTIME_CHECK(cfg_parser_create(mctx, logc, &parser) == ISC_R_SUCCESS);
-
- cfg_parser_setcallback(parser, directory_callback, NULL);
-
- if (cfg_parse_file(parser, conffile, &cfg_type_namedconf, &config) !=
- ISC_R_SUCCESS)
- exit(1);
-
- result = bind9_check_namedconf(config, logc, mctx);
- if (result != ISC_R_SUCCESS)
- exit_status = 1;
-
- if (result == ISC_R_SUCCESS && load_zones) {
- dns_log_init(logc);
- dns_log_setcontext(logc);
- result = load_zones_fromconfig(config, mctx);
- if (result != ISC_R_SUCCESS)
- exit_status = 1;
- }
-
- cfg_obj_destroy(parser, &config);
-
- cfg_parser_destroy(&parser);
-
- isc_log_destroy(&logc);
-
- isc_hash_destroy();
- isc_entropy_detach(&ectx);
-
- isc_mem_destroy(&mctx);
-
- return (exit_status);
-}
diff --git a/contrib/bind9/bin/check/named-checkconf.docbook b/contrib/bind9/bin/check/named-checkconf.docbook
deleted file mode 100644
index c2529f642fe07..0000000000000
--- a/contrib/bind9/bin/check/named-checkconf.docbook
+++ /dev/null
@@ -1,163 +0,0 @@
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
- "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
- [<!ENTITY mdash "&#8212;">]>
-<!--
- - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2000-2002 Internet Software Consortium.
- -
- - Permission to use, copy, modify, and 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-checkconf.docbook,v 1.3.2.1.8.7 2005/05/12 21:35:56 sra Exp $ -->
-
-<refentry>
- <refentryinfo>
- <date>June 14, 2000</date>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle><application>named-checkconf</application></refentrytitle>
- <manvolnum>8</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <docinfo>
- <copyright>
- <year>2004</year>
- <year>2005</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2002</year>
- <holder>Internet Software Consortium.</holder>
- </copyright>
- </docinfo>
-
- <refnamediv>
- <refname><application>named-checkconf</application></refname>
- <refpurpose>named configuration file syntax checking tool</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>named-checkconf</command>
- <arg><option>-v</option></arg>
- <arg><option>-j</option></arg>
- <arg><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
- <arg choice="req">filename</arg>
- <arg><option>-z</option></arg>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1>
- <title>DESCRIPTION</title>
- <para>
- <command>named-checkconf</command> checks the syntax, but not
- the semantics, of a named configuration file.
- </para>
- </refsect1>
-
- <refsect1>
- <title>OPTIONS</title>
-
- <variablelist>
- <varlistentry>
- <term>-t <replaceable class="parameter">directory</replaceable></term>
- <listitem>
- <para>
- chroot to <filename>directory</filename> so that include
- directives in the configuration file are processed as if
- run by a similarly chrooted named.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-v</term>
- <listitem>
- <para>
- Print the version of the <command>named-checkconf</command>
- program and exit.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-z</term>
- <listitem>
- <para>
- Perform a check load the master zonefiles found in
- <filename>named.conf</filename>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-j</term>
- <listitem>
- <para>
- When loading a zonefile read the journal if it exists.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>filename</term>
- <listitem>
- <para>
- The name of the configuration file to be checked. If not
- specified, it defaults to <filename>/etc/named.conf</filename>.
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
-
- </refsect1>
-
- <refsect1>
- <title>RETURN VALUES</title>
- <para>
- <command>named-checkconf</command> returns an exit status of 1 if
- errors were detected and 0 otherwise.
- </para>
- </refsect1>
-
- <refsect1>
- <title>SEE ALSO</title>
- <para>
- <citerefentry>
- <refentrytitle>named</refentrytitle>
- <manvolnum>8</manvolnum>
- </citerefentry>,
- <citetitle>BIND 9 Administrator Reference Manual</citetitle>.
- </para>
- </refsect1>
-
- <refsect1>
- <title>AUTHOR</title>
- <para>
- <corpauthor>Internet Systems Consortium</corpauthor>
- </para>
- </refsect1>
-
-</refentry>
-
-<!--
- - Local variables:
- - mode: sgml
- - End:
--->
-
diff --git a/contrib/bind9/bin/check/named-checkconf.html b/contrib/bind9/bin/check/named-checkconf.html
deleted file mode 100644
index 14b8ff89cb1f0..0000000000000
--- a/contrib/bind9/bin/check/named-checkconf.html
+++ /dev/null
@@ -1,92 +0,0 @@
-<!--
- - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2000-2002 Internet Software Consortium.
- -
- - Permission to use, copy, modify, and 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-checkconf.html,v 1.5.2.1.4.12 2005/10/13 02:33:42 marka Exp $ -->
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>named-checkconf</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
-<a name="id2463721"></a><div class="titlepage"></div>
-<div class="refnamediv">
-<h2>Name</h2>
-<p><span class="application">named-checkconf</span> &#8212; named configuration file syntax checking tool</p>
-</div>
-<div class="refsynopsisdiv">
-<h2>Synopsis</h2>
-<div class="cmdsynopsis"><p><code class="command">named-checkconf</code> [<code class="option">-v</code>] [<code class="option">-j</code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] {filename} [<code class="option">-z</code>]</p></div>
-</div>
-<div class="refsect1" lang="en">
-<a name="id2525865"></a><h2>DESCRIPTION</h2>
-<p>
- <span><strong class="command">named-checkconf</strong></span> checks the syntax, but not
- the semantics, of a named configuration file.
- </p>
-</div>
-<div class="refsect1" lang="en">
-<a name="id2525878"></a><h2>OPTIONS</h2>
-<div class="variablelist"><dl>
-<dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
-<dd><p>
- chroot to <code class="filename">directory</code> so that include
- directives in the configuration file are processed as if
- run by a similarly chrooted named.
- </p></dd>
-<dt><span class="term">-v</span></dt>
-<dd><p>
- Print the version of the <span><strong class="command">named-checkconf</strong></span>
- program and exit.
- </p></dd>
-<dt><span class="term">-z</span></dt>
-<dd><p>
- Perform a check load the master zonefiles found in
- <code class="filename">named.conf</code>.
- </p></dd>
-<dt><span class="term">-j</span></dt>
-<dd><p>
- When loading a zonefile read the journal if it exists.
- </p></dd>
-<dt><span class="term">filename</span></dt>
-<dd><p>
- The name of the configuration file to be checked. If not
- specified, it defaults to <code class="filename">/etc/named.conf</code>.
- </p></dd>
-</dl></div>
-</div>
-<div class="refsect1" lang="en">
-<a name="id2525970"></a><h2>RETURN VALUES</h2>
-<p>
- <span><strong class="command">named-checkconf</strong></span> returns an exit status of 1 if
- errors were detected and 0 otherwise.
- </p>
-</div>
-<div class="refsect1" lang="en">
-<a name="id2525982"></a><h2>SEE ALSO</h2>
-<p>
- <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
- <em class="citetitle">BIND 9 Administrator Reference Manual</em>.
- </p>
-</div>
-<div class="refsect1" lang="en">
-<a name="id2526006"></a><h2>AUTHOR</h2>
-<p>
- <span class="corpauthor">Internet Systems Consortium</span>
- </p>
-</div>
-</div></body>
-</html>
diff --git a/contrib/bind9/bin/check/named-checkzone.8 b/contrib/bind9/bin/check/named-checkzone.8
deleted file mode 100644
index 33402d5fe8d05..0000000000000
--- a/contrib/bind9/bin/check/named-checkzone.8
+++ /dev/null
@@ -1,111 +0,0 @@
-.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
-.\" Copyright (C) 2000-2002 Internet Software Consortium.
-.\"
-.\" Permission to use, copy, modify, and 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-checkzone.8,v 1.11.2.1.8.8 2005/10/13 02:33:41 marka Exp $
-.\"
-.hy 0
-.ad l
-.\" ** You probably do not want to edit this file directly **
-.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
-.\" Instead of manually editing it, you probably should edit the DocBook XML
-.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
-.TH "NAMED\-CHECKZONE" "8" "June 13, 2000" "BIND9" "BIND9"
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.SH "NAME"
-named\-checkzone \- zone file validity checking tool
-.SH "SYNOPSIS"
-.HP 16
-\fBnamed\-checkzone\fR [\fB\-d\fR] [\fB\-j\fR] [\fB\-q\fR] [\fB\-v\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-k\ \fR\fB\fImode\fR\fR] [\fB\-n\ \fR\fB\fImode\fR\fR] [\fB\-o\ \fR\fB\fIfilename\fR\fR] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] [\fB\-w\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] {zonename} {filename}
-.SH "DESCRIPTION"
-.PP
-\fBnamed\-checkzone\fR
-checks the syntax and integrity of a zone file. It performs the same checks as
-\fBnamed\fR
-does when loading a zone. This makes
-\fBnamed\-checkzone\fR
-useful for checking zone files before configuring them into a name server.
-.SH "OPTIONS"
-.TP
-\-d
-Enable debugging.
-.TP
-\-q
-Quiet mode \- exit code only.
-.TP
-\-v
-Print the version of the
-\fBnamed\-checkzone\fR
-program and exit.
-.TP
-\-j
-When loading the zone file read the journal if it exists.
-.TP
-\-c \fIclass\fR
-Specify the class of the zone. If not specified "IN" is assumed.
-.TP
-\-k \fImode\fR
-Perform
-\fB"check\-name"\fR
-checks with the specified failure mode. Possible modes are
-\fB"fail"\fR,
-\fB"warn"\fR
-(default) and
-\fB"ignore"\fR.
-.TP
-\-n \fImode\fR
-Specify whether NS records should be checked to see if they are addresses. Possible modes are
-\fB"fail"\fR,
-\fB"warn"\fR
-(default) and
-\fB"ignore"\fR.
-.TP
-\-o \fIfilename\fR
-Write zone output to
-\fIfilename\fR.
-.TP
-\-t \fIdirectory\fR
-chroot to
-\fIdirectory\fR
-so that include directives in the configuration file are processed as if run by a similarly chrooted named.
-.TP
-\-w \fIdirectory\fR
-chdir to
-\fIdirectory\fR
-so that relative filenames in master file $INCLUDE directives work. This is similar to the directory clause in
-\fInamed.conf\fR.
-.TP
-\-D
-Dump zone file in canonical format.
-.TP
-zonename
-The domain name of the zone being checked.
-.TP
-filename
-The name of the zone file.
-.SH "RETURN VALUES"
-.PP
-\fBnamed\-checkzone\fR
-returns an exit status of 1 if errors were detected and 0 otherwise.
-.SH "SEE ALSO"
-.PP
-\fBnamed\fR(8),
-RFC 1035,
-BIND 9 Administrator Reference Manual.
-.SH "AUTHOR"
-.PP
-Internet Systems Consortium
diff --git a/contrib/bind9/bin/check/named-checkzone.c b/contrib/bind9/bin/check/named-checkzone.c
deleted file mode 100644
index 0eea166822a7c..0000000000000
--- a/contrib/bind9/bin/check/named-checkzone.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2003 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and 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-checkzone.c,v 1.13.2.3.8.11 2004/10/25 01:36:06 marka Exp $ */
-
-#include <config.h>
-
-#include <stdlib.h>
-
-#include <isc/app.h>
-#include <isc/commandline.h>
-#include <isc/dir.h>
-#include <isc/entropy.h>
-#include <isc/hash.h>
-#include <isc/log.h>
-#include <isc/mem.h>
-#include <isc/socket.h>
-#include <isc/string.h>
-#include <isc/task.h>
-#include <isc/timer.h>
-#include <isc/util.h>
-
-#include <dns/db.h>
-#include <dns/fixedname.h>
-#include <dns/log.h>
-#include <dns/rdataclass.h>
-#include <dns/rdataset.h>
-#include <dns/result.h>
-#include <dns/zone.h>
-
-#include "check-tool.h"
-
-static int quiet = 0;
-static isc_mem_t *mctx = NULL;
-static isc_entropy_t *ectx = NULL;
-dns_zone_t *zone = NULL;
-dns_zonetype_t zonetype = dns_zone_master;
-static int dumpzone = 0;
-static const char *output_filename;
-
-#define ERRRET(result, function) \
- do { \
- if (result != ISC_R_SUCCESS) { \
- if (!quiet) \
- fprintf(stderr, "%s() returned %s\n", \
- function, dns_result_totext(result)); \
- return (result); \
- } \
- } while (0)
-
-static void
-usage(void) {
- fprintf(stderr,
- "usage: named-checkzone [-djqvD] [-c class] [-o output] "
- "[-t directory] [-w directory] [-k (ignore|warn|fail)] "
- "[-n (ignore|warn|fail)] zonename filename\n");
- exit(1);
-}
-
-static void
-destroy(void) {
- if (zone != NULL)
- dns_zone_detach(&zone);
-}
-
-int
-main(int argc, char **argv) {
- int c;
- char *origin = NULL;
- char *filename = NULL;
- isc_log_t *lctx = NULL;
- isc_result_t result;
- char classname_in[] = "IN";
- char *classname = classname_in;
- const char *workdir = NULL;
-
- while ((c = isc_commandline_parse(argc, argv, "c:dijk:n:qst:o:vw:D")) != EOF) {
- switch (c) {
- case 'c':
- classname = isc_commandline_argument;
- break;
-
- case 'd':
- debug++;
- break;
-
- case 'j':
- nomerge = ISC_FALSE;
- break;
-
- case 'n':
- if (!strcmp(isc_commandline_argument, "ignore"))
- zone_options &= ~(DNS_ZONEOPT_CHECKNS|
- DNS_ZONEOPT_FATALNS);
- else if (!strcmp(isc_commandline_argument, "warn")) {
- zone_options |= DNS_ZONEOPT_CHECKNS;
- zone_options &= ~DNS_ZONEOPT_FATALNS;
- } else if (!strcmp(isc_commandline_argument, "fail"))
- zone_options |= DNS_ZONEOPT_CHECKNS|
- DNS_ZONEOPT_FATALNS;
- break;
-
- case 'k':
- if (!strcmp(isc_commandline_argument, "warn")) {
- zone_options |= DNS_ZONEOPT_CHECKNAMES;
- zone_options &= ~DNS_ZONEOPT_CHECKNAMESFAIL;
- } else if (!strcmp(isc_commandline_argument,
- "fail")) {
- zone_options |= DNS_ZONEOPT_CHECKNAMES |
- DNS_ZONEOPT_CHECKNAMESFAIL;
- } else if (!strcmp(isc_commandline_argument,
- "ignore")) {
- zone_options &= ~(DNS_ZONEOPT_CHECKNAMES |
- DNS_ZONEOPT_CHECKNAMESFAIL);
- }
- break;
-
- case 'q':
- quiet++;
- break;
-
- case 't':
- result = isc_dir_chroot(isc_commandline_argument);
- if (result != ISC_R_SUCCESS) {
- fprintf(stderr, "isc_dir_chroot: %s: %s\n",
- isc_commandline_argument,
- isc_result_totext(result));
- exit(1);
- }
- result = isc_dir_chdir("/");
- if (result != ISC_R_SUCCESS) {
- fprintf(stderr, "isc_dir_chdir: %s\n",
- isc_result_totext(result));
- exit(1);
- }
- break;
-
- case 'o':
- output_filename = isc_commandline_argument;
- break;
-
- case 'v':
- printf(VERSION "\n");
- exit(0);
-
- case 'w':
- workdir = isc_commandline_argument;
- break;
-
- case 'D':
- dumpzone++;
- break;
-
- default:
- usage();
- }
- }
-
- if (workdir != NULL) {
- result = isc_dir_chdir(workdir);
- if (result != ISC_R_SUCCESS) {
- fprintf(stderr, "isc_dir_chdir: %s: %s\n",
- workdir, isc_result_totext(result));
- exit(1);
- }
- }
-
- if (isc_commandline_index + 2 > argc)
- usage();
-
- RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
- if (!quiet) {
- RUNTIME_CHECK(setup_logging(mctx, &lctx) == ISC_R_SUCCESS);
- dns_log_init(lctx);
- dns_log_setcontext(lctx);
- }
- RUNTIME_CHECK(isc_entropy_create(mctx, &ectx) == ISC_R_SUCCESS);
- RUNTIME_CHECK(isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE)
- == ISC_R_SUCCESS);
-
- dns_result_register();
-
- origin = argv[isc_commandline_index++];
- filename = argv[isc_commandline_index++];
- result = load_zone(mctx, origin, filename, classname, &zone);
-
- if (result == ISC_R_SUCCESS && dumpzone) {
- result = dump_zone(origin, zone, output_filename);
- }
-
- if (!quiet && result == ISC_R_SUCCESS)
- fprintf(stdout, "OK\n");
- destroy();
- if (lctx != NULL)
- isc_log_destroy(&lctx);
- isc_hash_destroy();
- isc_entropy_detach(&ectx);
- isc_mem_destroy(&mctx);
- return ((result == ISC_R_SUCCESS) ? 0 : 1);
-}
diff --git a/contrib/bind9/bin/check/named-checkzone.docbook b/contrib/bind9/bin/check/named-checkzone.docbook
deleted file mode 100644
index ce0d78bdbdfe3..0000000000000
--- a/contrib/bind9/bin/check/named-checkzone.docbook
+++ /dev/null
@@ -1,254 +0,0 @@
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
- "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"
- [<!ENTITY mdash "&#8212;">]>
-<!--
- - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2000-2002 Internet Software Consortium.
- -
- - Permission to use, copy, modify, and 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-checkzone.docbook,v 1.3.2.2.8.11 2005/05/12 21:35:57 sra Exp $ -->
-
-<refentry>
- <refentryinfo>
- <date>June 13, 2000</date>
- </refentryinfo>
-
- <refmeta>
- <refentrytitle><application>named-checkzone</application></refentrytitle>
- <manvolnum>8</manvolnum>
- <refmiscinfo>BIND9</refmiscinfo>
- </refmeta>
-
- <docinfo>
- <copyright>
- <year>2004</year>
- <year>2005</year>
- <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
- </copyright>
- <copyright>
- <year>2000</year>
- <year>2001</year>
- <year>2002</year>
- <holder>Internet Software Consortium.</holder>
- </copyright>
- </docinfo>
-
- <refnamediv>
- <refname><application>named-checkzone</application></refname>
- <refpurpose>zone file validity checking tool</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>named-checkzone</command>
- <arg><option>-d</option></arg>
- <arg><option>-j</option></arg>
- <arg><option>-q</option></arg>
- <arg><option>-v</option></arg>
- <arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
- <arg><option>-k <replaceable class="parameter">mode</replaceable></option></arg>
- <arg><option>-n <replaceable class="parameter">mode</replaceable></option></arg>
- <arg><option>-o <replaceable class="parameter">filename</replaceable></option></arg>
- <arg><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
- <arg><option>-w <replaceable class="parameter">directory</replaceable></option></arg>
- <arg><option>-D</option></arg>
- <arg choice="req">zonename</arg>
- <arg choice="req">filename</arg>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1>
- <title>DESCRIPTION</title>
- <para>
- <command>named-checkzone</command> checks the syntax and integrity of
- a zone file. It performs the same checks as <command>named</command>
- does when loading a zone. This makes
- <command>named-checkzone</command> useful for checking zone
- files before configuring them into a name server.
- </para>
- </refsect1>
-
- <refsect1>
- <title>OPTIONS</title>
-
- <variablelist>
- <varlistentry>
- <term>-d</term>
- <listitem>
- <para>
- Enable debugging.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-q</term>
- <listitem>
- <para>
- Quiet mode - exit code only.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-v</term>
- <listitem>
- <para>
- Print the version of the <command>named-checkzone</command>
- program and exit.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-j</term>
- <listitem>
- <para>
- When loading the zone file read the journal if it exists.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-c <replaceable class="parameter">class</replaceable></term>
- <listitem>
- <para>
- Specify the class of the zone. If not specified "IN" is assumed.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-k <replaceable class="parameter">mode</replaceable></term>
- <listitem>
- <para>
- Perform <command>"check-name"</command> checks with the specified failure mode.
- Possible modes are <command>"fail"</command>,
- <command>"warn"</command> (default) and
- <command>"ignore"</command>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-n <replaceable class="parameter">mode</replaceable></term>
- <listitem>
- <para>
- Specify whether NS records should be checked to see if they
- are addresses. Possible modes are <command>"fail"</command>,
- <command>"warn"</command> (default) and
- <command>"ignore"</command>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-o <replaceable class="parameter">filename</replaceable></term>
- <listitem>
- <para>
- Write zone output to <filename>filename</filename>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-t <replaceable class="parameter">directory</replaceable></term>
- <listitem>
- <para>
- chroot to <filename>directory</filename> so that include
- directives in the configuration file are processed as if
- run by a similarly chrooted named.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-w <replaceable class="parameter">directory</replaceable></term>
- <listitem>
- <para>
- chdir to <filename>directory</filename> so that relative
- filenames in master file $INCLUDE directives work. This
- is similar to the directory clause in
- <filename>named.conf</filename>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>-D</term>
- <listitem>
- <para>
- Dump zone file in canonical format.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>zonename</term>
- <listitem>
- <para>
- The domain name of the zone being checked.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>filename</term>
- <listitem>
- <para>
- The name of the zone file.
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
-
- </refsect1>
-
- <refsect1>
- <title>RETURN VALUES</title>
- <para>
- <command>named-checkzone</command> returns an exit status of 1 if
- errors were detected and 0 otherwise.
- </para>
- </refsect1>
-
- <refsect1>
- <title>SEE ALSO</title>
- <para>
- <citerefentry>
- <refentrytitle>named</refentrytitle>
- <manvolnum>8</manvolnum>
- </citerefentry>,
- <citetitle>RFC 1035</citetitle>,
- <citetitle>BIND 9 Administrator Reference Manual</citetitle>.
- </para>
- </refsect1>
-
- <refsect1>
- <title>AUTHOR</title>
- <para>
- <corpauthor>Internet Systems Consortium</corpauthor>
- </para>
- </refsect1>
-
-</refentry>
-
-<!--
- - Local variables:
- - mode: sgml
- - End:
--->
-
diff --git a/contrib/bind9/bin/check/named-checkzone.html b/contrib/bind9/bin/check/named-checkzone.html
deleted file mode 100644
index cf544c94728a4..0000000000000
--- a/contrib/bind9/bin/check/named-checkzone.html
+++ /dev/null
@@ -1,135 +0,0 @@
-<!--
- - Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- - Copyright (C) 2000-2002 Internet Software Consortium.
- -
- - Permission to use, copy, modify, and 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-checkzone.html,v 1.5.2.2.4.13 2005/10/13 02:33:42 marka Exp $ -->
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>named-checkzone</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
-<a name="id2463721"></a><div class="titlepage"></div>
-<div class="refnamediv">
-<h2>Name</h2>
-<p><span class="application">named-checkzone</span> &#8212; zone file validity checking tool</p>
-</div>
-<div class="refsynopsisdiv">
-<h2>Synopsis</h2>
-<div class="cmdsynopsis"><p><code class="command">named-checkzone</code> [<code class="option">-d</code>] [<code class="option">-j</code>] [<code class="option">-q</code>] [<code class="option">-v</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-k <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-n <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-o <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-w <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-D</code>] {zonename} {filename}</p></div>
-</div>
-<div class="refsect1" lang="en">
-<a name="id2525922"></a><h2>DESCRIPTION</h2>
-<p>
- <span><strong class="command">named-checkzone</strong></span> checks the syntax and integrity of
- a zone file. It performs the same checks as <span><strong class="command">named</strong></span>
- does when loading a zone. This makes
- <span><strong class="command">named-checkzone</strong></span> useful for checking zone
- files before configuring them into a name server.
- </p>
-</div>
-<div class="refsect1" lang="en">
-<a name="id2525942"></a><h2>OPTIONS</h2>
-<div class="variablelist"><dl>
-<dt><span class="term">-d</span></dt>
-<dd><p>
- Enable debugging.
- </p></dd>
-<dt><span class="term">-q</span></dt>
-<dd><p>
- Quiet mode - exit code only.
- </p></dd>
-<dt><span class="term">-v</span></dt>
-<dd><p>
- Print the version of the <span><strong class="command">named-checkzone</strong></span>
- program and exit.
- </p></dd>
-<dt><span class="term">-j</span></dt>
-<dd><p>
- When loading the zone file read the journal if it exists.
- </p></dd>
-<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
-<dd><p>
- Specify the class of the zone. If not specified "IN" is assumed.
- </p></dd>
-<dt><span class="term">-k <em class="replaceable"><code>mode</code></em></span></dt>
-<dd><p>
- Perform <span><strong class="command">"check-name"</strong></span> checks with the specified failure mode.
- Possible modes are <span><strong class="command">"fail"</strong></span>,
- <span><strong class="command">"warn"</strong></span> (default) and
- <span><strong class="command">"ignore"</strong></span>.
- </p></dd>
-<dt><span class="term">-n <em class="replaceable"><code>mode</code></em></span></dt>
-<dd><p>
- Specify whether NS records should be checked to see if they
- are addresses. Possible modes are <span><strong class="command">"fail"</strong></span>,
- <span><strong class="command">"warn"</strong></span> (default) and
- <span><strong class="command">"ignore"</strong></span>.
- </p></dd>
-<dt><span class="term">-o <em class="replaceable"><code>filename</code></em></span></dt>
-<dd><p>
- Write zone output to <code class="filename">filename</code>.
- </p></dd>
-<dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
-<dd><p>
- chroot to <code class="filename">directory</code> so that include
- directives in the configuration file are processed as if
- run by a similarly chrooted named.
- </p></dd>
-<dt><span class="term">-w <em class="replaceable"><code>directory</code></em></span></dt>
-<dd><p>
- chdir to <code class="filename">directory</code> so that relative
- filenames in master file $INCLUDE directives work. This
- is similar to the directory clause in
- <code class="filename">named.conf</code>.
- </p></dd>
-<dt><span class="term">-D</span></dt>
-<dd><p>
- Dump zone file in canonical format.
- </p></dd>
-<dt><span class="term">zonename</span></dt>
-<dd><p>
- The domain name of the zone being checked.
- </p></dd>
-<dt><span class="term">filename</span></dt>
-<dd><p>
- The name of the zone file.
- </p></dd>
-</dl></div>
-</div>
-<div class="refsect1" lang="en">
-<a name="id2526187"></a><h2>RETURN VALUES</h2>
-<p>
- <span><strong class="command">named-checkzone</strong></span> returns an exit status of 1 if
- errors were detected and 0 otherwise.
- </p>
-</div>
-<div class="refsect1" lang="en">
-<a name="id2526200"></a><h2>SEE ALSO</h2>
-<p>
- <span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
- <em class="citetitle">RFC 1035</em>,
- <em class="citetitle">BIND 9 Administrator Reference Manual</em>.
- </p>
-</div>
-<div class="refsect1" lang="en">
-<a name="id2526227"></a><h2>AUTHOR</h2>
-<p>
- <span class="corpauthor">Internet Systems Consortium</span>
- </p>
-</div>
-</div></body>
-</html>