diff options
Diffstat (limited to 'contrib/bind9/bin/check')
| -rw-r--r-- | contrib/bind9/bin/check/Makefile.in | 95 | ||||
| -rw-r--r-- | contrib/bind9/bin/check/check-tool.c | 162 | ||||
| -rw-r--r-- | contrib/bind9/bin/check/check-tool.h | 46 | ||||
| -rw-r--r-- | contrib/bind9/bin/check/named-checkconf.8 | 59 | ||||
| -rw-r--r-- | contrib/bind9/bin/check/named-checkconf.c | 297 | ||||
| -rw-r--r-- | contrib/bind9/bin/check/named-checkconf.docbook | 146 | ||||
| -rw-r--r-- | contrib/bind9/bin/check/named-checkconf.html | 216 | ||||
| -rw-r--r-- | contrib/bind9/bin/check/named-checkzone.8 | 94 | ||||
| -rw-r--r-- | contrib/bind9/bin/check/named-checkzone.c | 214 | ||||
| -rw-r--r-- | contrib/bind9/bin/check/named-checkzone.docbook | 236 | ||||
| -rw-r--r-- | contrib/bind9/bin/check/named-checkzone.html | 367 |
11 files changed, 0 insertions, 1932 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, ®ion)); - - 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 25dbdd86ff15c..0000000000000 --- a/contrib/bind9/bin/check/named-checkconf.8 +++ /dev/null @@ -1,59 +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: named-checkconf.8,v 1.11.12.4 2004/06/03 05:35:41 marka Exp $ -.\" -.TH "NAMED-CHECKCONF" "8" "June 14, 2000" "BIND9" "" -.SH NAME -named-checkconf \- named configuration file syntax checking tool -.SH SYNOPSIS -.sp -\fBnamed-checkconf\fR [ \fB-v\fR ] [ \fB-j\fR ] [ \fB-t \fIdirectory\fB\fR ] \fBfilename\fR [ \fB-z\fR ] -.SH "DESCRIPTION" -.PP -\fBnamed-checkconf\fR checks the syntax, but not -the semantics, of a named configuration file. -.SH "OPTIONS" -.TP -\fB-t \fIdirectory\fB\fR -chroot to \fIdirectory\fR so that include -directives in the configuration file are processed as if -run by a similarly chrooted named. -.TP -\fB-v\fR -Print the version of the \fBnamed-checkconf\fR -program and exit. -.TP -\fB-z\fR -Perform a check load the master zonefiles found in -\fInamed.conf\fR. -.TP -\fB-j\fR -When loading a zonefile read the journal if it exists. -.TP -\fBfilename\fR -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), -\fIBIND 9 Administrator Reference Manual\fR. -.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 d1336cfa537b8..0000000000000 --- a/contrib/bind9/bin/check/named-checkconf.docbook +++ /dev/null @@ -1,146 +0,0 @@ -<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"> -<!-- - - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") - - Copyright (C) 2001, 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.5 2004/06/03 02:24:59 marka Exp $ --> - -<refentry> - <refentryinfo> - <date>June 14, 2000</date> - </refentryinfo> - - <refmeta> - <refentrytitle><application>named-checkconf</application></refentrytitle> - <manvolnum>8</manvolnum> - <refmiscinfo>BIND9</refmiscinfo> - </refmeta> - - <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. - </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 8d5f38e99c515..0000000000000 --- a/contrib/bind9/bin/check/named-checkconf.html +++ /dev/null @@ -1,216 +0,0 @@ -<!-- - - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") - - Copyright (C) 2001, 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.5 2004/08/22 23:38:57 marka Exp $ --> - -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<HTML -><HEAD -><TITLE ->named-checkconf</TITLE -><META -NAME="GENERATOR" -CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD -><BODY -CLASS="REFENTRY" -BGCOLOR="#FFFFFF" -TEXT="#000000" -LINK="#0000FF" -VLINK="#840084" -ALINK="#0000FF" -><H1 -><A -NAME="AEN1" -></A -><SPAN -CLASS="APPLICATION" ->named-checkconf</SPAN -></H1 -><DIV -CLASS="REFNAMEDIV" -><A -NAME="AEN9" -></A -><H2 ->Name</H2 -><SPAN -CLASS="APPLICATION" ->named-checkconf</SPAN -> -- named configuration file syntax checking tool</DIV -><DIV -CLASS="REFSYNOPSISDIV" -><A -NAME="AEN13" -></A -><H2 ->Synopsis</H2 -><P -><B -CLASS="COMMAND" ->named-checkconf</B -> [<VAR -CLASS="OPTION" ->-v</VAR ->] [<VAR -CLASS="OPTION" ->-j</VAR ->] [<VAR -CLASS="OPTION" ->-t <VAR -CLASS="REPLACEABLE" ->directory</VAR -></VAR ->] {filename} [<VAR -CLASS="OPTION" ->-z</VAR ->]</P -></DIV -><DIV -CLASS="REFSECT1" -><A -NAME="AEN26" -></A -><H2 ->DESCRIPTION</H2 -><P -> <B -CLASS="COMMAND" ->named-checkconf</B -> checks the syntax, but not - the semantics, of a named configuration file. - </P -></DIV -><DIV -CLASS="REFSECT1" -><A -NAME="AEN30" -></A -><H2 ->OPTIONS</H2 -><P -></P -><DIV -CLASS="VARIABLELIST" -><DL -><DT ->-t <VAR -CLASS="REPLACEABLE" ->directory</VAR -></DT -><DD -><P -> chroot to <TT -CLASS="FILENAME" ->directory</TT -> so that include - directives in the configuration file are processed as if - run by a similarly chrooted named. - </P -></DD -><DT ->-v</DT -><DD -><P -> Print the version of the <B -CLASS="COMMAND" ->named-checkconf</B -> - program and exit. - </P -></DD -><DT ->-z</DT -><DD -><P -> Perform a check load the master zonefiles found in - <TT -CLASS="FILENAME" ->named.conf</TT ->. - </P -></DD -><DT ->-j</DT -><DD -><P -> When loading a zonefile read the journal if it exists. - </P -></DD -><DT ->filename</DT -><DD -><P -> The name of the configuration file to be checked. If not - specified, it defaults to <TT -CLASS="FILENAME" ->/etc/named.conf</TT ->. - </P -></DD -></DL -></DIV -></DIV -><DIV -CLASS="REFSECT1" -><A -NAME="AEN58" -></A -><H2 ->RETURN VALUES</H2 -><P -> <B -CLASS="COMMAND" ->named-checkconf</B -> returns an exit status of 1 if - errors were detected and 0 otherwise. - </P -></DIV -><DIV -CLASS="REFSECT1" -><A -NAME="AEN62" -></A -><H2 ->SEE ALSO</H2 -><P -> <SPAN -CLASS="CITEREFENTRY" -><SPAN -CLASS="REFENTRYTITLE" ->named</SPAN ->(8)</SPAN ->, - <I -CLASS="CITETITLE" ->BIND 9 Administrator Reference Manual</I ->. - </P -></DIV -><DIV -CLASS="REFSECT1" -><A -NAME="AEN69" -></A -><H2 ->AUTHOR</H2 -><P -> Internet Systems Consortium - </P -></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 efa600c8e087c..0000000000000 --- a/contrib/bind9/bin/check/named-checkzone.8 +++ /dev/null @@ -1,94 +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: named-checkzone.8,v 1.11.2.1.8.4 2004/06/03 05:35:42 marka Exp $ -.\" -.TH "NAMED-CHECKZONE" "8" "June 13, 2000" "BIND9" "" -.SH NAME -named-checkzone \- zone file validity checking tool -.SH SYNOPSIS -.sp -\fBnamed-checkzone\fR [ \fB-d\fR ] [ \fB-j\fR ] [ \fB-q\fR ] [ \fB-v\fR ] [ \fB-c \fIclass\fB\fR ] [ \fB-k \fImode\fB\fR ] [ \fB-n \fImode\fB\fR ] [ \fB-o \fIfilename\fB\fR ] [ \fB-t \fIdirectory\fB\fR ] [ \fB-w \fIdirectory\fB\fR ] [ \fB-D\fR ] \fBzonename\fR \fBfilename\fR -.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 -\fB-d\fR -Enable debugging. -.TP -\fB-q\fR -Quiet mode - exit code only. -.TP -\fB-v\fR -Print the version of the \fBnamed-checkzone\fR -program and exit. -.TP -\fB-j\fR -When loading the zone file read the journal if it exists. -.TP -\fB-c \fIclass\fB\fR -Specify the class of the zone. If not specified "IN" is assumed. -.TP -\fB-k \fImode\fB\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 -\fB-n \fImode\fB\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 -\fB-o \fIfilename\fB\fR -Write zone output to \fIdirectory\fR. -.TP -\fB-t \fIdirectory\fB\fR -chroot to \fIdirectory\fR so that include -directives in the configuration file are processed as if -run by a similarly chrooted named. -.TP -\fB-w \fIdirectory\fB\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 -\fB-D\fR -Dump zone file in canonical format. -.TP -\fBzonename\fR -The domain name of the zone being checked. -.TP -\fBfilename\fR -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), -\fIRFC 1035\fR, -\fIBIND 9 Administrator Reference Manual\fR. -.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 68b0baeeba44c..0000000000000 --- a/contrib/bind9/bin/check/named-checkzone.docbook +++ /dev/null @@ -1,236 +0,0 @@ -<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN"> -<!-- - - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") - - Copyright (C) 2001, 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.7 2004/06/03 02:25:00 marka Exp $ --> - -<refentry> - <refentryinfo> - <date>June 13, 2000</date> - </refentryinfo> - - <refmeta> - <refentrytitle><application>named-checkzone</application></refentrytitle> - <manvolnum>8</manvolnum> - <refmiscinfo>BIND9</refmiscinfo> - </refmeta> - - <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> - <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>directory</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. - </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 dd14c1f8fd73b..0000000000000 --- a/contrib/bind9/bin/check/named-checkzone.html +++ /dev/null @@ -1,367 +0,0 @@ -<!-- - - Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") - - Copyright (C) 2001, 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.5 2004/08/22 23:38:57 marka Exp $ --> - -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<HTML -><HEAD -><TITLE ->named-checkzone</TITLE -><META -NAME="GENERATOR" -CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD -><BODY -CLASS="REFENTRY" -BGCOLOR="#FFFFFF" -TEXT="#000000" -LINK="#0000FF" -VLINK="#840084" -ALINK="#0000FF" -><H1 -><A -NAME="AEN1" -></A -><SPAN -CLASS="APPLICATION" ->named-checkzone</SPAN -></H1 -><DIV -CLASS="REFNAMEDIV" -><A -NAME="AEN9" -></A -><H2 ->Name</H2 -><SPAN -CLASS="APPLICATION" ->named-checkzone</SPAN -> -- zone file validity checking tool</DIV -><DIV -CLASS="REFSYNOPSISDIV" -><A -NAME="AEN13" -></A -><H2 ->Synopsis</H2 -><P -><B -CLASS="COMMAND" ->named-checkzone</B -> [<VAR -CLASS="OPTION" ->-d</VAR ->] [<VAR -CLASS="OPTION" ->-j</VAR ->] [<VAR -CLASS="OPTION" ->-q</VAR ->] [<VAR -CLASS="OPTION" ->-v</VAR ->] [<VAR -CLASS="OPTION" ->-c <VAR -CLASS="REPLACEABLE" ->class</VAR -></VAR ->] [<VAR -CLASS="OPTION" ->-k <VAR -CLASS="REPLACEABLE" ->mode</VAR -></VAR ->] [<VAR -CLASS="OPTION" ->-n <VAR -CLASS="REPLACEABLE" ->mode</VAR -></VAR ->] [<VAR -CLASS="OPTION" ->-o <VAR -CLASS="REPLACEABLE" ->filename</VAR -></VAR ->] [<VAR -CLASS="OPTION" ->-t <VAR -CLASS="REPLACEABLE" ->directory</VAR -></VAR ->] [<VAR -CLASS="OPTION" ->-w <VAR -CLASS="REPLACEABLE" ->directory</VAR -></VAR ->] [<VAR -CLASS="OPTION" ->-D</VAR ->] {zonename} {filename}</P -></DIV -><DIV -CLASS="REFSECT1" -><A -NAME="AEN46" -></A -><H2 ->DESCRIPTION</H2 -><P -> <B -CLASS="COMMAND" ->named-checkzone</B -> checks the syntax and integrity of - a zone file. It performs the same checks as <B -CLASS="COMMAND" ->named</B -> - does when loading a zone. This makes - <B -CLASS="COMMAND" ->named-checkzone</B -> useful for checking zone - files before configuring them into a name server. - </P -></DIV -><DIV -CLASS="REFSECT1" -><A -NAME="AEN52" -></A -><H2 ->OPTIONS</H2 -><P -></P -><DIV -CLASS="VARIABLELIST" -><DL -><DT ->-d</DT -><DD -><P -> Enable debugging. - </P -></DD -><DT ->-q</DT -><DD -><P -> Quiet mode - exit code only. - </P -></DD -><DT ->-v</DT -><DD -><P -> Print the version of the <B -CLASS="COMMAND" ->named-checkzone</B -> - program and exit. - </P -></DD -><DT ->-j</DT -><DD -><P -> When loading the zone file read the journal if it exists. - </P -></DD -><DT ->-c <VAR -CLASS="REPLACEABLE" ->class</VAR -></DT -><DD -><P -> Specify the class of the zone. If not specified "IN" is assumed. - </P -></DD -><DT ->-k <VAR -CLASS="REPLACEABLE" ->mode</VAR -></DT -><DD -><P -> Perform <B -CLASS="COMMAND" ->"check-name"</B -> checks with the specified failure mode. - Possible modes are <B -CLASS="COMMAND" ->"fail"</B ->, - <B -CLASS="COMMAND" ->"warn"</B -> (default) and - <B -CLASS="COMMAND" ->"ignore"</B ->. - </P -></DD -><DT ->-n <VAR -CLASS="REPLACEABLE" ->mode</VAR -></DT -><DD -><P -> Specify whether NS records should be checked to see if they - are addresses. Possible modes are <B -CLASS="COMMAND" ->"fail"</B ->, - <B -CLASS="COMMAND" ->"warn"</B -> (default) and - <B -CLASS="COMMAND" ->"ignore"</B ->. - </P -></DD -><DT ->-o <VAR -CLASS="REPLACEABLE" ->filename</VAR -></DT -><DD -><P -> Write zone output to <TT -CLASS="FILENAME" ->directory</TT ->. - </P -></DD -><DT ->-t <VAR -CLASS="REPLACEABLE" ->directory</VAR -></DT -><DD -><P -> chroot to <TT -CLASS="FILENAME" ->directory</TT -> so that include - directives in the configuration file are processed as if - run by a similarly chrooted named. - </P -></DD -><DT ->-w <VAR -CLASS="REPLACEABLE" ->directory</VAR -></DT -><DD -><P -> chdir to <TT -CLASS="FILENAME" ->directory</TT -> so that relative - filenames in master file $INCLUDE directives work. This - is similar to the directory clause in - <TT -CLASS="FILENAME" ->named.conf</TT ->. - </P -></DD -><DT ->-D</DT -><DD -><P -> Dump zone file in canonical format. - </P -></DD -><DT ->zonename</DT -><DD -><P -> The domain name of the zone being checked. - </P -></DD -><DT ->filename</DT -><DD -><P -> The name of the zone file. - </P -></DD -></DL -></DIV -></DIV -><DIV -CLASS="REFSECT1" -><A -NAME="AEN125" -></A -><H2 ->RETURN VALUES</H2 -><P -> <B -CLASS="COMMAND" ->named-checkzone</B -> returns an exit status of 1 if - errors were detected and 0 otherwise. - </P -></DIV -><DIV -CLASS="REFSECT1" -><A -NAME="AEN129" -></A -><H2 ->SEE ALSO</H2 -><P -> <SPAN -CLASS="CITEREFENTRY" -><SPAN -CLASS="REFENTRYTITLE" ->named</SPAN ->(8)</SPAN ->, - <I -CLASS="CITETITLE" ->RFC 1035</I ->, - <I -CLASS="CITETITLE" ->BIND 9 Administrator Reference Manual</I ->. - </P -></DIV -><DIV -CLASS="REFSECT1" -><A -NAME="AEN137" -></A -><H2 ->AUTHOR</H2 -><P -> Internet Systems Consortium - </P -></DIV -></BODY -></HTML -> |
