Compare commits

..

65 Commits

Author SHA1 Message Date
Mark Andrews
8bc3fe510b 2305. [security] inet_network() buffer overflow. CVE-2008-0122. 2008-01-16 05:15:36 +00:00
Mark Andrews
a7637b7db7 9.2.0 2007-09-20 01:22:18 +00:00
Mark Andrews
457410a26c 9.2.9rc1 2007-08-29 04:02:47 +00:00
Mark Andrews
89ddae72f0 9.2.9rc1 2007-08-29 03:30:45 +00:00
Mark Andrews
18e6143d25 regen 2007-08-29 03:29:18 +00:00
Automatic Updater
dbfff653bf update copyright notice 2007-08-28 07:18:19 +00:00
Mark Andrews
f10757ea16 9.2.9rc1 2007-08-28 07:14:54 +00:00
Mark Andrews
b3371ede92 2221. [bug] Set the event result code to reflect the actual
record returned to caller when a cache update is
                        rejected due to a more credible answer existing.
                        [RT #17017]
2007-08-28 02:33:20 +00:00
Mark Andrews
19618d7274 incremental and/or conversion for old branches 2007-08-28 02:13:52 +00:00
Mark Andrews
67d9451466 2220. [bug] win32: Address a race condition in final shutdown of
the Windows socket code. [RT #17028]
2007-08-28 00:42:27 +00:00
Automatic Updater
0405b61364 update copyright notice 2007-08-27 23:45:25 +00:00
Automatic Updater
3b83d4f4db newcopyrights 2007-08-27 23:30:04 +00:00
Mark Andrews
2497f7dcf6 2218. [bug] Remove unnecessary REQUIRE from dns_validator_create().
[RT #16976]
2007-08-27 04:47:40 +00:00
Mark Andrews
6224164cbd 2214. [bug] Deregister OpenSSL lock callback when cleaning
up. [RT #17098]
2007-08-27 03:15:14 +00:00
Mark Andrews
1fcfbb18ef 2210. [bug] Deleting class specific records via UPDATE could
fail.  [RT #17074]
2007-08-14 00:32:13 +00:00
Mark Andrews
4be0ef79e0 2209. [port] osx: linking against user supplied static OpenSSL
libraries failed as the system ones were still being
                        found. [RT #17078]
2007-08-14 00:21:52 +00:00
Mark Andrews
c4db1740f2 Run Message Compiler 2007-08-06 21:23:28 +00:00
Automatic Updater
2355a4a941 update copyright notice 2007-08-06 07:23:12 +00:00
Automatic Updater
86e788ec11 newcopyrights 2007-08-06 07:22:36 +00:00
Mark Andrews
695bd1314f add bat 2007-08-06 07:21:30 +00:00
Mark Andrews
801a60ff77 2199. [bug] win32: don't call WSAStartup() while loading dlls.
[RT #16911]
2007-08-06 07:14:33 +00:00
Mark Andrews
9b32ed6ac2 2208. [port] win32: make sure both build methods produce the
same output. [RT #17058]
2007-08-06 04:30:52 +00:00
Mark Andrews
60ac43c98a 9.2.9b1 2007-08-06 04:06:23 +00:00
Mark Andrews
ea6c157d37 9.2.9b2 2007-08-06 01:44:39 +00:00
Mark Andrews
e70ec748cf 9.2.9b1 2007-08-06 01:43:11 +00:00
Automatic Updater
20f726202f newcopyrights 2007-07-09 23:30:05 +00:00
Mark Andrews
35637bd1b8 2205. [bug] libbind: change #2119 broke thread support. [RT #16982] 2007-07-09 01:54:50 +00:00
Automatic Updater
04463e0fb1 newcopyrights 2007-06-28 23:30:04 +00:00
Mark Andrews
685388d595 set vcredist before the if 2007-06-28 04:55:51 +00:00
Mark Andrews
abb14a2c2b copy vcredist_x86.exe to the release/debug directories 2007-06-28 04:53:53 +00:00
Mark Andrews
8748cdc7c2 silence "Different types treated as unsigned for >." warning 2007-06-27 04:21:27 +00:00
Mark Andrews
62518cf366 add missing 1310 to "#elif _MSC_VER > 1200 && _MSC_VER < 1310" 2007-06-27 01:52:19 +00:00
Automatic Updater
cafb2c913e update copyright notice 2007-06-26 23:45:22 +00:00
Automatic Updater
2f05e7840b newcopyrights 2007-06-26 23:30:04 +00:00
Mark Andrews
fdb3c848d7 replace gettimeofday with isc_time_now 2007-06-26 06:10:08 +00:00
Mark Andrews
d9c4cb079d s/u_int16_t/isc_uint16_t/ 2007-06-26 04:54:53 +00:00
Mark Andrews
fc67e0f25b 2203. [security] Query id generation was cryptographically weak.
[RT # 16915]
2007-06-26 04:24:53 +00:00
Mark Andrews
0ddce8e490 regen 2007-06-20 02:25:45 +00:00
Mark Andrews
3624be0678 s/seperate/separate/ 2007-06-19 14:21:14 +00:00
Mark Andrews
3619408f99 documentation updates from Jeremy 2007-06-19 07:52:23 +00:00
cvs2git
29f239eef6 This commit was manufactured by cvs2git to create branch 'v9_2'. 2007-06-18 23:47:58 +00:00
Automatic Updater
28e93ca98e update copyright notice 2007-06-18 23:45:28 +00:00
Automatic Updater
ee839d6157 newcopyrights 2007-06-18 23:30:04 +00:00
Mark Andrews
f97a741101 2199. [bug] win32: don't call WSAStartup() while loading dlls.
[RT #16911]
2007-06-18 03:30:31 +00:00
Mark Andrews
63bfd2235a 2198. [bug] win32: RegCloseKey() could be called when
RegOpenKeyEx() failed. [RT #16911]
2007-06-18 03:04:58 +00:00
Mark Andrews
2109130aa3 2197. [bug] Add INSIST to catch negative responses which are
not setting the event result code appropriately.
                        [RT #16909]
2007-06-18 02:46:22 +00:00
Mark Andrews
98b767dff6 2196. [port] win32: yield processor while waiting for once to
to complete. [RT# 16958]
2007-06-18 01:22:08 +00:00
Mark Andrews
2f9040d1ca regen 2007-05-31 23:28:40 +00:00
Mark Andrews
bca86b6c1c update from jeremy 2007-05-31 22:33:12 +00:00
Mark Andrews
7bed4ec694 2194. [bug] Close journal before calling 'done' in xfrin.c. 2007-05-24 02:57:42 +00:00
Automatic Updater
9d1c51cc1b update copyright notice 2007-05-24 01:56:01 +00:00
Automatic Updater
88bc51b102 newcopyrights 2007-05-24 01:55:06 +00:00
Mark Andrews
360af9de3d 2194. [bug] Close journal before calling 'done' in xfrin.c. 2007-05-24 01:51:38 +00:00
Mark Andrews
f11a65c3e2 2193. [port] win32: BINDInstall.exe is now linked statically.
[RT #16906]

2192.   [port]          win32: use vcredist_x86.exe to install Visual
                        Studio's redistributable dlls if building with
                        Visual Stdio 2005 or later.
2007-05-24 01:28:13 +00:00
Mark Andrews
8e2dc11955 2189. [bug] Handle socket() returning EINTR. [RT #15949] 2007-05-21 01:57:16 +00:00
Automatic Updater
6ed82ee69b newcopyrights 2007-05-18 23:30:04 +00:00
Mark Andrews
f02d448534 regen 2007-05-18 06:37:11 +00:00
Mark Andrews
f624b3cb14 2186. [port] cygwin: libbind: check for struct sockaddr_storage
independently of IPv6. [RT #16482]
2007-05-18 06:31:30 +00:00
Mark Andrews
98d20b3743 2185. [port] sunos: libbind: check for ssize_t, memmove() and
memchr(). [RT #16463]
2007-05-18 06:25:47 +00:00
Mark Andrews
0bf52a6b6d 2182. [bug] dns_dispatch_createtcp() and dispatch_createudp()
could return ISC_R_SUCCESS when they ran out of
                        memory. [RT #16365]
2007-05-18 05:33:33 +00:00
Automatic Updater
1ac0e71b8d update copyright notice 2007-05-16 23:45:25 +00:00
Automatic Updater
6aab9bd398 newcopyrights 2007-05-16 23:30:04 +00:00
Mark Andrews
2e3ecb9360 unexpeced/unexpected 2007-05-16 07:00:23 +00:00
Mark Andrews
ddfd77d582 regen 2007-05-16 06:57:47 +00:00
Mark Andrews
9b719d0610 2181. [port] sunos: libbind: add paths.h from BIND 8. [RT #16462] 2007-05-16 06:34:09 +00:00
1622 changed files with 65472 additions and 82859 deletions

View File

@@ -6,4 +6,3 @@ config.status
libtool
isc-config.sh
configure.lineno
autom4te.cache

1447
CHANGES

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
Copyright (C) 1996-2003 Internet Software Consortium.
Permission to use, copy, modify, and/or distribute this software for any
@@ -13,7 +13,7 @@ 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: COPYRIGHT,v 1.6.2.2.8.7 2008/01/02 23:45:32 tbox Exp $
$Id: COPYRIGHT,v 1.6.2.8 2007/08/28 07:18:12 tbox Exp $
Portions Copyright (C) 1996-2001 Nominum, Inc.

View File

@@ -160,3 +160,26 @@
Use --enable-getifaddrs=glibc to force the use of
this version under linux machines.
1502. [bug] nsupdate: adjust timeouts for UPDATE requests over TCP.
1517. [port] Support for IPv6 interface scanning on HP/UX and
TrueUNIX 5.1.
1519. [bug] dnssec-signzone:nsec_setbit() computed the wrong
length of the new bitmap.
1521. [bug] dns_view_createresolver() failed to check the
result from isc_mem_create(). [RT# 9294]
1548. [bug] When parsing APL records it was possible to silently
accept out of range ADDRESSFAMILY values. [RT# 9979]
1554. [bug] dig, host, nslookup failed when no nameservers
were specified in /etc/resolv.conf. [RT #8232]
1560. [port] FreeBSD: work around FreeBSD 5.2 mapping EAI_NODATA
and EAI_NONAME to the same value.
1565. [bug] CD flag should be copied to outgoing queries unless
the query is under a secure entry point in which case
CD should be set.

881
FAQ

File diff suppressed because it is too large Load Diff

1163
FAQ.xml

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
# Copyright (C) 2004, 2006, 2007 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2003 Internet Software Consortium.
# Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2001, 2003 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
# 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.
#
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: Makefile.in,v 1.41.2.2.2.7 2007/08/28 07:19:07 tbox Exp $
# $Id: Makefile.in,v 1.41.2.5 2006/05/19 00:03:59 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@

154
README
View File

@@ -28,7 +28,7 @@ BIND 9
BIND version 9 development has been underwritten by the following
organizations:
organisations:
Sun Microsystems, Inc.
Hewlett Packard
@@ -43,71 +43,73 @@ BIND 9
Nominum, Inc.
BIND 9.3.2
BIND 9.2.9
BIND 9.3.2 is a maintenance release, containing fixes for
a number of bugs in 9.3.1.
libbind: corresponds to that from BIND 8.4.7-REL.
Known Issues:
The following INSIST can be triggered with DNSSEC enabled.
resolver.c:762: INSIST(result != 0 || dns_rdataset_isassociated(event->rdataset) || fctx->type == ((dns_rdatatype_t)dns_rdatatype_any) || fctx->type == ((dns_rdatatype_t)dns_rdatatype_rrsig)) failed
We are still trying to isolate the cause. If you have core
dump please send a bug report to bind9-bugs@isc.org with
the location of the core, named executable and OS details.
BIND 9.2.9 is the final maintenance release for BIND 9.2.
BIND 9.2.9 contains fixes for a number of bugs in 9.2.8.
Note: contrib/nanny contains a perl script to restart named
in the event of a INSIST/REQUIRE/ENSURE failure.
BIND 9.2.8
BIND 9.3.1
BIND 9.2.9 is a security release for BIND 9.2.
BIND 9.3.1 is a maintenance release, containing fixes for
a number of bugs in 9.3.0.
BIND 9.2.7
libbind: corresponds to that from BIND 8.4.6-REL.
BIND 9.2.7 is a maintenance release, containing fixes for
a number of bugs in 9.2.6.
BIND 9.3.0
BIND 9.2.6
BIND 9.3.0 has a number of new features over 9.2,
including:
BIND 9.2.6 is a maintenance release, containing fixes for
a number of bugs in 9.2.5.
DNSSEC is now DS based (RFC 3658).
See also RFC 3845, doc/draft/draft-ietf-dnsext-dnssec-*.
libbind: corresponds to that from BIND 8.4.7-REL.
DNSSEC lookaside validation.
BIND 9.2.5
check-names is now implemented.
rrset-order in more complete.
BIND 9.2.5 is a maintenance release, containing fixes for
a number of bugs in 9.2.4.
IPv4/IPv6 transition support, dual-stack-servers.
libbind: corresponds to that from BIND 8.4.6-REL.
IXFR deltas can now be generated when loading master files,
ixfr-from-differences.
It is now possible to specify the size of a journal, max-journal-size.
It is now possible to define a named set of master servers to be
used in masters clause, masters.
The advertised EDNS UDP size can now be set, edns-udp-size.
allow-v6-synthesis has been obsoleted.
NOTE:
* Zones containing MD and MF will now be rejected.
* dig, nslookup name. now report "Not Implemented" as
NOTIMP rather than NOTIMPL. This will have impact on scripts
that are looking for NOTIMPL.
BIND 9.2.4
BIND 9.2.4 is a maintenance release, containing fixes for
a number of bugs in 9.2.3.
libbind: corresponds to that from BIND 8.4.5.
BIND 9.2.3
BIND 9.2.3 is a maintenance release, containing fixes for
a number of bugs in 9.2.2.
A new zone type delegation-only is now supported.
A new view option root-delegation-only is now supported.
libbind: corresponds to that from BIND 8.4.0.
BIND 9.2.2
BIND 9.2.2 is a maintenance release, containing fixes for
a number of bugs in 9.2.1 but no new features. RFC 2535
style DNSSEC is disabled as it is incompatible with the
forthcoming DS style DNSSEC.
libbind: from BIND 8.3.3. [CERT CA-2002-19]
Minimum OpenSSL version now 0.9.6e. [CERT CA-2002-23]
BIND 9.2.1
BIND 9.2.1 is a maintenance release, containing fixes for
a number of bugs in 9.2.0 but no new features.
NOTE: dig, nslookup name. now report "Not Implemented" as
NOTIMP rather than NOTIMPL. This will have impact on scripts
that are looking for NOTIMPL.
BIND 9.2.0
BIND 9.2.0 has a number of new features over 9.1,
BIND 9.2.0 introduces a number of new features over 9.1,
including:
- The size of the cache can now be limited using the
@@ -161,8 +163,8 @@ BIND 9.2.0
BIND 9.2 is capable of acting as an authoritative server
for DNSSEC secured zones. This functionality is believed to
be stable and complete except for lacking support for
verifications involving wildcard records in secure zones.
be stable and complete except for lacking support for wildcard
records in secure zones.
When acting as a caching server, BIND 9.2 can be configured
to perform DNSSEC secure resolution on behalf of its clients.
@@ -186,8 +188,7 @@ BIND 9.2.0
This is due to a bug in "/dev/random" and impacts the
server's DNSSEC support.
OS X 10.1.4 (Darwin 5.4), OS X 10.1.5 (Darwin 5.5) and
OS X 10.2 (Darwin 6.0) reports errors like
OS X 10.1.4 (Darwin 5.4) reports errors like
"fcntl(3, F_SETFL, 4): Operation not supported by device".
This is due to a bug in "/dev/random" and impacts the
server's DNSSEC support.
@@ -212,13 +213,13 @@ Building
We've had successful builds and tests on the following systems:
COMPAQ Tru64 UNIX 5.1B
FreeBSD 4.10, 5.2.1
HP-UX 11.11
NetBSD 1.5
Slackware Linux 8.1
Solaris 8, 9, 9 (x86)
Windows NT/2000/XP/2003
COMPAQ Tru64 UNIX 5.1B
FreeBSD 4.10, 5.2.1
HP-UX 11.11
NetBSD 1.5
Slackware Linux 8.1
Solaris 8, 9, 9 (x86)
Windows NT/2000/XP/2003
Additionally, we have unverified reports of success building
previous versions of BIND 9 from users of the following systems:
@@ -228,11 +229,11 @@ Building
Slackware Linux 7.x, 8.0
Red Hat Linux 7.1
Debian GNU/Linux 2.2 and 3.0
Mandrake 8.1
OpenBSD 2.6, 2.8, 2.9, 3.1, 3.6, 3.8
UnixWare 7.1.1
HP-UX 10.20
BSD/OS 4.2
OpenUNIX 8
Mac OS X 10.1, 10.3.8
To build, just
@@ -251,7 +252,7 @@ Building
CFLAGS
C compiler flags. Defaults to include -g and/or -O2
as supported by the compiler.
as supported by the compiler.
STD_CINCLUDES
System header file directories. Can be used to specify
@@ -263,13 +264,14 @@ Building
Defaults to empty string.
Possible settings:
Change the default syslog facility of named/lwresd.
-DISC_FACILITY=LOG_LOCAL0
Enable DNSSEC signature chasing support in dig.
-DDIG_SIGCHASE=1 (sets -DDIG_SIGCHASE_TD=1 and
-DDIG_SIGCHASE_BU=1)
Disable dropping queries from particular well known ports.
-DNS_CLIENT_DROPPORT=0
-DISC_RFC2535
Enable support RFC 2535 style DNSSEC. This
is incompatable with the upcoming DS support
and SHOULD NOT be set unless you are currently
making use of it.
-DNS_CLIENT_DROPPORT=0
Disable dropping queries from particular well
known ports.
LDFLAGS
Linker flags. Defaults to empty string.
@@ -337,8 +339,9 @@ Building
compiler (e.g. the various BSD systems, Linux).
Known compiler issues:
* gcc-3.2.1 and gcc-3.1.1 is known to cause problems with solaris-x86.
* gcc prior to gcc-3.2.3 ultrasparc generates incorrect code at -02.
* gcc-3.2.1 and gcc-3.1.1 is known to cause problems with solaris-x86
if the optimiser is enabled. Use -O0 to disable the optimiser.
* gcc ultrasparc generates incorrect code at -02.
* gcc-3.3.5 powerpc generates incorrect code at -02.
* Irix, MipsPRO 7.4.1m is known to cause problems.
@@ -347,7 +350,6 @@ Building
on your system, and some require Perl; see bin/tests/system/README
for details.
Documentation
The BIND 9 Administrator Reference Manual is included with the
@@ -373,13 +375,17 @@ Bug Reports and Mailing Lists
bind9-bugs@isc.org
Configuration questions should be sent to the BIND 9 Users
mailing list. Compilation questions should be sent to the
BIND 9 Users mailing list.
To join the BIND Users mailing list, send mail to
bind-users-request@isc.org
archives of which can be found via
http://www.isc.org/ops/lists/
http://www.isc.org/ml-archives/
If you're planning on making changes to the BIND 9 source
code, you might want to join the BIND Workers mailing list.

View File

@@ -1,6 +1,6 @@
/*
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
* Copyright (C) 1999-2001, 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
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: acconfig.h,v 1.35.2.4.2.10 2004/12/04 06:50:02 marka Exp $ */
/* $Id: acconfig.h,v 1.35.2.10 2004/12/04 06:44:36 marka Exp $ */
/***
*** This file is not to be included by any public header files, because
@@ -53,9 +53,6 @@
/* define if catgets() is available */
#undef HAVE_CATGETS
/* define if getifaddrs() exists */
#undef HAVE_GETIFADDRS
/* define if you have the NET_RT_IFLIST sysctl variable and sys/sysctl.h */
#undef HAVE_IFLIST_SYSCTL
@@ -134,12 +131,6 @@ int sigwait(const unsigned int *set, int *sig);
/* define if you have strerror in the C library. */
#undef HAVE_STRERROR
/* Define if you are running under Compaq TruCluster. */
#undef HAVE_TRUCLUSTER
/* Define if OpenSSL includes DSA support */
#undef HAVE_OPENSSL_DSA
/* Define to the length type used by the socket API (socklen_t, size_t, int). */
#undef ISC_SOCKADDR_LEN_T

View File

@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: Makefile.in,v 1.22.208.1 2004/03/06 10:21:10 marka Exp $
# $Id: Makefile.in,v 1.22.2.1 2004/03/09 06:09:08 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@

View File

@@ -1,5 +1,5 @@
# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000-2003 Internet Software Consortium.
# 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
@@ -13,7 +13,7 @@
# 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 $
# $Id: Makefile.in,v 1.15.2.6 2004/07/20 07:00:09 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -21,30 +21,27 @@ top_srcdir = @top_srcdir@
@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
@BIND9_INCLUDES@
CINCLUDES = ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \
${ISC_INCLUDES}
CINCLUDES = ${DNS_INCLUDES} ${ISCCFG_INCLUDES} ${ISC_INCLUDES}
CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_OPENSSL_LIBS@ @DNS_GSSAPI_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@
TARGETS = named-checkconf named-checkzone
# Alphabetically
SRCS = named-checkconf.c named-checkzone.c check-tool.c
@@ -58,24 +55,21 @@ MANOBJS = ${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@
named-checkconf.@O@: named-checkconf.c
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
-DVERSION=\"${VERSION}\" \
${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}\" \
${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-checkconf: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \
${ISCCFGDEPLIBS} ${DNSDEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ named-checkconf.@O@ \
check-tool.@O@ ${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}
named-checkzone: 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}
@@ -86,9 +80,9 @@ 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}
install:: named-checkconf named-checkzone installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkconf ${DESTDIR}${sbindir}
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkzone ${DESTDIR}${sbindir}
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8; done
clean distclean::

View File

@@ -1,8 +1,8 @@
/*
* Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* 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.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: check-tool.c,v 1.4.12.11 2007/09/13 05:18:07 each Exp $ */
/* $Id: check-tool.c,v 1.4.2.1 2004/03/09 06:09:08 marka Exp $ */
#include <config.h>
@@ -24,35 +24,9 @@
#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/string.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;
@@ -76,87 +50,3 @@ setup_logging(isc_mem_t *mctx, isc_log_t **logp) {
*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);
}

View File

@@ -1,8 +1,8 @@
/*
* Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* 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.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: check-tool.h,v 1.2.12.8 2007/08/28 07:19:07 tbox Exp $ */
/* $Id: check-tool.h,v 1.2.2.1 2004/03/09 06:09:09 marka Exp $ */
#ifndef CHECK_TOOL_H
#define CHECK_TOOL_H
@@ -23,24 +23,12 @@
#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

View File

@@ -1,5 +1,5 @@
.\" Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000-2003 Internet Software Consortium.
.\" 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
@@ -13,7 +13,7 @@
.\" 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.13 2007/06/20 02:26:23 marka Exp $
.\" $Id: named-checkconf.8,v 1.11.2.10 2007/06/20 02:25:45 marka Exp $
.\"
.hy 0
.ad l
@@ -33,7 +33,7 @@
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]
\fBnamed\-checkconf\fR [\fB\-v\fR] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename}
.SH "DESCRIPTION"
.PP
\fBnamed\-checkconf\fR
@@ -54,17 +54,6 @@ Print the version of the
program and exit.
.RE
.PP
\-z
.RS 4
Perform a test load of all master zones found in
\fInamed.conf\fR.
.RE
.PP
\-j
.RS 4
When loading a zonefile read the journal if it exists.
.RE
.PP
filename
.RS 4
The name of the configuration file to be checked. If not specified, it defaults to
@@ -85,5 +74,5 @@ Internet Systems Consortium
.SH "COPYRIGHT"
Copyright \(co 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
.br
Copyright \(co 2000\-2003 Internet Software Consortium.
Copyright \(co 2000\-2002 Internet Software Consortium.
.br

View File

@@ -1,8 +1,8 @@
/*
* Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* 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.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named-checkconf.c,v 1.12.12.14 2007/08/28 07:19:07 tbox Exp $ */
/* $Id: named-checkconf.c,v 1.12.2.3 2006/03/02 00:37:17 marka Exp $ */
#include <config.h>
@@ -25,37 +25,22 @@
#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 <isccfg/cfg.h>
#include <isccfg/check.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");
fprintf(stderr, "usage: named-checkconf [-v] [-t directory] [named.conf]\n");
exit(1);
}
@@ -76,7 +61,7 @@ directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
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",
"change directory to '%s' failed: %s",
directory, isc_result_totext(result));
return (result);
}
@@ -84,119 +69,6 @@ directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
return (ISC_R_SUCCESS);
}
static isc_result_t
configure_zone(const char *vclass, const char *view,
const cfg_obj_t *zconfig, isc_mem_t *mctx)
{
isc_result_t result;
const char *zclass;
const char *zname;
const char *zfile;
const cfg_obj_t *zoptions = NULL;
const cfg_obj_t *classobj = NULL;
const cfg_obj_t *typeobj = NULL;
const cfg_obj_t *fileobj = NULL;
const 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, const cfg_obj_t *config,
const cfg_obj_t *vconfig, isc_mem_t *mctx)
{
const cfg_listelt_t *element;
const cfg_obj_t *voptions;
const 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))
{
const 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(const cfg_obj_t *config, isc_mem_t *mctx) {
const cfg_listelt_t *element;
const cfg_obj_t *classobj;
const cfg_obj_t *views;
const 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;
@@ -206,19 +78,9 @@ main(int argc, char **argv) {
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) {
while ((c = isc_commandline_parse(argc, argv, "t:v")) != 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) {
@@ -238,10 +100,6 @@ main(int argc, char **argv) {
printf(VERSION "\n");
exit(0);
case 'z':
load_zones = ISC_TRUE;
break;
default:
usage();
}
@@ -256,12 +114,6 @@ main(int argc, char **argv) {
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);
@@ -270,27 +122,16 @@ main(int argc, char **argv) {
ISC_R_SUCCESS)
exit(1);
result = bind9_check_namedconf(config, logc, mctx);
result = cfg_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);

View File

@@ -3,7 +3,7 @@
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2003 Internet Software Consortium.
- Copyright (C) 2000-2002 Internet Software Consortium.
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -18,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: named-checkconf.docbook,v 1.3.2.1.8.13 2007/08/28 07:19:07 tbox Exp $ -->
<!-- $Id: named-checkconf.docbook,v 1.3.2.10 2007/08/28 07:18:12 tbox Exp $ -->
<refentry>
<refentryinfo>
@@ -42,7 +42,6 @@
<year>2000</year>
<year>2001</year>
<year>2002</year>
<year>2003</year>
<holder>Internet Software Consortium.</holder>
</copyright>
</docinfo>
@@ -56,10 +55,8 @@
<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>
@@ -96,25 +93,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-z</term>
<listitem>
<para>
Perform a test load of all master zones 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>

View File

@@ -1,6 +1,6 @@
<!--
- Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2003 Internet Software Consortium.
- 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
@@ -14,7 +14,7 @@
- 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.21 2007/06/20 02:26:23 marka Exp $ -->
<!-- $Id: named-checkconf.html,v 1.5.2.19 2007/06/20 02:25:45 marka Exp $ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
@@ -29,17 +29,17 @@
</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 class="cmdsynopsis"><p><code class="command">named-checkconf</code> [<code class="option">-v</code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] {filename}</p></div>
</div>
<div class="refsect1" lang="en">
<a name="id2543374"></a><h2>DESCRIPTION</h2>
<a name="id2543363"></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="id2543387"></a><h2>OPTIONS</h2>
<a name="id2543376"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
<dd><p>
@@ -52,15 +52,6 @@
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 test load of all master zones 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
@@ -69,14 +60,14 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
<a name="id2543479"></a><h2>RETURN VALUES</h2>
<a name="id2543438"></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="id2543492"></a><h2>SEE ALSO</h2>
<a name="id2543451"></a><h2>SEE ALSO</h2>
<p>
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">named-checkzone</span>(8)</span>,
@@ -84,7 +75,7 @@
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2543524"></a><h2>AUTHOR</h2>
<a name="id2543483"></a><h2>AUTHOR</h2>
<p>
<span class="corpauthor">Internet Systems Consortium</span>
</p>

View File

@@ -1,5 +1,5 @@
.\" Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000-2003 Internet Software Consortium.
.\" Copyright (C) 2004, 2005, 2007 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
@@ -13,7 +13,7 @@
.\" 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.16 2007/06/20 02:26:23 marka Exp $
.\" $Id: named-checkzone.8,v 1.11.2.10 2007/06/20 02:25:45 marka Exp $
.\"
.hy 0
.ad l
@@ -33,7 +33,7 @@
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}
\fBnamed\-checkzone\fR [\fB\-d\fR] [\fB\-j\fR] [\fB\-q\fR] [\fB\-v\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] {zonename} {filename}
.SH "DESCRIPTION"
.PP
\fBnamed\-checkzone\fR
@@ -71,52 +71,6 @@ When loading the zone file read the journal if it exists.
Specify the class of the zone. If not specified "IN" is assumed.
.RE
.PP
\-k \fImode\fR
.RS 4
Perform
\fB"check\-names"\fR
checks with the specified failure mode. Possible modes are
\fB"fail"\fR,
\fB"warn"\fR
(default) and
\fB"ignore"\fR.
.RE
.PP
\-n \fImode\fR
.RS 4
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.
.RE
.PP
\-o \fIfilename\fR
.RS 4
Write zone output to
\fIfilename\fR.
.RE
.PP
\-t \fIdirectory\fR
.RS 4
Chroot to
\fIdirectory\fR
so that include directives in the configuration file are processed as if run by a similarly chrooted named.
.RE
.PP
\-w \fIdirectory\fR
.RS 4
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.
.RE
.PP
\-D
.RS 4
Dump zone file in canonical format.
.RE
.PP
zonename
.RS 4
The domain name of the zone being checked.
@@ -140,7 +94,7 @@ BIND 9 Administrator Reference Manual.
.PP
Internet Systems Consortium
.SH "COPYRIGHT"
Copyright \(co 2004\-2007 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
.br
Copyright \(co 2000\-2003 Internet Software Consortium.
Copyright \(co 2000\-2002 Internet Software Consortium.
.br

View File

@@ -1,6 +1,6 @@
/*
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
* 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
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named-checkzone.c,v 1.13.2.3.8.11 2004/10/25 01:36:06 marka Exp $ */
/* $Id: named-checkzone.c,v 1.13.2.5 2004/10/25 01:45:25 marka Exp $ */
#include <config.h>
@@ -23,7 +23,6 @@
#include <isc/app.h>
#include <isc/commandline.h>
#include <isc/dir.h>
#include <isc/entropy.h>
#include <isc/hash.h>
#include <isc/log.h>
@@ -44,13 +43,14 @@
#include "check-tool.h"
static int debug = 0;
isc_boolean_t nomerge = ISC_TRUE;
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;
static const char *dbtype[] = { "rbt" };
#define ERRRET(result, function) \
do { \
@@ -65,12 +65,58 @@ static const char *output_filename;
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");
"usage: named-checkzone [-djqv] [-c class] zonename filename \n");
exit(1);
}
static isc_result_t
setup(char *zonename, char *filename, char *classname) {
isc_result_t result;
dns_rdataclass_t rdclass;
isc_textregion_t region;
isc_buffer_t buffer;
dns_fixedname_t fixorigin;
dns_name_t *origin;
if (debug)
fprintf(stderr, "loading \"%s\" from \"%s\" class \"%s\"\n",
zonename, filename, classname);
result = dns_zone_create(&zone, mctx);
ERRRET(result, "dns_zone_new");
dns_zone_settype(zone, zonetype);
isc_buffer_init(&buffer, zonename, strlen(zonename));
isc_buffer_add(&buffer, strlen(zonename));
dns_fixedname_init(&fixorigin);
result = dns_name_fromtext(dns_fixedname_name(&fixorigin),
&buffer, dns_rootname, ISC_FALSE, NULL);
ERRRET(result, "dns_name_fromtext");
origin = dns_fixedname_name(&fixorigin);
result = dns_zone_setorigin(zone, origin);
ERRRET(result, "dns_zone_setorigin");
result = dns_zone_setdbtype(zone, 1, (const char * const *) dbtype);
ERRRET(result, "dns_zone_setdatabase");
result = dns_zone_setfile(zone, filename);
ERRRET(result, "dns_zone_setdatabase");
region.base = classname;
region.length = strlen(classname);
result = dns_rdataclass_fromtext(&rdclass, &region);
ERRRET(result, "dns_rdataclass_fromtext");
dns_zone_setclass(zone, rdclass);
dns_zone_setoption(zone, DNS_ZONEOPT_MANYERRORS, ISC_TRUE);
dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge);
result = dns_zone_load(zone);
return (result);
}
static void
destroy(void) {
if (zone != NULL)
@@ -86,14 +132,12 @@ main(int argc, char **argv) {
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) {
while ((c = isc_commandline_parse(argc, argv, "c:djqsv")) != EOF) {
switch (c) {
case 'c':
classname = isc_commandline_argument;
break;
case 'd':
debug++;
break;
@@ -101,84 +145,17 @@ main(int argc, char **argv) {
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();
@@ -196,12 +173,7 @@ main(int argc, char **argv) {
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);
}
result = setup(origin, filename, classname);
if (!quiet && result == ISC_R_SUCCESS)
fprintf(stdout, "OK\n");
destroy();

View File

@@ -2,8 +2,8 @@
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2003 Internet Software Consortium.
- Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2002 Internet Software Consortium.
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -18,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: named-checkzone.docbook,v 1.3.2.2.8.19 2007/08/28 07:19:07 tbox Exp $ -->
<!-- $Id: named-checkzone.docbook,v 1.3.2.10 2007/08/28 07:18:12 tbox Exp $ -->
<refentry>
<refentryinfo>
@@ -35,7 +35,6 @@
<copyright>
<year>2004</year>
<year>2005</year>
<year>2006</year>
<year>2007</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
@@ -43,7 +42,6 @@
<year>2000</year>
<year>2001</year>
<year>2002</year>
<year>2003</year>
<holder>Internet Software Consortium.</holder>
</copyright>
</docinfo>
@@ -61,12 +59,6 @@
<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>
@@ -133,71 +125,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-k <replaceable class="parameter">mode</replaceable></term>
<listitem>
<para>
Perform <command>"check-names"</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>

View File

@@ -1,6 +1,6 @@
<!--
- Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2003 Internet Software Consortium.
- Copyright (C) 2004, 2005, 2007 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
@@ -14,7 +14,7 @@
- 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.23 2007/06/20 02:26:23 marka Exp $ -->
<!-- $Id: named-checkzone.html,v 1.5.2.18 2007/06/20 02:25:45 marka Exp $ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
@@ -29,10 +29,10 @@
</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 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>] {zonename} {filename}</p></div>
</div>
<div class="refsect1" lang="en">
<a name="id2543434"></a><h2>DESCRIPTION</h2>
<a name="id2543381"></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>
@@ -42,7 +42,7 @@
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2543454"></a><h2>OPTIONS</h2>
<a name="id2543401"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-d</span></dt>
<dd><p>
@@ -65,41 +65,6 @@
<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-names"</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.
@@ -111,14 +76,14 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
<a name="id2543700"></a><h2>RETURN VALUES</h2>
<a name="id2543512"></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="id2543713"></a><h2>SEE ALSO</h2>
<a name="id2543525"></a><h2>SEE ALSO</h2>
<p>
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">named-checkconf</span>(8)</span>,
@@ -127,7 +92,7 @@
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2543748"></a><h2>AUTHOR</h2>
<a name="id2543560"></a><h2>AUTHOR</h2>
<p>
<span class="corpauthor">Internet Systems Consortium</span>
</p>

View File

@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../include" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/isccfg/include" /I "../../../lib/dns/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /YX /FD /c /Fdchecktool
# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../include" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /YX /FD /c /Fdchecktool
# SUBTRACT CPP /X
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -70,7 +70,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "../include" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/isccfg/include" /I "../../../lib/dns/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /FR /YX /FD /GZ /c /Fdchecktool
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "../include" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /FR /YX /FD /GZ /c /Fdchecktool
# SUBTRACT CPP /X
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32

View File

@@ -1,29 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "checktool"=".\checktool.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "checktool"=".\checktool.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -42,7 +42,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/isccfg/include" /I "../../../lib/bind9/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__STDC__" /FR /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/isccfg/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__STDC__" /FR /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@@ -50,7 +50,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib Release/checktool.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib ../../../lib/isccfg/win32/Release/libisccfg.lib ../../../lib/bind9/win32/Release/libbind9.lib /nologo /subsystem:console /machine:I386 /out:"../../../Build/Release/named-checkconf.exe"
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib Release/checktool.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/isccfg/win32/Release/libisccfg.lib /nologo /subsystem:console /machine:I386 /out:"../../../Build/Release/named-checkconf.exe"
!ELSEIF "$(CFG)" == "namedcheckconf - Win32 Debug"
@@ -66,7 +66,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/isccfg/include" /I "../../../lib/bind9/include" /D "_DEBUG" /D "__STDC__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/isccfg/include" /D "_DEBUG" /D "__STDC__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c
# SUBTRACT CPP /X /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
@@ -75,7 +75,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib Debug/checktool.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib ../../../lib/isccfg/win32/Debug/libisccfg.lib ../../../lib/bind9/win32/Debug/libbind9.lib ../../../lib/bind9/win32/Debug/libbind9.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../../Build/Debug/named-checkconf.exe" /pdbtype:sept
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib Debug/checktool.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/isccfg/win32/Debug/libisccfg.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../../Build/Debug/named-checkconf.exe" /pdbtype:sept
!ENDIF

View File

@@ -25,9 +25,6 @@ NULL=
NULL=nul
!ENDIF
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "namedcheckconf - Win32 Release"
_VC_MANIFEST_INC=0
_VC_MANIFEST_BASENAME=__VC80
@@ -111,21 +108,10 @@ INTDIR=.\Release
OutDir=.\Release
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Release\named-checkconf.exe" "$(OUTDIR)\namedcheckconf.bsc"
!ELSE
ALL : "libdns - Win32 Release" "libisccfg - Win32 Release" "libisc - Win32 Release" "..\..\..\Build\Release\named-checkconf.exe" "$(OUTDIR)\namedcheckconf.bsc"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libisc - Win32 ReleaseCLEAN" "libisccfg - Win32 ReleaseCLEAN" "libdns - Win32 ReleaseCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\check-tool.obj"
-@erase "$(INTDIR)\check-tool.sbr"
-@erase "$(INTDIR)\named-checkconf.obj"
@@ -138,99 +124,8 @@ CLEAN :
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/isccfg/include" /I "../../../lib/bind9/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__STDC__" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\namedcheckconf.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\namedcheckconf.bsc"
BSC32_SBRS= \
"$(INTDIR)\check-tool.sbr" \
"$(INTDIR)\named-checkconf.sbr"
"$(OUTDIR)\namedcheckconf.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib ../../../lib/isccfg/win32/Release/libisccfg.lib ../../../lib/bind9/win32/Release/libbind9.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\named-checkconf.pdb" /machine:I386 /out:"../../../Build/Release/named-checkconf.exe"
LINK32_OBJS= \
"$(INTDIR)\check-tool.obj" \
"$(INTDIR)\named-checkconf.obj" \
"..\..\..\lib\isc\win32\Release\libisc.lib" \
"..\..\..\lib\isccfg\win32\Release\libisccfg.lib" \
"..\..\..\lib\dns\win32\Release\libdns.lib"
"..\..\..\Build\Release\named-checkconf.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ELSEIF "$(CFG)" == "namedcheckconf - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Debug\named-checkconf.exe" "$(OUTDIR)\namedcheckconf.bsc"
!ELSE
ALL : "libdns - Win32 Debug" "libisccfg - Win32 Debug" "libisc - Win32 Debug" "..\..\..\Build\Debug\named-checkconf.exe" "$(OUTDIR)\namedcheckconf.bsc"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libisc - Win32 DebugCLEAN" "libisccfg - Win32 DebugCLEAN" "libdns - Win32 DebugCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\check-tool.obj"
-@erase "$(INTDIR)\check-tool.sbr"
-@erase "$(INTDIR)\named-checkconf.obj"
-@erase "$(INTDIR)\named-checkconf.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\named-checkconf.pdb"
-@erase "$(OUTDIR)\namedcheckconf.bsc"
-@erase "..\..\..\Build\Debug\named-checkconf.exe"
-@erase "..\..\..\Build\Debug\named-checkconf.ilk"
-@$(_VC_MANIFEST_CLEAN)
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/isccfg/include" /I "../../../lib/bind9/include" /D "_DEBUG" /D "__STDC__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\namedcheckconf.bsc"
BSC32_SBRS= \
"$(INTDIR)\check-tool.sbr" \
"$(INTDIR)\named-checkconf.sbr"
"$(OUTDIR)\namedcheckconf.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib ../../../lib/isccfg/win32/Debug/libisccfg.lib ../../../lib/bind9/win32/Debug/libbind9.lib ../../../lib/bind9/win32/Debug/libbind9.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\named-checkconf.pdb" /debug /machine:I386 /out:"../../../Build/Debug/named-checkconf.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\check-tool.obj" \
"$(INTDIR)\named-checkconf.obj" \
"..\..\..\lib\isc\win32\Debug\libisc.lib" \
"..\..\..\lib\isccfg\win32\Debug\libisccfg.lib" \
"..\..\..\lib\dns\win32\Debug\libdns.lib"
"..\..\..\Build\Debug\named-checkconf.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ENDIF
CPP=cl.exe
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/isccfg/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__STDC__" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\namedcheckconf.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
@@ -262,6 +157,116 @@ LINK32_OBJS= \
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\namedcheckconf.bsc"
BSC32_SBRS= \
"$(INTDIR)\check-tool.sbr" \
"$(INTDIR)\named-checkconf.sbr"
"$(OUTDIR)\namedcheckconf.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/isccfg/win32/Release/libisccfg.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\named-checkconf.pdb" /machine:I386 /out:"../../../Build/Release/named-checkconf.exe"
LINK32_OBJS= \
"$(INTDIR)\check-tool.obj" \
"$(INTDIR)\named-checkconf.obj"
"..\..\..\Build\Release\named-checkconf.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ELSEIF "$(CFG)" == "namedcheckconf - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
ALL : "..\..\..\Build\Debug\named-checkconf.exe" "$(OUTDIR)\namedcheckconf.bsc"
CLEAN :
-@erase "$(INTDIR)\check-tool.obj"
-@erase "$(INTDIR)\check-tool.sbr"
-@erase "$(INTDIR)\named-checkconf.obj"
-@erase "$(INTDIR)\named-checkconf.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\named-checkconf.pdb"
-@erase "$(OUTDIR)\namedcheckconf.bsc"
-@erase "..\..\..\Build\Debug\named-checkconf.exe"
-@erase "..\..\..\Build\Debug\named-checkconf.ilk"
-@$(_VC_MANIFEST_CLEAN)
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/isccfg/include" /D "_DEBUG" /D "__STDC__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\namedcheckconf.bsc"
BSC32_SBRS= \
"$(INTDIR)\check-tool.sbr" \
"$(INTDIR)\named-checkconf.sbr"
"$(OUTDIR)\namedcheckconf.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/isccfg/win32/Debug/libisccfg.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\named-checkconf.pdb" /debug /machine:I386 /out:"../../../Build/Debug/named-checkconf.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\check-tool.obj" \
"$(INTDIR)\named-checkconf.obj"
"..\..\..\Build\Debug\named-checkconf.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ENDIF
!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("namedcheckconf.dep")
@@ -285,84 +290,6 @@ SOURCE="..\named-checkconf.c"
$(CPP) $(CPP_PROJ) $(SOURCE)
!IF "$(CFG)" == "namedcheckconf - Win32 Release"
"libisc - Win32 Release" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release"
cd "..\..\..\bin\check\win32"
"libisc - Win32 ReleaseCLEAN" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!ELSEIF "$(CFG)" == "namedcheckconf - Win32 Debug"
"libisc - Win32 Debug" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug"
cd "..\..\..\bin\check\win32"
"libisc - Win32 DebugCLEAN" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!ENDIF
!IF "$(CFG)" == "namedcheckconf - Win32 Release"
"libisccfg - Win32 Release" :
cd "..\..\..\lib\isccfg\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisccfg.mak" CFG="libisccfg - Win32 Release"
cd "..\..\..\bin\check\win32"
"libisccfg - Win32 ReleaseCLEAN" :
cd "..\..\..\lib\isccfg\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisccfg.mak" CFG="libisccfg - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!ELSEIF "$(CFG)" == "namedcheckconf - Win32 Debug"
"libisccfg - Win32 Debug" :
cd "..\..\..\lib\isccfg\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisccfg.mak" CFG="libisccfg - Win32 Debug"
cd "..\..\..\bin\check\win32"
"libisccfg - Win32 DebugCLEAN" :
cd "..\..\..\lib\isccfg\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisccfg.mak" CFG="libisccfg - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!ENDIF
!IF "$(CFG)" == "namedcheckconf - Win32 Release"
"libdns - Win32 Release" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release"
cd "..\..\..\bin\check\win32"
"libdns - Win32 ReleaseCLEAN" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!ELSEIF "$(CFG)" == "namedcheckconf - Win32 Debug"
"libdns - Win32 Debug" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug"
cd "..\..\..\bin\check\win32"
"libdns - Win32 DebugCLEAN" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!ENDIF
!ENDIF

View File

@@ -42,8 +42,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__STDC__" /YX /FD /c
# SUBTRACT CPP /Fr
# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__STDC__" /FR /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe

View File

@@ -104,25 +104,20 @@ _VC_MANIFEST_CLEAN=
OUTDIR=.\Release
INTDIR=.\Release
# Begin Custom Macros
OutDir=.\Release
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Release\named-checkzone.exe" "$(OUTDIR)\namedcheckzone.bsc"
ALL : "..\..\..\Build\Release\named-checkzone.exe"
!ELSE
ALL : "libisc - Win32 Release" "libdns - Win32 Release" "..\..\..\Build\Release\named-checkzone.exe"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libdns - Win32 ReleaseCLEAN" "libisc - Win32 ReleaseCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\check-tool.obj"
-@erase "$(INTDIR)\check-tool.sbr"
-@erase "$(INTDIR)\named-checkzone.obj"
-@erase "$(INTDIR)\named-checkzone.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(OUTDIR)\namedcheckzone.bsc"
-@erase "..\..\..\Build\Release\named-checkzone.exe"
-@$(_VC_MANIFEST_CLEAN)
@@ -130,7 +125,7 @@ CLEAN :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__STDC__" /Fp"$(INTDIR)\namedcheckzone.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__STDC__" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\namedcheckzone.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
@@ -166,14 +161,19 @@ RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\namedcheckzone.bsc"
BSC32_SBRS= \
"$(INTDIR)\check-tool.sbr" \
"$(INTDIR)\named-checkzone.sbr"
"$(OUTDIR)\namedcheckzone.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\named-checkzone.pdb" /machine:I386 /out:"../../../Build/Release/named-checkzone.exe"
LINK32_OBJS= \
"$(INTDIR)\check-tool.obj" \
"$(INTDIR)\named-checkzone.obj" \
"..\..\..\lib\dns\win32\Release\libdns.lib" \
"..\..\..\lib\isc\win32\Release\libisc.lib"
"$(INTDIR)\named-checkzone.obj"
"..\..\..\Build\Release\named-checkzone.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
@@ -189,21 +189,10 @@ INTDIR=.\Debug
OutDir=.\Debug
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Debug\named-checkzone.exe" "$(OUTDIR)\namedcheckzone.bsc"
!ELSE
ALL : "libisc - Win32 Debug" "libdns - Win32 Debug" "..\..\..\Build\Debug\named-checkzone.exe" "$(OUTDIR)\namedcheckzone.bsc"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libdns - Win32 DebugCLEAN" "libisc - Win32 DebugCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\check-tool.obj"
-@erase "$(INTDIR)\check-tool.sbr"
-@erase "$(INTDIR)\named-checkzone.obj"
@@ -268,9 +257,7 @@ LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\named-checkzone.pdb" /debug /machine:I386 /out:"../../../Build/Debug/named-checkzone.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\check-tool.obj" \
"$(INTDIR)\named-checkzone.obj" \
"..\..\..\lib\dns\win32\Debug\libdns.lib" \
"..\..\..\lib\isc\win32\Debug\libisc.lib"
"$(INTDIR)\named-checkzone.obj"
"..\..\..\Build\Debug\named-checkzone.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
@@ -293,92 +280,16 @@ LINK32_OBJS= \
!IF "$(CFG)" == "namedcheckzone - Win32 Release" || "$(CFG)" == "namedcheckzone - Win32 Debug"
SOURCE="..\check-tool.c"
!IF "$(CFG)" == "namedcheckzone - Win32 Release"
"$(INTDIR)\check-tool.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "namedcheckzone - Win32 Debug"
"$(INTDIR)\check-tool.obj" "$(INTDIR)\check-tool.sbr" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
SOURCE="..\named-checkzone.c"
!IF "$(CFG)" == "namedcheckzone - Win32 Release"
"$(INTDIR)\named-checkzone.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "namedcheckzone - Win32 Debug"
"$(INTDIR)\named-checkzone.obj" "$(INTDIR)\named-checkzone.sbr" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
!IF "$(CFG)" == "namedcheckzone - Win32 Release"
"libdns - Win32 Release" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release"
cd "..\..\..\bin\check\win32"
"libdns - Win32 ReleaseCLEAN" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!ELSEIF "$(CFG)" == "namedcheckzone - Win32 Debug"
"libdns - Win32 Debug" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug"
cd "..\..\..\bin\check\win32"
"libdns - Win32 DebugCLEAN" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!ENDIF
!IF "$(CFG)" == "namedcheckzone - Win32 Release"
"libisc - Win32 Release" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release"
cd "..\..\..\bin\check\win32"
"libisc - Win32 ReleaseCLEAN" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!ELSEIF "$(CFG)" == "namedcheckzone - Win32 Debug"
"libisc - Win32 Debug" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug"
cd "..\..\..\bin\check\win32"
"libisc - Win32 DebugCLEAN" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!ENDIF
!ENDIF

View File

@@ -1,7 +1,7 @@
# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000-2003 Internet Software Consortium.
# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000, 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
# 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.
#
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: Makefile.in,v 1.25.12.15 2007/08/28 07:19:07 tbox Exp $
# $Id: Makefile.in,v 1.25.2.4 2004/08/18 23:22:52 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -21,35 +21,26 @@ top_srcdir = @top_srcdir@
@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
@BIND9_INCLUDES@
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${BIND9_INCLUDES} \
${ISC_INCLUDES} ${LWRES_INCLUDES}
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${ISC_INCLUDES}
CDEFINES = -DVERSION=\"${VERSION}\"
CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_OPENSSL_LIBS@ @DNS_GSSAPI_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@
LWRESLIBS = ../../lib/lwres/liblwres.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
DNSDEPLIBS = ../../lib/dns/libdns.@A@
BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
ISCDEPLIBS = ../../lib/isc/libisc.@A@
LWRESDEPLIBS = ../../lib/lwres/liblwres.@A@
DEPLIBS = ${DNSDEPLIBS} ${BIND9DEPLIBS} ${ISCDEPLIBS} ${ISCCFGDEPLIBS} \
${LWRESDEPLIBS}
DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS}
LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} ${ISCLIBS} \
${ISCCFGLIBS} @LIBS@
LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@
SUBDIRS =
TARGETS = dig@EXEEXT@ host@EXEEXT@ nslookup@EXEEXT@
TARGETS = dig host nslookup
OBJS = dig.@O@ dighost.@O@ host.@O@ nslookup.@O@
@@ -65,17 +56,14 @@ MANOBJS = ${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@
dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
dig.@O@ dighost.@O@ ${UOBJS} ${LIBS}
dig: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ dig.@O@ dighost.@O@ ${UOBJS} ${LIBS}
host@EXEEXT@: host.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
host.@O@ dighost.@O@ ${UOBJS} ${LIBS}
host: host.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ host.@O@ dighost.@O@ ${UOBJS} ${LIBS}
nslookup@EXEEXT@: nslookup.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
nslookup.@O@ dighost.@O@ ${UOBJS} ${LIBS}
nslookup: nslookup.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ nslookup.@O@ dighost.@O@ ${UOBJS} ${LIBS}
doc man:: ${MANOBJS}
@@ -89,13 +77,8 @@ installdirs:
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir}
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1
install:: dig@EXEEXT@ host@EXEEXT@ nslookup@EXEEXT@ installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \
dig@EXEEXT@ ${DESTDIR}${bindir}
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \
host@EXEEXT@ ${DESTDIR}${bindir}
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} \
nslookup@EXEEXT@ ${DESTDIR}${bindir}
for m in ${MANPAGES}; do \
${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man1; \
done
install:: dig host nslookup installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} dig ${DESTDIR}${bindir}
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} host ${DESTDIR}${bindir}
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} nslookup ${DESTDIR}${bindir}
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man1; done

View File

@@ -1,5 +1,5 @@
.\" Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000-2003 Internet Software Consortium.
.\" Copyright (C) 2000, 2001, 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
@@ -13,7 +13,7 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
.\" $Id: dig.1,v 1.14.2.4.2.18 2007/05/16 06:10:54 marka Exp $
.\" $Id: dig.1,v 1.14.2.17 2007/05/16 06:57:45 marka Exp $
.\"
.hy 0
.ad l
@@ -33,7 +33,7 @@
dig \- DNS lookup utility
.SH "SYNOPSIS"
.HP 4
\fBdig\fR [@server] [\fB\-b\ \fR\fB\fIaddress\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-f\ \fR\fB\fIfilename\fR\fR] [\fB\-k\ \fR\fB\fIfilename\fR\fR] [\fB\-p\ \fR\fB\fIport#\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-x\ \fR\fB\fIaddr\fR\fR] [\fB\-y\ \fR\fB\fIname:key\fR\fR] [\fB\-4\fR] [\fB\-6\fR] [name] [type] [class] [queryopt...]
\fBdig\fR [@server] [\fB\-b\ \fR\fB\fIaddress\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-f\ \fR\fB\fIfilename\fR\fR] [\fB\-k\ \fR\fB\fIfilename\fR\fR] [\fB\-p\ \fR\fB\fIport#\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-x\ \fR\fB\fIaddr\fR\fR] [\fB\-y\ \fR\fB\fIname:key\fR\fR] [name] [type] [class] [queryopt...]
.HP 4
\fBdig\fR [\fB\-h\fR]
.HP 4
@@ -61,7 +61,7 @@ will try each of the servers listed in
.PP
When no command line arguments or options are given, will perform an NS query for "." (the root).
.PP
It is possible to set per\-user defaults for
It is possible to set per user defaults for
\fBdig\fR
via
\fI${HOME}/.digrc\fR. This file is read and any options in it are applied before the command line arguments.
@@ -120,7 +120,7 @@ will perform a lookup for an A record.
The
\fB\-b\fR
option sets the source IP address of the query to
\fIaddress\fR. This must be a valid address on one of the host's network interfaces or "0.0.0.0" or "::". An optional port may be specified by appending "#<port>"
\fIaddress\fR. This must be a valid address on one of the host's network interfaces.
.PP
The default query class (IN for internet) is overridden by the
\fB\-c\fR
@@ -146,16 +146,6 @@ is the port number that
will send its queries instead of the standard DNS port number 53. This option would be used to test a name server that has been configured to listen for queries on a non\-standard port number.
.PP
The
\fB\-4\fR
option forces
\fBdig\fR
to only use IPv4 query transport. The
\fB\-6\fR
option forces
\fBdig\fR
to only use IPv6 query transport.
.PP
The
\fB\-t\fR
option sets the query type to
\fItype\fR. It can be any valid query type which is supported in BIND 9. The default query type is "A", unless the
@@ -179,9 +169,9 @@ arguments.
\fBdig\fR
automatically performs a lookup for a name like
11.12.13.10.in\-addr.arpa
and sets the query type and class to PTR and IN respectively. By default, IPv6 addresses are looked up using nibble format under the IP6.ARPA domain. To use the older RFC1886 method using the IP6.INT domain specify the
\fB\-i\fR
option. Bit string labels (RFC2874) are now experimental and are not attempted.
and sets the query type and class to PTR and IN respectively. By default, IPv6 addresses are looked up using the IP6.ARPA domain and binary labels as defined in RFC2874. To use the older RFC1886 method using the IP6.INT domain and "nibble" labels, specify the
\fB\-n\fR
(nibble) option.
.PP
To sign the DNS queries sent by
\fBdig\fR
@@ -258,13 +248,9 @@ Deprecated, treated as a synonym for
.PP
\fB+[no]aaonly\fR
.RS 4
Sets the "aa" flag in the query.
.RE
.PP
\fB+[no]aaflag\fR
.RS 4
A synonym for
\fI+[no]aaonly\fR.
This option does nothing. It is provided for compatibility with old versions of
\fBdig\fR
where it set an unimplemented resolver flag.
.RE
.PP
\fB+[no]adflag\fR
@@ -277,16 +263,6 @@ Set [do not set] the AD (authentic data) bit in the query. The AD bit currently
Set [do not set] the CD (checking disabled) bit in the query. This requests the server to not perform DNSSEC validation of responses.
.RE
.PP
\fB+[no]cl\fR
.RS 4
Display [do not display] the CLASS when printing the record.
.RE
.PP
\fB+[no]ttlid\fR
.RS 4
Display [do not display] the TTL when printing the record.
.RE
.PP
\fB+[no]recurse\fR
.RS 4
Toggle the setting of the RD (recursion desired) bit in the query. This bit is set by default, which means
@@ -382,19 +358,11 @@ to less than 1 will result in a query timeout of 1 second being applied.
.PP
\fB+tries=T\fR
.RS 4
Sets the number of times to try UDP queries to server to
Sets the number of times to retry UDP queries to server to
\fIT\fR
instead of the default, 3. If
\fIT\fR
is less than or equal to zero, the number of tries is silently rounded up to 1.
.RE
.PP
\fB+retry=T\fR
.RS 4
Sets the number of times to retry UDP queries to server to
\fIT\fR
instead of the default, 2. Unlike
\fI+tries\fR, this does not include the initial query.
is less than or equal to zero, the number of retries is silently rounded up to 1.
.RE
.PP
\fB+ndots=D\fR
@@ -440,32 +408,6 @@ Attempt to display the contents of messages which are malformed. The default is
.RS 4
Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO) in the OPT record in the additional section of the query.
.RE
.PP
\fB+[no]sigchase\fR
.RS 4
Chase DNSSEC signature chains. Requires dig be compiled with \-DDIG_SIGCHASE.
.RE
.PP
\fB+trusted\-key=####\fR
.RS 4
Specifies a file containing trusted keys to be used with
\fB+sigchase\fR. Each DNSKEY record must be on its own line.
.sp
If not specified
\fBdig\fR
will look for
\fI/etc/trusted\-key.key\fR
then
\fItrusted\-key.key\fR
in the current directory.
.sp
Requires dig be compiled with \-DDIG_SIGCHASE.
.RE
.PP
\fB+[no]topdown\fR
.RS 4
When chasing DNSSEC signature chains perform a top\-down validation. Requires dig be compiled with \-DDIG_SIGCHASE.
.RE
.SH "MULTIPLE QUERIES"
.PP
The BIND 9 implementation of
@@ -519,5 +461,5 @@ There are probably too many query options.
.SH "COPYRIGHT"
Copyright \(co 2004\-2007 Internet Systems Consortium, Inc. ("ISC")
.br
Copyright \(co 2000\-2003 Internet Software Consortium.
Copyright \(co 2000, 2001, 2003 Internet Software Consortium.
.br

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dig.c,v 1.157.2.13.2.35 2007/08/28 07:19:07 tbox Exp $ */
/* $Id: dig.c,v 1.157.2.25 2007/08/28 07:18:12 tbox Exp $ */
#include <config.h>
#include <stdlib.h>
@@ -24,7 +24,6 @@
#include <isc/app.h>
#include <isc/netaddr.h>
#include <isc/parseint.h>
#include <isc/print.h>
#include <isc/string.h>
#include <isc/util.h>
@@ -41,8 +40,6 @@
#include <dns/rdataclass.h>
#include <dns/result.h>
#include <bind9/getaddresses.h>
#include <dig/dig.h>
#define ADD_STRING(b, s) { \
@@ -65,7 +62,7 @@ static char domainopt[DNS_NAME_MAXTEXT];
static isc_boolean_t short_form = ISC_FALSE, printcmd = ISC_TRUE,
ip6_int = ISC_FALSE, plusquest = ISC_FALSE, pluscomm = ISC_FALSE,
multiline = ISC_FALSE, nottl = ISC_FALSE, noclass = ISC_FALSE;
multiline = ISC_FALSE;
static const char *opcodetext[] = {
"QUERY",
@@ -110,8 +107,8 @@ static void
print_usage(FILE *fp) {
fputs(
"Usage: dig [@global-server] [domain] [q-type] [q-class] {q-opt}\n"
" {global-d-opt} host [@local-server] {local-d-opt}\n"
" [ host [@local-server] {local-d-opt} [...]]\n", fp);
" {global-d-opt} host [@local-server] {local-d-opt}\n"
" [ host [@local-server] {local-d-opt} [...]]\n", fp);
}
static void
@@ -122,16 +119,11 @@ usage(void) {
exit(1);
}
static void
version(void) {
fputs("DiG " VERSION "\n", stderr);
}
static void
help(void) {
print_usage(stdout);
fputs(
"Where: domain is in the Domain Name System\n"
"Where: domain are in the Domain Name System\n"
" q-class is one of (in,hs,ch,...) [default: in]\n"
" q-type is one of (a,any,mx,ns,soa,hinfo,axfr,txt,...) [default:a]\n"
" (Use ixfr=version for type ixfr)\n"
@@ -139,20 +131,17 @@ help(void) {
" -x dot-notation (shortcut for in-addr lookups)\n"
" -i (IP6.INT reverse IPv6 lookups)\n"
" -f filename (batch mode)\n"
" -b address[#port] (bind to source address/port)\n"
" -b address (bind to source address)\n"
" -p port (specify port number)\n"
" -t type (specify query type)\n"
" -c class (specify query class)\n"
" -k keyfile (specify tsig key file)\n"
" -y name:key (specify named base64 tsig key)\n"
" -4 (use IPv4 query transport only)\n"
" -6 (use IPv6 query transport only)\n"
" d-opt is of the form +keyword[=value], where keyword is:\n"
" +[no]vc (TCP mode)\n"
" +[no]tcp (TCP mode, alternate syntax)\n"
" +time=### (Set query timeout) [5]\n"
" +tries=### (Set number of UDP attempts) [3]\n"
" +retry=### (Set number of UDP retries) [2]\n"
" +domain=### (Set default domainname)\n"
" +bufsize=### (Set EDNS0 Max UDP packet size)\n"
" +ndots=### (Set NDOTS value)\n"
@@ -163,10 +152,9 @@ help(void) {
"\n"
" +[no]fail (Don't try next server on SERVFAIL)\n"
" +[no]besteffort (Try to parse even illegal messages)\n"
" +[no]aaonly (Set AA flag in query (+[no]aaflag))\n"
" +[no]aaonly (Set AA flag in query)\n"
" +[no]adflag (Set AD flag in query)\n"
" +[no]cdflag (Set CD flag in query)\n"
" +[no]cl (Control display of class in records)\n"
" +[no]cmd (Control display of command line)\n"
" +[no]comments (Control display of comment lines)\n"
" +[no]question (Control display of question)\n"
@@ -176,25 +164,15 @@ help(void) {
" +[no]stats (Control display of statistics)\n"
" +[no]short (Disable everything except short\n"
" form of answer)\n"
" +[no]ttlid (Control display of ttls in records)\n"
" +[no]all (Set or clear all display flags)\n"
" +[no]qr (Print question before sending)\n"
" +[no]nssearch (Search all authoritative nameservers)\n"
" +[no]identify (ID responders in short answers)\n"
" +[no]trace (Trace delegation down from root)\n"
" +[no]dnssec (Request DNSSEC records)\n"
#ifdef DIG_SIGCHASE
" +[no]sigchase (Chase DNSSEC signatures)\n"
" +trusted-key=#### (Trusted Key when chasing DNSSEC sigs)\n"
#if DIG_SIGCHASE_TD
" +[no]topdown (Do DNSSEC validation top down mode)\n"
#endif
#endif
" +[no]multiline (Print records in an expanded format)\n"
" global d-opts and servers (before host name) affect all queries.\n"
" local d-opts and servers (after host name) affect only that lookup.\n"
" -h (print help and exit)\n"
" -v (print version and exit)\n",
" local d-opts and servers (after host name) affect only that lookup.\n",
stdout);
}
@@ -205,12 +183,14 @@ void
received(int bytes, isc_sockaddr_t *from, dig_query_t *query) {
isc_uint64_t diff;
isc_time_t now;
isc_result_t result;
time_t tnow;
char fromtext[ISC_SOCKADDR_FORMATSIZE];
isc_sockaddr_format(from, fromtext, sizeof(fromtext));
TIME_NOW(&now);
result = isc_time_now(&now);
check_result(result, "isc_time_now");
if (query->lookup->stats && !short_form) {
diff = isc_time_microdiff(&now, &query->time_sent);
@@ -219,8 +199,8 @@ received(int bytes, isc_sockaddr_t *from, dig_query_t *query) {
time(&tnow);
printf(";; WHEN: %s", ctime(&tnow));
if (query->lookup->doing_xfr) {
printf(";; XFR size: %u records (messages %u)\n",
query->rr_count, query->msg_count);
printf(";; XFR size: %d records\n",
query->rr_count);
} else {
printf(";; MSG SIZE rcvd: %d\n", bytes);
@@ -272,7 +252,9 @@ say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) {
result = dns_rdata_totext(rdata, NULL, buf);
check_result(result, "dns_rdata_totext");
if (query->lookup->identify) {
TIME_NOW(&now);
result = isc_time_now(&now);
if (result != ISC_R_SUCCESS)
return (result);
diff = isc_time_microdiff(&now, &query->time_sent);
ADD_STRING(buf, " from server ");
ADD_STRING(buf, query->servname);
@@ -335,51 +317,6 @@ short_answer(dns_message_t *msg, dns_messagetextflag_t flags,
return (ISC_R_SUCCESS);
}
#ifdef DIG_SIGCHASE
isc_result_t
printrdataset(dns_name_t *owner_name, dns_rdataset_t *rdataset,
isc_buffer_t *target)
{
isc_result_t result;
dns_master_style_t *style = NULL;
unsigned int styleflags = 0;
if (rdataset == NULL || owner_name == NULL || target == NULL)
return(ISC_FALSE);
styleflags |= DNS_STYLEFLAG_REL_OWNER;
if (nottl)
styleflags |= DNS_STYLEFLAG_NO_TTL;
if (noclass)
styleflags |= DNS_STYLEFLAG_NO_CLASS;
if (multiline) {
styleflags |= DNS_STYLEFLAG_OMIT_OWNER;
styleflags |= DNS_STYLEFLAG_OMIT_CLASS;
styleflags |= DNS_STYLEFLAG_REL_DATA;
styleflags |= DNS_STYLEFLAG_OMIT_TTL;
styleflags |= DNS_STYLEFLAG_TTL;
styleflags |= DNS_STYLEFLAG_MULTILINE;
styleflags |= DNS_STYLEFLAG_COMMENT;
}
if (multiline || (nottl && noclass))
result = dns_master_stylecreate(&style, styleflags,
24, 24, 24, 32, 80, 8, mctx);
else if (nottl || noclass)
result = dns_master_stylecreate(&style, styleflags,
24, 24, 32, 40, 80, 8, mctx);
else
result = dns_master_stylecreate(&style, styleflags,
24, 32, 40, 48, 80, 8, mctx);
check_result(result, "dns_master_stylecreate");
result = dns_master_rdatasettotext(owner_name, rdataset, style, target);
if (style != NULL)
dns_master_styledestroy(&style, mctx);
return(result);
}
#endif
/*
* Callback from dighost.c to print the reply from a server
@@ -390,33 +327,12 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
dns_messagetextflag_t flags;
isc_buffer_t *buf = NULL;
unsigned int len = OUTPUTBUF;
dns_master_style_t *style = NULL;
unsigned int styleflags = 0;
const dns_master_style_t *style;
styleflags |= DNS_STYLEFLAG_REL_OWNER;
if (nottl)
styleflags |= DNS_STYLEFLAG_NO_TTL;
if (noclass)
styleflags |= DNS_STYLEFLAG_NO_CLASS;
if (multiline) {
styleflags |= DNS_STYLEFLAG_OMIT_OWNER;
styleflags |= DNS_STYLEFLAG_OMIT_CLASS;
styleflags |= DNS_STYLEFLAG_REL_DATA;
styleflags |= DNS_STYLEFLAG_OMIT_TTL;
styleflags |= DNS_STYLEFLAG_TTL;
styleflags |= DNS_STYLEFLAG_MULTILINE;
styleflags |= DNS_STYLEFLAG_COMMENT;
}
if (multiline || (nottl && noclass))
result = dns_master_stylecreate(&style, styleflags,
24, 24, 24, 32, 80, 8, mctx);
else if (nottl || noclass)
result = dns_master_stylecreate(&style, styleflags,
24, 24, 32, 40, 80, 8, mctx);
else
result = dns_master_stylecreate(&style, styleflags,
24, 32, 40, 48, 80, 8, mctx);
check_result(result, "dns_master_stylecreate");
if (multiline)
style = &dns_master_style_default;
else
style = &dns_master_style_debug;
if (query->lookup->cmdline[0] != 0) {
if (!short_form)
@@ -480,7 +396,8 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
repopulate_buffer:
if (query->lookup->comments && headers && !short_form) {
if (query->lookup->comments && headers && !short_form)
{
result = dns_message_pseudosectiontotext(msg,
DNS_PSEUDOSECTION_OPT,
style, flags, buf);
@@ -492,7 +409,7 @@ buftoosmall:
if (result == ISC_R_SUCCESS)
goto repopulate_buffer;
else
goto cleanup;
return (result);
}
check_result(result,
"dns_message_pseudosectiontotext");
@@ -571,10 +488,6 @@ buftoosmall:
printf("%.*s", (int)isc_buffer_usedlength(buf),
(char *)isc_buffer_base(buf));
isc_buffer_free(&buf);
cleanup:
if (style != NULL)
dns_master_styledestroy(&style, mctx);
return (result);
}
@@ -613,7 +526,7 @@ printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
strncat(lookup->cmdline, append, remaining);
}
if (first) {
snprintf(append, sizeof(append),
snprintf(append, sizeof (append),
";; global options: %s %s\n",
short_form ? "short_form" : "",
printcmd ? "printcmd" : "");
@@ -627,14 +540,14 @@ printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
static isc_uint32_t
parse_uint(char *arg, const char *desc, isc_uint32_t max) {
isc_result_t result;
char *endp;
isc_uint32_t tmp;
result = isc_parse_uint32(&tmp, arg, 10);
if (result == ISC_R_SUCCESS && tmp > max)
result = ISC_R_RANGE;
if (result != ISC_R_SUCCESS)
fatal("%s '%s': %s", desc, arg, isc_result_totext(result));
tmp = strtoul(arg, &endp, 10);
if (*endp != '\0')
fatal("%s '%s' must be numeric", desc, arg);
if (tmp > max)
fatal("%s '%s' out of range", desc, arg);
return (tmp);
}
@@ -652,53 +565,32 @@ plus_option(char *option, isc_boolean_t is_batchfile,
char option_store[256];
char *cmd, *value, *ptr;
isc_boolean_t state = ISC_TRUE;
#ifdef DIG_SIGCHASE
size_t n;
#endif
strncpy(option_store, option, sizeof(option_store));
option_store[sizeof(option_store)-1]=0;
ptr = option_store;
cmd = next_token(&ptr,"=");
cmd=next_token(&ptr,"=");
if (cmd == NULL) {
printf(";; Invalid option %s\n", option_store);
printf(";; Invalid option %s\n",option_store);
return;
}
value = ptr;
if (strncasecmp(cmd, "no", 2)==0) {
value=ptr;
if (strncasecmp(cmd,"no",2)==0) {
cmd += 2;
state = ISC_FALSE;
}
#define FULLCHECK(A) \
do { \
size_t _l = strlen(cmd); \
if (_l >= sizeof(A) || strncasecmp(cmd, A, _l) != 0) \
goto invalid_option; \
} while (0)
#define FULLCHECK2(A, B) \
do { \
size_t _l = strlen(cmd); \
if ((_l >= sizeof(A) || strncasecmp(cmd, A, _l) != 0) && \
(_l >= sizeof(B) || strncasecmp(cmd, B, _l) != 0)) \
goto invalid_option; \
} while (0)
switch (cmd[0]) {
case 'a':
switch (cmd[1]) {
case 'a': /* aaonly / aaflag */
FULLCHECK2("aaonly", "aaflag");
case 'a': /* aaflag */
lookup->aaonly = state;
break;
case 'd':
switch (cmd[2]) {
case 'd': /* additional */
FULLCHECK("additional");
lookup->section_additional = state;
break;
case 'f': /* adflag */
FULLCHECK("adflag");
lookup->adflag = state;
break;
default:
@@ -706,7 +598,6 @@ plus_option(char *option, isc_boolean_t is_batchfile,
}
break;
case 'l': /* all */
FULLCHECK("all");
lookup->section_question = state;
lookup->section_authority = state;
lookup->section_answer = state;
@@ -716,11 +607,9 @@ plus_option(char *option, isc_boolean_t is_batchfile,
printcmd = state;
break;
case 'n': /* answer */
FULLCHECK("answer");
lookup->section_answer = state;
break;
case 'u': /* authority */
FULLCHECK("authority");
lookup->section_authority = state;
break;
default:
@@ -730,11 +619,9 @@ plus_option(char *option, isc_boolean_t is_batchfile,
case 'b':
switch (cmd[1]) {
case 'e':/* besteffort */
FULLCHECK("besteffort");
lookup->besteffort = state;
break;
case 'u':/* bufsize */
FULLCHECK("bufsize");
if (value == NULL)
goto need_value;
if (!state)
@@ -749,19 +636,12 @@ plus_option(char *option, isc_boolean_t is_batchfile,
case 'c':
switch (cmd[1]) {
case 'd':/* cdflag */
FULLCHECK("cdflag");
lookup->cdflag = state;
break;
case 'l': /* cl */
FULLCHECK("cl");
noclass = ISC_TF(!state);
break;
case 'm': /* cmd */
FULLCHECK("cmd");
printcmd = state;
break;
case 'o': /* comments */
FULLCHECK("comments");
lookup->comments = state;
if (lookup == default_lookup)
pluscomm = state;
@@ -773,15 +653,12 @@ plus_option(char *option, isc_boolean_t is_batchfile,
case 'd':
switch (cmd[1]) {
case 'e': /* defname */
FULLCHECK("defname");
usesearch = state;
break;
case 'n': /* dnssec */
FULLCHECK("dnssec");
lookup->dnssec = state;
break;
case 'o': /* domain */
FULLCHECK("domain");
if (value == NULL)
goto need_value;
if (!state)
@@ -794,29 +671,24 @@ plus_option(char *option, isc_boolean_t is_batchfile,
}
break;
case 'f': /* fail */
FULLCHECK("fail");
lookup->servfail_stops = state;
break;
case 'i':
switch (cmd[1]) {
case 'd': /* identify */
FULLCHECK("identify");
lookup->identify = state;
break;
case 'g': /* ignore */
default: /* Inherets default for compatibility */
FULLCHECK("ignore");
lookup->ignore = ISC_TRUE;
}
break;
case 'm': /* multiline */
FULLCHECK("multiline");
multiline = state;
break;
case 'n':
switch (cmd[1]) {
case 'd': /* ndots */
FULLCHECK("ndots");
if (value == NULL)
goto need_value;
if (!state)
@@ -824,7 +696,6 @@ plus_option(char *option, isc_boolean_t is_batchfile,
ndots = parse_uint(value, "ndots", MAXNDOTS);
break;
case 's': /* nssearch */
FULLCHECK("nssearch");
lookup->ns_search_only = state;
if (state) {
lookup->trace_root = ISC_TRUE;
@@ -847,11 +718,9 @@ plus_option(char *option, isc_boolean_t is_batchfile,
case 'q':
switch (cmd[1]) {
case 'r': /* qr */
FULLCHECK("qr");
qr = state;
break;
case 'u': /* question */
FULLCHECK("question");
lookup->section_question = state;
if (lookup == default_lookup)
plusquest = state;
@@ -860,40 +729,15 @@ plus_option(char *option, isc_boolean_t is_batchfile,
goto invalid_option;
}
break;
case 'r':
switch (cmd[1]) {
case 'e':
switch (cmd[2]) {
case 'c': /* recurse */
FULLCHECK("recurse");
lookup->recurse = state;
break;
case 't': /* retry / retries */
FULLCHECK2("retry", "retries");
if (value == NULL)
goto need_value;
if (!state)
goto invalid_option;
lookup->retries = parse_uint(value, "retries",
MAXTRIES - 1);
lookup->retries++;
break;
default:
goto invalid_option;
}
break;
default:
goto invalid_option;
}
case 'r': /* recurse */
lookup->recurse = state;
break;
case 's':
switch (cmd[1]) {
case 'e': /* search */
FULLCHECK("search");
usesearch = state;
break;
case 'h': /* short */
FULLCHECK("short");
short_form = state;
if (state) {
printcmd = ISC_FALSE;
@@ -905,16 +749,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
lookup->stats = ISC_FALSE;
}
break;
#ifdef DIG_SIGCHASE
case 'i': /* sigchase */
FULLCHECK("sigchase");
lookup->sigchase = state;
if (lookup->sigchase)
lookup->dnssec = ISC_TRUE;
break;
#endif
case 't': /* stats */
FULLCHECK("stats");
lookup->stats = state;
break;
default:
@@ -924,12 +759,10 @@ plus_option(char *option, isc_boolean_t is_batchfile,
case 't':
switch (cmd[1]) {
case 'c': /* tcp */
FULLCHECK("tcp");
if (!is_batchfile)
lookup->tcp_mode = state;
break;
case 'i': /* timeout */
FULLCHECK("timeout");
if (value == NULL)
goto need_value;
if (!state)
@@ -938,16 +771,9 @@ plus_option(char *option, isc_boolean_t is_batchfile,
if (timeout == 0)
timeout = 1;
break;
#if DIG_SIGCHASE_TD
case 'o': /* topdown */
FULLCHECK("topdown");
lookup->do_topdown = state;
break;
#endif
case 'r':
switch (cmd[2]) {
case 'a': /* trace */
FULLCHECK("trace");
lookup->trace = state;
lookup->trace_root = state;
if (state) {
@@ -961,43 +787,24 @@ plus_option(char *option, isc_boolean_t is_batchfile,
}
break;
case 'i': /* tries */
FULLCHECK("tries");
if (value == NULL)
goto need_value;
if (!state)
goto invalid_option;
lookup->retries = parse_uint(value, "tries",
MAXTRIES);
lookup->retries = parse_uint(value, "retries",
MAXTRIES);
if (lookup->retries == 0)
lookup->retries = 1;
break;
#ifdef DIG_SIGCHASE
case 'u': /* trusted-key */
FULLCHECK("trusted-key");
if (value == NULL)
goto need_value;
if (!state)
goto invalid_option;
n = strlcpy(trustedkey, ptr,
sizeof(trustedkey));
if (n >= sizeof(trustedkey))
fatal("trusted key too large");
break;
#endif
default:
goto invalid_option;
}
break;
case 't': /* ttlid */
FULLCHECK("ttlid");
nottl = ISC_TF(!state);
break;
default:
goto invalid_option;
}
break;
case 'v':
FULLCHECK("vc");
if (!is_batchfile)
lookup->tcp_mode = state;
break;
@@ -1014,14 +821,12 @@ plus_option(char *option, isc_boolean_t is_batchfile,
/*
* ISC_TRUE returned if value was used
*/
static const char *single_dash_opts = "46dhimnv";
static const char *dash_opts = "46bcdfhikmnptvyx";
static isc_boolean_t
dash_option(char *option, char *next, dig_lookup_t **lookup,
isc_boolean_t *open_type_class, isc_boolean_t *need_clone,
int argc, char **argv, isc_boolean_t *firstarg)
{
char opt, *value, *ptr;
char cmd, *value, *ptr;
isc_result_t result;
isc_boolean_t value_from_next;
isc_textregion_t tr;
@@ -1030,69 +835,8 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
char textname[MXNAME];
struct in_addr in4;
struct in6_addr in6;
in_port_t srcport;
char *hash, *cmd;
while (strpbrk(option, single_dash_opts) == &option[0]) {
/*
* Since the -[46dhimnv] options do not take an argument,
* account for them (in any number and/or combination)
* if they appear as the first character(s) of a q-opt.
*/
opt = option[0];
switch (opt) {
case '4':
if (have_ipv4) {
isc_net_disableipv6();
have_ipv6 = ISC_FALSE;
} else {
fatal("can't find IPv4 networking");
return (ISC_FALSE);
}
break;
case '6':
if (have_ipv6) {
isc_net_disableipv4();
have_ipv4 = ISC_FALSE;
} else {
fatal("can't find IPv6 networking");
return (ISC_FALSE);
}
break;
case 'd':
ptr = strpbrk(&option[1], dash_opts);
if (ptr != &option[1]) {
cmd = option;
FULLCHECK("debug");
debugging = ISC_TRUE;
return (ISC_FALSE);
} else
debugging = ISC_TRUE;
break;
case 'h':
help();
exit(0);
break;
case 'i':
ip6_int = ISC_TRUE;
break;
case 'm': /* memdebug */
/* memdebug is handled in preparse_args() */
break;
case 'n':
/* deprecated */
break;
case 'v':
version();
exit(0);
break;
}
if (strlen(option) > 1U)
option = &option[1];
else
return (ISC_FALSE);
}
opt = option[0];
cmd = option[0];
if (strlen(option) > 1U) {
value_from_next = ISC_FALSE;
value = &option[1];
@@ -1100,31 +844,34 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
value_from_next = ISC_TRUE;
value = next;
}
switch (cmd) {
case 'd':
debugging = ISC_TRUE;
return (ISC_FALSE);
case 'h':
help();
exit(0);
break;
case 'i':
ip6_int = ISC_TRUE;
return (ISC_FALSE);
case 'm': /* memdebug */
/* memdebug is handled in preparse_args() */
return (ISC_FALSE);
case 'n':
/* deprecated */
return (ISC_FALSE);
}
if (value == NULL)
goto invalid_option;
switch (opt) {
switch (cmd) {
case 'b':
hash = strchr(value, '#');
if (hash != NULL) {
srcport = (in_port_t)
parse_uint(hash + 1,
"port number", MAXPORT);
*hash = '\0';
} else
srcport = 0;
if (have_ipv6 && inet_pton(AF_INET6, value, &in6) == 1) {
isc_sockaddr_fromin6(&bind_address, &in6, srcport);
isc_net_disableipv4();
} else if (have_ipv4 && inet_pton(AF_INET, value, &in4) == 1) {
isc_sockaddr_fromin(&bind_address, &in4, srcport);
isc_net_disableipv6();
} else {
if (hash != NULL)
*hash = '#';
if (have_ipv6 && inet_pton(AF_INET6, value, &in6) == 1)
isc_sockaddr_fromin6(&bind_address, &in6, 0);
else if (have_ipv4 && inet_pton(AF_INET, value, &in4) == 1)
isc_sockaddr_fromin(&bind_address, &in4, 0);
else
fatal("invalid address %s", value);
}
if (hash != NULL)
*hash = '#';
specified_source = ISC_TRUE;
return (value_from_next);
case 'c':
@@ -1165,7 +912,8 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
result = dns_rdatatype_fromtext(&rdtype,
(isc_textregion_t *)&tr);
if (result == ISC_R_SUCCESS &&
rdtype == dns_rdatatype_ixfr) {
rdtype == dns_rdatatype_ixfr)
{
result = DNS_R_UNKNOWN;
}
}
@@ -1210,11 +958,12 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
keysecret[sizeof(keysecret)-1]=0;
return (value_from_next);
case 'x':
if (*need_clone)
*lookup = clone_lookup(default_lookup, ISC_TRUE);
*need_clone = ISC_TRUE;
if (get_reverse(textname, sizeof(textname), value,
ip6_int, ISC_FALSE) == ISC_R_SUCCESS) {
if (*need_clone)
*lookup = clone_lookup(default_lookup, ISC_TRUE);
*need_clone = ISC_TRUE;
if (get_reverse(textname, value, ip6_int, ISC_FALSE)
== ISC_R_SUCCESS)
{
strncpy((*lookup)->textname, textname,
sizeof((*lookup)->textname));
debug("looking up %s", (*lookup)->textname);
@@ -1256,26 +1005,20 @@ static void
preparse_args(int argc, char **argv) {
int rc;
char **rv;
char *option;
rc = argc;
rv = argv;
for (rc--, rv++; rc > 0; rc--, rv++) {
if (rv[0][0] != '-')
continue;
option = &rv[0][1];
while (strpbrk(option, single_dash_opts) == &option[0]) {
if (option[0] == 'm') {
memdebugging = ISC_TRUE;
isc_mem_debugging = ISC_MEM_DEBUGTRACE |
ISC_MEM_DEBUGRECORD;
return;
}
option = &option[1];
if (strcmp(rv[0], "-m") == 0) {
memdebugging = ISC_TRUE;
isc_mem_debugging = ISC_MEM_DEBUGTRACE |
ISC_MEM_DEBUGRECORD;
return;
}
}
}
static void
getaddresses(dig_lookup_t *lookup, const char *host) {
isc_result_t result;
@@ -1285,11 +1028,10 @@ getaddresses(dig_lookup_t *lookup, const char *host) {
dig_server_t *srv;
char tmp[ISC_NETADDR_FORMATSIZE];
result = bind9_getaddresses(host, 0, sockaddrs,
DIG_MAX_ADDRESSES, &count);
result = get_addresses(host, 0, sockaddrs, DIG_MAX_ADDRESSES, &count);
if (result != ISC_R_SUCCESS)
fatal("couldn't get address for '%s': %s",
host, isc_result_totext(result));
fatal("couldn't get address for '%s': %s",
host, isc_result_totext(result));
for (i = 0; i < count; i++) {
isc_netaddr_fromsockaddr(&netaddr, &sockaddrs[i]);
@@ -1341,17 +1083,14 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
#ifndef NOPOSIX
/*
* Treat ${HOME}/.digrc as a special batchfile
* Treat .digrc as a special batchfile
*/
INSIST(batchfp == NULL);
homedir = getenv("HOME");
if (homedir != NULL) {
unsigned int n;
n = snprintf(rcfile, sizeof(rcfile), "%s/.digrc",
homedir);
if (n < sizeof(rcfile))
batchfp = fopen(rcfile, "r");
}
if (homedir != NULL)
snprintf(rcfile, sizeof(rcfile), "%s/.digrc", homedir);
else
strcpy(rcfile, ".digrc");
batchfp = fopen(rcfile, "r");
if (batchfp != NULL) {
while (fgets(batchline, sizeof(batchline),
batchfp) != 0) {
@@ -1362,8 +1101,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
while ((bargv[bargc] != NULL) &&
(bargc < 62)) {
bargc++;
bargv[bargc] =
next_token(&input, " \t\r\n");
bargv[bargc] = next_token(&input, " \t\r\n");
}
bargv[0] = argv[0];
@@ -1428,9 +1166,10 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
tr.base = rv[0];
tr.length = strlen(rv[0]);
result = dns_rdatatype_fromtext(&rdtype,
(isc_textregion_t *)&tr);
(isc_textregion_t *)&tr);
if (result == ISC_R_SUCCESS &&
rdtype == dns_rdatatype_ixfr) {
rdtype == dns_rdatatype_ixfr)
{
result = DNS_R_UNKNOWN;
fprintf(stderr, ";; Warning, "
"ixfr requires a "
@@ -1438,30 +1177,28 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
continue;
}
}
if (result == ISC_R_SUCCESS) {
if (result == ISC_R_SUCCESS)
{
if (lookup->rdtypeset) {
fprintf(stderr, ";; Warning, "
"extra type option\n");
}
if (rdtype == dns_rdatatype_ixfr) {
lookup->rdtype =
dns_rdatatype_ixfr;
lookup->rdtype = dns_rdatatype_ixfr;
lookup->rdtypeset = ISC_TRUE;
lookup->ixfr_serial =
parse_uint(&rv[0][5],
"serial number",
MAXSERIAL);
lookup->section_question =
plusquest;
lookup->section_question = plusquest;
lookup->comments = pluscomm;
} else {
lookup->rdtype = rdtype;
lookup->rdtypeset = ISC_TRUE;
if (rdtype ==
dns_rdatatype_axfr) {
lookup->section_question =
if (rdtype == dns_rdatatype_axfr) {
lookup->section_question =
plusquest;
lookup->comments = pluscomm;
lookup->comments = pluscomm;
}
lookup->ixfr_serial = ISC_FALSE;
}
@@ -1516,7 +1253,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
perror(batchname);
if (exitcode < 8)
exitcode = 8;
fatal("couldn't open specified batch file");
fatal("Couldn't open specified batch file");
}
/* XXX Remove code dup from shutdown code */
next_line:
@@ -1567,9 +1304,9 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
}
/*
* Callback from dighost.c to allow program-specific shutdown code.
* Here, we're possibly reading from a batch file, then shutting down
* for real if there's nothing in the batch file to read.
* Callback from dighost.c to allow program-specific shutdown code. Here,
* Here, we're possibly reading from a batch file, then shutting down for
* real if there's nothing in the batch file to read.
*/
void
dighost_shutdown(void) {
@@ -1647,9 +1384,6 @@ main(int argc, char **argv) {
fclose(batchfp);
batchname = NULL;
}
#ifdef DIG_SIGCHASE
clean_trustedkey();
#endif
cancel_all();
destroy_libs();
isc_app_finish();

View File

@@ -3,7 +3,7 @@
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2003 Internet Software Consortium.
- Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -18,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: dig.docbook,v 1.4.2.7.4.20 2007/08/28 07:19:07 tbox Exp $ -->
<!-- $Id: dig.docbook,v 1.4.2.19 2007/08/28 07:18:12 tbox Exp $ -->
<refentry>
@@ -43,7 +43,6 @@
<copyright>
<year>2000</year>
<year>2001</year>
<year>2002</year>
<year>2003</year>
<holder>Internet Software Consortium.</holder>
</copyright>
@@ -66,8 +65,6 @@
<arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
<arg><option>-x <replaceable class="parameter">addr</replaceable></option></arg>
<arg><option>-y <replaceable class="parameter">name:key</replaceable></option></arg>
<arg><option>-4</option></arg>
<arg><option>-6</option></arg>
<arg choice="opt">name</arg>
<arg choice="opt">type</arg>
<arg choice="opt">class</arg>
@@ -120,7 +117,7 @@ NS query for "." (the root).
</para>
<para>
It is possible to set per-user defaults for <command>dig</command> via
It is possible to set per user defaults for <command>dig</command> via
<filename>${HOME}/.digrc</filename>. This file is read and any options in it
are applied before the command line arguments.
</para>
@@ -181,8 +178,7 @@ ANY, A, MX, SIG, etc.
<para>
The <option>-b</option> option sets the source IP address of the query
to <parameter>address</parameter>. This must be a valid address on
one of the host's network interfaces or "0.0.0.0" or "::". An optional port
may be specified by appending "#&lt;port&gt;"
one of the host's network interfaces.
</para>
<para>
@@ -209,12 +205,6 @@ to test a name server that has been configured to listen for queries
on a non-standard port number.
</para>
<para>
The <option>-4</option> option forces <command>dig</command> to only
use IPv4 query transport. The <option>-6</option> option forces
<command>dig</command> to only use IPv6 query transport.
</para>
<para>
The <option>-t</option> option sets the query type to
<parameter>type</parameter>. It can be any valid query type which is
@@ -238,10 +228,9 @@ When this option is used, there is no need to provide the
automatically performs a lookup for a name like
<literal>11.12.13.10.in-addr.arpa</literal> and sets the query type and
class to PTR and IN respectively. By default, IPv6 addresses are
looked up using nibble format under the IP6.ARPA domain.
To use the older RFC1886 method using the IP6.INT domain
specify the <option>-i</option> option. Bit string labels (RFC2874)
are now experimental and are not attempted.
looked up using the IP6.ARPA domain and binary labels as defined in
RFC2874. To use the older RFC1886 method using the IP6.INT domain and
"nibble" labels, specify the <option>-n</option> (nibble) option.
</para>
<para>
@@ -332,12 +321,9 @@ Deprecated, treated as a synonym for <parameter>+[no]search</parameter>
<varlistentry><term><option>+[no]aaonly</option></term>
<listitem><para>
Sets the "aa" flag in the query.
</para></listitem></varlistentry>
<varlistentry><term><option>+[no]aaflag</option></term>
<listitem><para>
A synonym for <parameter>+[no]aaonly</parameter>.
This option does nothing. It is provided for compatibility with old
versions of <command>dig</command> where it set an unimplemented
resolver flag.
</para></listitem></varlistentry>
<varlistentry><term><option>+[no]adflag</option></term>
@@ -354,16 +340,6 @@ Set [do not set] the CD (checking disabled) bit in the query. This
requests the server to not perform DNSSEC validation of responses.
</para></listitem></varlistentry>
<varlistentry><term><option>+[no]cl</option></term>
<listitem><para>
Display [do not display] the CLASS when printing the record.
</para></listitem></varlistentry>
<varlistentry><term><option>+[no]ttlid</option></term>
<listitem><para>
Display [do not display] the TTL when printing the record.
</para></listitem></varlistentry>
<varlistentry><term><option>+[no]recurse</option></term>
<listitem><para>
Toggle the setting of the RD (recursion desired) bit in the query.
@@ -471,18 +447,10 @@ in a query timeout of 1 second being applied.
<varlistentry><term><option>+tries=T</option></term>
<listitem><para>
Sets the number of times to try UDP queries to server to
Sets the number of times to retry UDP queries to server to
<parameter>T</parameter> instead of the default, 3. If
<parameter>T</parameter> is less than or equal to zero, the number of
tries is silently rounded up to 1.
</para></listitem></varlistentry>
<varlistentry><term><option>+retry=T</option></term>
<listitem><para>
Sets the number of times to retry UDP queries to server to
<parameter>T</parameter> instead of the default, 2. Unlike
<parameter>+tries</parameter>, this does not include the initial
query.
retries is silently rounded up to 1.
</para></listitem></varlistentry>
<varlistentry><term><option>+ndots=D</option></term>
@@ -512,59 +480,30 @@ Print records like the SOA records in a verbose multi-line
format with human-readable comments. The default is to print
each record on a single line, to facilitate machine parsing
of the <command>dig</command> output.
</para></listitem></varlistentry>
</para>
</listitem></varlistentry>
<varlistentry><term><option>+[no]fail</option></term>
<listitem><para>
Do not try the next server if you receive a SERVFAIL. The default is
to not try the next server which is the reverse of normal stub resolver
behavior.
</para></listitem></varlistentry>
</para>
</listitem></varlistentry>
<varlistentry><term><option>+[no]besteffort</option></term>
<listitem><para>
Attempt to display the contents of messages which are malformed.
The default is to not display malformed answers.
</para></listitem></varlistentry>
</para>
</listitem></varlistentry>
<varlistentry><term><option>+[no]dnssec</option></term>
<listitem><para>
Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO)
in the OPT record in the additional section of the query.
</para></listitem></varlistentry>
<varlistentry><term><option>+[no]sigchase</option></term>
<listitem><para>
Chase DNSSEC signature chains. Requires dig be compiled with
-DDIG_SIGCHASE.
</para></listitem></varlistentry>
<varlistentry>
<term><option>+trusted-key=####</option></term>
<listitem>
<para>
Specifies a file containing trusted keys to be used with
<option>+sigchase</option>. Each DNSKEY record must be
on its own line.
</para>
<para>
If not specified <command>dig</command> will look for
<filename>/etc/trusted-key.key</filename> then
<filename>trusted-key.key</filename> in the current directory.
</para>
<para>
Requires dig be compiled with -DDIG_SIGCHASE.
</para>
</listitem>
</varlistentry>
<varlistentry><term><option>+[no]topdown</option></term>
<listitem><para>
When chasing DNSSEC signature chains perform a top-down validation.
Requires dig be compiled with -DDIG_SIGCHASE.
</para></listitem></varlistentry>
</para>
</listitem></varlistentry>
</variablelist>

View File

@@ -1,6 +1,6 @@
<!--
- Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2003 Internet Software Consortium.
- Copyright (C) 2000, 2001, 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
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: dig.html,v 1.6.2.4.2.23 2007/05/16 06:10:54 marka Exp $ -->
<!-- $Id: dig.html,v 1.6.2.23 2007/05/16 06:57:45 marka Exp $ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
@@ -29,12 +29,12 @@
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p><code class="command">dig</code> [@server] [<code class="option">-b <em class="replaceable"><code>address</code></em></code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-f <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-k <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-p <em class="replaceable"><code>port#</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-x <em class="replaceable"><code>addr</code></em></code>] [<code class="option">-y <em class="replaceable"><code>name:key</code></em></code>] [<code class="option">-4</code>] [<code class="option">-6</code>] [name] [type] [class] [queryopt...]</p></div>
<div class="cmdsynopsis"><p><code class="command">dig</code> [@server] [<code class="option">-b <em class="replaceable"><code>address</code></em></code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-f <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-k <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-p <em class="replaceable"><code>port#</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-x <em class="replaceable"><code>addr</code></em></code>] [<code class="option">-y <em class="replaceable"><code>name:key</code></em></code>] [name] [type] [class] [queryopt...]</p></div>
<div class="cmdsynopsis"><p><code class="command">dig</code> [<code class="option">-h</code>]</p></div>
<div class="cmdsynopsis"><p><code class="command">dig</code> [global-queryopt...] [query...]</p></div>
</div>
<div class="refsect1" lang="en">
<a name="id2543485"></a><h2>DESCRIPTION</h2>
<a name="id2543474"></a><h2>DESCRIPTION</h2>
<p>
<span><strong class="command">dig</strong></span> (domain information groper) is a flexible tool
for interrogating DNS name servers. It performs DNS lookups and
@@ -63,7 +63,7 @@ When no command line arguments or options are given, will perform an
NS query for "." (the root).
</p>
<p>
It is possible to set per-user defaults for <span><strong class="command">dig</strong></span> via
It is possible to set per user defaults for <span><strong class="command">dig</strong></span> via
<code class="filename">${HOME}/.digrc</code>. This file is read and any options in it
are applied before the command line arguments.
</p>
@@ -75,7 +75,7 @@ are applied before the command line arguments.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2543554"></a><h2>SIMPLE USAGE</h2>
<a name="id2543542"></a><h2>SIMPLE USAGE</h2>
<p>
A typical invocation of <span><strong class="command">dig</strong></span> looks like:
</p>
@@ -113,12 +113,11 @@ ANY, A, MX, SIG, etc.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2543633"></a><h2>OPTIONS</h2>
<a name="id2543621"></a><h2>OPTIONS</h2>
<p>
The <code class="option">-b</code> option sets the source IP address of the query
to <em class="parameter"><code>address</code></em>. This must be a valid address on
one of the host's network interfaces or "0.0.0.0" or "::". An optional port
may be specified by appending "#&lt;port&gt;"
one of the host's network interfaces.
</p>
<p>
The default query class (IN for internet) is overridden by the
@@ -142,11 +141,6 @@ to test a name server that has been configured to listen for queries
on a non-standard port number.
</p>
<p>
The <code class="option">-4</code> option forces <span><strong class="command">dig</strong></span> to only
use IPv4 query transport. The <code class="option">-6</code> option forces
<span><strong class="command">dig</strong></span> to only use IPv6 query transport.
</p>
<p>
The <code class="option">-t</code> option sets the query type to
<em class="parameter"><code>type</code></em>. It can be any valid query type which is
supported in BIND 9. The default query type is "A", unless the
@@ -168,10 +162,9 @@ When this option is used, there is no need to provide the
automatically performs a lookup for a name like
<code class="literal">11.12.13.10.in-addr.arpa</code> and sets the query type and
class to PTR and IN respectively. By default, IPv6 addresses are
looked up using nibble format under the IP6.ARPA domain.
To use the older RFC1886 method using the IP6.INT domain
specify the <code class="option">-i</code> option. Bit string labels (RFC2874)
are now experimental and are not attempted.
looked up using the IP6.ARPA domain and binary labels as defined in
RFC2874. To use the older RFC1886 method using the IP6.INT domain and
"nibble" labels, specify the <code class="option">-n</code> (nibble) option.
</p>
<p>
To sign the DNS queries sent by <span><strong class="command">dig</strong></span> and their
@@ -194,7 +187,7 @@ being used. In BIND, this is done by providing appropriate
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2543816"></a><h2>QUERY OPTIONS</h2>
<a name="id2543786"></a><h2>QUERY OPTIONS</h2>
<p>
<span><strong class="command">dig</strong></span> provides a number of query options which affect
the way in which lookups are made and the results displayed. Some of
@@ -249,11 +242,9 @@ Deprecated, treated as a synonym for <em class="parameter"><code>+[no]search</co
</p></dd>
<dt><span class="term"><code class="option">+[no]aaonly</code></span></dt>
<dd><p>
Sets the "aa" flag in the query.
</p></dd>
<dt><span class="term"><code class="option">+[no]aaflag</code></span></dt>
<dd><p>
A synonym for <em class="parameter"><code>+[no]aaonly</code></em>.
This option does nothing. It is provided for compatibility with old
versions of <span><strong class="command">dig</strong></span> where it set an unimplemented
resolver flag.
</p></dd>
<dt><span class="term"><code class="option">+[no]adflag</code></span></dt>
<dd><p>
@@ -267,14 +258,6 @@ completeness.
Set [do not set] the CD (checking disabled) bit in the query. This
requests the server to not perform DNSSEC validation of responses.
</p></dd>
<dt><span class="term"><code class="option">+[no]cl</code></span></dt>
<dd><p>
Display [do not display] the CLASS when printing the record.
</p></dd>
<dt><span class="term"><code class="option">+[no]ttlid</code></span></dt>
<dd><p>
Display [do not display] the TTL when printing the record.
</p></dd>
<dt><span class="term"><code class="option">+[no]recurse</code></span></dt>
<dd><p>
Toggle the setting of the RD (recursion desired) bit in the query.
@@ -367,17 +350,10 @@ in a query timeout of 1 second being applied.
</p></dd>
<dt><span class="term"><code class="option">+tries=T</code></span></dt>
<dd><p>
Sets the number of times to try UDP queries to server to
Sets the number of times to retry UDP queries to server to
<em class="parameter"><code>T</code></em> instead of the default, 3. If
<em class="parameter"><code>T</code></em> is less than or equal to zero, the number of
tries is silently rounded up to 1.
</p></dd>
<dt><span class="term"><code class="option">+retry=T</code></span></dt>
<dd><p>
Sets the number of times to retry UDP queries to server to
<em class="parameter"><code>T</code></em> instead of the default, 2. Unlike
<em class="parameter"><code>+tries</code></em>, this does not include the initial
query.
retries is silently rounded up to 1.
</p></dd>
<dt><span class="term"><code class="option">+ndots=D</code></span></dt>
<dd><p>
@@ -420,39 +396,13 @@ The default is to not display malformed answers.
Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO)
in the OPT record in the additional section of the query.
</p></dd>
<dt><span class="term"><code class="option">+[no]sigchase</code></span></dt>
<dd><p>
Chase DNSSEC signature chains. Requires dig be compiled with
-DDIG_SIGCHASE.
</p></dd>
<dt><span class="term"><code class="option">+trusted-key=####</code></span></dt>
<dd>
<p>
Specifies a file containing trusted keys to be used with
<code class="option">+sigchase</code>. Each DNSKEY record must be
on its own line.
</p>
<p>
If not specified <span><strong class="command">dig</strong></span> will look for
<code class="filename">/etc/trusted-key.key</code> then
<code class="filename">trusted-key.key</code> in the current directory.
</p>
<p>
Requires dig be compiled with -DDIG_SIGCHASE.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]topdown</code></span></dt>
<dd><p>
When chasing DNSSEC signature chains perform a top-down validation.
Requires dig be compiled with -DDIG_SIGCHASE.
</p></dd>
</dl></div>
<p>
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2544553"></a><h2>MULTIPLE QUERIES</h2>
<a name="id2544354"></a><h2>MULTIPLE QUERIES</h2>
<p>
The BIND 9 implementation of <span><strong class="command">dig </strong></span> supports
specifying multiple queries on the command line (in addition to
@@ -493,7 +443,7 @@ will not print the initial query when it looks up the NS records for
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2544612"></a><h2>FILES</h2>
<a name="id2544481"></a><h2>FILES</h2>
<p>
<code class="filename">/etc/resolv.conf</code>
</p>
@@ -502,7 +452,7 @@ will not print the initial query when it looks up the NS records for
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2544631"></a><h2>SEE ALSO</h2>
<a name="id2544500"></a><h2>SEE ALSO</h2>
<p>
<span class="citerefentry"><span class="refentrytitle">host</span>(1)</span>,
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
@@ -511,7 +461,7 @@ will not print the initial query when it looks up the NS records for
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2544738"></a><h2>BUGS </h2>
<a name="id2544606"></a><h2>BUGS </h2>
<p>
There are probably too many query options.
</p>

File diff suppressed because it is too large Load Diff

View File

@@ -13,7 +13,7 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
.\" $Id: host.1,v 1.11.2.1.4.12 2007/05/09 03:32:36 marka Exp $
.\" $Id: host.1,v 1.11.2.9 2007/05/09 03:32:21 marka Exp $
.\"
.hy 0
.ad l
@@ -33,7 +33,7 @@
host \- DNS lookup utility
.SH "SYNOPSIS"
.HP 5
\fBhost\fR [\fB\-aCdlnrTwv\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-N\ \fR\fB\fIndots\fR\fR] [\fB\-R\ \fR\fB\fInumber\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-W\ \fR\fB\fIwait\fR\fR] [\fB\-4\fR] [\fB\-6\fR] {name} [server]
\fBhost\fR [\fB\-aCdlnrTwv\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-N\ \fR\fB\fIndots\fR\fR] [\fB\-R\ \fR\fB\fInumber\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-W\ \fR\fB\fIwait\fR\fR] {name} [server]
.SH "DESCRIPTION"
.PP
\fBhost\fR
@@ -89,13 +89,11 @@ List mode is selected by the
option. This makes
\fBhost\fR
perform a zone transfer for zone
\fIname\fR. Transfer the zone printing out the NS, PTR and address records (A/AAAA). If combined with
\fB\-a\fR
all records will be printed.
\fIname\fR. The argument is provided for compatibility with older implementations. This option is equivalent to making a query of type AXFR.
.PP
The
\fB\-i\fR
option specifies that reverse lookups of IPv6 addresses should use the IP6.INT domain as defined in RFC1886. The default is to use IP6.ARPA.
\fB\-n\fR
option specifies that reverse lookups of IPv6 addresses should use the IP6.INT domain and "nibble" labels as defined in RFC1886. The default is to use IP6.ARPA and binary labels as defined in RFC2874.
.PP
The
\fB\-N\fR
@@ -139,16 +137,6 @@ uses UDP when making queries. The
option makes it use a TCP connection when querying the name server. TCP will be automatically selected for queries that require it, such as zone transfer (AXFR) requests.
.PP
The
\fB\-4\fR
option forces
\fBhost\fR
to only use IPv4 query transport. The
\fB\-6\fR
option forces
\fBhost\fR
to only use IPv6 query transport.
.PP
The
\fB\-t\fR
option is used to select the query type.
\fItype\fR
@@ -160,7 +148,7 @@ option was given, queries will be made for SOA records, and if
\fIname\fR
is a dotted\-decimal IPv4 address or colon\-delimited IPv6 address,
\fBhost\fR
will query for PTR records. If a query type of IXFR is chosen the starting serial number can be specified by appending an equal followed by the starting serial number (e.g. \-t IXFR=12345678).
will query for PTR records.
.PP
The time to wait for a reply can be controlled through the
\fB\-W\fR

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -15,19 +15,18 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: host.c,v 1.76.2.5.2.19 2007/08/28 07:19:07 tbox Exp $ */
/* $Id: host.c,v 1.76.2.13 2007/08/28 07:18:13 tbox Exp $ */
#include <config.h>
#include <stdlib.h>
#include <limits.h>
#include <isc/app.h>
#include <isc/commandline.h>
#include <isc/netaddr.h>
#include <isc/print.h>
#include <isc/string.h>
#include <isc/util.h>
#include <isc/task.h>
#include <isc/stdlib.h>
#include <dns/byaddr.h>
#include <dns/fixedname.h>
@@ -37,16 +36,12 @@
#include <dns/rdataclass.h>
#include <dns/rdataset.h>
#include <dns/rdatatype.h>
#include <dns/rdatastruct.h>
#include <dig/dig.h>
static isc_boolean_t short_form = ISC_TRUE, listed_server = ISC_FALSE;
static isc_boolean_t default_lookups = ISC_TRUE;
static int seen_error = -1;
static isc_boolean_t list_addresses = ISC_TRUE;
static dns_rdatatype_t list_type = dns_rdatatype_a;
static isc_boolean_t printed_server = ISC_FALSE;
static const char *opcodetext[] = {
"QUERY",
@@ -87,40 +82,123 @@ static const char *rcodetext[] = {
"BADVERS"
};
struct rtype {
unsigned int type;
const char *text;
};
static const char *rtypetext[] = {
"zero", /* 0 */
"has address", /* 1 */
"name server", /* 2 */
"MD", /* 3 */
"MF", /* 4 */
"is an alias for", /* 5 */
"SOA", /* 6 */
"MB", /* 7 */
"MG", /* 8 */
"MR", /* 9 */
"NULL", /* 10 */
"has well known services", /* 11 */
"domain name pointer", /* 12 */
"host information", /* 13 */
"MINFO", /* 14 */
"mail is handled by", /* 15 */
"text", /* 16 */
"RP", /* 17 */
"AFSDB", /* 18 */
"x25 address", /* 19 */
"isdn address", /* 20 */
"RT", /* 21 */
"NSAP", /* 22 */
"NSAP_PTR", /* 23 */
"has signature", /* 24 */
"has key", /* 25 */
"PX", /* 26 */
"GPOS", /* 27 */
"has AAAA address", /* 28 */
"LOC", /* 29 */
"has next record", /* 30 */
"EID", /* 31 */
"NIMLOC", /* 32 */
"SRV", /* 33 */
"ATMA", /* 34 */
"NAPTR", /* 35 */
"KX", /* 36 */
"CERT", /* 37 */
"has v6 address", /* 38 */
"DNAME", /* 39 */
"has optional information", /* 41 */
"has 42 record", /* 42 */
"has 43 record", /* 43 */
"has 44 record", /* 44 */
"has 45 record", /* 45 */
"has 46 record", /* 46 */
"has 47 record", /* 47 */
"has 48 record", /* 48 */
"has 49 record", /* 49 */
"has 50 record", /* 50 */
"has 51 record", /* 51 */
"has 52 record", /* 52 */
"has 53 record", /* 53 */
"has 54 record", /* 54 */
"has 55 record", /* 55 */
"has 56 record", /* 56 */
"has 57 record", /* 57 */
"has 58 record", /* 58 */
"has 59 record", /* 59 */
"has 60 record", /* 60 */
"has 61 record", /* 61 */
"has 62 record", /* 62 */
"has 63 record", /* 63 */
"has 64 record", /* 64 */
"has 65 record", /* 65 */
"has 66 record", /* 66 */
"has 67 record", /* 67 */
"has 68 record", /* 68 */
"has 69 record", /* 69 */
"has 70 record", /* 70 */
"has 71 record", /* 71 */
"has 72 record", /* 72 */
"has 73 record", /* 73 */
"has 74 record", /* 74 */
"has 75 record", /* 75 */
"has 76 record", /* 76 */
"has 77 record", /* 77 */
"has 78 record", /* 78 */
"has 79 record", /* 79 */
"has 80 record", /* 80 */
"has 81 record", /* 81 */
"has 82 record", /* 82 */
"has 83 record", /* 83 */
"has 84 record", /* 84 */
"has 85 record", /* 85 */
"has 86 record", /* 86 */
"has 87 record", /* 87 */
"has 88 record", /* 88 */
"has 89 record", /* 89 */
"has 90 record", /* 90 */
"has 91 record", /* 91 */
"has 92 record", /* 92 */
"has 93 record", /* 93 */
"has 94 record", /* 94 */
"has 95 record", /* 95 */
"has 96 record", /* 96 */
"has 97 record", /* 97 */
"has 98 record", /* 98 */
"has 99 record", /* 99 */
"UINFO", /* 100 */
"UID", /* 101 */
"GID", /* 102 */
"UNSPEC"}; /* 103 */
struct rtype rtypes[] = {
{ 1, "has address" },
{ 2, "name server" },
{ 5, "is an alias for" },
{ 11, "has well known services" },
{ 12, "domain name pointer" },
{ 13, "host information" },
{ 15, "mail is handled by" },
{ 16, "descriptive text" },
{ 19, "x25 address" },
{ 20, "ISDN address" },
{ 24, "has signature" },
{ 25, "has key" },
{ 28, "has IPv6 address" },
{ 29, "location" },
{ 0, NULL }
};
static void
show_usage(void) {
fputs(
"Usage: host [-aCdlriTwv] [-c class] [-N ndots] [-t type] [-W time]\n"
"Usage: host [-aCdlrTwv] [-c class] [-n] [-N ndots] [-t type] [-W time]\n"
" [-R number] hostname [server]\n"
" -a is equivalent to -v -t *\n"
" -a is equivalent to -v -t ANY\n"
" -c specifies query class for non-IN data\n"
" -C compares SOA records on authoritative nameservers\n"
" -d is equivalent to -v\n"
" -l lists all hosts in a domain, using AXFR\n"
" -i IP6.INT reverse lookups\n"
" -i Use the old IN6.INT form of IPv6 reverse lookup\n"
" -N changes the number of dots allowed before root lookup is done\n"
" -r disables recursive processing\n"
" -R specifies number of retries for UDP packets\n"
@@ -128,9 +206,7 @@ show_usage(void) {
" -T enables TCP/IP mode\n"
" -v enables verbose output\n"
" -w specifies to wait forever for a reply\n"
" -W specifies how long to wait for a reply\n"
" -4 use IPv4 query transport only\n"
" -6 use IPv6 query transport only\n", stderr);
" -W specifies how long to wait for a reply\n", stderr);
exit(1);
}
@@ -140,14 +216,17 @@ dighost_shutdown(void) {
}
void
received(int bytes, isc_sockaddr_t *from, dig_query_t *query) {
received(int bytes, isc_sockaddr_t *from, dig_query_t *query)
{
isc_time_t now;
isc_result_t result;
int diff;
if (!short_form) {
char fromtext[ISC_SOCKADDR_FORMATSIZE];
isc_sockaddr_format(from, fromtext, sizeof(fromtext));
TIME_NOW(&now);
result = isc_time_now(&now);
check_result(result, "isc_time_now");
diff = (int) isc_time_microdiff(&now, &query->time_sent);
printf("Received %u bytes from %s in %d ms\n",
bytes, fromtext, diff/1000);
@@ -196,18 +275,8 @@ say_message(dns_name_t *name, const char *msg, dns_rdata_t *rdata,
printf("\n");
isc_buffer_free(&b);
}
#ifdef DIG_SIGCHASE
/* Just for compatibility : not use in host program */
isc_result_t
printrdataset(dns_name_t *owner_name, dns_rdataset_t *rdataset,
isc_buffer_t *target)
{
UNUSED(owner_name);
UNUSED(rdataset);
UNUSED(target);
return(ISC_FALSE);
}
#endif
static isc_result_t
printsection(dns_message_t *msg, dns_section_t sectionid,
const char *section_name, isc_boolean_t headers,
@@ -223,6 +292,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
char t[4096];
isc_boolean_t first;
isc_boolean_t no_rdata;
const char *rtt;
if (sectionid == DNS_SECTION_QUESTION)
no_rdata = ISC_TRUE;
@@ -280,27 +350,15 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
} else {
loopresult = dns_rdataset_first(rdataset);
while (loopresult == ISC_R_SUCCESS) {
struct rtype *t;
const char *rtt;
char typebuf[DNS_RDATATYPE_FORMATSIZE];
char typebuf2[DNS_RDATATYPE_FORMATSIZE
+ 20];
dns_rdataset_current(rdataset, &rdata);
for (t = rtypes; t->text != NULL; t++) {
if (t->type == rdata.type) {
rtt = t->text;
goto found;
}
}
dns_rdatatype_format(rdata.type,
typebuf,
sizeof(typebuf));
snprintf(typebuf2, sizeof(typebuf2),
"has %s record", typebuf);
rtt = typebuf2;
found:
if (rdata.type <= 103)
rtt = rtypetext[rdata.type];
else if (rdata.type == 249)
rtt = "key";
else if (rdata.type == 250)
rtt = "signature";
else
rtt = "unknown";
say_message(print_name, rtt,
&rdata, query);
dns_rdata_reset(&rdata);
@@ -353,49 +411,16 @@ printrdata(dns_message_t *msg, dns_rdataset_t *rdataset, dns_name_t *owner,
return (ISC_R_SUCCESS);
}
static void
chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
isc_result_t result;
dns_rdataset_t *rdataset;
dns_rdata_cname_t cname;
dns_rdata_t rdata = DNS_RDATA_INIT;
unsigned int i = msg->counts[DNS_SECTION_ANSWER];
while (i-- > 0) {
rdataset = NULL;
result = dns_message_findname(msg, DNS_SECTION_ANSWER, qname,
dns_rdatatype_cname, 0, NULL,
&rdataset);
if (result != ISC_R_SUCCESS)
return;
result = dns_rdataset_first(rdataset);
check_result(result, "dns_rdataset_first");
dns_rdata_reset(&rdata);
dns_rdataset_current(rdataset, &rdata);
result = dns_rdata_tostruct(&rdata, &cname, NULL);
check_result(result, "dns_rdata_tostruct");
dns_name_copy(&cname.cname, qname, NULL);
dns_rdata_freestruct(&cname);
}
}
isc_result_t
printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
isc_boolean_t did_flag = ISC_FALSE;
dns_rdataset_t *opt, *tsig = NULL;
dns_name_t *tsigname;
isc_result_t result = ISC_R_SUCCESS;
int force_error;
UNUSED(headers);
/*
* We get called multiple times.
* Preserve any existing error status.
*/
force_error = (seen_error == 1) ? 1 : 0;
seen_error = 1;
if (listed_server && !printed_server) {
if (listed_server) {
char sockstr[ISC_SOCKADDR_FORMATSIZE];
printf("Using domain server:\n");
@@ -404,7 +429,6 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
sizeof(sockstr));
printf("Address: %s\n", sockstr);
printf("Aliases: \n\n");
printed_server = ISC_TRUE;
}
if (msg->rcode != 0) {
@@ -416,43 +440,6 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
rcodetext[msg->rcode]);
return (ISC_R_SUCCESS);
}
if (default_lookups && query->lookup->rdtype == dns_rdatatype_a) {
char namestr[DNS_NAME_FORMATSIZE];
dig_lookup_t *lookup;
dns_fixedname_t fixed;
dns_name_t *name;
/* Add AAAA and MX lookups. */
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
dns_name_copy(query->lookup->name, name, NULL);
chase_cnamechain(msg, name);
dns_name_format(name, namestr, sizeof(namestr));
lookup = clone_lookup(query->lookup, ISC_FALSE);
if (lookup != NULL) {
strncpy(lookup->textname, namestr,
sizeof(lookup->textname));
lookup->textname[sizeof(lookup->textname)-1] = 0;
lookup->rdtype = dns_rdatatype_aaaa;
lookup->rdtypeset = ISC_TRUE;
lookup->origin = NULL;
lookup->retries = tries;
ISC_LIST_APPEND(lookup_list, lookup, link);
}
lookup = clone_lookup(query->lookup, ISC_FALSE);
if (lookup != NULL) {
strncpy(lookup->textname, namestr,
sizeof(lookup->textname));
lookup->textname[sizeof(lookup->textname)-1] = 0;
lookup->rdtype = dns_rdatatype_mx;
lookup->rdtypeset = ISC_TRUE;
lookup->origin = NULL;
lookup->retries = tries;
ISC_LIST_APPEND(lookup_list, lookup, link);
}
}
if (!short_form) {
printf(";; ->>HEADER<<- opcode: %s, status: %s, id: %u\n",
opcodetext[msg->opcode], rcodetext[msg->rcode],
@@ -545,16 +532,6 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
if (!short_form)
printf("\n");
if (short_form && !default_lookups &&
ISC_LIST_EMPTY(msg->sections[DNS_SECTION_ANSWER])) {
char namestr[DNS_NAME_FORMATSIZE];
char typestr[DNS_RDATATYPE_FORMATSIZE];
dns_name_format(query->lookup->name, namestr, sizeof(namestr));
dns_rdatatype_format(query->lookup->rdtype, typestr,
sizeof(typestr));
printf("%s has no %s record\n", namestr, typestr);
}
seen_error = force_error;
return (result);
}
@@ -568,13 +545,12 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
isc_result_t result = ISC_R_SUCCESS;
dns_rdatatype_t rdtype;
dns_rdataclass_t rdclass;
isc_uint32_t serial = 0;
UNUSED(is_batchfile);
lookup = make_empty_lookup();
while ((c = isc_commandline_parse(argc, argv, "lvwrdt:c:aTCN:R:W:Dni46"))
while ((c = isc_commandline_parse(argc, argv, "ilvwrdt:c:aTCN:R:W:Dn"))
!= EOF) {
switch (c) {
case 'l':
@@ -591,41 +567,27 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
lookup->recurse = ISC_FALSE;
break;
case 't':
if (strncasecmp(isc_commandline_argument,
"ixfr=", 5) == 0) {
rdtype = dns_rdatatype_ixfr;
/* XXXMPA add error checking */
serial = strtoul(isc_commandline_argument + 5,
NULL, 10);
result = ISC_R_SUCCESS;
} else {
tr.base = isc_commandline_argument;
tr.length = strlen(isc_commandline_argument);
result = dns_rdatatype_fromtext(&rdtype,
tr.base = isc_commandline_argument;
tr.length = strlen(isc_commandline_argument);
result = dns_rdatatype_fromtext(&rdtype,
(isc_textregion_t *)&tr);
}
if (result != ISC_R_SUCCESS) {
fatalexit = 2;
fatal("invalid type: %s\n",
isc_commandline_argument);
}
}
if (!lookup->rdtypeset ||
lookup->rdtype != dns_rdatatype_axfr)
lookup->rdtype = rdtype;
lookup->rdtypeset = ISC_TRUE;
if (rdtype == dns_rdatatype_axfr) {
/* -l -t any -v */
list_type = dns_rdatatype_any;
short_form = ISC_FALSE;
lookup->tcp_mode = ISC_TRUE;
} else if (rdtype == dns_rdatatype_ixfr) {
lookup->ixfr_serial = serial;
list_type = rdtype;
} else
list_type = rdtype;
list_addresses = ISC_FALSE;
default_lookups = ISC_FALSE;
break;
case 'c':
tr.base = isc_commandline_argument;
@@ -641,7 +603,6 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
lookup->rdclass = rdclass;
lookup->rdclassset = ISC_TRUE;
}
default_lookups = ISC_FALSE;
break;
case 'a':
if (!lookup->rdtypeset ||
@@ -651,13 +612,11 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
list_addresses = ISC_FALSE;
lookup->rdtypeset = ISC_TRUE;
short_form = ISC_FALSE;
default_lookups = ISC_FALSE;
break;
case 'i':
lookup->ip6_int = ISC_TRUE;
break;
case 'n':
/* deprecated */
break;
case 'w':
/*
@@ -672,9 +631,9 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
timeout = 1;
break;
case 'R':
tries = atoi(isc_commandline_argument) + 1;
if (tries < 2)
tries = 2;
tries = atoi(isc_commandline_argument);
if (tries < 1)
tries = 1;
break;
case 'T':
lookup->tcp_mode = ISC_TRUE;
@@ -688,7 +647,6 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
lookup->ns_search_only = ISC_TRUE;
lookup->trace_root = ISC_TRUE;
lookup->identify_previous_line = ISC_TRUE;
default_lookups = ISC_FALSE;
break;
case 'N':
debug("setting NDOTS to %s",
@@ -698,28 +656,11 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
case 'D':
debugging = ISC_TRUE;
break;
case '4':
if (have_ipv4) {
isc_net_disableipv6();
have_ipv6 = ISC_FALSE;
} else
fatal("can't find IPv4 networking");
break;
case '6':
if (have_ipv6) {
isc_net_disableipv4();
have_ipv4 = ISC_FALSE;
} else
fatal("can't find IPv6 networking");
break;
}
}
lookup->retries = tries;
if (isc_commandline_index >= argc)
if (isc_commandline_index >= argc) {
show_usage();
}
strncpy(hostname, argv[isc_commandline_index], sizeof(hostname));
hostname[sizeof(hostname)-1]=0;
if (argc > isc_commandline_index + 1) {
@@ -729,13 +670,12 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
}
lookup->pending = ISC_FALSE;
if (get_reverse(store, sizeof(store), hostname,
lookup->ip6_int, ISC_TRUE) == ISC_R_SUCCESS) {
if (get_reverse(store, hostname, lookup->ip6_int, ISC_TRUE) == ISC_R_SUCCESS)
{
strncpy(lookup->textname, store, sizeof(lookup->textname));
lookup->textname[sizeof(lookup->textname)-1] = 0;
lookup->rdtype = dns_rdatatype_ptr;
lookup->rdtypeset = ISC_TRUE;
default_lookups = ISC_FALSE;
} else {
strncpy(lookup->textname, hostname, sizeof(lookup->textname));
lookup->textname[sizeof(lookup->textname)-1]=0;
@@ -750,8 +690,6 @@ int
main(int argc, char **argv) {
isc_result_t result;
tries = 2;
ISC_LIST_INIT(lookup_list);
ISC_LIST_INIT(server_list);
ISC_LIST_INIT(search_list);
@@ -771,6 +709,6 @@ main(int argc, char **argv) {
cancel_all();
destroy_libs();
isc_app_finish();
return ((seen_error == 0) ? 0 : 1);
return (0);
}

View File

@@ -18,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: host.docbook,v 1.2.2.2.4.12 2007/08/28 07:19:07 tbox Exp $ -->
<!-- $Id: host.docbook,v 1.2.2.9 2007/08/28 07:18:13 tbox Exp $ -->
<refentry>
@@ -62,8 +62,6 @@
<arg><option>-R <replaceable class="parameter">number</replaceable></option></arg>
<arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
<arg><option>-W <replaceable class="parameter">wait</replaceable></option></arg>
<arg><option>-4</option></arg>
<arg><option>-6</option></arg>
<arg choice="req">name</arg>
<arg choice="opt">server</arg>
</cmdsynopsis>
@@ -123,16 +121,16 @@ output.
<para>
List mode is selected by the <option>-l</option> option. This makes
<command>host</command> perform a zone transfer for zone
<parameter>name</parameter>. Transfer the zone printing out the NS, PTR
and address records (A/AAAA). If combined with <option>-a</option>
all records will be printed.
<parameter>name</parameter>. The argument is provided for
compatibility with older implementations. This option is equivalent
to making a query of type AXFR.
</para>
<para>
The <option>-i</option>
The <option>-n</option>
option specifies that reverse lookups of IPv6 addresses should
use the IP6.INT domain as defined in RFC1886.
The default is to use IP6.ARPA.
use the IP6.INT domain and "nibble" labels as defined in RFC1886.
The default is to use IP6.ARPA and binary labels as defined in RFC2874.
</para>
<para>
@@ -174,12 +172,6 @@ the name server. TCP will be automatically selected for queries that
require it, such as zone transfer (AXFR) requests.
</para>
<para>
The <option>-4</option> option forces <command>host</command> to only
use IPv4 query transport. The <option>-6</option> option forces
<command>host</command> to only use IPv6 query transport.
</para>
<para>
The <option>-t</option> option is used to select the query type.
<parameter>type</parameter> can be any recognized query type: CNAME,
@@ -189,9 +181,7 @@ type. By default it looks for A records, but if the
<option>-C</option> option was given, queries will be made for SOA
records, and if <parameter>name</parameter> is a dotted-decimal IPv4
address or colon-delimited IPv6 address, <command>host</command> will
query for PTR records. If a query type of IXFR is chosen the starting
serial number can be specified by appending an equal followed by the
starting serial number (e.g. -t IXFR=12345678).
query for PTR records.
</para>
<para>

View File

@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: host.html,v 1.4.2.1.4.19 2007/05/09 03:32:36 marka Exp $ -->
<!-- $Id: host.html,v 1.4.2.16 2007/05/09 03:32:21 marka Exp $ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
@@ -29,10 +29,10 @@
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p><code class="command">host</code> [<code class="option">-aCdlnrTwv</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-N <em class="replaceable"><code>ndots</code></em></code>] [<code class="option">-R <em class="replaceable"><code>number</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-W <em class="replaceable"><code>wait</code></em></code>] [<code class="option">-4</code>] [<code class="option">-6</code>] {name} [server]</p></div>
<div class="cmdsynopsis"><p><code class="command">host</code> [<code class="option">-aCdlnrTwv</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-N <em class="replaceable"><code>ndots</code></em></code>] [<code class="option">-R <em class="replaceable"><code>number</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-W <em class="replaceable"><code>wait</code></em></code>] {name} [server]</p></div>
</div>
<div class="refsect1" lang="en">
<a name="id2543411"></a><h2>DESCRIPTION</h2>
<a name="id2543402"></a><h2>DESCRIPTION</h2>
<p>
<span><strong class="command">host</strong></span>
is a simple utility for performing DNS lookups.
@@ -79,15 +79,15 @@ output.
<p>
List mode is selected by the <code class="option">-l</code> option. This makes
<span><strong class="command">host</strong></span> perform a zone transfer for zone
<em class="parameter"><code>name</code></em>. Transfer the zone printing out the NS, PTR
and address records (A/AAAA). If combined with <code class="option">-a</code>
all records will be printed.
<em class="parameter"><code>name</code></em>. The argument is provided for
compatibility with older implementations. This option is equivalent
to making a query of type AXFR.
</p>
<p>
The <code class="option">-i</code>
The <code class="option">-n</code>
option specifies that reverse lookups of IPv6 addresses should
use the IP6.INT domain as defined in RFC1886.
The default is to use IP6.ARPA.
use the IP6.INT domain and "nibble" labels as defined in RFC1886.
The default is to use IP6.ARPA and binary labels as defined in RFC2874.
</p>
<p>
The <code class="option">-N</code> option sets the number of dots that have to be
@@ -125,11 +125,6 @@ the name server. TCP will be automatically selected for queries that
require it, such as zone transfer (AXFR) requests.
</p>
<p>
The <code class="option">-4</code> option forces <span><strong class="command">host</strong></span> to only
use IPv4 query transport. The <code class="option">-6</code> option forces
<span><strong class="command">host</strong></span> to only use IPv6 query transport.
</p>
<p>
The <code class="option">-t</code> option is used to select the query type.
<em class="parameter"><code>type</code></em> can be any recognized query type: CNAME,
NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
@@ -138,9 +133,7 @@ type. By default it looks for A records, but if the
<code class="option">-C</code> option was given, queries will be made for SOA
records, and if <em class="parameter"><code>name</code></em> is a dotted-decimal IPv4
address or colon-delimited IPv6 address, <span><strong class="command">host</strong></span> will
query for PTR records. If a query type of IXFR is chosen the starting
serial number can be specified by appending an equal followed by the
starting serial number (e.g. -t IXFR=12345678).
query for PTR records.
</p>
<p>
The time to wait for a reply can be controlled through the
@@ -155,13 +148,13 @@ value for an integer quantity.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2543682"></a><h2>FILES</h2>
<a name="id2543651"></a><h2>FILES</h2>
<p>
<code class="filename">/etc/resolv.conf</code>
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2543694"></a><h2>SEE ALSO</h2>
<a name="id2543664"></a><h2>SEE ALSO</h2>
<p>
<span class="citerefentry"><span class="refentrytitle">dig</span>(1)</span>,
<span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>.

View File

@@ -1,6 +1,6 @@
/*
* Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
* Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dig.h,v 1.71.2.6.2.18 2007/08/28 07:19:07 tbox Exp $ */
/* $Id: dig.h,v 1.71.2.19 2007/08/28 07:18:13 tbox Exp $ */
#ifndef DIG_H
#define DIG_H
@@ -66,27 +66,11 @@
* in a tight loop of constant lookups. It's value is arbitrary.
*/
/*
* Defaults for the sigchase suboptions. Consolidated here because
* these control the layout of dig_lookup_t (among other things).
*/
#ifdef DIG_SIGCHASE
#ifndef DIG_SIGCHASE_BU
#define DIG_SIGCHASE_BU 1
#endif
#ifndef DIG_SIGCHASE_TD
#define DIG_SIGCHASE_TD 1
#endif
#endif
ISC_LANG_BEGINDECLS
typedef struct dig_lookup dig_lookup_t;
typedef struct dig_query dig_query_t;
typedef struct dig_server dig_server_t;
#ifdef DIG_SIGCHASE
typedef struct dig_message dig_message_t;
#endif
typedef ISC_LIST(dig_server_t) dig_serverlist_t;
typedef struct dig_searchlist dig_searchlist_t;
@@ -120,27 +104,10 @@ struct dig_lookup {
done_as_is,
besteffort,
dnssec;
#ifdef DIG_SIGCHASE
isc_boolean_t sigchase;
#if DIG_SIGCHASE_TD
isc_boolean_t do_topdown,
trace_root_sigchase,
rdtype_sigchaseset,
rdclass_sigchaseset;
/* Name we are going to validate RRset */
char textnamesigchase[MXNAME];
#endif
#endif
char textname[MXNAME]; /* Name we're going to be looking up */
char cmdline[MXNAME];
dns_rdatatype_t rdtype;
dns_rdatatype_t qrdtype;
#if DIG_SIGCHASE_TD
dns_rdatatype_t rdtype_sigchase;
dns_rdatatype_t qrdtype_sigchase;
dns_rdataclass_t rdclass_sigchase;
#endif
dns_rdataclass_t rdclass;
isc_boolean_t rdtypeset;
isc_boolean_t rdclassset;
@@ -185,7 +152,6 @@ struct dig_query {
warn_id;
isc_uint32_t first_rr_serial;
isc_uint32_t second_rr_serial;
isc_uint32_t msg_count;
isc_uint32_t rr_count;
char *servname;
char *userarg;
@@ -215,12 +181,6 @@ struct dig_searchlist {
char origin[MXNAME];
ISC_LINK(dig_searchlist_t) link;
};
#ifdef DIG_SIGCHASE
struct dig_message {
dns_message_t *msg;
ISC_LINK(dig_message_t) link;
};
#endif
typedef ISC_LIST(dig_searchlist_t) dig_searchlistlist_t;
typedef ISC_LIST(dig_lookup_t) dig_lookuplist_t;
@@ -241,15 +201,13 @@ extern isc_mem_t *mctx;
extern dns_messageid_t id;
extern int sendcount;
extern int ndots;
extern int tries;
extern int lookup_counter;
extern int exitcode;
extern isc_sockaddr_t bind_address;
extern char keynametext[MXNAME];
extern char keyfile[MXNAME];
extern char keysecret[MXNAME];
#ifdef DIG_SIGCHASE
extern char trustedkey[MXNAME];
#endif
extern dns_tsigkey_t *key;
extern isc_boolean_t validated;
extern isc_taskmgr_t *taskmgr;
@@ -258,7 +216,6 @@ extern isc_boolean_t free_now;
extern isc_boolean_t debugging, memdebugging;
extern char *progname;
extern int tries;
extern int fatalexit;
/*
@@ -268,7 +225,11 @@ void
get_address(char *host, in_port_t port, isc_sockaddr_t *sockaddr);
isc_result_t
get_reverse(char *reverse, size_t len, char *value, isc_boolean_t ip6_int,
get_addresses(const char *hostname, in_port_t port,
isc_sockaddr_t *addrs, int addrsize, int *addrcount);
isc_result_t
get_reverse(char *reverse, char *value, isc_boolean_t ip6int,
isc_boolean_t strict);
void
@@ -310,18 +271,18 @@ requeue_lookup(dig_lookup_t *lookold, isc_boolean_t servers);
dig_lookup_t *
make_empty_lookup(void);
dig_lookup_t *
clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers);
dig_server_t *
make_server(const char *servname, const char *userarg);
void
flush_server_list(void);
void
set_nameserver(char *opt);
dig_lookup_t *
clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers);
dig_server_t *
make_server(const char *servname, const char *userarg);
void
clone_server_list(dig_serverlist_t src,
dig_serverlist_t *dest);
@@ -335,19 +296,9 @@ destroy_libs(void);
void
set_search_domain(char *domain);
#ifdef DIG_SIGCHASE
void
clean_trustedkey(void);
#endif
/*
* Routines to be defined in dig.c, host.c, and nslookup.c.
*/
#ifdef DIG_SIGCHASE
isc_result_t
printrdataset(dns_name_t *owner_name, dns_rdataset_t *rdataset,
isc_buffer_t *target);
#endif
isc_result_t
printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers);
@@ -372,14 +323,6 @@ dighost_shutdown(void);
char *
next_token(char **stringp, const char *delim);
#ifdef DIG_SIGCHASE
/* Chasing functions */
dns_rdataset_t *
chase_scanname(dns_name_t *name, dns_rdatatype_t type, dns_rdatatype_t covers);
void
chase_sig(dns_message_t *msg);
#endif
ISC_LANG_ENDDECLS
#endif

View File

@@ -12,7 +12,7 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
.\" $Id: nslookup.1,v 1.1.6.12 2007/05/16 06:10:54 marka Exp $
.\" $Id: nslookup.1,v 1.1.4.12 2007/05/16 06:57:45 marka Exp $
.\"
.hy 0
.ad l

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: nslookup.c,v 1.90.2.4.2.15 2007/08/28 07:19:07 tbox Exp $ */
/* $Id: nslookup.c,v 1.90.2.16 2007/08/28 07:18:13 tbox Exp $ */
#include <config.h>
@@ -25,7 +25,6 @@
#include <isc/buffer.h>
#include <isc/commandline.h>
#include <isc/event.h>
#include <isc/parseint.h>
#include <isc/string.h>
#include <isc/timer.h>
#include <isc/util.h>
@@ -120,8 +119,7 @@ static const char *rtypetext[] = {
"v6 address = ", /* 38 */
"dname = ", /* 39 */
"rtype_40 = ", /* 40 */
"optional = " /* 41 */
};
"optional = "}; /* 41 */
#define N_KNOWN_RRTYPES (sizeof(rtypetext) / sizeof(rtypetext[0]))
@@ -176,18 +174,7 @@ printa(dns_rdata_t *rdata) {
printf("Address: %.*s\n", (int)isc_buffer_usedlength(&b),
(char *)isc_buffer_base(&b));
}
#ifdef DIG_SIGCHASE
/* Just for compatibility : not use in host program */
isc_result_t
printrdataset(dns_name_t *owner_name, dns_rdataset_t *rdataset,
isc_buffer_t *target)
{
UNUSED(owner_name);
UNUSED(rdataset);
UNUSED(target);
return(ISC_FALSE);
}
#endif
static void
printrdata(dns_rdata_t *rdata) {
isc_result_t result;
@@ -517,46 +504,7 @@ safecpy(char *dest, char *src, int size) {
strncpy(dest, src, size);
dest[size-1] = 0;
}
static isc_result_t
parse_uint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
const char *desc) {
isc_uint32_t n;
isc_result_t result = isc_parse_uint32(&n, value, 10);
if (result == ISC_R_SUCCESS && n > max)
result = ISC_R_RANGE;
if (result != ISC_R_SUCCESS) {
printf("invalid %s '%s': %s\n", desc,
value, isc_result_totext(result));
return result;
}
*uip = n;
return (ISC_R_SUCCESS);
}
static void
set_port(const char *value) {
isc_uint32_t n;
isc_result_t result = parse_uint(&n, value, 65535, "port");
if (result == ISC_R_SUCCESS)
port = (isc_uint16_t) n;
}
static void
set_timeout(const char *value) {
isc_uint32_t n;
isc_result_t result = parse_uint(&n, value, UINT_MAX, "timeout");
if (result == ISC_R_SUCCESS)
timeout = n;
}
static void
set_tries(const char *value) {
isc_uint32_t n;
isc_result_t result = parse_uint(&n, value, INT_MAX, "tries");
if (result == ISC_R_SUCCESS)
tries = n;
}
static void
setoption(char *opt) {
@@ -595,21 +543,21 @@ setoption(char *opt) {
set_search_domain(domainopt);
usesearch = ISC_TRUE;
} else if (strncasecmp(opt, "port=", 5) == 0) {
set_port(&opt[5]);
port = atoi(&opt[5]);
} else if (strncasecmp(opt, "po=", 3) == 0) {
set_port(&opt[3]);
port = atoi(&opt[3]);
} else if (strncasecmp(opt, "timeout=", 8) == 0) {
set_timeout(&opt[8]);
timeout = atoi(&opt[8]);
} else if (strncasecmp(opt, "t=", 2) == 0) {
set_timeout(&opt[2]);
timeout = atoi(&opt[2]);
} else if (strncasecmp(opt, "rec", 3) == 0) {
recurse = ISC_TRUE;
} else if (strncasecmp(opt, "norec", 5) == 0) {
recurse = ISC_FALSE;
} else if (strncasecmp(opt, "retry=", 6) == 0) {
set_tries(&opt[6]);
tries = atoi(&opt[6]);
} else if (strncasecmp(opt, "ret=", 4) == 0) {
set_tries(&opt[4]);
tries = atoi(&opt[4]);
} else if (strncasecmp(opt, "def", 3) == 0) {
usesearch = ISC_TRUE;
} else if (strncasecmp(opt, "nodef", 5) == 0) {
@@ -626,11 +574,11 @@ setoption(char *opt) {
debugging = ISC_TRUE;
} else if (strncasecmp(opt, "nod2", 4) == 0) {
debugging = ISC_FALSE;
} else if (strncasecmp(opt, "search", 3) == 0) {
} else if (strncasecmp(opt, "search",3) == 0) {
usesearch = ISC_TRUE;
} else if (strncasecmp(opt, "nosearch", 5) == 0) {
} else if (strncasecmp(opt, "nosearch",5) == 0) {
usesearch = ISC_FALSE;
} else if (strncasecmp(opt, "sil", 3) == 0) {
} else if (strncasecmp(opt, "sil",3) == 0) {
/* deprecation_msg = ISC_FALSE; */
} else {
printf("*** Invalid option: %s\n", opt);
@@ -662,8 +610,9 @@ addlookup(char *opt) {
rdclass = dns_rdataclass_in;
}
lookup = make_empty_lookup();
if (get_reverse(store, sizeof(store), opt, lookup->ip6_int, ISC_TRUE)
== ISC_R_SUCCESS) {
if (get_reverse(store, opt, lookup->ip6_int, ISC_TRUE)
== ISC_R_SUCCESS)
{
safecpy(lookup->textname, store, sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_ptr;
lookup->rdtypeset = ISC_TRUE;
@@ -735,13 +684,15 @@ get_next_command(void) {
in_use = ISC_FALSE;
goto cleanup;
} else if (strcasecmp(ptr, "help") == 0 ||
strcasecmp(ptr, "?") == 0) {
strcasecmp(ptr, "?") == 0)
{
printf("The '%s' command is not yet implemented.\n", ptr);
goto cleanup;
} else if (strcasecmp(ptr, "finger") == 0 ||
strcasecmp(ptr, "root") == 0 ||
strcasecmp(ptr, "ls") == 0 ||
strcasecmp(ptr, "view") == 0) {
strcasecmp(ptr, "view") == 0)
{
printf("The '%s' command is not implemented.\n", ptr);
goto cleanup;
} else

View File

@@ -17,7 +17,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: nslookup.docbook,v 1.3.6.13 2007/08/28 07:19:07 tbox Exp $ -->
<!-- $Id: nslookup.docbook,v 1.3.4.13 2007/08/28 07:18:13 tbox Exp $ -->
<!--
- Copyright (c) 1985, 1989

View File

@@ -13,7 +13,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: nslookup.html,v 1.1.6.18 2007/05/16 06:10:54 marka Exp $ -->
<!-- $Id: nslookup.html,v 1.1.4.19 2007/05/16 06:57:45 marka Exp $ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

View File

@@ -42,7 +42,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/bind9/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /D "WIN32" /D "__STDC__" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "WIN32" /D "__STDC__" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@@ -50,7 +50,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib Release/dighost.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib ../../../lib/bind9/win32/Release/libbind9.lib ../../../lib/lwres/win32/Release/liblwres.lib /nologo /subsystem:console /machine:I386 /out:"../../../Build/Release/dig.exe"
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib Release/dighost.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /machine:I386 /out:"../../../Build/Release/dig.exe"
!ELSEIF "$(CFG)" == "dig - Win32 Debug"
@@ -66,7 +66,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/bind9/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c
# SUBTRACT CPP /X /u /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
@@ -75,7 +75,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib Debug/dighost.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib ../../../lib/bind9/win32/Debug/libbind9.lib ../../../lib/lwres/win32/Debug/liblwres.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../../Build/Debug/dig.exe" /pdbtype:sept
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib Debug/dighost.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../../Build/Debug/dig.exe" /pdbtype:sept
!ENDIF
@@ -94,10 +94,6 @@ SOURCE=..\dig.c
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\include\dig\dig.h
# End Source File
# End Group
# Begin Group "Resource Files"

View File

@@ -25,9 +25,6 @@ NULL=
NULL=nul
!ENDIF
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "dig - Win32 Release"
_VC_MANIFEST_INC=0
_VC_MANIFEST_BASENAME=__VC80
@@ -108,21 +105,10 @@ _VC_MANIFEST_CLEAN=
OUTDIR=.\Release
INTDIR=.\Release
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Release\dig.exe"
!ELSE
ALL : "liblwres - Win32 Release" "libbind9 - Win32 Release" "libisc - Win32 Release" "libdns - Win32 Release" "..\..\..\Build\Release\dig.exe"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libdns - Win32 ReleaseCLEAN" "libisc - Win32 ReleaseCLEAN" "libbind9 - Win32 ReleaseCLEAN" "liblwres - Win32 ReleaseCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\dig.obj"
-@erase "$(INTDIR)\dighost.obj"
-@erase "$(INTDIR)\vc60.idb"
@@ -132,94 +118,8 @@ CLEAN :
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/bind9/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /D "WIN32" /D "__STDC__" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\dig.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\dig.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib ../../../lib/bind9/win32/Release/libbind9.lib ../../../lib/lwres/win32/Release/liblwres.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\dig.pdb" /machine:I386 /out:"../../../Build/Release/dig.exe"
LINK32_OBJS= \
"$(INTDIR)\dig.obj" \
"$(INTDIR)\dighost.obj" \
"..\..\..\lib\dns\win32\Release\libdns.lib" \
"..\..\..\lib\isc\win32\Release\libisc.lib" \
"..\..\..\lib\bind9\win32\Release\libbind9.lib" \
"..\..\..\lib\lwres\win32\Release\liblwres.lib"
"..\..\..\Build\Release\dig.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ELSEIF "$(CFG)" == "dig - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Debug\dig.exe" "$(OUTDIR)\dig.bsc"
!ELSE
ALL : "liblwres - Win32 Debug" "libbind9 - Win32 Debug" "libisc - Win32 Debug" "libdns - Win32 Debug" "..\..\..\Build\Debug\dig.exe" "$(OUTDIR)\dig.bsc"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libdns - Win32 DebugCLEAN" "libisc - Win32 DebugCLEAN" "libbind9 - Win32 DebugCLEAN" "liblwres - Win32 DebugCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\dig.obj"
-@erase "$(INTDIR)\dig.sbr"
-@erase "$(INTDIR)\dighost.obj"
-@erase "$(INTDIR)\dighost.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\dig.bsc"
-@erase "$(OUTDIR)\dig.pdb"
-@erase "..\..\..\Build\Debug\dig.exe"
-@erase "..\..\..\Build\Debug\dig.ilk"
-@$(_VC_MANIFEST_CLEAN)
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/bind9/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\dig.bsc"
BSC32_SBRS= \
"$(INTDIR)\dig.sbr" \
"$(INTDIR)\dighost.sbr"
"$(OUTDIR)\dig.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib ../../../lib/bind9/win32/Debug/libbind9.lib ../../../lib/lwres/win32/Debug/liblwres.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\dig.pdb" /debug /machine:I386 /out:"../../../Build/Debug/dig.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\dig.obj" \
"$(INTDIR)\dighost.obj" \
"..\..\..\lib\dns\win32\Debug\libdns.lib" \
"..\..\..\lib\isc\win32\Debug\libisc.lib" \
"..\..\..\lib\bind9\win32\Debug\libbind9.lib" \
"..\..\..\lib\lwres\win32\Debug\liblwres.lib"
"..\..\..\Build\Debug\dig.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ENDIF
CPP=cl.exe
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "WIN32" /D "__STDC__" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\dig.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
@@ -251,6 +151,109 @@ LINK32_OBJS= \
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\dig.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\dig.pdb" /machine:I386 /out:"../../../Build/Release/dig.exe"
LINK32_OBJS= \
"$(INTDIR)\dig.obj" \
"$(INTDIR)\dighost.obj"
"..\..\..\Build\Release\dig.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ELSEIF "$(CFG)" == "dig - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
ALL : "..\..\..\Build\Debug\dig.exe" "$(OUTDIR)\dig.bsc"
CLEAN :
-@erase "$(INTDIR)\dig.obj"
-@erase "$(INTDIR)\dig.sbr"
-@erase "$(INTDIR)\dighost.obj"
-@erase "$(INTDIR)\dighost.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\dig.bsc"
-@erase "$(OUTDIR)\dig.pdb"
-@erase "..\..\..\Build\Debug\dig.exe"
-@erase "..\..\..\Build\Debug\dig.ilk"
-@$(_VC_MANIFEST_CLEAN)
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\dig.bsc"
BSC32_SBRS= \
"$(INTDIR)\dig.sbr" \
"$(INTDIR)\dighost.sbr"
"$(OUTDIR)\dig.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\dig.pdb" /debug /machine:I386 /out:"../../../Build/Debug/dig.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\dig.obj" \
"$(INTDIR)\dighost.obj"
"..\..\..\Build\Debug\dig.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ENDIF
!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("dig.dep")
@@ -298,110 +301,6 @@ SOURCE=..\dighost.c
!ENDIF
!IF "$(CFG)" == "dig - Win32 Release"
"libdns - Win32 Release" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release"
cd "..\..\..\bin\dig\win32"
"libdns - Win32 ReleaseCLEAN" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "dig - Win32 Debug"
"libdns - Win32 Debug" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"libdns - Win32 DebugCLEAN" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!IF "$(CFG)" == "dig - Win32 Release"
"libisc - Win32 Release" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release"
cd "..\..\..\bin\dig\win32"
"libisc - Win32 ReleaseCLEAN" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "dig - Win32 Debug"
"libisc - Win32 Debug" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"libisc - Win32 DebugCLEAN" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!IF "$(CFG)" == "dig - Win32 Release"
"libbind9 - Win32 Release" :
cd "..\..\..\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Release"
cd "..\..\..\bin\dig\win32"
"libbind9 - Win32 ReleaseCLEAN" :
cd "..\..\..\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "dig - Win32 Debug"
"libbind9 - Win32 Debug" :
cd "..\..\..\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"libbind9 - Win32 DebugCLEAN" :
cd "..\..\..\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!IF "$(CFG)" == "dig - Win32 Release"
"liblwres - Win32 Release" :
cd "..\..\..\lib\lwres\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\liblwres.mak" CFG="liblwres - Win32 Release"
cd "..\..\..\bin\dig\win32"
"liblwres - Win32 ReleaseCLEAN" :
cd "..\..\..\lib\lwres\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\liblwres.mak" CFG="liblwres - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "dig - Win32 Debug"
"liblwres - Win32 Debug" :
cd "..\..\..\lib\lwres\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\liblwres.mak" CFG="liblwres - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"liblwres - Win32 DebugCLEAN" :
cd "..\..\..\lib\lwres\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\liblwres.mak" CFG="liblwres - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!ENDIF

View File

@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../include" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /I "../../../lib/dns/include" /I "../../../lib/bind9/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /YX /FD /c /Fddighost
# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../include" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /YX /FD /c /Fddighost
# SUBTRACT CPP /X
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
@@ -70,7 +70,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "../include" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /I "../../../lib/dns/include" /I "../../../lib/bind9/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /FR /YX /FD /GZ /c /Fddighost
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "../include" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "__STDC__" /D "_MBCS" /FR /YX /FD /GZ /c /Fddighost
# SUBTRACT CPP /X
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32

View File

@@ -1,29 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "dighost"=".\dighost.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "dighost"=".\dighost.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -42,7 +42,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/bind9/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /D "WIN32" /D "__STDC__" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "WIN32" /D "__STDC__" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@@ -50,7 +50,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib Release/dighost.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib ../../../lib/bind9/win32/Release/libbind9.lib ../../../lib/lwres/win32/Release/liblwres.lib /nologo /subsystem:console /machine:I386 /out:"../../../Build/Release/host.exe"
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib Release/dighost.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /machine:I386 /out:"../../../Build/Release/host.exe"
!ELSEIF "$(CFG)" == "host - Win32 Debug"
@@ -66,7 +66,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/bind9/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c
# SUBTRACT CPP /X /u /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
@@ -75,7 +75,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib Debug/dighost.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib ../../../lib/bind9/win32/Debug/libbind9.lib ../../../lib/lwres/win32/Debug/liblwres.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../../Build/Debug/host.exe" /pdbtype:sept
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib Debug/dighost.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../../Build/Debug/host.exe" /pdbtype:sept
!ENDIF

View File

@@ -25,9 +25,6 @@ NULL=
NULL=nul
!ENDIF
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "host - Win32 Release"
_VC_MANIFEST_INC=0
_VC_MANIFEST_BASENAME=__VC80
@@ -108,21 +105,10 @@ _VC_MANIFEST_CLEAN=
OUTDIR=.\Release
INTDIR=.\Release
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Release\host.exe"
!ELSE
ALL : "liblwres - Win32 Release" "libbind9 - Win32 Release" "libisc - Win32 Release" "libdns - Win32 Release" "..\..\..\Build\Release\host.exe"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libdns - Win32 ReleaseCLEAN" "libisc - Win32 ReleaseCLEAN" "libbind9 - Win32 ReleaseCLEAN" "liblwres - Win32 ReleaseCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\dighost.obj"
-@erase "$(INTDIR)\host.obj"
-@erase "$(INTDIR)\vc60.idb"
@@ -132,94 +118,8 @@ CLEAN :
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/bind9/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /D "WIN32" /D "__STDC__" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\host.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\host.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib ../../../lib/bind9/win32/Release/libbind9.lib ../../../lib/lwres/win32/Release/liblwres.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\host.pdb" /machine:I386 /out:"../../../Build/Release/host.exe"
LINK32_OBJS= \
"$(INTDIR)\dighost.obj" \
"$(INTDIR)\host.obj" \
"..\..\..\lib\dns\win32\Release\libdns.lib" \
"..\..\..\lib\isc\win32\Release\libisc.lib" \
"..\..\..\lib\bind9\win32\Release\libbind9.lib" \
"..\..\..\lib\lwres\win32\Release\liblwres.lib"
"..\..\..\Build\Release\host.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ELSEIF "$(CFG)" == "host - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Debug\host.exe" "$(OUTDIR)\host.bsc"
!ELSE
ALL : "liblwres - Win32 Debug" "libbind9 - Win32 Debug" "libisc - Win32 Debug" "libdns - Win32 Debug" "..\..\..\Build\Debug\host.exe" "$(OUTDIR)\host.bsc"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libdns - Win32 DebugCLEAN" "libisc - Win32 DebugCLEAN" "libbind9 - Win32 DebugCLEAN" "liblwres - Win32 DebugCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\dighost.obj"
-@erase "$(INTDIR)\dighost.sbr"
-@erase "$(INTDIR)\host.obj"
-@erase "$(INTDIR)\host.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\host.bsc"
-@erase "$(OUTDIR)\host.pdb"
-@erase "..\..\..\Build\Debug\host.exe"
-@erase "..\..\..\Build\Debug\host.ilk"
-@$(_VC_MANIFEST_CLEAN)
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/bind9/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\host.bsc"
BSC32_SBRS= \
"$(INTDIR)\dighost.sbr" \
"$(INTDIR)\host.sbr"
"$(OUTDIR)\host.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib ../../../lib/bind9/win32/Debug/libbind9.lib ../../../lib/lwres/win32/Debug/liblwres.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\host.pdb" /debug /machine:I386 /out:"../../../Build/Debug/host.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\dighost.obj" \
"$(INTDIR)\host.obj" \
"..\..\..\lib\dns\win32\Debug\libdns.lib" \
"..\..\..\lib\isc\win32\Debug\libisc.lib" \
"..\..\..\lib\bind9\win32\Debug\libbind9.lib" \
"..\..\..\lib\lwres\win32\Debug\liblwres.lib"
"..\..\..\Build\Debug\host.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ENDIF
CPP=cl.exe
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "WIN32" /D "__STDC__" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\host.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
@@ -251,6 +151,109 @@ LINK32_OBJS= \
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\host.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\host.pdb" /machine:I386 /out:"../../../Build/Release/host.exe"
LINK32_OBJS= \
"$(INTDIR)\dighost.obj" \
"$(INTDIR)\host.obj"
"..\..\..\Build\Release\host.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ELSEIF "$(CFG)" == "host - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
ALL : "..\..\..\Build\Debug\host.exe" "$(OUTDIR)\host.bsc"
CLEAN :
-@erase "$(INTDIR)\dighost.obj"
-@erase "$(INTDIR)\dighost.sbr"
-@erase "$(INTDIR)\host.obj"
-@erase "$(INTDIR)\host.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\host.bsc"
-@erase "$(OUTDIR)\host.pdb"
-@erase "..\..\..\Build\Debug\host.exe"
-@erase "..\..\..\Build\Debug\host.ilk"
-@$(_VC_MANIFEST_CLEAN)
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\host.bsc"
BSC32_SBRS= \
"$(INTDIR)\dighost.sbr" \
"$(INTDIR)\host.sbr"
"$(OUTDIR)\host.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\host.pdb" /debug /machine:I386 /out:"../../../Build/Debug/host.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\dighost.obj" \
"$(INTDIR)\host.obj"
"..\..\..\Build\Debug\host.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ENDIF
!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("host.dep")
@@ -298,110 +301,6 @@ SOURCE=..\host.c
!ENDIF
!IF "$(CFG)" == "host - Win32 Release"
"libdns - Win32 Release" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release"
cd "..\..\..\bin\dig\win32"
"libdns - Win32 ReleaseCLEAN" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "host - Win32 Debug"
"libdns - Win32 Debug" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"libdns - Win32 DebugCLEAN" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!IF "$(CFG)" == "host - Win32 Release"
"libisc - Win32 Release" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release"
cd "..\..\..\bin\dig\win32"
"libisc - Win32 ReleaseCLEAN" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "host - Win32 Debug"
"libisc - Win32 Debug" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"libisc - Win32 DebugCLEAN" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!IF "$(CFG)" == "host - Win32 Release"
"libbind9 - Win32 Release" :
cd "..\..\..\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Release"
cd "..\..\..\bin\dig\win32"
"libbind9 - Win32 ReleaseCLEAN" :
cd "..\..\..\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "host - Win32 Debug"
"libbind9 - Win32 Debug" :
cd "..\..\..\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"libbind9 - Win32 DebugCLEAN" :
cd "..\..\..\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!IF "$(CFG)" == "host - Win32 Release"
"liblwres - Win32 Release" :
cd "..\..\..\lib\lwres\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\liblwres.mak" CFG="liblwres - Win32 Release"
cd "..\..\..\bin\dig\win32"
"liblwres - Win32 ReleaseCLEAN" :
cd "..\..\..\lib\lwres\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\liblwres.mak" CFG="liblwres - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "host - Win32 Debug"
"liblwres - Win32 Debug" :
cd "..\..\..\lib\lwres\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\liblwres.mak" CFG="liblwres - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"liblwres - Win32 DebugCLEAN" :
cd "..\..\..\lib\lwres\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\liblwres.mak" CFG="liblwres - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!ENDIF

View File

@@ -42,7 +42,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/bind9/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /D "WIN32" /D "__STDC__" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "WIN32" /D "__STDC__" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@@ -50,7 +50,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib ../../../lib/bind9/win32/Release/libbind9.lib ../../../lib/lwres/win32/Release/liblwres.lib /nologo /subsystem:console /machine:I386 /out:"../../../Build/Release/nslookup.exe"
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib Release/dighost.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /machine:I386 /out:"../../../Build/Release/nslookup.exe"
!ELSEIF "$(CFG)" == "nslookup - Win32 Debug"
@@ -66,7 +66,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/bind9/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c
# SUBTRACT CPP /X /u /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
@@ -75,7 +75,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib ../../../lib/bind9/win32/Debug/libbind9.lib ../../../lib/lwres/win32/Debug/liblwres.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../../Build/Debug/nslookup.exe" /pdbtype:sept
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib Debug/dighost.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../../Build/Debug/nslookup.exe" /pdbtype:sept
!ENDIF
@@ -88,10 +88,6 @@ LINK32=link.exe
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\dighost.c
# End Source File
# Begin Source File
SOURCE=..\nslookup.c
# End Source File
# End Group

View File

@@ -25,9 +25,6 @@ NULL=
NULL=nul
!ENDIF
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "nslookup - Win32 Release"
_VC_MANIFEST_INC=0
_VC_MANIFEST_BASENAME=__VC80
@@ -108,21 +105,10 @@ _VC_MANIFEST_CLEAN=
OUTDIR=.\Release
INTDIR=.\Release
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Release\nslookup.exe"
!ELSE
ALL : "liblwres - Win32 Release" "libbind9 - Win32 Release" "libisc - Win32 Release" "libdns - Win32 Release" "..\..\..\Build\Release\nslookup.exe"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libdns - Win32 ReleaseCLEAN" "libisc - Win32 ReleaseCLEAN" "libbind9 - Win32 ReleaseCLEAN" "liblwres - Win32 ReleaseCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\dighost.obj"
-@erase "$(INTDIR)\nslookup.obj"
-@erase "$(INTDIR)\vc60.idb"
@@ -132,94 +118,8 @@ CLEAN :
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/bind9/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /D "WIN32" /D "__STDC__" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\nslookup.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\nslookup.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib ../../../lib/bind9/win32/Release/libbind9.lib ../../../lib/lwres/win32/Release/liblwres.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\nslookup.pdb" /machine:I386 /out:"../../../Build/Release/nslookup.exe"
LINK32_OBJS= \
"$(INTDIR)\dighost.obj" \
"$(INTDIR)\nslookup.obj" \
"..\..\..\lib\dns\win32\Release\libdns.lib" \
"..\..\..\lib\isc\win32\Release\libisc.lib" \
"..\..\..\lib\bind9\win32\Release\libbind9.lib" \
"..\..\..\lib\lwres\win32\Release\liblwres.lib"
"..\..\..\Build\Release\nslookup.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ELSEIF "$(CFG)" == "nslookup - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Debug\nslookup.exe" "$(OUTDIR)\nslookup.bsc"
!ELSE
ALL : "liblwres - Win32 Debug" "libbind9 - Win32 Debug" "libisc - Win32 Debug" "libdns - Win32 Debug" "..\..\..\Build\Debug\nslookup.exe" "$(OUTDIR)\nslookup.bsc"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libdns - Win32 DebugCLEAN" "libisc - Win32 DebugCLEAN" "libbind9 - Win32 DebugCLEAN" "liblwres - Win32 DebugCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\dighost.obj"
-@erase "$(INTDIR)\dighost.sbr"
-@erase "$(INTDIR)\nslookup.obj"
-@erase "$(INTDIR)\nslookup.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\nslookup.bsc"
-@erase "$(OUTDIR)\nslookup.pdb"
-@erase "..\..\..\Build\Debug\nslookup.exe"
-@erase "..\..\..\Build\Debug\nslookup.ilk"
-@$(_VC_MANIFEST_CLEAN)
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/bind9/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\nslookup.bsc"
BSC32_SBRS= \
"$(INTDIR)\dighost.sbr" \
"$(INTDIR)\nslookup.sbr"
"$(OUTDIR)\nslookup.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib ../../../lib/bind9/win32/Debug/libbind9.lib ../../../lib/lwres/win32/Debug/liblwres.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\nslookup.pdb" /debug /machine:I386 /out:"../../../Build/Debug/nslookup.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\dighost.obj" \
"$(INTDIR)\nslookup.obj" \
"..\..\..\lib\dns\win32\Debug\libdns.lib" \
"..\..\..\lib\isc\win32\Debug\libisc.lib" \
"..\..\..\lib\bind9\win32\Debug\libbind9.lib" \
"..\..\..\lib\lwres\win32\Debug\liblwres.lib"
"..\..\..\Build\Debug\nslookup.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ENDIF
CPP=cl.exe
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "WIN32" /D "__STDC__" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\nslookup.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
@@ -251,6 +151,109 @@ LINK32_OBJS= \
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\nslookup.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\nslookup.pdb" /machine:I386 /out:"../../../Build/Release/nslookup.exe"
LINK32_OBJS= \
"$(INTDIR)\dighost.obj" \
"$(INTDIR)\nslookup.obj"
"..\..\..\Build\Release\nslookup.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ELSEIF "$(CFG)" == "nslookup - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
ALL : "..\..\..\Build\Debug\nslookup.exe" "$(OUTDIR)\nslookup.bsc"
CLEAN :
-@erase "$(INTDIR)\dighost.obj"
-@erase "$(INTDIR)\dighost.sbr"
-@erase "$(INTDIR)\nslookup.obj"
-@erase "$(INTDIR)\nslookup.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\nslookup.bsc"
-@erase "$(OUTDIR)\nslookup.pdb"
-@erase "..\..\..\Build\Debug\nslookup.exe"
-@erase "..\..\..\Build\Debug\nslookup.ilk"
-@$(_VC_MANIFEST_CLEAN)
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\nslookup.bsc"
BSC32_SBRS= \
"$(INTDIR)\dighost.sbr" \
"$(INTDIR)\nslookup.sbr"
"$(OUTDIR)\nslookup.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\nslookup.pdb" /debug /machine:I386 /out:"../../../Build/Debug/nslookup.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\dighost.obj" \
"$(INTDIR)\nslookup.obj"
"..\..\..\Build\Debug\nslookup.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ENDIF
!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("nslookup.dep")
@@ -298,110 +301,6 @@ SOURCE=..\nslookup.c
!ENDIF
!IF "$(CFG)" == "nslookup - Win32 Release"
"libdns - Win32 Release" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release"
cd "..\..\..\bin\dig\win32"
"libdns - Win32 ReleaseCLEAN" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "nslookup - Win32 Debug"
"libdns - Win32 Debug" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"libdns - Win32 DebugCLEAN" :
cd "..\..\..\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!IF "$(CFG)" == "nslookup - Win32 Release"
"libisc - Win32 Release" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release"
cd "..\..\..\bin\dig\win32"
"libisc - Win32 ReleaseCLEAN" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "nslookup - Win32 Debug"
"libisc - Win32 Debug" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"libisc - Win32 DebugCLEAN" :
cd "..\..\..\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!IF "$(CFG)" == "nslookup - Win32 Release"
"libbind9 - Win32 Release" :
cd "..\..\..\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Release"
cd "..\..\..\bin\dig\win32"
"libbind9 - Win32 ReleaseCLEAN" :
cd "..\..\..\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "nslookup - Win32 Debug"
"libbind9 - Win32 Debug" :
cd "..\..\..\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"libbind9 - Win32 DebugCLEAN" :
cd "..\..\..\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!IF "$(CFG)" == "nslookup - Win32 Release"
"liblwres - Win32 Release" :
cd "..\..\..\lib\lwres\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\liblwres.mak" CFG="liblwres - Win32 Release"
cd "..\..\..\bin\dig\win32"
"liblwres - Win32 ReleaseCLEAN" :
cd "..\..\..\lib\lwres\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\liblwres.mak" CFG="liblwres - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "nslookup - Win32 Debug"
"liblwres - Win32 Debug" :
cd "..\..\..\lib\lwres\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\liblwres.mak" CFG="liblwres - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"liblwres - Win32 DebugCLEAN" :
cd "..\..\..\lib\lwres\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\liblwres.mak" CFG="liblwres - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!ENDIF

View File

@@ -1,7 +1,7 @@
# Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000-2003 Internet Software Consortium.
# Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 2000, 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
# 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.
#
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: Makefile.in,v 1.19.12.15 2007/08/28 07:19:07 tbox Exp $
# $Id: Makefile.in,v 1.19.2.5 2005/05/02 00:25:33 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -21,14 +21,14 @@ top_srcdir = @top_srcdir@
@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
@BIND9_INCLUDES@
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES}
CDEFINES = -DVERSION=\"${VERSION}\"
CDEFINES =
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_OPENSSL_LIBS@ @DNS_GSSAPI_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@
DNSDEPLIBS = ../../lib/dns/libdns.@A@
@@ -39,31 +39,46 @@ DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS}
LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@
# Alphabetically
TARGETS = dnssec-keygen@EXEEXT@ dnssec-signzone@EXEEXT@
TARGETS = dnssec-keygen \
dnssec-makekeyset \
dnssec-signkey \
dnssec-signzone
OBJS = dnssectool.@O@
SRCS = dnssec-keygen.c dnssec-signzone.c dnssectool.c
SRCS = dnssec-keygen.c dnssec-makekeyset.c \
dnssec-signkey.c dnssec-signzone.c \
dnssectool.c
MANPAGES = dnssec-keygen.8 dnssec-signzone.8
MANPAGES = dnssec-keygen.8 \
dnssec-makekeyset.8 \
dnssec-signkey.8 \
dnssec-signzone.8
HTMLPAGES = dnssec-keygen.html dnssec-signzone.html
HTMLPAGES = dnssec-keygen.html \
dnssec-makekeyset.html \
dnssec-signkey.html \
dnssec-signzone.html
MANOBJS = ${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@
dnssec-keygen@EXEEXT@: dnssec-keygen.@O@ ${OBJS} ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
dnssec-keygen.@O@ ${OBJS} ${LIBS}
dnssec-keygen: dnssec-keygen.@O@ ${OBJS} ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ dnssec-keygen.@O@ ${OBJS} ${LIBS}
dnssec-makekeyset: dnssec-makekeyset.@O@ ${OBJS} ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ dnssec-makekeyset.@O@ ${OBJS} ${LIBS}
dnssec-signkey: dnssec-signkey.@O@ ${OBJS} ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ dnssec-signkey.@O@ ${OBJS} ${LIBS}
dnssec-signzone.@O@: dnssec-signzone.c
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -DVERSION=\"${VERSION}\" \
-c ${srcdir}/dnssec-signzone.c
dnssec-signzone@EXEEXT@: dnssec-signzone.@O@ ${OBJS} ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
dnssec-signzone.@O@ ${OBJS} ${LIBS}
dnssec-signzone: dnssec-signzone.@O@ ${OBJS} ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ dnssec-signzone.@O@ ${OBJS} ${LIBS}
doc man:: ${MANOBJS}

View File

@@ -1,5 +1,5 @@
.\" Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000-2003 Internet Software Consortium.
.\" Copyright (C) 2000, 2001 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
@@ -13,7 +13,7 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
.\" $Id: dnssec-keygen.8,v 1.19.12.13 2007/05/09 03:32:36 marka Exp $
.\" $Id: dnssec-keygen.8,v 1.19.2.9 2007/05/09 03:32:21 marka Exp $
.\"
.hy 0
.ad l
@@ -33,34 +33,32 @@
dnssec\-keygen \- DNSSEC key generation tool
.SH "SYNOPSIS"
.HP 14
\fBdnssec\-keygen\fR {\-a\ \fIalgorithm\fR} {\-b\ \fIkeysize\fR} {\-n\ \fInametype\fR} [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-e\fR] [\fB\-f\ \fR\fB\fIflag\fR\fR] [\fB\-g\ \fR\fB\fIgenerator\fR\fR] [\fB\-h\fR] [\fB\-k\fR] [\fB\-p\ \fR\fB\fIprotocol\fR\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-s\ \fR\fB\fIstrength\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] {name}
\fBdnssec\-keygen\fR {\-a\ \fIalgorithm\fR} {\-b\ \fIkeysize\fR} {\-n\ \fInametype\fR} [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-e\fR] [\fB\-g\ \fR\fB\fIgenerator\fR\fR] [\fB\-h\fR] [\fB\-p\ \fR\fB\fIprotocol\fR\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-s\ \fR\fB\fIstrength\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] {name}
.SH "DESCRIPTION"
.PP
\fBdnssec\-keygen\fR
generates keys for DNSSEC (Secure DNS), as defined in RFC 2535 and RFC 4034. It can also generate keys for use with TSIG (Transaction Signatures), as defined in RFC 2845.
generates keys for DNSSEC (Secure DNS), as defined in RFC 2535. It can also generate keys for use with TSIG (Transaction Signatures), as defined in RFC 2845.
.SH "OPTIONS"
.PP
\-a \fIalgorithm\fR
.RS 4
Selects the cryptographic algorithm. The value of
\fBalgorithm\fR
must be one of RSAMD5 (RSA) or RSASHA1, DSA, DH (Diffie Hellman), or HMAC\-MD5. These values are case insensitive.
must be one of RSAMD5 or RSA, DSA, DH (Diffie Hellman), or HMAC\-MD5. These values are case insensitive.
.sp
Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement algorithm, and DSA is recommended. For TSIG, HMAC\-MD5 is mandatory.
.sp
Note 2: HMAC\-MD5 and DH automatically set the \-k flag.
Note that for DNSSEC, DSA is a mandatory to implement algorithm, and RSA is recommended. For TSIG, HMAC\-MD5 is mandatory.
.RE
.PP
\-b \fIkeysize\fR
.RS 4
Specifies the number of bits in the key. The choice of key size depends on the algorithm used. RSAMD5 / RSASHA1 keys must be between 512 and 2048 bits. Diffie Hellman keys must be between 128 and 4096 bits. DSA keys must be between 512 and 1024 bits and an exact multiple of 64. HMAC\-MD5 keys must be between 1 and 512 bits.
Specifies the number of bits in the key. The choice of key size depends on the algorithm used. RSA keys must be between 512 and 2048 bits. Diffie Hellman keys must be between 128 and 4096 bits. DSA keys must be between 512 and 1024 bits and an exact multiple of 64. HMAC\-MD5 keys must be between 1 and 512 bits.
.RE
.PP
\-n \fInametype\fR
.RS 4
Specifies the owner type of the key. The value of
\fBnametype\fR
must either be ZONE (for a DNSSEC zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)), USER (for a key associated with a user(KEY)) or OTHER (DNSKEY). These values are case insensitive.
must either be ZONE (for a DNSSEC zone key), HOST or ENTITY (for a key associated with a host), or USER (for a key associated with a user). These values are case insensitive.
.RE
.PP
\-c \fIclass\fR
@@ -70,12 +68,7 @@ Indicates that the DNS record containing the key should have the specified class
.PP
\-e
.RS 4
If generating an RSAMD5/RSASHA1 key, use a large exponent.
.RE
.PP
\-f \fIflag\fR
.RS 4
Set the specified flag in the flag field of the KEY/DNSKEY record. The only recognized flag is KSK (Key Signing Key) DNSKEY.
If generating an RSA key, use a large exponent.
.RE
.PP
\-g \fIgenerator\fR
@@ -89,14 +82,9 @@ Prints a short summary of the options and arguments to
\fBdnssec\-keygen\fR.
.RE
.PP
\-k
.RS 4
Generate KEY records rather than DNSKEY records.
.RE
.PP
\-p \fIprotocol\fR
.RS 4
Sets the protocol value for the generated key. The protocol is a number between 0 and 255. The default is 3 (DNSSEC). Other possible values for this argument are listed in RFC 2535 and its successors.
Sets the protocol value for the generated key. The protocol is a number between 0 and 255. The default is 2 (email) for keys of type USER and 3 (DNSSEC) for all other key types. Other possible values for this argument are listed in RFC 2535 and its successors.
.RE
.PP
\-r \fIrandomdev\fR
@@ -132,7 +120,8 @@ When
\fBdnssec\-keygen\fR
completes successfully, it prints a string of the form
\fIKnnnn.+aaa+iiiii\fR
to the standard output. This is an identification string for the key it has generated.
to the standard output. This is an identification string for the key it has generated. These strings can be used as arguments to
\fBdnssec\-makekeyset\fR.
.TP 4
\(bu
\fInnnn\fR
@@ -185,6 +174,8 @@ and
\fIKexample.com.+003+26160.private\fR.
.SH "SEE ALSO"
.PP
\fBdnssec\-makekeyset\fR(8),
\fBdnssec\-signkey\fR(8),
\fBdnssec\-signzone\fR(8),
BIND 9 Administrator Reference Manual,
RFC 2535,
@@ -196,5 +187,5 @@ Internet Systems Consortium
.SH "COPYRIGHT"
Copyright \(co 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
.br
Copyright \(co 2000\-2003 Internet Software Consortium.
Copyright \(co 2000, 2001 Internet Software Consortium.
.br

View File

@@ -1,6 +1,6 @@
/*
* Portions Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (C) 1999-2003 Internet Software Consortium.
* Portions Copyright (C) 1999-2001 Internet Software Consortium.
* Portions Copyright (C) 1995-2000 by Network Associates, Inc.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -16,7 +16,7 @@
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-keygen.c,v 1.48.2.1.10.14 2007/08/28 07:19:07 tbox Exp $ */
/* $Id: dnssec-keygen.c,v 1.48.2.5 2007/08/28 07:18:13 tbox Exp $ */
#include <config.h>
@@ -47,8 +47,6 @@
const char *program = "dnssec-keygen";
int verbose;
static const char *algs = "RSA | RSAMD5 | DH | DSA | RSASHA1 | HMAC-MD5";
static isc_boolean_t
dsa_size_ok(int size) {
return (ISC_TF(size >= 512 && size <= 1024 && size % 64 == 0));
@@ -59,33 +57,28 @@ usage(void) {
fprintf(stderr, "Usage:\n");
fprintf(stderr, " %s -a alg -b bits -n type [options] name\n\n",
program);
fprintf(stderr, "Version: %s\n", VERSION);
fprintf(stderr, "Required options:\n");
fprintf(stderr, " -a algorithm: %s\n", algs);
fprintf(stderr, " -a algorithm: RSA | RSAMD5 | DH | DSA | HMAC-MD5"
"\n");
fprintf(stderr, " -b key size, in bits:\n");
fprintf(stderr, " RSAMD5:\t\t[512..%d]\n", MAX_RSA);
fprintf(stderr, " RSASHA1:\t\t[512..%d]\n", MAX_RSA);
fprintf(stderr, " RSA:\t\t[512..%d]\n", MAX_RSA);
fprintf(stderr, " DH:\t\t[128..4096]\n");
fprintf(stderr, " DSA:\t\t[512..1024] and divisible by 64\n");
fprintf(stderr, " HMAC-MD5:\t[1..512]\n");
fprintf(stderr, " -n nametype: ZONE | HOST | ENTITY | USER | OTHER\n");
fprintf(stderr, " -n nametype: ZONE | HOST | ENTITY | USER\n");
fprintf(stderr, " name: owner of the key\n");
fprintf(stderr, "Other options:\n");
fprintf(stderr, " -c <class> (default: IN)\n");
fprintf(stderr, " -e use large exponent (RSAMD5/RSASHA1 only)\n");
fprintf(stderr, " -f keyflag: KSK\n");
fprintf(stderr, " -g <generator> use specified generator "
"(DH only)\n");
fprintf(stderr, " -t <type>: "
"AUTHCONF | NOAUTHCONF | NOAUTH | NOCONF "
"(default: AUTHCONF)\n");
fprintf(stderr, " -p <protocol>: "
"default: 3 [dnssec]\n");
fprintf(stderr, " -s <strength> strength value this key signs DNS "
"records with (default: 0)\n");
fprintf(stderr, " -r <randomdev>: a file containing random data\n");
fprintf(stderr, " -v <verbose level>\n");
fprintf(stderr, " -k : generate a TYPE=KEY key\n");
fprintf(stderr, " -c class (default: IN)\n");
fprintf(stderr, " -e use large exponent (RSA only)\n");
fprintf(stderr, " -g use specified generator (DH only)\n");
fprintf(stderr, " -t type: AUTHCONF | NOAUTHCONF | NOAUTH | NOCONF "
"(default: AUTHCONF)\n");
fprintf(stderr, " -p protocol value "
"(default: 2 [email] for USER, 3 [dnssec] otherwise)\n");
fprintf(stderr, " -s strength value this key signs DNS records "
"with (default: 0)\n");
fprintf(stderr, " -r randomdev (a file containing random data)\n");
fprintf(stderr, " -v verbose level\n");
fprintf(stderr, "Output:\n");
fprintf(stderr, " K<name>+<alg>+<id>.key, "
"K<name>+<alg>+<id>.private\n");
@@ -97,11 +90,12 @@ int
main(int argc, char **argv) {
char *algname = NULL, *nametype = NULL, *type = NULL;
char *classname = NULL;
char *endp;
char *randomfile = NULL;
char *prog, *endp;
dst_key_t *key = NULL, *oldkey;
dns_fixedname_t fname;
dns_name_t *name;
isc_uint16_t flags = 0, ksk = 0;
isc_uint16_t flags = 0;
dns_secalg_t alg;
isc_boolean_t conflict = ISC_FALSE, null_key = ISC_FALSE;
isc_mem_t *mctx = NULL;
@@ -114,17 +108,23 @@ main(int argc, char **argv) {
isc_log_t *log = NULL;
isc_entropy_t *ectx = NULL;
dns_rdataclass_t rdclass;
int options = DST_TYPE_PRIVATE | DST_TYPE_PUBLIC;
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
if ((prog = strrchr(argv[0],'/')) == NULL)
prog = isc_mem_strdup(mctx, argv[0]);
else
prog = isc_mem_strdup(mctx, ++prog);
if (prog == NULL)
fatal("out of memory");
if (argc == 1)
usage();
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
dns_result_register();
while ((ch = isc_commandline_parse(argc, argv,
"a:b:c:ef:g:kn:t:p:s:r:v:h")) != -1)
"a:b:c:eg:n:t:p:s:hr:v:")) != -1)
{
switch (ch) {
case 'a':
@@ -141,27 +141,21 @@ main(int argc, char **argv) {
case 'e':
rsa_exp = 1;
break;
case 'f':
if (strcasecmp(isc_commandline_argument, "KSK") == 0)
ksk = DNS_KEYFLAG_KSK;
else
fatal("unknown flag '%s'",
isc_commandline_argument);
break;
case 'g':
generator = strtol(isc_commandline_argument,
&endp, 10);
if (*endp != '\0' || generator <= 0)
fatal("-g requires a positive number");
break;
case 'k':
options |= DST_TYPE_KEY;
break;
case 'n':
nametype = isc_commandline_argument;
if (nametype == NULL)
fatal("out of memory");
break;
case 't':
type = isc_commandline_argument;
if (type == NULL)
fatal("out of memory");
break;
case 'p':
protocol = strtol(isc_commandline_argument, &endp, 10);
@@ -177,7 +171,7 @@ main(int argc, char **argv) {
"[0..15]");
break;
case 'r':
setup_entropy(mctx, isc_commandline_argument, &ectx);
randomfile = isc_commandline_argument;
break;
case 'v':
endp = NULL;
@@ -195,8 +189,7 @@ main(int argc, char **argv) {
}
}
if (ectx == NULL)
setup_entropy(mctx, NULL, &ectx);
setup_entropy(mctx, randomfile, &ectx);
ret = dst_lib_init(mctx, ectx,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
if (ret != ISC_R_SUCCESS)
@@ -211,20 +204,19 @@ main(int argc, char **argv) {
if (algname == NULL)
fatal("no algorithm was specified");
if (strcasecmp(algname, "HMAC-MD5") == 0) {
options |= DST_TYPE_KEY;
if (strcasecmp(algname, "RSA") == 0)
alg = DNS_KEYALG_RSA;
else if (strcasecmp(algname, "HMAC-MD5") == 0)
alg = DST_ALG_HMACMD5;
} else {
else {
r.base = algname;
r.length = strlen(algname);
ret = dns_secalg_fromtext(&alg, &r);
if (ret != ISC_R_SUCCESS)
fatal("unknown algorithm %s", algname);
if (alg == DST_ALG_DH)
options |= DST_TYPE_KEY;
}
if (type != NULL && (options & DST_TYPE_KEY) != 0) {
if (type != NULL) {
if (strcasecmp(type, "NOAUTH") == 0)
flags |= DNS_KEYTYPE_NOAUTH;
else if (strcasecmp(type, "NOCONF") == 0)
@@ -244,8 +236,7 @@ main(int argc, char **argv) {
fatal("key size not specified (-b option)");
switch (alg) {
case DNS_KEYALG_RSAMD5:
case DNS_KEYALG_RSASHA1:
case DNS_KEYALG_RSA:
if (size != 0 && (size < 512 || size > MAX_RSA))
fatal("RSA key size %d out of range", size);
break;
@@ -255,7 +246,7 @@ main(int argc, char **argv) {
break;
case DNS_KEYALG_DSA:
if (size != 0 && !dsa_size_ok(size))
fatal("invalid DSS key size: %d", size);
fatal("Invalid DSS key size: %d", size);
break;
case DST_ALG_HMACMD5:
if (size < 1 || size > 512)
@@ -263,53 +254,49 @@ main(int argc, char **argv) {
break;
}
if (!(alg == DNS_KEYALG_RSAMD5 || alg == DNS_KEYALG_RSASHA1) &&
rsa_exp != 0)
fatal("specified RSA exponent for a non-RSA key");
if (alg != DNS_KEYALG_RSA && rsa_exp != 0)
fatal("specified RSA exponent without RSA");
if (alg != DNS_KEYALG_DH && generator != 0)
fatal("specified DH generator for a non-DH key");
fatal("specified DH generator without DH");
if (nametype == NULL)
fatal("no nametype specified");
if (strcasecmp(nametype, "zone") == 0)
flags |= DNS_KEYOWNER_ZONE;
else if ((options & DST_TYPE_KEY) != 0) { /* KEY */
if (strcasecmp(nametype, "host") == 0 ||
strcasecmp(nametype, "entity") == 0)
flags |= DNS_KEYOWNER_ENTITY;
else if (strcasecmp(nametype, "user") == 0)
flags |= DNS_KEYOWNER_USER;
else if (strcasecmp(nametype, "host") == 0 ||
strcasecmp(nametype, "entity") == 0)
flags |= DNS_KEYOWNER_ENTITY;
else if (strcasecmp(nametype, "user") == 0)
flags |= DNS_KEYOWNER_USER;
else
fatal("invalid nametype %s", nametype);
if (classname != NULL) {
r.base = classname;
r.length = strlen(classname);
ret = dns_rdataclass_fromtext(&rdclass, &r);
if (ret != ISC_R_SUCCESS)
fatal("unknown class %s",classname);
} else
rdclass = dns_rdataclass_in;
flags |= signatory;
if (protocol == -1) {
if ((flags & DNS_KEYFLAG_OWNERMASK) == DNS_KEYOWNER_USER)
protocol = DNS_KEYPROTO_EMAIL;
else
fatal("invalid KEY nametype %s", nametype);
} else if (strcasecmp(nametype, "other") != 0) /* DNSKEY */
fatal("invalid DNSKEY nametype %s", nametype);
rdclass = strtoclass(classname);
if ((options & DST_TYPE_KEY) != 0) /* KEY */
flags |= signatory;
else if ((flags & DNS_KEYOWNER_ZONE) != 0) /* DNSKEY */
flags |= ksk;
if (protocol == -1)
protocol = DNS_KEYPROTO_DNSSEC;
else if ((options & DST_TYPE_KEY) == 0 &&
protocol != DNS_KEYPROTO_DNSSEC)
fatal("invalid DNSKEY protocol: %d", protocol);
protocol = DNS_KEYPROTO_DNSSEC;
}
if ((flags & DNS_KEYFLAG_TYPEMASK) == DNS_KEYTYPE_NOKEY) {
if (size > 0)
fatal("specified null key with non-zero size");
fatal("Specified null key with non-zero size");
if ((flags & DNS_KEYFLAG_SIGNATORYMASK) != 0)
fatal("specified null key with signing authority");
fatal("Specified null key with signing authority");
}
if ((flags & DNS_KEYFLAG_OWNERMASK) == DNS_KEYOWNER_ZONE &&
(alg == DNS_KEYALG_DH || alg == DST_ALG_HMACMD5))
fatal("a key with algorithm '%s' cannot be a zone key",
algname);
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
isc_buffer_init(&buf, argv[isc_commandline_index],
@@ -317,12 +304,11 @@ main(int argc, char **argv) {
isc_buffer_add(&buf, strlen(argv[isc_commandline_index]));
ret = dns_name_fromtext(name, &buf, dns_rootname, ISC_FALSE, NULL);
if (ret != ISC_R_SUCCESS)
fatal("invalid key name %s: %s", argv[isc_commandline_index],
fatal("Invalid key name %s: %s", argv[isc_commandline_index],
isc_result_totext(ret));
switch(alg) {
case DNS_KEYALG_RSAMD5:
case DNS_KEYALG_RSASHA1:
case DNS_KEYALG_RSA:
param = rsa_exp;
break;
case DNS_KEYALG_DH:
@@ -351,8 +337,8 @@ main(int argc, char **argv) {
if (ret != ISC_R_SUCCESS) {
char namestr[DNS_NAME_FORMATSIZE];
char algstr[ALG_FORMATSIZE];
dns_name_format(name, namestr, sizeof(namestr));
alg_format(alg, algstr, sizeof(algstr));
dns_name_format(name, namestr, sizeof namestr);
alg_format(alg, algstr, sizeof algstr);
fatal("failed to generate key %s/%s: %s\n",
namestr, algstr, isc_result_totext(ret));
exit(-1);
@@ -391,10 +377,10 @@ main(int argc, char **argv) {
fatal("cannot generate a null key when a key with id 0 "
"already exists");
ret = dst_key_tofile(key, options, NULL);
ret = dst_key_tofile(key, DST_TYPE_PUBLIC | DST_TYPE_PRIVATE, NULL);
if (ret != ISC_R_SUCCESS) {
char keystr[KEY_FORMATSIZE];
key_format(key, keystr, sizeof(keystr));
key_format(key, keystr, sizeof keystr);
fatal("failed to write key %s: %s\n", keystr,
isc_result_totext(ret));
}
@@ -402,6 +388,7 @@ main(int argc, char **argv) {
isc_buffer_clear(&buf);
ret = dst_key_buildfilename(key, 0, NULL, &buf);
printf("%s\n", filename);
isc_mem_free(mctx, prog);
dst_key_free(&key);
cleanup_logging(&log);

View File

@@ -3,7 +3,7 @@
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2003 Internet Software Consortium.
- Copyright (C) 2000, 2001 Internet Software Consortium.
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -18,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: dnssec-keygen.docbook,v 1.3.12.13 2007/08/28 07:19:07 tbox Exp $ -->
<!-- $Id: dnssec-keygen.docbook,v 1.3.2.8 2007/08/28 07:18:13 tbox Exp $ -->
<refentry>
<refentryinfo>
@@ -41,8 +41,6 @@
<copyright>
<year>2000</year>
<year>2001</year>
<year>2002</year>
<year>2003</year>
<holder>Internet Software Consortium.</holder>
</copyright>
</docinfo>
@@ -60,10 +58,8 @@
<arg choice="req">-n <replaceable class="parameter">nametype</replaceable></arg>
<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
<arg><option>-e</option></arg>
<arg><option>-f <replaceable class="parameter">flag</replaceable></option></arg>
<arg><option>-g <replaceable class="parameter">generator</replaceable></option></arg>
<arg><option>-h</option></arg>
<arg><option>-k</option></arg>
<arg><option>-p <replaceable class="parameter">protocol</replaceable></option></arg>
<arg><option>-r <replaceable class="parameter">randomdev</replaceable></option></arg>
<arg><option>-s <replaceable class="parameter">strength</replaceable></option></arg>
@@ -77,7 +73,7 @@
<title>DESCRIPTION</title>
<para>
<command>dnssec-keygen</command> generates keys for DNSSEC
(Secure DNS), as defined in RFC 2535 and RFC 4034. It can also generate
(Secure DNS), as defined in RFC 2535. It can also generate
keys for use with TSIG (Transaction Signatures), as
defined in RFC 2845.
</para>
@@ -92,16 +88,13 @@
<listitem>
<para>
Selects the cryptographic algorithm. The value of
<option>algorithm</option> must be one of RSAMD5 (RSA) or RSASHA1,
<option>algorithm</option> must be one of RSAMD5 or RSA,
DSA, DH (Diffie Hellman), or HMAC-MD5. These values
are case insensitive.
</para>
<para>
Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement algorithm,
and DSA is recommended. For TSIG, HMAC-MD5 is mandatory.
</para>
<para>
Note 2: HMAC-MD5 and DH automatically set the -k flag.
Note that for DNSSEC, DSA is a mandatory to implement algorithm,
and RSA is recommended. For TSIG, HMAC-MD5 is mandatory.
</para>
</listitem>
</varlistentry>
@@ -111,7 +104,7 @@
<listitem>
<para>
Specifies the number of bits in the key. The choice of key
size depends on the algorithm used. RSAMD5 / RSASHA1 keys must be between
size depends on the algorithm used. RSA keys must be between
512 and 2048 bits. Diffie Hellman keys must be between
128 and 4096 bits. DSA keys must be between 512 and 1024
bits and an exact multiple of 64. HMAC-MD5 keys must be
@@ -126,8 +119,8 @@
<para>
Specifies the owner type of the key. The value of
<option>nametype</option> must either be ZONE (for a DNSSEC
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)),
USER (for a key associated with a user(KEY)) or OTHER (DNSKEY). These values are
zone key), HOST or ENTITY (for a key associated with a host),
or USER (for a key associated with a user). These values are
case insensitive.
</para>
</listitem>
@@ -147,17 +140,7 @@
<term>-e</term>
<listitem>
<para>
If generating an RSAMD5/RSASHA1 key, use a large exponent.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-f <replaceable class="parameter">flag</replaceable></term>
<listitem>
<para>
Set the specified flag in the flag field of the KEY/DNSKEY record.
The only recognized flag is KSK (Key Signing Key) DNSKEY.
If generating an RSA key, use a large exponent.
</para>
</listitem>
</varlistentry>
@@ -184,21 +167,13 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-k</term>
<listitem>
<para>
Generate KEY records rather than DNSKEY records.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-p <replaceable class="parameter">protocol</replaceable></term>
<listitem>
<para>
Sets the protocol value for the generated key. The protocol
is a number between 0 and 255. The default is 3 (DNSSEC).
is a number between 0 and 255. The default is 2 (email) for
keys of type USER and 3 (DNSSEC) for all other key types.
Other possible values for this argument are listed in
RFC 2535 and its successors.
</para>
@@ -262,7 +237,8 @@
When <command>dnssec-keygen</command> completes successfully,
it prints a string of the form <filename>Knnnn.+aaa+iiiii</filename>
to the standard output. This is an identification string for
the key it has generated.
the key it has generated. These strings can be used as arguments
to <command>dnssec-makekeyset</command>.
</para>
<itemizedlist>
<listitem>
@@ -332,6 +308,14 @@
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<refentrytitle>dnssec-makekeyset</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>dnssec-signkey</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>dnssec-signzone</refentrytitle>
<manvolnum>8</manvolnum>

View File

@@ -1,6 +1,6 @@
<!--
- Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2003 Internet Software Consortium.
- Copyright (C) 2000, 2001 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
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: dnssec-keygen.html,v 1.5.2.1.4.19 2007/05/09 03:32:36 marka Exp $ -->
<!-- $Id: dnssec-keygen.html,v 1.5.2.16 2007/05/09 03:32:21 marka Exp $ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
@@ -29,40 +29,37 @@
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p><code class="command">dnssec-keygen</code> {-a <em class="replaceable"><code>algorithm</code></em>} {-b <em class="replaceable"><code>keysize</code></em>} {-n <em class="replaceable"><code>nametype</code></em>} [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-e</code>] [<code class="option">-f <em class="replaceable"><code>flag</code></em></code>] [<code class="option">-g <em class="replaceable"><code>generator</code></em></code>] [<code class="option">-h</code>] [<code class="option">-k</code>] [<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-s <em class="replaceable"><code>strength</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] {name}</p></div>
<div class="cmdsynopsis"><p><code class="command">dnssec-keygen</code> {-a <em class="replaceable"><code>algorithm</code></em>} {-b <em class="replaceable"><code>keysize</code></em>} {-n <em class="replaceable"><code>nametype</code></em>} [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-e</code>] [<code class="option">-g <em class="replaceable"><code>generator</code></em></code>] [<code class="option">-h</code>] [<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-s <em class="replaceable"><code>strength</code></em></code>] [<code class="option">-t <em class="replaceable"><code>type</code></em></code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] {name}</p></div>
</div>
<div class="refsect1" lang="en">
<a name="id2543462"></a><h2>DESCRIPTION</h2>
<a name="id2543443"></a><h2>DESCRIPTION</h2>
<p>
<span><strong class="command">dnssec-keygen</strong></span> generates keys for DNSSEC
(Secure DNS), as defined in RFC 2535 and RFC 4034. It can also generate
(Secure DNS), as defined in RFC 2535. It can also generate
keys for use with TSIG (Transaction Signatures), as
defined in RFC 2845.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2543475"></a><h2>OPTIONS</h2>
<a name="id2543456"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
<dd>
<p>
Selects the cryptographic algorithm. The value of
<code class="option">algorithm</code> must be one of RSAMD5 (RSA) or RSASHA1,
<code class="option">algorithm</code> must be one of RSAMD5 or RSA,
DSA, DH (Diffie Hellman), or HMAC-MD5. These values
are case insensitive.
</p>
<p>
Note 1: that for DNSSEC, RSASHA1 is a mandatory to implement algorithm,
and DSA is recommended. For TSIG, HMAC-MD5 is mandatory.
</p>
<p>
Note 2: HMAC-MD5 and DH automatically set the -k flag.
Note that for DNSSEC, DSA is a mandatory to implement algorithm,
and RSA is recommended. For TSIG, HMAC-MD5 is mandatory.
</p>
</dd>
<dt><span class="term">-b <em class="replaceable"><code>keysize</code></em></span></dt>
<dd><p>
Specifies the number of bits in the key. The choice of key
size depends on the algorithm used. RSAMD5 / RSASHA1 keys must be between
size depends on the algorithm used. RSA keys must be between
512 and 2048 bits. Diffie Hellman keys must be between
128 and 4096 bits. DSA keys must be between 512 and 1024
bits and an exact multiple of 64. HMAC-MD5 keys must be
@@ -72,8 +69,8 @@
<dd><p>
Specifies the owner type of the key. The value of
<code class="option">nametype</code> must either be ZONE (for a DNSSEC
zone key (KEY/DNSKEY)), HOST or ENTITY (for a key associated with a host (KEY)),
USER (for a key associated with a user(KEY)) or OTHER (DNSKEY). These values are
zone key), HOST or ENTITY (for a key associated with a host),
or USER (for a key associated with a user). These values are
case insensitive.
</p></dd>
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
@@ -83,12 +80,7 @@
</p></dd>
<dt><span class="term">-e</span></dt>
<dd><p>
If generating an RSAMD5/RSASHA1 key, use a large exponent.
</p></dd>
<dt><span class="term">-f <em class="replaceable"><code>flag</code></em></span></dt>
<dd><p>
Set the specified flag in the flag field of the KEY/DNSKEY record.
The only recognized flag is KSK (Key Signing Key) DNSKEY.
If generating an RSA key, use a large exponent.
</p></dd>
<dt><span class="term">-g <em class="replaceable"><code>generator</code></em></span></dt>
<dd><p>
@@ -102,14 +94,11 @@
Prints a short summary of the options and arguments to
<span><strong class="command">dnssec-keygen</strong></span>.
</p></dd>
<dt><span class="term">-k</span></dt>
<dd><p>
Generate KEY records rather than DNSKEY records.
</p></dd>
<dt><span class="term">-p <em class="replaceable"><code>protocol</code></em></span></dt>
<dd><p>
Sets the protocol value for the generated key. The protocol
is a number between 0 and 255. The default is 3 (DNSSEC).
is a number between 0 and 255. The default is 2 (email) for
keys of type USER and 3 (DNSSEC) for all other key types.
Other possible values for this argument are listed in
RFC 2535 and its successors.
</p></dd>
@@ -144,12 +133,13 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
<a name="id2543744"></a><h2>GENERATED KEYS</h2>
<a name="id2543691"></a><h2>GENERATED KEYS</h2>
<p>
When <span><strong class="command">dnssec-keygen</strong></span> completes successfully,
it prints a string of the form <code class="filename">Knnnn.+aaa+iiiii</code>
to the standard output. This is an identification string for
the key it has generated.
the key it has generated. These strings can be used as arguments
to <span><strong class="command">dnssec-makekeyset</strong></span>.
</p>
<div class="itemizedlist"><ul type="disc">
<li><p>
@@ -187,7 +177,7 @@
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2543900"></a><h2>EXAMPLE</h2>
<a name="id2543783"></a><h2>EXAMPLE</h2>
<p>
To generate a 768-bit DSA key for the domain
<strong class="userinput"><code>example.com</code></strong>, the following command would be
@@ -209,8 +199,10 @@
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2543946"></a><h2>SEE ALSO</h2>
<a name="id2543829"></a><h2>SEE ALSO</h2>
<p>
<span class="citerefentry"><span class="refentrytitle">dnssec-makekeyset</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">dnssec-signkey</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
<em class="citetitle">RFC 2535</em>,
@@ -219,7 +211,7 @@
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2543979"></a><h2>AUTHOR</h2>
<a name="id2543881"></a><h2>AUTHOR</h2>
<p>
<span class="corpauthor">Internet Systems Consortium</span>
</p>

View File

@@ -0,0 +1,141 @@
.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000, 2001, 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: dnssec-makekeyset.8,v 1.16.2.9 2006/12/12 01:42:53 marka Exp $
.\"
.hy 0
.ad l
.\" Title: dnssec\-makekeyset
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
.\" Date: June 30, 2000
.\" Manual: BIND9
.\" Source: BIND9
.\"
.TH "DNSSEC\-MAKEKEYSET" "8" "June 30, 2000" "BIND9" "BIND9"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
dnssec\-makekeyset \- DNSSEC zone signing tool
.SH "SYNOPSIS"
.HP 18
\fBdnssec\-makekeyset\fR [\fB\-a\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-h\fR] [\fB\-p\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-t\fR\fIttl\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] {key...}
.SH "DESCRIPTION"
.PP
\fBdnssec\-makekeyset\fR
generates a key set from one or more keys created by
\fBdnssec\-keygen\fR. It creates a file containing a KEY record for each key, and self\-signs the key set with each zone key. The output file is of the form
\fIkeyset\-nnnn.\fR, where
\fInnnn\fR
is the zone name.
.SH "OPTIONS"
.PP
\-a
.RS 4
Verify all generated signatures.
.RE
.PP
\-s \fIstart\-time\fR
.RS 4
Specify the date and time when the generated SIG records become valid. This can be either an absolute or relative time. An absolute start time is indicated by a number in YYYYMMDDHHMMSS notation; 20000530144500 denotes 14:45:00 UTC on May 30th, 2000. A relative start time is indicated by +N, which is N seconds from the current time. If no
\fBstart\-time\fR
is specified, the current time is used.
.RE
.PP
\-e \fIend\-time\fR
.RS 4
Specify the date and time when the generated SIG records expire. As with
\fBstart\-time\fR, an absolute time is indicated in YYYYMMDDHHMMSS notation. A time relative to the start time is indicated with +N, which is N seconds from the start time. A time relative to the current time is indicated with now+N. If no
\fBend\-time\fR
is specified, 30 days from the start time is used as a default.
.RE
.PP
\-h
.RS 4
Prints a short summary of the options and arguments to
\fBdnssec\-makekeyset\fR.
.RE
.PP
\-p
.RS 4
Use pseudo\-random data when signing the zone. This is faster, but less secure, than using real random data. This option may be useful when signing large zones or when the entropy source is limited.
.RE
.PP
\-r \fIrandomdev\fR
.RS 4
Specifies the source of randomness. If the operating system does not provide a
\fI/dev/random\fR
or equivalent device, the default source of randomness is keyboard input.
\fIrandomdev\fR
specifies the name of a character device or file containing random data to be used instead of the default. The special value
\fIkeyboard\fR
indicates that keyboard input should be used.
.RE
.PP
\-t \fIttl\fR
.RS 4
Specify the TTL (time to live) of the KEY and SIG records. The default is 3600 seconds.
.RE
.PP
\-v \fIlevel\fR
.RS 4
Sets the debugging level.
.RE
.PP
key
.RS 4
The list of keys to be included in the keyset file. These keys are expressed in the form
\fIKnnnn.+aaa+iiiii\fR
as generated by
\fBdnssec\-keygen\fR.
.RE
.SH "EXAMPLE"
.PP
The following command generates a keyset containing the DSA key for
\fBexample.com\fR
generated in the
\fBdnssec\-keygen\fR
man page.
.PP
\fBdnssec\-makekeyset \-t 86400 \-s 20000701120000 \-e +2592000 Kexample.com.+003+26160\fR
.PP
In this example,
\fBdnssec\-makekeyset\fR
creates the file
\fIkeyset\-example.com.\fR. This file contains the specified key and a self\-generated signature.
.PP
The DNS administrator for
\fBexample.com\fR
could send
\fIkeyset\-example.com.\fR
to the DNS administrator for
\fB.com\fR
for signing, if the .com zone is DNSSEC\-aware and the administrators of the two zones have some mechanism for authenticating each other and exchanging the keys and signatures securely.
.SH "SEE ALSO"
.PP
\fBdnssec\-keygen\fR(8),
\fBdnssec\-signkey\fR(8),
BIND 9 Administrator Reference Manual,
RFC 2535.
.SH "AUTHOR"
.PP
Internet Systems Consortium
.SH "COPYRIGHT"
Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
.br
Copyright \(co 2000, 2001, 2003 Internet Software Consortium.
.br

View File

@@ -0,0 +1,473 @@
/*
* Portions Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (C) 2000, 2001 Internet Software Consortium.
* Portions Copyright (C) 1995-2000 by Network Associates, Inc.
*
* 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 AND NETWORK ASSOCIATES 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: dnssec-makekeyset.c,v 1.52.2.4 2005/06/08 00:12:17 marka Exp $ */
#include <config.h>
#include <stdlib.h>
#include <isc/commandline.h>
#include <isc/entropy.h>
#include <isc/hash.h>
#include <isc/mem.h>
#include <isc/string.h>
#include <isc/util.h>
#include <dns/db.h>
#include <dns/dnssec.h>
#include <dns/fixedname.h>
#include <dns/log.h>
#include <dns/rdata.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
#include <dns/result.h>
#include <dns/secalg.h>
#include <dns/time.h>
#include <dst/dst.h>
#include "dnssectool.h"
#define BUFSIZE 2048
const char *program = "dnssec-makekeyset";
int verbose;
typedef struct keynode keynode_t;
struct keynode {
dst_key_t *key;
ISC_LINK(keynode_t) link;
};
typedef ISC_LIST(keynode_t) keylist_t;
static isc_stdtime_t starttime = 0, endtime = 0, now;
static int ttl = -1;
static isc_mem_t *mctx = NULL;
static isc_entropy_t *ectx = NULL;
static keylist_t keylist;
static void
usage(void) {
fprintf(stderr, "Usage:\n");
fprintf(stderr, "\t%s [options] keys\n", program);
fprintf(stderr, "\n");
fprintf(stderr, "Options: (default value in parenthesis) \n");
fprintf(stderr, "\t-a\n");
fprintf(stderr, "\t\tverify generated signatures\n");
fprintf(stderr, "\t-s YYYYMMDDHHMMSS|+offset:\n");
fprintf(stderr, "\t\tSIG start time - absolute|offset (now)\n");
fprintf(stderr, "\t-e YYYYMMDDHHMMSS|+offset|\"now\"+offset]:\n");
fprintf(stderr, "\t\tSIG end time - "
"absolute|from start|from now (now + 30 days)\n");
fprintf(stderr, "\t-t ttl\n");
fprintf(stderr, "\t-p\n");
fprintf(stderr, "\t\tuse pseudorandom data (faster but less secure)\n");
fprintf(stderr, "\t-r randomdev:\n");
fprintf(stderr, "\t\ta file containing random data\n");
fprintf(stderr, "\t-v level:\n");
fprintf(stderr, "\t\tverbose level (0)\n");
fprintf(stderr, "\n");
fprintf(stderr, "keys:\n");
fprintf(stderr, "\tkeyfile (Kname+alg+tag)\n");
fprintf(stderr, "\n");
fprintf(stderr, "Output:\n");
fprintf(stderr, "\tkeyset (keyset-<name>)\n");
exit(0);
}
static isc_boolean_t
zonekey_on_list(dst_key_t *key) {
keynode_t *keynode;
for (keynode = ISC_LIST_HEAD(keylist);
keynode != NULL;
keynode = ISC_LIST_NEXT(keynode, link))
{
if (dst_key_compare(keynode->key, key))
return (ISC_TRUE);
}
return (ISC_FALSE);
}
static isc_boolean_t
rdata_on_list(dns_rdata_t *rdata, dns_rdatalist_t *list) {
dns_rdata_t *trdata;
for (trdata = ISC_LIST_HEAD(list->rdata);
trdata != NULL;
trdata = ISC_LIST_NEXT(trdata, link))
{
if (dns_rdata_compare(trdata, rdata) == 0)
return (ISC_TRUE);
}
return (ISC_FALSE);
}
int
main(int argc, char *argv[]) {
int i, ch;
char *startstr = NULL, *endstr = NULL;
char *randomfile = NULL;
dns_fixedname_t fdomain;
dns_name_t *domain = NULL;
char *output = NULL;
char *endp;
unsigned char *data;
dns_db_t *db;
dns_dbnode_t *node;
dns_dbversion_t *version;
dst_key_t *key = NULL;
dns_rdata_t *rdata;
dns_rdatalist_t rdatalist, sigrdatalist;
dns_rdataset_t rdataset, sigrdataset;
isc_result_t result;
isc_buffer_t b;
isc_region_t r;
isc_log_t *log = NULL;
keynode_t *keynode;
dns_name_t *savedname = NULL;
unsigned int eflags;
isc_boolean_t pseudorandom = ISC_FALSE;
isc_boolean_t tryverify = ISC_FALSE;
result = isc_mem_create(0, 0, &mctx);
if (result != ISC_R_SUCCESS)
fatal("failed to create memory context: %s",
isc_result_totext(result));
dns_result_register();
while ((ch = isc_commandline_parse(argc, argv, "as:e:t:r:v:ph")) != -1)
{
switch (ch) {
case 'a':
tryverify = ISC_TRUE;
break;
case 's':
startstr = isc_commandline_argument;
break;
case 'e':
endstr = isc_commandline_argument;
break;
case 't':
endp = NULL;
ttl = strtol(isc_commandline_argument, &endp, 0);
if (*endp != '\0')
fatal("TTL must be numeric");
break;
case 'r':
randomfile = isc_commandline_argument;
break;
case 'v':
endp = NULL;
verbose = strtol(isc_commandline_argument, &endp, 0);
if (*endp != '\0')
fatal("verbose level must be numeric");
break;
case 'p':
pseudorandom = ISC_TRUE;
break;
case 'h':
default:
usage();
}
}
argc -= isc_commandline_index;
argv += isc_commandline_index;
if (argc < 1)
usage();
setup_entropy(mctx, randomfile, &ectx);
eflags = ISC_ENTROPY_BLOCKING;
if (!pseudorandom)
eflags |= ISC_ENTROPY_GOODONLY;
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
if (result != ISC_R_SUCCESS)
fatal("could not create hash context");
result = dst_lib_init(mctx, ectx, eflags);
if (result != ISC_R_SUCCESS)
fatal("could not initialize dst: %s",
isc_result_totext(result));
isc_stdtime_get(&now);
if (startstr != NULL)
starttime = strtotime(startstr, now, now);
else
starttime = now;
if (endstr != NULL)
endtime = strtotime(endstr, now, starttime);
else
endtime = starttime + (30 * 24 * 60 * 60);
if (ttl == -1) {
ttl = 3600;
fprintf(stderr, "%s: TTL not specified, assuming 3600\n",
program);
}
setup_logging(verbose, mctx, &log);
dns_rdatalist_init(&rdatalist);
rdatalist.rdclass = 0;
rdatalist.type = dns_rdatatype_key;
rdatalist.covers = 0;
rdatalist.ttl = ttl;
ISC_LIST_INIT(keylist);
for (i = 0; i < argc; i++) {
char namestr[DNS_NAME_FORMATSIZE];
isc_buffer_t namebuf;
key = NULL;
result = dst_key_fromnamedfile(argv[i], DST_TYPE_PUBLIC,
mctx, &key);
if (result != ISC_R_SUCCESS)
fatal("error loading key from %s: %s", argv[i],
isc_result_totext(result));
if (rdatalist.rdclass == 0)
rdatalist.rdclass = dst_key_class(key);
isc_buffer_init(&namebuf, namestr, sizeof namestr);
result = dns_name_tofilenametext(dst_key_name(key),
ISC_FALSE,
&namebuf);
check_result(result, "dns_name_tofilenametext");
isc_buffer_putuint8(&namebuf, 0);
if (savedname == NULL) {
savedname = isc_mem_get(mctx, sizeof(dns_name_t));
if (savedname == NULL)
fatal("out of memory");
dns_name_init(savedname, NULL);
result = dns_name_dup(dst_key_name(key), mctx,
savedname);
if (result != ISC_R_SUCCESS)
fatal("out of memory");
} else {
char savednamestr[DNS_NAME_FORMATSIZE];
dns_name_format(savedname, savednamestr,
sizeof savednamestr);
if (!dns_name_equal(savedname, dst_key_name(key)) != 0)
fatal("all keys must have the same owner - %s "
"and %s do not match",
savednamestr, namestr);
}
if (output == NULL) {
output = isc_mem_allocate(mctx,
strlen("keyset-") +
strlen(namestr) + 1);
if (output == NULL)
fatal("out of memory");
strcpy(output, "keyset-");
strcat(output, namestr);
}
if (domain == NULL) {
dns_fixedname_init(&fdomain);
domain = dns_fixedname_name(&fdomain);
dns_name_copy(dst_key_name(key), domain, NULL);
}
if (dst_key_iszonekey(key)) {
dst_key_t *zonekey = NULL;
result = dst_key_fromnamedfile(argv[i],
DST_TYPE_PUBLIC |
DST_TYPE_PRIVATE,
mctx, &zonekey);
if (result != ISC_R_SUCCESS)
fatal("failed to read private key %s: %s",
argv[i], isc_result_totext(result));
if (!zonekey_on_list(zonekey)) {
keynode = isc_mem_get(mctx,
sizeof (keynode_t));
if (keynode == NULL)
fatal("out of memory");
keynode->key = zonekey;
ISC_LIST_INITANDAPPEND(keylist, keynode, link);
} else
dst_key_free(&zonekey);
}
rdata = isc_mem_get(mctx, sizeof(dns_rdata_t));
if (rdata == NULL)
fatal("out of memory");
dns_rdata_init(rdata);
data = isc_mem_get(mctx, BUFSIZE);
if (data == NULL)
fatal("out of memory");
isc_buffer_init(&b, data, BUFSIZE);
result = dst_key_todns(key, &b);
if (result != ISC_R_SUCCESS)
fatal("failed to convert key %s to a DNS KEY: %s",
argv[i], isc_result_totext(result));
isc_buffer_usedregion(&b, &r);
dns_rdata_fromregion(rdata, rdatalist.rdclass,
dns_rdatatype_key, &r);
if (!rdata_on_list(rdata, &rdatalist))
ISC_LIST_APPEND(rdatalist.rdata, rdata, link);
else {
isc_mem_put(mctx, data, BUFSIZE);
isc_mem_put(mctx, rdata, sizeof *rdata);
}
dst_key_free(&key);
}
dns_rdataset_init(&rdataset);
result = dns_rdatalist_tordataset(&rdatalist, &rdataset);
check_result(result, "dns_rdatalist_tordataset()");
dns_rdatalist_init(&sigrdatalist);
sigrdatalist.rdclass = rdatalist.rdclass;
sigrdatalist.type = dns_rdatatype_sig;
sigrdatalist.covers = dns_rdatatype_key;
sigrdatalist.ttl = ttl;
if (ISC_LIST_EMPTY(keylist))
fprintf(stderr,
"%s: no private zone key found; not self-signing\n",
program);
for (keynode = ISC_LIST_HEAD(keylist);
keynode != NULL;
keynode = ISC_LIST_NEXT(keynode, link))
{
rdata = isc_mem_get(mctx, sizeof(dns_rdata_t));
if (rdata == NULL)
fatal("out of memory");
dns_rdata_init(rdata);
data = isc_mem_get(mctx, BUFSIZE);
if (data == NULL)
fatal("out of memory");
isc_buffer_init(&b, data, BUFSIZE);
result = dns_dnssec_sign(domain, &rdataset, keynode->key,
&starttime, &endtime, mctx, &b,
rdata);
isc_entropy_stopcallbacksources(ectx);
if (result != ISC_R_SUCCESS) {
char keystr[KEY_FORMATSIZE];
key_format(keynode->key, keystr, sizeof keystr);
fatal("failed to sign keyset with key %s: %s",
keystr, isc_result_totext(result));
}
if (tryverify) {
result = dns_dnssec_verify(domain, &rdataset,
keynode->key, ISC_TRUE,
mctx, rdata);
if (result != ISC_R_SUCCESS) {
char keystr[KEY_FORMATSIZE];
key_format(keynode->key, keystr, sizeof keystr);
fatal("signature from key '%s' failed to "
"verify: %s",
keystr, isc_result_totext(result));
}
}
ISC_LIST_APPEND(sigrdatalist.rdata, rdata, link);
dns_rdataset_init(&sigrdataset);
result = dns_rdatalist_tordataset(&sigrdatalist, &sigrdataset);
check_result(result, "dns_rdatalist_tordataset()");
}
db = NULL;
result = dns_db_create(mctx, "rbt", dns_rootname, dns_dbtype_zone,
rdataset.rdclass, 0, NULL, &db);
if (result != ISC_R_SUCCESS) {
char domainstr[DNS_NAME_FORMATSIZE];
dns_name_format(domain, domainstr, sizeof domainstr);
fatal("failed to create a database for %s", domainstr);
}
version = NULL;
dns_db_newversion(db, &version);
node = NULL;
result = dns_db_findnode(db, domain, ISC_TRUE, &node);
check_result(result, "dns_db_findnode()");
dns_db_addrdataset(db, node, version, 0, &rdataset, 0, NULL);
if (!ISC_LIST_EMPTY(keylist))
dns_db_addrdataset(db, node, version, 0, &sigrdataset, 0,
NULL);
dns_db_detachnode(db, &node);
dns_db_closeversion(db, &version, ISC_TRUE);
result = dns_db_dump(db, version, output);
if (result != ISC_R_SUCCESS) {
char domainstr[DNS_NAME_FORMATSIZE];
dns_name_format(domain, domainstr, sizeof domainstr);
fatal("failed to write database for %s to %s",
domainstr, output);
}
printf("%s\n", output);
dns_db_detach(&db);
dns_rdataset_disassociate(&rdataset);
while (!ISC_LIST_EMPTY(rdatalist.rdata)) {
rdata = ISC_LIST_HEAD(rdatalist.rdata);
ISC_LIST_UNLINK(rdatalist.rdata, rdata, link);
isc_mem_put(mctx, rdata->data, BUFSIZE);
isc_mem_put(mctx, rdata, sizeof *rdata);
}
while (!ISC_LIST_EMPTY(sigrdatalist.rdata)) {
rdata = ISC_LIST_HEAD(sigrdatalist.rdata);
ISC_LIST_UNLINK(sigrdatalist.rdata, rdata, link);
isc_mem_put(mctx, rdata->data, BUFSIZE);
isc_mem_put(mctx, rdata, sizeof *rdata);
}
while (!ISC_LIST_EMPTY(keylist)) {
keynode = ISC_LIST_HEAD(keylist);
ISC_LIST_UNLINK(keylist, keynode, link);
dst_key_free(&keynode->key);
isc_mem_put(mctx, keynode, sizeof(keynode_t));
}
if (savedname != NULL) {
dns_name_free(savedname, mctx);
isc_mem_put(mctx, savedname, sizeof(dns_name_t));
}
cleanup_logging(&log);
isc_hash_destroy();
cleanup_entropy(&ectx);
isc_mem_free(mctx, output);
dst_lib_destroy();
if (verbose > 10)
isc_mem_stats(mctx, stdout);
isc_mem_destroy(&mctx);
return (0);
}

View File

@@ -0,0 +1,249 @@
<!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, 2001, 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: dnssec-makekeyset.docbook,v 1.2.2.7 2005/05/12 21:35:07 sra Exp $ -->
<refentry>
<refentryinfo>
<date>June 30, 2000</date>
</refentryinfo>
<refmeta>
<refentrytitle><application>dnssec-makekeyset</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>2003</year>
<holder>Internet Software Consortium.</holder>
</copyright>
</docinfo>
<refnamediv>
<refname><application>dnssec-makekeyset</application></refname>
<refpurpose>DNSSEC zone signing tool</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>dnssec-makekeyset</command>
<arg><option>-a</option></arg>
<arg><option>-s <replaceable class="parameter">start-time</replaceable></option></arg>
<arg><option>-e <replaceable class="parameter">end-time</replaceable></option></arg>
<arg><option>-h</option></arg>
<arg><option>-p</option></arg>
<arg><option>-r <replaceable class="parameter">randomdev</replaceable></option></arg>
<arg><option>-t</option><replaceable class="parameter">ttl</replaceable></arg>
<arg><option>-v <replaceable class="parameter">level</replaceable></option></arg>
<arg choice="req" rep="repeat">key</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para>
<command>dnssec-makekeyset</command> generates a key set from one
or more keys created by <command>dnssec-keygen</command>. It creates
a file containing a KEY record for each key, and self-signs the key
set with each zone key. The output file is of the form
<filename>keyset-nnnn.</filename>, where <filename>nnnn</filename>
is the zone name.
</para>
</refsect1>
<refsect1>
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term>-a</term>
<listitem>
<para>
Verify all generated signatures.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-s <replaceable class="parameter">start-time</replaceable></term>
<listitem>
<para>
Specify the date and time when the generated SIG records
become valid. This can be either an absolute or relative
time. An absolute start time is indicated by a number
in YYYYMMDDHHMMSS notation; 20000530144500 denotes
14:45:00 UTC on May 30th, 2000. A relative start time is
indicated by +N, which is N seconds from the current time.
If no <option>start-time</option> is specified, the current
time is used.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-e <replaceable class="parameter">end-time</replaceable></term>
<listitem>
<para>
Specify the date and time when the generated SIG records
expire. As with <option>start-time</option>, an absolute
time is indicated in YYYYMMDDHHMMSS notation. A time relative
to the start time is indicated with +N, which is N seconds from
the start time. A time relative to the current time is
indicated with now+N. If no <option>end-time</option> is
specified, 30 days from the start time is used as a default.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-h</term>
<listitem>
<para>
Prints a short summary of the options and arguments to
<command>dnssec-makekeyset</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-p</term>
<listitem>
<para>
Use pseudo-random data when signing the zone. This is faster,
but less secure, than using real random data. This option
may be useful when signing large zones or when the entropy
source is limited.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-r <replaceable class="parameter">randomdev</replaceable></term>
<listitem>
<para>
Specifies the source of randomness. If the operating
system does not provide a <filename>/dev/random</filename>
or equivalent device, the default source of randomness
is keyboard input. <filename>randomdev</filename> specifies
the name of a character device or file containing random
data to be used instead of the default. The special value
<filename>keyboard</filename> indicates that keyboard
input should be used.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-t <replaceable class="parameter">ttl</replaceable></term>
<listitem>
<para>
Specify the TTL (time to live) of the KEY and SIG records.
The default is 3600 seconds.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-v <replaceable class="parameter">level</replaceable></term>
<listitem>
<para>
Sets the debugging level.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>key</term>
<listitem>
<para>
The list of keys to be included in the keyset file. These keys
are expressed in the form <filename>Knnnn.+aaa+iiiii</filename>
as generated by <command>dnssec-keygen</command>.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>EXAMPLE</title>
<para>
The following command generates a keyset containing the DSA key for
<userinput>example.com</userinput> generated in the
<command>dnssec-keygen</command> man page.
</para>
<para>
<userinput>dnssec-makekeyset -t 86400 -s 20000701120000 -e +2592000 Kexample.com.+003+26160</userinput>
</para>
<para>
In this example, <command>dnssec-makekeyset</command> creates
the file <filename>keyset-example.com.</filename>. This file
contains the specified key and a self-generated signature.
</para>
<para>
The DNS administrator for <userinput>example.com</userinput> could
send <filename>keyset-example.com.</filename> to the DNS
administrator for <userinput>.com</userinput> for signing, if the
.com zone is DNSSEC-aware and the administrators of the two zones
have some mechanism for authenticating each other and exchanging
the keys and signatures securely.
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<refentrytitle>dnssec-keygen</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>dnssec-signkey</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>,
<citetitle>BIND 9 Administrator Reference Manual</citetitle>,
<citetitle>RFC 2535</citetitle>.
</para>
</refsect1>
<refsect1>
<title>AUTHOR</title>
<para>
<corpauthor>Internet Systems Consortium</corpauthor>
</para>
</refsect1>
</refentry>
<!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -0,0 +1,153 @@
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001, 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: dnssec-makekeyset.html,v 1.4.2.16 2007/01/26 23:26:58 marka Exp $ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>dnssec-makekeyset</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
<a name="id2476275"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2>Name</h2>
<p><span class="application">dnssec-makekeyset</span> &#8212; DNSSEC zone signing tool</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p><code class="command">dnssec-makekeyset</code> [<code class="option">-a</code>] [<code class="option">-s <em class="replaceable"><code>start-time</code></em></code>] [<code class="option">-e <em class="replaceable"><code>end-time</code></em></code>] [<code class="option">-h</code>] [<code class="option">-p</code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-t</code><em class="replaceable"><code>ttl</code></em>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] {key...}</p></div>
</div>
<div class="refsect1" lang="en">
<a name="id2543403"></a><h2>DESCRIPTION</h2>
<p>
<span><strong class="command">dnssec-makekeyset</strong></span> generates a key set from one
or more keys created by <span><strong class="command">dnssec-keygen</strong></span>. It creates
a file containing a KEY record for each key, and self-signs the key
set with each zone key. The output file is of the form
<code class="filename">keyset-nnnn.</code>, where <code class="filename">nnnn</code>
is the zone name.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2543427"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-a</span></dt>
<dd><p>
Verify all generated signatures.
</p></dd>
<dt><span class="term">-s <em class="replaceable"><code>start-time</code></em></span></dt>
<dd><p>
Specify the date and time when the generated SIG records
become valid. This can be either an absolute or relative
time. An absolute start time is indicated by a number
in YYYYMMDDHHMMSS notation; 20000530144500 denotes
14:45:00 UTC on May 30th, 2000. A relative start time is
indicated by +N, which is N seconds from the current time.
If no <code class="option">start-time</code> is specified, the current
time is used.
</p></dd>
<dt><span class="term">-e <em class="replaceable"><code>end-time</code></em></span></dt>
<dd><p>
Specify the date and time when the generated SIG records
expire. As with <code class="option">start-time</code>, an absolute
time is indicated in YYYYMMDDHHMMSS notation. A time relative
to the start time is indicated with +N, which is N seconds from
the start time. A time relative to the current time is
indicated with now+N. If no <code class="option">end-time</code> is
specified, 30 days from the start time is used as a default.
</p></dd>
<dt><span class="term">-h</span></dt>
<dd><p>
Prints a short summary of the options and arguments to
<span><strong class="command">dnssec-makekeyset</strong></span>.
</p></dd>
<dt><span class="term">-p</span></dt>
<dd><p>
Use pseudo-random data when signing the zone. This is faster,
but less secure, than using real random data. This option
may be useful when signing large zones or when the entropy
source is limited.
</p></dd>
<dt><span class="term">-r <em class="replaceable"><code>randomdev</code></em></span></dt>
<dd><p>
Specifies the source of randomness. If the operating
system does not provide a <code class="filename">/dev/random</code>
or equivalent device, the default source of randomness
is keyboard input. <code class="filename">randomdev</code> specifies
the name of a character device or file containing random
data to be used instead of the default. The special value
<code class="filename">keyboard</code> indicates that keyboard
input should be used.
</p></dd>
<dt><span class="term">-t <em class="replaceable"><code>ttl</code></em></span></dt>
<dd><p>
Specify the TTL (time to live) of the KEY and SIG records.
The default is 3600 seconds.
</p></dd>
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
<dd><p>
Sets the debugging level.
</p></dd>
<dt><span class="term">key</span></dt>
<dd><p>
The list of keys to be included in the keyset file. These keys
are expressed in the form <code class="filename">Knnnn.+aaa+iiiii</code>
as generated by <span><strong class="command">dnssec-keygen</strong></span>.
</p></dd>
</dl></div>
</div>
<div class="refsect1" lang="en">
<a name="id2543606"></a><h2>EXAMPLE</h2>
<p>
The following command generates a keyset containing the DSA key for
<strong class="userinput"><code>example.com</code></strong> generated in the
<span><strong class="command">dnssec-keygen</strong></span> man page.
</p>
<p>
<strong class="userinput"><code>dnssec-makekeyset -t 86400 -s 20000701120000 -e +2592000 Kexample.com.+003+26160</code></strong>
</p>
<p>
In this example, <span><strong class="command">dnssec-makekeyset</strong></span> creates
the file <code class="filename">keyset-example.com.</code>. This file
contains the specified key and a self-generated signature.
</p>
<p>
The DNS administrator for <strong class="userinput"><code>example.com</code></strong> could
send <code class="filename">keyset-example.com.</code> to the DNS
administrator for <strong class="userinput"><code>.com</code></strong> for signing, if the
.com zone is DNSSEC-aware and the administrators of the two zones
have some mechanism for authenticating each other and exchanging
the keys and signatures securely.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2543652"></a><h2>SEE ALSO</h2>
<p>
<span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">dnssec-signkey</span>(8)</span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
<em class="citetitle">RFC 2535</em>.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2543688"></a><h2>AUTHOR</h2>
<p>
<span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
</div></body>
</html>

143
bin/dnssec/dnssec-signkey.8 Normal file
View File

@@ -0,0 +1,143 @@
.\" Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000, 2001, 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: dnssec-signkey.8,v 1.18.2.8 2006/12/12 01:42:53 marka Exp $
.\"
.hy 0
.ad l
.\" Title: dnssec\-signkey
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
.\" Date: June 30, 2000
.\" Manual: BIND9
.\" Source: BIND9
.\"
.TH "DNSSEC\-SIGNKEY" "8" "June 30, 2000" "BIND9" "BIND9"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
dnssec\-signkey \- DNSSEC key set signing tool
.SH "SYNOPSIS"
.HP 15
\fBdnssec\-signkey\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-h\fR] [\fB\-p\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] {keyset} {key...}
.SH "DESCRIPTION"
.PP
\fBdnssec\-signkey\fR
signs a keyset. Typically the keyset will be for a child zone, and will have been generated by
\fBdnssec\-makekeyset\fR. The child zone's keyset is signed with the zone keys for its parent zone. The output file is of the form
\fIsignedkey\-nnnn.\fR, where
\fInnnn\fR
is the zone name.
.SH "OPTIONS"
.PP
\-a
.RS 4
Verify all generated signatures.
.RE
.PP
\-c \fIclass\fR
.RS 4
Specifies the DNS class of the key sets.
.RE
.PP
\-s \fIstart\-time\fR
.RS 4
Specify the date and time when the generated SIG records become valid. This can be either an absolute or relative time. An absolute start time is indicated by a number in YYYYMMDDHHMMSS notation; 20000530144500 denotes 14:45:00 UTC on May 30th, 2000. A relative start time is indicated by +N, which is N seconds from the current time. If no
\fBstart\-time\fR
is specified, the current time is used.
.RE
.PP
\-e \fIend\-time\fR
.RS 4
Specify the date and time when the generated SIG records expire. As with
\fBstart\-time\fR, an absolute time is indicated in YYYYMMDDHHMMSS notation. A time relative to the start time is indicated with +N, which is N seconds from the start time. A time relative to the current time is indicated with now+N. If no
\fBend\-time\fR
is specified, 30 days from the start time is used as a default.
.RE
.PP
\-h
.RS 4
Prints a short summary of the options and arguments to
\fBdnssec\-signkey\fR.
.RE
.PP
\-p
.RS 4
Use pseudo\-random data when signing the zone. This is faster, but less secure, than using real random data. This option may be useful when signing large zones or when the entropy source is limited.
.RE
.PP
\-r \fIrandomdev\fR
.RS 4
Specifies the source of randomness. If the operating system does not provide a
\fI/dev/random\fR
or equivalent device, the default source of randomness is keyboard input.
\fIrandomdev\fR
specifies the name of a character device or file containing random data to be used instead of the default. The special value
\fIkeyboard\fR
indicates that keyboard input should be used.
.RE
.PP
\-v \fIlevel\fR
.RS 4
Sets the debugging level.
.RE
.PP
keyset
.RS 4
The file containing the child's keyset.
.RE
.PP
key
.RS 4
The keys used to sign the child's keyset.
.RE
.SH "EXAMPLE"
.PP
The DNS administrator for a DNSSEC\-aware
\fB.com\fR
zone would use the following command to sign the
\fIkeyset\fR
file for
\fBexample.com\fR
created by
\fBdnssec\-makekeyset\fR
with a key generated by
\fBdnssec\-keygen\fR:
.PP
\fBdnssec\-signkey keyset\-example.com. Kcom.+003+51944\fR
.PP
In this example,
\fBdnssec\-signkey\fR
creates the file
\fIsignedkey\-example.com.\fR, which contains the
\fBexample.com\fR
keys and the signatures by the
\fB.com\fR
keys.
.SH "SEE ALSO"
.PP
\fBdnssec\-keygen\fR(8),
\fBdnssec\-makekeyset\fR(8),
\fBdnssec\-signzone\fR(8).
.SH "AUTHOR"
.PP
Internet Systems Consortium
.SH "COPYRIGHT"
Copyright \(co 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
.br
Copyright \(co 2000, 2001, 2003 Internet Software Consortium.
.br

478
bin/dnssec/dnssec-signkey.c Normal file
View File

@@ -0,0 +1,478 @@
/*
* Portions Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
* Portions Copyright (C) 1995-2000 by Network Associates, Inc.
*
* 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 AND NETWORK ASSOCIATES 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: dnssec-signkey.c,v 1.50.2.6 2005/06/08 00:12:17 marka Exp $ */
#include <config.h>
#include <stdlib.h>
#include <isc/string.h>
#include <isc/commandline.h>
#include <isc/entropy.h>
#include <isc/hash.h>
#include <isc/mem.h>
#include <isc/util.h>
#include <dns/db.h>
#include <dns/dbiterator.h>
#include <dns/dnssec.h>
#include <dns/fixedname.h>
#include <dns/log.h>
#include <dns/rdata.h>
#include <dns/rdataclass.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
#include <dns/rdatasetiter.h>
#include <dns/rdatastruct.h>
#include <dns/result.h>
#include <dns/secalg.h>
#include <dst/dst.h>
#include "dnssectool.h"
const char *program = "dnssec-signkey";
int verbose;
#define BUFSIZE 2048
typedef struct keynode keynode_t;
struct keynode {
dst_key_t *key;
isc_boolean_t verified;
ISC_LINK(keynode_t) link;
};
typedef ISC_LIST(keynode_t) keylist_t;
static isc_stdtime_t starttime = 0, endtime = 0, now;
static isc_mem_t *mctx = NULL;
static isc_entropy_t *ectx = NULL;
static keylist_t keylist;
static void
usage(void) {
fprintf(stderr, "Usage:\n");
fprintf(stderr, "\t%s [options] keyset keys\n", program);
fprintf(stderr, "\n");
fprintf(stderr, "Options: (default value in parenthesis) \n");
fprintf(stderr, "\t-a\n");
fprintf(stderr, "\t\tverify generated signatures\n");
fprintf(stderr, "\t-c class (IN)\n");
fprintf(stderr, "\t-s YYYYMMDDHHMMSS|+offset:\n");
fprintf(stderr, "\t\tSIG start time - absolute|offset (from keyset)\n");
fprintf(stderr, "\t-e YYYYMMDDHHMMSS|+offset|\"now\"+offset]:\n");
fprintf(stderr, "\t\tSIG end time - absolute|from start|from now "
"(from keyset)\n");
fprintf(stderr, "\t-v level:\n");
fprintf(stderr, "\t\tverbose level (0)\n");
fprintf(stderr, "\t-p\n");
fprintf(stderr, "\t\tuse pseudorandom data (faster but less secure)\n");
fprintf(stderr, "\t-r randomdev:\n");
fprintf(stderr, "\t\ta file containing random data\n");
fprintf(stderr, "\n");
fprintf(stderr, "keyset:\n");
fprintf(stderr, "\tfile with keyset to be signed (keyset-<name>)\n");
fprintf(stderr, "keys:\n");
fprintf(stderr, "\tkeyfile (Kname+alg+tag)\n");
fprintf(stderr, "\n");
fprintf(stderr, "Output:\n");
fprintf(stderr, "\tsigned keyset (signedkey-<name>)\n");
exit(0);
}
static void
loadkeys(dns_name_t *name, dns_rdataset_t *rdataset) {
dst_key_t *key;
dns_rdata_t rdata = DNS_RDATA_INIT;
keynode_t *keynode;
isc_result_t result;
ISC_LIST_INIT(keylist);
result = dns_rdataset_first(rdataset);
check_result(result, "dns_rdataset_first");
for (; result == ISC_R_SUCCESS; result = dns_rdataset_next(rdataset)) {
dns_rdata_reset(&rdata);
dns_rdataset_current(rdataset, &rdata);
key = NULL;
result = dns_dnssec_keyfromrdata(name, &rdata, mctx, &key);
if (result != ISC_R_SUCCESS)
continue;
if (!dst_key_iszonekey(key))
continue;
keynode = isc_mem_get(mctx, sizeof (keynode_t));
if (keynode == NULL)
fatal("out of memory");
keynode->key = key;
keynode->verified = ISC_FALSE;
ISC_LIST_INITANDAPPEND(keylist, keynode, link);
}
if (result != ISC_R_NOMORE)
fatal("failure traversing key list");
}
static dst_key_t *
findkey(dns_rdata_sig_t *sig) {
keynode_t *keynode;
for (keynode = ISC_LIST_HEAD(keylist);
keynode != NULL;
keynode = ISC_LIST_NEXT(keynode, link))
{
if (dst_key_id(keynode->key) == sig->keyid &&
dst_key_alg(keynode->key) == sig->algorithm) {
keynode->verified = ISC_TRUE;
return (keynode->key);
}
}
fatal("signature generated by non-zone or missing key");
return (NULL);
}
int
main(int argc, char *argv[]) {
int i, ch;
char *startstr = NULL, *endstr = NULL, *classname = NULL;
char tdomain[1025];
dns_fixedname_t fdomain;
dns_name_t *domain;
char *output = NULL;
char *endp;
unsigned char *data;
char *randomfile = NULL;
dns_db_t *db;
dns_dbnode_t *node;
dns_dbversion_t *version;
dns_dbiterator_t *dbiter;
dns_rdatasetiter_t *rdsiter;
dst_key_t *key = NULL;
dns_rdata_t *rdata;
dns_rdata_t sigrdata = DNS_RDATA_INIT;
dns_rdatalist_t sigrdatalist;
dns_rdataset_t rdataset, sigrdataset, newsigrdataset;
dns_rdata_sig_t sig;
isc_result_t result;
isc_buffer_t b;
isc_textregion_t tr;
isc_log_t *log = NULL;
keynode_t *keynode;
isc_boolean_t pseudorandom = ISC_FALSE;
unsigned int eflags;
dns_rdataclass_t rdclass;
static isc_boolean_t tryverify = ISC_FALSE;
result = isc_mem_create(0, 0, &mctx);
check_result(result, "isc_mem_create()");
dns_result_register();
while ((ch = isc_commandline_parse(argc, argv, "ac:s:e:pr:v:h")) != -1)
{
switch (ch) {
case 'a':
tryverify = ISC_TRUE;
break;
case 'c':
classname = isc_commandline_argument;
break;
case 's':
startstr = isc_commandline_argument;
break;
case 'e':
endstr = isc_commandline_argument;
break;
case 'p':
pseudorandom = ISC_TRUE;
break;
case 'r':
randomfile = isc_commandline_argument;
break;
case 'v':
endp = NULL;
verbose = strtol(isc_commandline_argument, &endp, 0);
if (*endp != '\0')
fatal("verbose level must be numeric");
break;
case 'h':
default:
usage();
}
}
argc -= isc_commandline_index;
argv += isc_commandline_index;
if (argc < 2)
usage();
if (classname != NULL) {
tr.base = classname;
tr.length = strlen(classname);
result = dns_rdataclass_fromtext(&rdclass, &tr);
if (result != ISC_R_SUCCESS)
fatal("unknown class %s",classname);
} else
rdclass = dns_rdataclass_in;
setup_entropy(mctx, randomfile, &ectx);
eflags = ISC_ENTROPY_BLOCKING;
if (!pseudorandom)
eflags |= ISC_ENTROPY_GOODONLY;
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
if (result != ISC_R_SUCCESS)
fatal("could not create hash context");
result = dst_lib_init(mctx, ectx, eflags);
if (result != ISC_R_SUCCESS)
fatal("could not initialize dst: %s",
isc_result_totext(result));
isc_stdtime_get(&now);
if ((startstr == NULL || endstr == NULL) &&
!(startstr == NULL && endstr == NULL))
fatal("if -s or -e is specified, both must be");
setup_logging(verbose, mctx, &log);
if (strlen(argv[0]) < 8U || strncmp(argv[0], "keyset-", 7) != 0)
fatal("keyset file '%s' must start with keyset-", argv[0]);
db = NULL;
result = dns_db_create(mctx, "rbt", dns_rootname, dns_dbtype_zone,
rdclass, 0, NULL, &db);
check_result(result, "dns_db_create()");
result = dns_db_load(db, argv[0]);
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
fatal("failed to load database from '%s': %s", argv[0],
isc_result_totext(result));
dns_fixedname_init(&fdomain);
domain = dns_fixedname_name(&fdomain);
dbiter = NULL;
result = dns_db_createiterator(db, ISC_FALSE, &dbiter);
check_result(result, "dns_db_createiterator()");
result = dns_dbiterator_first(dbiter);
check_result(result, "dns_dbiterator_first()");
while (result == ISC_R_SUCCESS) {
node = NULL;
dns_dbiterator_current(dbiter, &node, domain);
rdsiter = NULL;
result = dns_db_allrdatasets(db, node, NULL, 0, &rdsiter);
check_result(result, "dns_db_allrdatasets()");
result = dns_rdatasetiter_first(rdsiter);
dns_rdatasetiter_destroy(&rdsiter);
if (result == ISC_R_SUCCESS)
break;
dns_db_detachnode(db, &node);
result = dns_dbiterator_next(dbiter);
}
dns_dbiterator_destroy(&dbiter);
if (result != ISC_R_SUCCESS)
fatal("failed to find data in keyset file");
isc_buffer_init(&b, tdomain, sizeof(tdomain) - 1);
result = dns_name_tofilenametext(domain, ISC_FALSE, &b);
check_result(result, "dns_name_tofilenametext()");
isc_buffer_putuint8(&b, 0);
output = isc_mem_allocate(mctx,
strlen("signedkey-") + strlen(tdomain) + 1);
if (output == NULL)
fatal("out of memory");
strcpy(output, "signedkey-");
strcat(output, tdomain);
version = NULL;
dns_db_newversion(db, &version);
dns_rdataset_init(&rdataset);
dns_rdataset_init(&sigrdataset);
result = dns_db_findrdataset(db, node, version, dns_rdatatype_key, 0,
0, &rdataset, &sigrdataset);
if (result != ISC_R_SUCCESS) {
char domainstr[DNS_NAME_FORMATSIZE];
dns_name_format(domain, domainstr, sizeof domainstr);
fatal("failed to find rdataset '%s KEY': %s",
domainstr, isc_result_totext(result));
}
loadkeys(domain, &rdataset);
if (!dns_rdataset_isassociated(&sigrdataset))
fatal("no SIG KEY set present");
result = dns_rdataset_first(&sigrdataset);
check_result(result, "dns_rdataset_first()");
do {
dns_rdataset_current(&sigrdataset, &sigrdata);
result = dns_rdata_tostruct(&sigrdata, &sig, mctx);
check_result(result, "dns_rdata_tostruct()");
key = findkey(&sig);
result = dns_dnssec_verify(domain, &rdataset, key,
ISC_TRUE, mctx, &sigrdata);
if (result != ISC_R_SUCCESS) {
char keystr[KEY_FORMATSIZE];
key_format(key, keystr, sizeof keystr);
fatal("signature by key '%s' did not verify: %s",
keystr, isc_result_totext(result));
}
dns_rdata_reset(&sigrdata);
dns_rdata_freestruct(&sig);
result = dns_rdataset_next(&sigrdataset);
} while (result == ISC_R_SUCCESS);
if (startstr != NULL) {
starttime = strtotime(startstr, now, now);
endtime = strtotime(endstr, now, starttime);
} else {
starttime = sig.timesigned;
endtime = sig.timeexpire;
}
for (keynode = ISC_LIST_HEAD(keylist);
keynode != NULL;
keynode = ISC_LIST_NEXT(keynode, link))
if (!keynode->verified)
fatal("Not all zone keys self signed the key set");
result = dns_rdataset_first(&sigrdataset);
check_result(result, "dns_rdataset_first()");
dns_rdataset_current(&sigrdataset, &sigrdata);
result = dns_rdata_tostruct(&sigrdata, &sig, mctx);
check_result(result, "dns_rdata_tostruct()");
dns_rdataset_disassociate(&sigrdataset);
argc -= 1;
argv += 1;
dns_rdatalist_init(&sigrdatalist);
sigrdatalist.rdclass = rdataset.rdclass;
sigrdatalist.type = dns_rdatatype_sig;
sigrdatalist.covers = dns_rdatatype_key;
sigrdatalist.ttl = rdataset.ttl;
for (i = 0; i < argc; i++) {
key = NULL;
result = dst_key_fromnamedfile(argv[i],
DST_TYPE_PUBLIC |
DST_TYPE_PRIVATE,
mctx, &key);
if (result != ISC_R_SUCCESS)
fatal("failed to read key %s from disk: %s",
argv[i], isc_result_totext(result));
rdata = isc_mem_get(mctx, sizeof(dns_rdata_t));
if (rdata == NULL)
fatal("out of memory");
dns_rdata_init(rdata);
data = isc_mem_get(mctx, BUFSIZE);
if (data == NULL)
fatal("out of memory");
isc_buffer_init(&b, data, BUFSIZE);
result = dns_dnssec_sign(domain, &rdataset, key,
&starttime, &endtime,
mctx, &b, rdata);
isc_entropy_stopcallbacksources(ectx);
if (result != ISC_R_SUCCESS) {
char keystr[KEY_FORMATSIZE];
key_format(key, keystr, sizeof keystr);
fatal("key '%s' failed to sign data: %s",
keystr, isc_result_totext(result));
}
if (tryverify) {
result = dns_dnssec_verify(domain, &rdataset, key,
ISC_TRUE, mctx, rdata);
if (result != ISC_R_SUCCESS) {
char keystr[KEY_FORMATSIZE];
key_format(key, keystr, sizeof keystr);
fatal("signature from key '%s' failed to "
"verify: %s",
keystr, isc_result_totext(result));
}
}
ISC_LIST_APPEND(sigrdatalist.rdata, rdata, link);
dst_key_free(&key);
}
dns_rdataset_init(&newsigrdataset);
result = dns_rdatalist_tordataset(&sigrdatalist, &newsigrdataset);
check_result (result, "dns_rdatalist_tordataset()");
dns_db_addrdataset(db, node, version, 0, &newsigrdataset, 0, NULL);
check_result (result, "dns_db_addrdataset()");
dns_db_detachnode(db, &node);
dns_db_closeversion(db, &version, ISC_TRUE);
result = dns_db_dump(db, version, output);
if (result != ISC_R_SUCCESS)
fatal("failed to write database to '%s': %s",
output, isc_result_totext(result));
printf("%s\n", output);
dns_rdataset_disassociate(&rdataset);
dns_rdataset_disassociate(&newsigrdataset);
dns_rdata_freestruct(&sig);
while (!ISC_LIST_EMPTY(sigrdatalist.rdata)) {
rdata = ISC_LIST_HEAD(sigrdatalist.rdata);
ISC_LIST_UNLINK(sigrdatalist.rdata, rdata, link);
isc_mem_put(mctx, rdata->data, BUFSIZE);
isc_mem_put(mctx, rdata, sizeof *rdata);
}
dns_db_detach(&db);
while (!ISC_LIST_EMPTY(keylist)) {
keynode = ISC_LIST_HEAD(keylist);
ISC_LIST_UNLINK(keylist, keynode, link);
dst_key_free(&keynode->key);
isc_mem_put(mctx, keynode, sizeof(keynode_t));
}
cleanup_logging(&log);
isc_mem_free(mctx, output);
isc_hash_destroy();
cleanup_entropy(&ectx);
dst_lib_destroy();
if (verbose > 10)
isc_mem_stats(mctx, stdout);
isc_mem_destroy(&mctx);
return (0);
}

View File

@@ -0,0 +1,253 @@
<!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, 2001, 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: dnssec-signkey.docbook,v 1.2.2.6 2005/05/12 21:35:08 sra Exp $ -->
<refentry>
<refentryinfo>
<date>June 30, 2000</date>
</refentryinfo>
<refmeta>
<refentrytitle><application>dnssec-signkey</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>2003</year>
<holder>Internet Software Consortium.</holder>
</copyright>
</docinfo>
<refnamediv>
<refname><application>dnssec-signkey</application></refname>
<refpurpose>DNSSEC key set signing tool</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>dnssec-signkey</command>
<arg><option>-a</option></arg>
<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
<arg><option>-s <replaceable class="parameter">start-time</replaceable></option></arg>
<arg><option>-e <replaceable class="parameter">end-time</replaceable></option></arg>
<arg><option>-h</option></arg>
<arg><option>-p</option></arg>
<arg><option>-r <replaceable class="parameter">randomdev</replaceable></option></arg>
<arg><option>-v <replaceable class="parameter">level</replaceable></option></arg>
<arg choice="req">keyset</arg>
<arg choice="req" rep="repeat">key</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para>
<command>dnssec-signkey</command> signs a keyset. Typically
the keyset will be for a child zone, and will have been generated
by <command>dnssec-makekeyset</command>. The child zone's keyset
is signed with the zone keys for its parent zone. The output file
is of the form <filename>signedkey-nnnn.</filename>, where
<filename>nnnn</filename> is the zone name.
</para>
</refsect1>
<refsect1>
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term>-a</term>
<listitem>
<para>
Verify all generated signatures.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-c <replaceable class="parameter">class</replaceable></term>
<listitem>
<para>
Specifies the DNS class of the key sets.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-s <replaceable class="parameter">start-time</replaceable></term>
<listitem>
<para>
Specify the date and time when the generated SIG records
become valid. This can be either an absolute or relative
time. An absolute start time is indicated by a number
in YYYYMMDDHHMMSS notation; 20000530144500 denotes
14:45:00 UTC on May 30th, 2000. A relative start time is
indicated by +N, which is N seconds from the current time.
If no <option>start-time</option> is specified, the current
time is used.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-e <replaceable class="parameter">end-time</replaceable></term>
<listitem>
<para>
Specify the date and time when the generated SIG records
expire. As with <option>start-time</option>, an absolute
time is indicated in YYYYMMDDHHMMSS notation. A time relative
to the start time is indicated with +N, which is N seconds from
the start time. A time relative to the current time is
indicated with now+N. If no <option>end-time</option> is
specified, 30 days from the start time is used as a default.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-h</term>
<listitem>
<para>
Prints a short summary of the options and arguments to
<command>dnssec-signkey</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-p</term>
<listitem>
<para>
Use pseudo-random data when signing the zone. This is faster,
but less secure, than using real random data. This option
may be useful when signing large zones or when the entropy
source is limited.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-r <replaceable class="parameter">randomdev</replaceable></term>
<listitem>
<para>
Specifies the source of randomness. If the operating
system does not provide a <filename>/dev/random</filename>
or equivalent device, the default source of randomness
is keyboard input. <filename>randomdev</filename> specifies
the name of a character device or file containing random
data to be used instead of the default. The special value
<filename>keyboard</filename> indicates that keyboard
input should be used.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-v <replaceable class="parameter">level</replaceable></term>
<listitem>
<para>
Sets the debugging level.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>keyset</term>
<listitem>
<para>
The file containing the child's keyset.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>key</term>
<listitem>
<para>
The keys used to sign the child's keyset.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>EXAMPLE</title>
<para>
The DNS administrator for a DNSSEC-aware <userinput>.com</userinput>
zone would use the following command to sign the
<filename>keyset</filename> file for <userinput>example.com</userinput>
created by <command>dnssec-makekeyset</command> with a key generated
by <command>dnssec-keygen</command>:
</para>
<para>
<userinput>dnssec-signkey keyset-example.com. Kcom.+003+51944</userinput>
</para>
<para>
In this example, <command>dnssec-signkey</command> creates
the file <filename>signedkey-example.com.</filename>, which
contains the <userinput>example.com</userinput> keys and the
signatures by the <userinput>.com</userinput> keys.
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>
<citerefentry>
<refentrytitle>dnssec-keygen</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>dnssec-makekeyset</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>dnssec-signzone</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>.
</para>
</refsect1>
<refsect1>
<title>AUTHOR</title>
<para>
<corpauthor>Internet Systems Consortium</corpauthor>
</para>
</refsect1>
</refentry>
<!--
- Local variables:
- mode: sgml
- End:
-->

View File

@@ -0,0 +1,148 @@
<!--
- Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000, 2001, 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: dnssec-signkey.html,v 1.4.2.15 2007/01/26 23:26:58 marka Exp $ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>dnssec-signkey</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
<a name="id2476275"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2>Name</h2>
<p><span class="application">dnssec-signkey</span> &#8212; DNSSEC key set signing tool</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p><code class="command">dnssec-signkey</code> [<code class="option">-a</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-s <em class="replaceable"><code>start-time</code></em></code>] [<code class="option">-e <em class="replaceable"><code>end-time</code></em></code>] [<code class="option">-h</code>] [<code class="option">-p</code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] {keyset} {key...}</p></div>
</div>
<div class="refsect1" lang="en">
<a name="id2543409"></a><h2>DESCRIPTION</h2>
<p>
<span><strong class="command">dnssec-signkey</strong></span> signs a keyset. Typically
the keyset will be for a child zone, and will have been generated
by <span><strong class="command">dnssec-makekeyset</strong></span>. The child zone's keyset
is signed with the zone keys for its parent zone. The output file
is of the form <code class="filename">signedkey-nnnn.</code>, where
<code class="filename">nnnn</code> is the zone name.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2543431"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-a</span></dt>
<dd><p>
Verify all generated signatures.
</p></dd>
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
<dd><p>
Specifies the DNS class of the key sets.
</p></dd>
<dt><span class="term">-s <em class="replaceable"><code>start-time</code></em></span></dt>
<dd><p>
Specify the date and time when the generated SIG records
become valid. This can be either an absolute or relative
time. An absolute start time is indicated by a number
in YYYYMMDDHHMMSS notation; 20000530144500 denotes
14:45:00 UTC on May 30th, 2000. A relative start time is
indicated by +N, which is N seconds from the current time.
If no <code class="option">start-time</code> is specified, the current
time is used.
</p></dd>
<dt><span class="term">-e <em class="replaceable"><code>end-time</code></em></span></dt>
<dd><p>
Specify the date and time when the generated SIG records
expire. As with <code class="option">start-time</code>, an absolute
time is indicated in YYYYMMDDHHMMSS notation. A time relative
to the start time is indicated with +N, which is N seconds from
the start time. A time relative to the current time is
indicated with now+N. If no <code class="option">end-time</code> is
specified, 30 days from the start time is used as a default.
</p></dd>
<dt><span class="term">-h</span></dt>
<dd><p>
Prints a short summary of the options and arguments to
<span><strong class="command">dnssec-signkey</strong></span>.
</p></dd>
<dt><span class="term">-p</span></dt>
<dd><p>
Use pseudo-random data when signing the zone. This is faster,
but less secure, than using real random data. This option
may be useful when signing large zones or when the entropy
source is limited.
</p></dd>
<dt><span class="term">-r <em class="replaceable"><code>randomdev</code></em></span></dt>
<dd><p>
Specifies the source of randomness. If the operating
system does not provide a <code class="filename">/dev/random</code>
or equivalent device, the default source of randomness
is keyboard input. <code class="filename">randomdev</code> specifies
the name of a character device or file containing random
data to be used instead of the default. The special value
<code class="filename">keyboard</code> indicates that keyboard
input should be used.
</p></dd>
<dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
<dd><p>
Sets the debugging level.
</p></dd>
<dt><span class="term">keyset</span></dt>
<dd><p>
The file containing the child's keyset.
</p></dd>
<dt><span class="term">key</span></dt>
<dd><p>
The keys used to sign the child's keyset.
</p></dd>
</dl></div>
</div>
<div class="refsect1" lang="en">
<a name="id2543620"></a><h2>EXAMPLE</h2>
<p>
The DNS administrator for a DNSSEC-aware <strong class="userinput"><code>.com</code></strong>
zone would use the following command to sign the
<code class="filename">keyset</code> file for <strong class="userinput"><code>example.com</code></strong>
created by <span><strong class="command">dnssec-makekeyset</strong></span> with a key generated
by <span><strong class="command">dnssec-keygen</strong></span>:
</p>
<p>
<strong class="userinput"><code>dnssec-signkey keyset-example.com. Kcom.+003+51944</code></strong>
</p>
<p>
In this example, <span><strong class="command">dnssec-signkey</strong></span> creates
the file <code class="filename">signedkey-example.com.</code>, which
contains the <strong class="userinput"><code>example.com</code></strong> keys and the
signatures by the <strong class="userinput"><code>.com</code></strong> keys.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2543672"></a><h2>SEE ALSO</h2>
<p>
<span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">dnssec-makekeyset</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">dnssec-signzone</span>(8)</span>.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2543710"></a><h2>AUTHOR</h2>
<p>
<span class="corpauthor">Internet Systems Consortium</span>
</p>
</div>
</div></body>
</html>

View File

@@ -1,5 +1,5 @@
.\" Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000-2003 Internet Software Consortium.
.\" Copyright (C) 2000, 2001, 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
@@ -13,7 +13,7 @@
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\" PERFORMANCE OF THIS SOFTWARE.
.\"
.\" $Id: dnssec-signzone.8,v 1.23.2.1.4.14 2007/05/09 03:32:36 marka Exp $
.\" $Id: dnssec-signzone.8,v 1.23.2.12 2007/05/09 03:32:21 marka Exp $
.\"
.hy 0
.ad l
@@ -33,12 +33,14 @@
dnssec\-signzone \- DNSSEC zone signing tool
.SH "SYNOPSIS"
.HP 16
\fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIdirectory\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-f\ \fR\fB\fIoutput\-file\fR\fR] [\fB\-g\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkey\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-n\ \fR\fB\fInthreads\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-p\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-t\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-z\fR] {zonefile} [key...]
\fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIdirectory\fR\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-f\ \fR\fB\fIoutput\-file\fR\fR] [\fB\-h\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-n\ \fR\fB\fInthreads\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-p\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-t\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] {zonefile} [key...]
.SH "DESCRIPTION"
.PP
\fBdnssec\-signzone\fR
signs a zone. It generates NSEC and RRSIG records and produces a signed version of the zone. The security status of delegations from the signed zone (that is, whether the child zones are secure or not) is determined by the presence or absence of a
\fIkeyset\fR
signs a zone. It generates NXT and SIG records and produces a signed version of the zone. If there is a
\fIsignedkey\fR
file from the zone's parent, the parent's signatures will be incorporated into the generated signed zone file. The security status of delegations from the signed zone (that is, whether the child zones are secure or not) is determined by the presence or absence of a
\fIsignedkey\fR
file for each child zone.
.SH "OPTIONS"
.PP
@@ -52,40 +54,25 @@ Verify all generated signatures.
Specifies the DNS class of the zone.
.RE
.PP
\-k \fIkey\fR
.RS 4
Treat specified key as a key signing key ignoring any key flags. This option may be specified multiple times.
.RE
.PP
\-l \fIdomain\fR
.RS 4
Generate a DLV set in addition to the key (DNSKEY) and DS sets. The domain is appended to the name of the records.
.RE
.PP
\-d \fIdirectory\fR
.RS 4
Look for
\fIkeyset\fR
\fIsignedkey\fR
files in
\fBdirectory\fR
as the directory
.RE
.PP
\-g
.RS 4
Generate DS records for child zones from keyset files. Existing DS records will be removed.
.RE
.PP
\-s \fIstart\-time\fR
.RS 4
Specify the date and time when the generated RRSIG records become valid. This can be either an absolute or relative time. An absolute start time is indicated by a number in YYYYMMDDHHMMSS notation; 20000530144500 denotes 14:45:00 UTC on May 30th, 2000. A relative start time is indicated by +N, which is N seconds from the current time. If no
Specify the date and time when the generated SIG records become valid. This can be either an absolute or relative time. An absolute start time is indicated by a number in YYYYMMDDHHMMSS notation; 20000530144500 denotes 14:45:00 UTC on May 30th, 2000. A relative start time is indicated by +N, which is N seconds from the current time. If no
\fBstart\-time\fR
is specified, the current time minus 1 hour (to allow for clock skew) is used.
is specified, the current time is used.
.RE
.PP
\-e \fIend\-time\fR
.RS 4
Specify the date and time when the generated RRSIG records expire. As with
Specify the date and time when the generated SIG records expire. As with
\fBstart\-time\fR, an absolute time is indicated in YYYYMMDDHHMMSS notation. A time relative to the start time is indicated with +N, which is N seconds from the start time. A time relative to the current time is indicated with now+N. If no
\fBend\-time\fR
is specified, 30 days from the start time is used as a default.
@@ -108,7 +95,7 @@ Prints a short summary of the options and arguments to
.RS 4
When a previously\-signed zone is passed as input, records may be resigned. The
\fBinterval\fR
option specifies the cycle interval as an offset from the current time (in seconds). If a RRSIG record expires after the cycle interval, it is retained. Otherwise, it is considered to be expiring soon, and it will be replaced.
option specifies the cycle interval as an offset from the current time (in seconds). If a SIG record expires after the cycle interval, it is retained. Otherwise, it is considered to be expiring soon, and it will be replaced.
.sp
The default cycle interval is one quarter of the difference between the signature end and start times. So if neither
\fBend\-time\fR
@@ -116,7 +103,7 @@ or
\fBstart\-time\fR
are specified,
\fBdnssec\-signzone\fR
generates signatures that are valid for 30 days, with a cycle interval of 7.5 days. Therefore, if any existing RRSIG records are due to expire in less than 7.5 days, they would be replaced.
generates signatures that are valid for 30 days, with a cycle interval of 7.5 days. Therefore, if any existing SIG records are due to expire in less than 7.5 days, they would be replaced.
.RE
.PP
\-n \fIncpus\fR
@@ -155,11 +142,6 @@ Print statistics at completion.
Sets the debugging level.
.RE
.PP
\-z
.RS 4
Ignore KSK flag on key when determining what to sign.
.RE
.PP
zonefile
.RS 4
The file containing the zone to be signed.
@@ -173,41 +155,27 @@ Specify which keys should be used to sign the zone. If no keys are specified, th
.PP
The following command signs the
\fBexample.com\fR
zone with the DSA key generated by
zone with the DSA key generated in the
\fBdnssec\-keygen\fR
(Kexample.com.+003+17247). The zone's keys must be in the master file (\fIdb.example.com\fR). This invocation looks for
\fIkeyset\fR
files, in the current directory, so that DS records can be generated from them (\fB\-g\fR).
.sp
.RS 4
.nf
% dnssec\-signzone \-g \-o example.com db.example.com \\
Kexample.com.+003+17247
db.example.com.signed
%
.fi
.RE
man page. The zone's keys must be in the zone. If there are
\fIsignedkey\fR
files associated with this zone or any child zones, they must be in the current directory.
\fBexample.com\fR, the following command would be issued:
.PP
In the above example,
\fBdnssec\-signzone \-o example.com db.example.com Kexample.com.+003+26160\fR
.PP
The command would print a string of the form:
.PP
In this example,
\fBdnssec\-signzone\fR
creates the file
\fIdb.example.com.signed\fR. This file should be referenced in a zone statement in a
\fInamed.conf\fR
file.
.PP
This example re\-signs a previously signed zone with default parameters. The private keys are assumed to be in the current directory.
.sp
.RS 4
.nf
% cp db.example.com.signed db.example.com
% dnssec\-signzone \-o example.com db.example.com
db.example.com.signed
%
.fi
.RE
.SH "SEE ALSO"
.PP
\fBdnssec\-keygen\fR(8),
\fBdnssec\-signkey\fR(8),
BIND 9 Administrator Reference Manual,
RFC 2535.
.SH "AUTHOR"
@@ -216,5 +184,5 @@ Internet Systems Consortium
.SH "COPYRIGHT"
Copyright \(co 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
.br
Copyright \(co 2000\-2003 Internet Software Consortium.
Copyright \(co 2000, 2001, 2003 Internet Software Consortium.
.br

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
[<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2003 Internet Software Consortium.
- Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
-
- Permission to use, copy, modify, and/or distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -18,7 +18,7 @@
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: dnssec-signzone.docbook,v 1.2.2.2.4.16 2007/08/28 07:19:07 tbox Exp $ -->
<!-- $Id: dnssec-signzone.docbook,v 1.2.2.12 2007/08/28 07:18:13 tbox Exp $ -->
<refentry>
<refentryinfo>
@@ -41,7 +41,6 @@
<copyright>
<year>2000</year>
<year>2001</year>
<year>2002</year>
<year>2003</year>
<holder>Internet Software Consortium.</holder>
</copyright>
@@ -58,21 +57,17 @@
<arg><option>-a</option></arg>
<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
<arg><option>-d <replaceable class="parameter">directory</replaceable></option></arg>
<arg><option>-s <replaceable class="parameter">start-time</replaceable></option></arg>
<arg><option>-e <replaceable class="parameter">end-time</replaceable></option></arg>
<arg><option>-f <replaceable class="parameter">output-file</replaceable></option></arg>
<arg><option>-g</option></arg>
<arg><option>-h</option></arg>
<arg><option>-k <replaceable class="parameter">key</replaceable></option></arg>
<arg><option>-l <replaceable class="parameter">domain</replaceable></option></arg>
<arg><option>-i <replaceable class="parameter">interval</replaceable></option></arg>
<arg><option>-n <replaceable class="parameter">nthreads</replaceable></option></arg>
<arg><option>-o <replaceable class="parameter">origin</replaceable></option></arg>
<arg><option>-p</option></arg>
<arg><option>-r <replaceable class="parameter">randomdev</replaceable></option></arg>
<arg><option>-s <replaceable class="parameter">start-time</replaceable></option></arg>
<arg><option>-t</option></arg>
<arg><option>-v <replaceable class="parameter">level</replaceable></option></arg>
<arg><option>-z</option></arg>
<arg choice="req">zonefile</arg>
<arg rep="repeat">key</arg>
</cmdsynopsis>
@@ -81,12 +76,14 @@
<refsect1>
<title>DESCRIPTION</title>
<para>
<command>dnssec-signzone</command> signs a zone. It generates
NSEC and RRSIG records and produces a signed version of the
zone. The security status of delegations from the signed zone
(that is, whether the child zones are secure or not) is
determined by the presence or absence of a
<filename>keyset</filename> file for each child zone.
<command>dnssec-signzone</command> signs a zone. It generates NXT
and SIG records and produces a signed version of the zone. If there
is a <filename>signedkey</filename> file from the zone's parent,
the parent's signatures will be incorporated into the generated
signed zone file. The security status of delegations from the
signed zone (that is, whether the child zones are secure or not) is
determined by the presence or absence of a
<filename>signedkey</filename> file for each child zone.
</para>
</refsect1>
@@ -112,58 +109,28 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-k <replaceable class="parameter">key</replaceable></term>
<listitem>
<para>
Treat specified key as a key signing key ignoring any
key flags. This option may be specified multiple times.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-l <replaceable class="parameter">domain</replaceable></term>
<listitem>
<para>
Generate a DLV set in addition to the key (DNSKEY) and DS sets.
The domain is appended to the name of the records.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-d <replaceable class="parameter">directory</replaceable></term>
<listitem>
<para>
Look for <filename>keyset</filename> files in
Look for <filename>signedkey</filename> files in
<option>directory</option> as the directory
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-g</term>
<listitem>
<para>
Generate DS records for child zones from keyset files.
Existing DS records will be removed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-s <replaceable class="parameter">start-time</replaceable></term>
<listitem>
<para>
Specify the date and time when the generated RRSIG records
Specify the date and time when the generated SIG records
become valid. This can be either an absolute or relative
time. An absolute start time is indicated by a number
in YYYYMMDDHHMMSS notation; 20000530144500 denotes
14:45:00 UTC on May 30th, 2000. A relative start time is
indicated by +N, which is N seconds from the current time.
If no <option>start-time</option> is specified, the current
time minus 1 hour (to allow for clock skew) is used.
time is used.
</para>
</listitem>
</varlistentry>
@@ -172,7 +139,7 @@
<term>-e <replaceable class="parameter">end-time</replaceable></term>
<listitem>
<para>
Specify the date and time when the generated RRSIG records
Specify the date and time when the generated SIG records
expire. As with <option>start-time</option>, an absolute
time is indicated in YYYYMMDDHHMMSS notation. A time relative
to the start time is indicated with +N, which is N seconds from
@@ -211,7 +178,7 @@
When a previously-signed zone is passed as input, records
may be resigned. The <option>interval</option> option
specifies the cycle interval as an offset from the current
time (in seconds). If a RRSIG record expires after the
time (in seconds). If a SIG record expires after the
cycle interval, it is retained. Otherwise, it is considered
to be expiring soon, and it will be replaced.
</para>
@@ -221,7 +188,7 @@
<option>end-time</option> or <option>start-time</option>
are specified, <command>dnssec-signzone</command> generates
signatures that are valid for 30 days, with a cycle
interval of 7.5 days. Therefore, if any existing RRSIG records
interval of 7.5 days. Therefore, if any existing SIG records
are due to expire in less than 7.5 days, they would be
replaced.
</para>
@@ -294,15 +261,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-z</term>
<listitem>
<para>
Ignore KSK flag on key when determining what to sign.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>zonefile</term>
<listitem>
@@ -331,31 +289,26 @@
<refsect1>
<title>EXAMPLE</title>
<para>
The following command signs the <userinput>example.com</userinput>
zone with the DSA key generated by <command>dnssec-keygen</command>
(Kexample.com.+003+17247). The zone's keys must be in the master
file (<filename>db.example.com</filename>). This invocation looks
for <filename>keyset</filename> files, in the current directory,
so that DS records can be generated from them (<command>-g</command>).
</para>
<programlisting>% dnssec-signzone -g -o example.com db.example.com \
Kexample.com.+003+17247
db.example.com.signed
%</programlisting>
<para>
In the above example, <command>dnssec-signzone</command> creates
the file <filename>db.example.com.signed</filename>. This
file should be referenced in a zone statement in a
<filename>named.conf</filename> file.
The following command signs the <userinput>example.com</userinput>
zone with the DSA key generated in the <command>dnssec-keygen</command>
man page. The zone's keys must be in the zone. If there are
<filename>signedkey</filename> files associated with this zone
or any child zones, they must be in the current directory.
<userinput>example.com</userinput>, the following command would be
issued:
</para>
<para>
This example re-signs a previously signed zone with default parameters.
The private keys are assumed to be in the current directory.
<userinput>dnssec-signzone -o example.com db.example.com Kexample.com.+003+26160</userinput>
</para>
<para>
The command would print a string of the form:
</para>
<para>
In this example, <command>dnssec-signzone</command> creates
the file <filename>db.example.com.signed</filename>. This file
should be referenced in a zone statement in a
<filename>named.conf</filename> file.
</para>
<programlisting>% cp db.example.com.signed db.example.com
% dnssec-signzone -o example.com db.example.com
db.example.com.signed
%</programlisting>
</refsect1>
<refsect1>
@@ -365,6 +318,10 @@ db.example.com.signed
<refentrytitle>dnssec-keygen</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>dnssec-signkey</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>,
<citetitle>BIND 9 Administrator Reference Manual</citetitle>,
<citetitle>RFC 2535</citetitle>.
</para>

View File

@@ -1,6 +1,6 @@
<!--
- Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2003 Internet Software Consortium.
- Copyright (C) 2000, 2001, 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
@@ -14,7 +14,7 @@
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: dnssec-signzone.html,v 1.4.2.1.4.20 2007/05/09 03:32:36 marka Exp $ -->
<!-- $Id: dnssec-signzone.html,v 1.4.2.18 2007/05/09 03:32:21 marka Exp $ -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
@@ -29,21 +29,23 @@
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p><code class="command">dnssec-signzone</code> [<code class="option">-a</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-d <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-e <em class="replaceable"><code>end-time</code></em></code>] [<code class="option">-f <em class="replaceable"><code>output-file</code></em></code>] [<code class="option">-g</code>] [<code class="option">-h</code>] [<code class="option">-k <em class="replaceable"><code>key</code></em></code>] [<code class="option">-l <em class="replaceable"><code>domain</code></em></code>] [<code class="option">-i <em class="replaceable"><code>interval</code></em></code>] [<code class="option">-n <em class="replaceable"><code>nthreads</code></em></code>] [<code class="option">-o <em class="replaceable"><code>origin</code></em></code>] [<code class="option">-p</code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-s <em class="replaceable"><code>start-time</code></em></code>] [<code class="option">-t</code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-z</code>] {zonefile} [key...]</p></div>
<div class="cmdsynopsis"><p><code class="command">dnssec-signzone</code> [<code class="option">-a</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-d <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-s <em class="replaceable"><code>start-time</code></em></code>] [<code class="option">-e <em class="replaceable"><code>end-time</code></em></code>] [<code class="option">-f <em class="replaceable"><code>output-file</code></em></code>] [<code class="option">-h</code>] [<code class="option">-i <em class="replaceable"><code>interval</code></em></code>] [<code class="option">-n <em class="replaceable"><code>nthreads</code></em></code>] [<code class="option">-o <em class="replaceable"><code>origin</code></em></code>] [<code class="option">-p</code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-t</code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] {zonefile} [key...]</p></div>
</div>
<div class="refsect1" lang="en">
<a name="id2543485"></a><h2>DESCRIPTION</h2>
<a name="id2543457"></a><h2>DESCRIPTION</h2>
<p>
<span><strong class="command">dnssec-signzone</strong></span> signs a zone. It generates
NSEC and RRSIG records and produces a signed version of the
zone. The security status of delegations from the signed zone
(that is, whether the child zones are secure or not) is
determined by the presence or absence of a
<code class="filename">keyset</code> file for each child zone.
<span><strong class="command">dnssec-signzone</strong></span> signs a zone. It generates NXT
and SIG records and produces a signed version of the zone. If there
is a <code class="filename">signedkey</code> file from the zone's parent,
the parent's signatures will be incorporated into the generated
signed zone file. The security status of delegations from the
signed zone (that is, whether the child zones are secure or not) is
determined by the presence or absence of a
<code class="filename">signedkey</code> file for each child zone.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2543501"></a><h2>OPTIONS</h2>
<a name="id2543476"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl>
<dt><span class="term">-a</span></dt>
<dd><p>
@@ -53,40 +55,25 @@
<dd><p>
Specifies the DNS class of the zone.
</p></dd>
<dt><span class="term">-k <em class="replaceable"><code>key</code></em></span></dt>
<dd><p>
Treat specified key as a key signing key ignoring any
key flags. This option may be specified multiple times.
</p></dd>
<dt><span class="term">-l <em class="replaceable"><code>domain</code></em></span></dt>
<dd><p>
Generate a DLV set in addition to the key (DNSKEY) and DS sets.
The domain is appended to the name of the records.
</p></dd>
<dt><span class="term">-d <em class="replaceable"><code>directory</code></em></span></dt>
<dd><p>
Look for <code class="filename">keyset</code> files in
Look for <code class="filename">signedkey</code> files in
<code class="option">directory</code> as the directory
</p></dd>
<dt><span class="term">-g</span></dt>
<dd><p>
Generate DS records for child zones from keyset files.
Existing DS records will be removed.
</p></dd>
<dt><span class="term">-s <em class="replaceable"><code>start-time</code></em></span></dt>
<dd><p>
Specify the date and time when the generated RRSIG records
Specify the date and time when the generated SIG records
become valid. This can be either an absolute or relative
time. An absolute start time is indicated by a number
in YYYYMMDDHHMMSS notation; 20000530144500 denotes
14:45:00 UTC on May 30th, 2000. A relative start time is
indicated by +N, which is N seconds from the current time.
If no <code class="option">start-time</code> is specified, the current
time minus 1 hour (to allow for clock skew) is used.
time is used.
</p></dd>
<dt><span class="term">-e <em class="replaceable"><code>end-time</code></em></span></dt>
<dd><p>
Specify the date and time when the generated RRSIG records
Specify the date and time when the generated SIG records
expire. As with <code class="option">start-time</code>, an absolute
time is indicated in YYYYMMDDHHMMSS notation. A time relative
to the start time is indicated with +N, which is N seconds from
@@ -111,7 +98,7 @@
When a previously-signed zone is passed as input, records
may be resigned. The <code class="option">interval</code> option
specifies the cycle interval as an offset from the current
time (in seconds). If a RRSIG record expires after the
time (in seconds). If a SIG record expires after the
cycle interval, it is retained. Otherwise, it is considered
to be expiring soon, and it will be replaced.
</p>
@@ -121,7 +108,7 @@
<code class="option">end-time</code> or <code class="option">start-time</code>
are specified, <span><strong class="command">dnssec-signzone</strong></span> generates
signatures that are valid for 30 days, with a cycle
interval of 7.5 days. Therefore, if any existing RRSIG records
interval of 7.5 days. Therefore, if any existing SIG records
are due to expire in less than 7.5 days, they would be
replaced.
</p>
@@ -162,10 +149,6 @@
<dd><p>
Sets the debugging level.
</p></dd>
<dt><span class="term">-z</span></dt>
<dd><p>
Ignore KSK flag on key when determining what to sign.
</p></dd>
<dt><span class="term">zonefile</span></dt>
<dd><p>
The file containing the zone to be signed.
@@ -181,44 +164,40 @@
</dl></div>
</div>
<div class="refsect1" lang="en">
<a name="id2543874"></a><h2>EXAMPLE</h2>
<a name="id2543858"></a><h2>EXAMPLE</h2>
<p>
The following command signs the <strong class="userinput"><code>example.com</code></strong>
zone with the DSA key generated by <span><strong class="command">dnssec-keygen</strong></span>
(Kexample.com.+003+17247). The zone's keys must be in the master
file (<code class="filename">db.example.com</code>). This invocation looks
for <code class="filename">keyset</code> files, in the current directory,
so that DS records can be generated from them (<span><strong class="command">-g</strong></span>).
</p>
<pre class="programlisting">% dnssec-signzone -g -o example.com db.example.com \
Kexample.com.+003+17247
db.example.com.signed
%</pre>
<p>
In the above example, <span><strong class="command">dnssec-signzone</strong></span> creates
the file <code class="filename">db.example.com.signed</code>. This
file should be referenced in a zone statement in a
<code class="filename">named.conf</code> file.
The following command signs the <strong class="userinput"><code>example.com</code></strong>
zone with the DSA key generated in the <span><strong class="command">dnssec-keygen</strong></span>
man page. The zone's keys must be in the zone. If there are
<code class="filename">signedkey</code> files associated with this zone
or any child zones, they must be in the current directory.
<strong class="userinput"><code>example.com</code></strong>, the following command would be
issued:
</p>
<p>
This example re-signs a previously signed zone with default parameters.
The private keys are assumed to be in the current directory.
<strong class="userinput"><code>dnssec-signzone -o example.com db.example.com Kexample.com.+003+26160</code></strong>
</p>
<p>
The command would print a string of the form:
</p>
<p>
In this example, <span><strong class="command">dnssec-signzone</strong></span> creates
the file <code class="filename">db.example.com.signed</code>. This file
should be referenced in a zone statement in a
<code class="filename">named.conf</code> file.
</p>
<pre class="programlisting">% cp db.example.com.signed db.example.com
% dnssec-signzone -o example.com db.example.com
db.example.com.signed
%</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2543993"></a><h2>SEE ALSO</h2>
<a name="id2543908"></a><h2>SEE ALSO</h2>
<p>
<span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
<span class="citerefentry"><span class="refentrytitle">dnssec-signkey</span>(8)</span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>,
<em class="citetitle">RFC 2535</em>.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2544020"></a><h2>AUTHOR</h2>
<a name="id2543944"></a><h2>AUTHOR</h2>
<p>
<span class="corpauthor">Internet Systems Consortium</span>
</p>

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssectool.c,v 1.31.2.3.2.6 2005/07/02 02:42:43 marka Exp $ */
/* $Id: dnssectool.c,v 1.31.2.7 2005/07/02 02:42:29 marka Exp $ */
#include <config.h>
@@ -23,8 +23,6 @@
#include <isc/buffer.h>
#include <isc/entropy.h>
#include <isc/list.h>
#include <isc/mem.h>
#include <isc/string.h>
#include <isc/time.h>
#include <isc/util.h>
@@ -33,7 +31,6 @@
#include <dns/log.h>
#include <dns/name.h>
#include <dns/rdatastruct.h>
#include <dns/rdataclass.h>
#include <dns/rdatatype.h>
#include <dns/result.h>
#include <dns/secalg.h>
@@ -44,15 +41,7 @@
extern int verbose;
extern const char *program;
typedef struct entropysource entropysource_t;
struct entropysource {
isc_entropysource_t *source;
isc_mem_t *mctx;
ISC_LINK(entropysource_t) link;
};
static ISC_LIST(entropysource_t) sources;
static isc_entropysource_t *source = NULL;
static fatalcallback_t *fatalcallback = NULL;
void
@@ -118,12 +107,12 @@ alg_format(const dns_secalg_t alg, char *cp, unsigned int size) {
}
void
sig_format(dns_rdata_rrsig_t *sig, char *cp, unsigned int size) {
sig_format(dns_rdata_sig_t *sig, char *cp, unsigned int size) {
char namestr[DNS_NAME_FORMATSIZE];
char algstr[DNS_NAME_FORMATSIZE];
dns_name_format(&sig->signer, namestr, sizeof(namestr));
alg_format(sig->algorithm, algstr, sizeof(algstr));
dns_name_format(&sig->signer, namestr, sizeof namestr);
alg_format(sig->algorithm, algstr, sizeof algstr);
snprintf(cp, size, "%s/%s/%d", namestr, algstr, sig->keyid);
}
@@ -132,8 +121,8 @@ key_format(const dst_key_t *key, char *cp, unsigned int size) {
char namestr[DNS_NAME_FORMATSIZE];
char algstr[DNS_NAME_FORMATSIZE];
dns_name_format(dst_key_name(key), namestr, sizeof(namestr));
alg_format((dns_secalg_t) dst_key_alg(key), algstr, sizeof(algstr));
dns_name_format(dst_key_name(key), namestr, sizeof namestr);
alg_format((dns_secalg_t) dst_key_alg(key), algstr, sizeof algstr);
snprintf(cp, size, "%s/%s/%d", namestr, algstr, dst_key_id(key));
}
@@ -211,8 +200,6 @@ cleanup_logging(isc_log_t **logp) {
void
setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx) {
isc_result_t result;
isc_entropysource_t *source = NULL;
entropysource_t *elt;
int usekeyboard = ISC_ENTROPY_KEYBOARDMAYBE;
REQUIRE(ectx != NULL);
@@ -221,7 +208,6 @@ setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx) {
result = isc_entropy_create(mctx, ectx);
if (result != ISC_R_SUCCESS)
fatal("could not create entropy object");
ISC_LIST_INIT(sources);
}
if (randomfile != NULL && strcmp(randomfile, "keyboard") == 0) {
@@ -235,32 +221,17 @@ setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx) {
if (result != ISC_R_SUCCESS)
fatal("could not initialize entropy source: %s",
isc_result_totext(result));
if (source != NULL) {
elt = isc_mem_get(mctx, sizeof(*elt));
if (elt == NULL)
fatal("out of memory");
elt->source = source;
elt->mctx = mctx;
ISC_LINK_INIT(elt, link);
ISC_LIST_APPEND(sources, elt, link);
}
}
void
cleanup_entropy(isc_entropy_t **ectx) {
entropysource_t *source;
while (!ISC_LIST_EMPTY(sources)) {
source = ISC_LIST_HEAD(sources);
ISC_LIST_UNLINK(sources, source, link);
isc_entropy_destroysource(&source->source);
isc_mem_put(source->mctx, source, sizeof(*source));
}
if (source != NULL)
isc_entropy_destroysource(&source);
isc_entropy_detach(ectx);
}
isc_stdtime_t
strtotime(const char *str, isc_int64_t now, isc_int64_t base) {
strtotime(char *str, isc_int64_t now, isc_int64_t base) {
isc_int64_t val, offset;
isc_result_t result;
char *endp;
@@ -289,19 +260,3 @@ strtotime(const char *str, isc_int64_t now, isc_int64_t base) {
return ((isc_stdtime_t) val);
}
dns_rdataclass_t
strtoclass(const char *str) {
isc_textregion_t r;
dns_rdataclass_t rdclass;
isc_result_t ret;
if (str == NULL)
return dns_rdataclass_in;
DE_CONST(str, r.base);
r.length = strlen(str);
ret = dns_rdataclass_fromtext(&rdclass, &r);
if (ret != ISC_R_SUCCESS)
fatal("unknown class %s", str);
return (rdclass);
}

View File

@@ -1,6 +1,6 @@
/*
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
* Copyright (C) 2000, 2001 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
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssectool.h,v 1.15.12.3 2004/03/08 04:04:18 marka Exp $ */
/* $Id: dnssectool.h,v 1.15.2.1 2004/03/09 06:09:16 marka Exp $ */
#ifndef DNSSECTOOL_H
#define DNSSECTOOL_H 1
@@ -48,7 +48,7 @@ alg_format(const dns_secalg_t alg, char *cp, unsigned int size);
#define ALG_FORMATSIZE 10
void
sig_format(dns_rdata_rrsig_t *sig, char *cp, unsigned int size);
sig_format(dns_rdata_sig_t *sig, char *cp, unsigned int size);
#define SIG_FORMATSIZE (DNS_NAME_FORMATSIZE + ALG_FORMATSIZE + sizeof("65535"))
void
@@ -68,9 +68,6 @@ void
cleanup_entropy(isc_entropy_t **ectx);
isc_stdtime_t
strtotime(const char *str, isc_int64_t now, isc_int64_t base);
dns_rdataclass_t
strtoclass(const char *str);
strtotime(char *str, isc_int64_t now, isc_int64_t base);
#endif /* DNSSEC_DNSSECTOOL_H */

View File

@@ -1,29 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "dighost"=".\dnssectool.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "dighost"=".\dnssectool.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -0,0 +1,103 @@
# Microsoft Developer Studio Project File - Name="makekeyset" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=makekeyset - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "makekeyset.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "makekeyset.mak" CFG="makekeyset - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "makekeyset - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "makekeyset - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "makekeyset - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "NDEBUG" /D "__STDC__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 user32.lib advapi32.lib Release/dnssectool.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /machine:I386 /out:"../../../Build/Release/dnssec-makekeyset.exe"
!ELSEIF "$(CFG)" == "makekeyset - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "_DEBUG" /D "WIN32" /D "__STDC__" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c
# SUBTRACT CPP /X /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 user32.lib advapi32.lib Debug/dnssectool.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../../Build/Debug/dnssec-makekeyset.exe" /pdbtype:sept
!ENDIF
# Begin Target
# Name "makekeyset - Win32 Release"
# Name "makekeyset - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE="..\dnssec-makekeyset.c"
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "makekeyset"=".\makekeyset.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -0,0 +1,343 @@
# Microsoft Developer Studio Generated NMAKE File, Based on makekeyset.dsp
!IF "$(CFG)" == ""
CFG=makekeyset - Win32 Debug
!MESSAGE No configuration specified. Defaulting to makekeyset - Win32 Debug.
!ENDIF
!IF "$(CFG)" != "makekeyset - Win32 Release" && "$(CFG)" != "makekeyset - Win32 Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "makekeyset.mak" CFG="makekeyset - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "makekeyset - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "makekeyset - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
!IF "$(CFG)" == "makekeyset - Win32 Release"
_VC_MANIFEST_INC=0
_VC_MANIFEST_BASENAME=__VC80
!ELSE
_VC_MANIFEST_INC=1
_VC_MANIFEST_BASENAME=__VC80.Debug
!ENDIF
####################################################
# Specifying name of temporary resource file used only in incremental builds:
!if "$(_VC_MANIFEST_INC)" == "1"
_VC_MANIFEST_AUTO_RES=$(_VC_MANIFEST_BASENAME).auto.res
!else
_VC_MANIFEST_AUTO_RES=
!endif
####################################################
# _VC_MANIFEST_EMBED_EXE - command to embed manifest in EXE:
!if "$(_VC_MANIFEST_INC)" == "1"
#MT_SPECIAL_RETURN=1090650113
#MT_SPECIAL_SWITCH=-notify_resource_update
MT_SPECIAL_RETURN=0
MT_SPECIAL_SWITCH=
_VC_MANIFEST_EMBED_EXE= \
if exist $@.manifest mt.exe -manifest $@.manifest -out:$(_VC_MANIFEST_BASENAME).auto.manifest $(MT_SPECIAL_SWITCH) & \
if "%ERRORLEVEL%" == "$(MT_SPECIAL_RETURN)" \
rc /r $(_VC_MANIFEST_BASENAME).auto.rc & \
link $** /out:$@ $(LFLAGS)
!else
_VC_MANIFEST_EMBED_EXE= \
if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;1
!endif
####################################################
# _VC_MANIFEST_EMBED_DLL - command to embed manifest in DLL:
!if "$(_VC_MANIFEST_INC)" == "1"
#MT_SPECIAL_RETURN=1090650113
#MT_SPECIAL_SWITCH=-notify_resource_update
MT_SPECIAL_RETURN=0
MT_SPECIAL_SWITCH=
_VC_MANIFEST_EMBED_EXE= \
if exist $@.manifest mt.exe -manifest $@.manifest -out:$(_VC_MANIFEST_BASENAME).auto.manifest $(MT_SPECIAL_SWITCH) & \
if "%ERRORLEVEL%" == "$(MT_SPECIAL_RETURN)" \
rc /r $(_VC_MANIFEST_BASENAME).auto.rc & \
link $** /out:$@ $(LFLAGS)
!else
_VC_MANIFEST_EMBED_EXE= \
if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;2
!endif
####################################################
# _VC_MANIFEST_CLEAN - command to clean resources files generated temporarily:
!if "$(_VC_MANIFEST_INC)" == "1"
_VC_MANIFEST_CLEAN=-del $(_VC_MANIFEST_BASENAME).auto.res \
$(_VC_MANIFEST_BASENAME).auto.rc \
$(_VC_MANIFEST_BASENAME).auto.manifest
!else
_VC_MANIFEST_CLEAN=
!endif
!IF "$(CFG)" == "makekeyset - Win32 Release"
OUTDIR=.\Release
INTDIR=.\Release
ALL : "..\..\..\Build\Release\dnssec-makekeyset.exe"
CLEAN :
-@erase "$(INTDIR)\dnssec-makekeyset.obj"
-@erase "$(INTDIR)\dnssectool.obj"
-@erase "$(INTDIR)\vc60.idb"
-@erase "..\..\..\Build\Release\dnssec-makekeyset.exe"
-@$(_VC_MANIFEST_CLEAN)
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "NDEBUG" /D "__STDC__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\makekeyset.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\makekeyset.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\dnssec-makekeyset.pdb" /machine:I386 /out:"../../../Build/Release/dnssec-makekeyset.exe"
LINK32_OBJS= \
"$(INTDIR)\dnssec-makekeyset.obj" \
"$(INTDIR)\dnssectool.obj"
"..\..\..\Build\Release\dnssec-makekeyset.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ELSEIF "$(CFG)" == "makekeyset - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
ALL : "..\..\..\Build\Debug\dnssec-makekeyset.exe" "$(OUTDIR)\makekeyset.bsc"
CLEAN :
-@erase "$(INTDIR)\dnssec-makekeyset.obj"
-@erase "$(INTDIR)\dnssec-makekeyset.sbr"
-@erase "$(INTDIR)\dnssectool.obj"
-@erase "$(INTDIR)\dnssectool.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\dnssec-makekeyset.pdb"
-@erase "$(OUTDIR)\makekeyset.bsc"
-@erase "..\..\..\Build\Debug\dnssec-makekeyset.exe"
-@erase "..\..\..\Build\Debug\dnssec-makekeyset.ilk"
-@$(_VC_MANIFEST_CLEAN)
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "_DEBUG" /D "WIN32" /D "__STDC__" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\makekeyset.bsc"
BSC32_SBRS= \
"$(INTDIR)\dnssec-makekeyset.sbr" \
"$(INTDIR)\dnssectool.sbr"
"$(OUTDIR)\makekeyset.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\dnssec-makekeyset.pdb" /debug /machine:I386 /out:"../../../Build/Debug/dnssec-makekeyset.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\dnssec-makekeyset.obj" \
"$(INTDIR)\dnssectool.obj"
"..\..\..\Build\Debug\dnssec-makekeyset.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ENDIF
!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("makekeyset.dep")
!INCLUDE "makekeyset.dep"
!ELSE
!MESSAGE Warning: cannot find "makekeyset.dep"
!ENDIF
!ENDIF
!IF "$(CFG)" == "makekeyset - Win32 Release" || "$(CFG)" == "makekeyset - Win32 Debug"
SOURCE="..\dnssec-makekeyset.c"
!IF "$(CFG)" == "makekeyset - Win32 Release"
"$(INTDIR)\dnssec-makekeyset.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "makekeyset - Win32 Debug"
"$(INTDIR)\dnssec-makekeyset.obj" "$(INTDIR)\dnssec-makekeyset.sbr" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
SOURCE=..\dnssectool.c
!IF "$(CFG)" == "makekeyset - Win32 Release"
"$(INTDIR)\dnssectool.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "makekeyset - Win32 Debug"
"$(INTDIR)\dnssectool.obj" "$(INTDIR)\dnssectool.sbr" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
!ENDIF
####################################################
# Commands to generate initial empty manifest file and the RC file
# that references it, and for generating the .res file:
$(_VC_MANIFEST_BASENAME).auto.res : $(_VC_MANIFEST_BASENAME).auto.rc
$(_VC_MANIFEST_BASENAME).auto.rc : $(_VC_MANIFEST_BASENAME).auto.manifest
type <<$@
#include <winuser.h>
1RT_MANIFEST"$(_VC_MANIFEST_BASENAME).auto.manifest"
<< KEEP
$(_VC_MANIFEST_BASENAME).auto.manifest :
type <<$@
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
</assembly>
<< KEEP
####################################################
# Commands to generate initial empty manifest file and the RC file
# that references it, and for generating the .res file:
$(_VC_MANIFEST_BASENAME).auto.res : $(_VC_MANIFEST_BASENAME).auto.rc
$(_VC_MANIFEST_BASENAME).auto.rc : $(_VC_MANIFEST_BASENAME).auto.manifest
type <<$@
#include <winuser.h>
1RT_MANIFEST"$(_VC_MANIFEST_BASENAME).auto.manifest"
<< KEEP
$(_VC_MANIFEST_BASENAME).auto.manifest :
type <<$@
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
</assembly>
<< KEEP

View File

@@ -0,0 +1,103 @@
# Microsoft Developer Studio Project File - Name="signkey" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=signkey - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "signkey.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "signkey.mak" CFG="signkey - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "signkey - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "signkey - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "signkey - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "NDEBUG" /D "__STDC__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 user32.lib advapi32.lib Release/dnssectool.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /machine:I386 /out:"../../../Build/Release/dnssec-signkey.exe"
!ELSEIF "$(CFG)" == "signkey - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "_DEBUG" /D "WIN32" /D "__STDC__" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c
# SUBTRACT CPP /X /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 user32.lib advapi32.lib Debug/dnssectool.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../../Build/Debug/dnssec-signkey.exe" /pdbtype:sept
!ENDIF
# Begin Target
# Name "signkey - Win32 Release"
# Name "signkey - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE="..\dnssec-signkey.c"
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
###############################################################################
Project: "libbind9"=.\libbind9.dsp - Package Owner=<4>
Project: "signkey"=".\signkey.dsp" - Package Owner=<4>
Package=<5>
{{{

View File

@@ -0,0 +1,342 @@
# Microsoft Developer Studio Generated NMAKE File, Based on signkey.dsp
!IF "$(CFG)" == ""
CFG=signkey - Win32 Debug
!MESSAGE No configuration specified. Defaulting to signkey - Win32 Debug.
!ENDIF
!IF "$(CFG)" != "signkey - Win32 Release" && "$(CFG)" != "signkey - Win32 Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "signkey.mak" CFG="signkey - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "signkey - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "signkey - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
!IF "$(CFG)" == "signkey - Win32 Release"
_VC_MANIFEST_INC=0
_VC_MANIFEST_BASENAME=__VC80
!ELSE
_VC_MANIFEST_INC=1
_VC_MANIFEST_BASENAME=__VC80.Debug
!ENDIF
####################################################
# Specifying name of temporary resource file used only in incremental builds:
!if "$(_VC_MANIFEST_INC)" == "1"
_VC_MANIFEST_AUTO_RES=$(_VC_MANIFEST_BASENAME).auto.res
!else
_VC_MANIFEST_AUTO_RES=
!endif
####################################################
# _VC_MANIFEST_EMBED_EXE - command to embed manifest in EXE:
!if "$(_VC_MANIFEST_INC)" == "1"
#MT_SPECIAL_RETURN=1090650113
#MT_SPECIAL_SWITCH=-notify_resource_update
MT_SPECIAL_RETURN=0
MT_SPECIAL_SWITCH=
_VC_MANIFEST_EMBED_EXE= \
if exist $@.manifest mt.exe -manifest $@.manifest -out:$(_VC_MANIFEST_BASENAME).auto.manifest $(MT_SPECIAL_SWITCH) & \
if "%ERRORLEVEL%" == "$(MT_SPECIAL_RETURN)" \
rc /r $(_VC_MANIFEST_BASENAME).auto.rc & \
link $** /out:$@ $(LFLAGS)
!else
_VC_MANIFEST_EMBED_EXE= \
if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;1
!endif
####################################################
# _VC_MANIFEST_EMBED_DLL - command to embed manifest in DLL:
!if "$(_VC_MANIFEST_INC)" == "1"
#MT_SPECIAL_RETURN=1090650113
#MT_SPECIAL_SWITCH=-notify_resource_update
MT_SPECIAL_RETURN=0
MT_SPECIAL_SWITCH=
_VC_MANIFEST_EMBED_EXE= \
if exist $@.manifest mt.exe -manifest $@.manifest -out:$(_VC_MANIFEST_BASENAME).auto.manifest $(MT_SPECIAL_SWITCH) & \
if "%ERRORLEVEL%" == "$(MT_SPECIAL_RETURN)" \
rc /r $(_VC_MANIFEST_BASENAME).auto.rc & \
link $** /out:$@ $(LFLAGS)
!else
_VC_MANIFEST_EMBED_EXE= \
if exist $@.manifest mt.exe -manifest $@.manifest -outputresource:$@;2
!endif
####################################################
# _VC_MANIFEST_CLEAN - command to clean resources files generated temporarily:
!if "$(_VC_MANIFEST_INC)" == "1"
_VC_MANIFEST_CLEAN=-del $(_VC_MANIFEST_BASENAME).auto.res \
$(_VC_MANIFEST_BASENAME).auto.rc \
$(_VC_MANIFEST_BASENAME).auto.manifest
!else
_VC_MANIFEST_CLEAN=
!endif
!IF "$(CFG)" == "signkey - Win32 Release"
OUTDIR=.\Release
INTDIR=.\Release
ALL : "..\..\..\Build\Release\dnssec-signkey.exe"
CLEAN :
-@erase "$(INTDIR)\dnssec-signkey.obj"
-@erase "$(INTDIR)\dnssectool.obj"
-@erase "$(INTDIR)\vc60.idb"
-@erase "..\..\..\Build\Release\dnssec-signkey.exe"
-@$(_VC_MANIFEST_CLEAN)
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "NDEBUG" /D "__STDC__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\signkey.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\signkey.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\dnssec-signkey.pdb" /machine:I386 /out:"../../../Build/Release/dnssec-signkey.exe"
LINK32_OBJS= \
"$(INTDIR)\dnssec-signkey.obj" \
"$(INTDIR)\dnssectool.obj"
"..\..\..\Build\Release\dnssec-signkey.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ELSEIF "$(CFG)" == "signkey - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
ALL : "..\..\..\Build\Debug\dnssec-signkey.exe" "$(OUTDIR)\signkey.bsc"
CLEAN :
-@erase "$(INTDIR)\dnssec-signkey.obj"
-@erase "$(INTDIR)\dnssec-signkey.sbr"
-@erase "$(INTDIR)\dnssectool.obj"
-@erase "$(INTDIR)\dnssectool.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\dnssec-signkey.pdb"
-@erase "$(OUTDIR)\signkey.bsc"
-@erase "..\..\..\Build\Debug\dnssec-signkey.exe"
-@erase "..\..\..\Build\Debug\dnssec-signkey.ilk"
-@$(_VC_MANIFEST_CLEAN)
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /D "_DEBUG" /D "WIN32" /D "__STDC__" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\signkey.bsc"
BSC32_SBRS= \
"$(INTDIR)\dnssec-signkey.sbr" \
"$(INTDIR)\dnssectool.sbr"
"$(OUTDIR)\signkey.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\dnssec-signkey.pdb" /debug /machine:I386 /out:"../../../Build/Debug/dnssec-signkey.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\dnssec-signkey.obj" \
"$(INTDIR)\dnssectool.obj"
"..\..\..\Build\Debug\dnssec-signkey.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
$(_VC_MANIFEST_EMBED_EXE)
!ENDIF
!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("signkey.dep")
!INCLUDE "signkey.dep"
!ELSE
!MESSAGE Warning: cannot find "signkey.dep"
!ENDIF
!ENDIF
!IF "$(CFG)" == "signkey - Win32 Release" || "$(CFG)" == "signkey - Win32 Debug"
SOURCE="..\dnssec-signkey.c"
!IF "$(CFG)" == "signkey - Win32 Release"
"$(INTDIR)\dnssec-signkey.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "signkey - Win32 Debug"
"$(INTDIR)\dnssec-signkey.obj" "$(INTDIR)\dnssec-signkey.sbr" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
SOURCE=..\dnssectool.c
!IF "$(CFG)" == "signkey - Win32 Release"
"$(INTDIR)\dnssectool.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "signkey - Win32 Debug"
"$(INTDIR)\dnssectool.obj" "$(INTDIR)\dnssectool.sbr" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
!ENDIF
####################################################
# Commands to generate initial empty manifest file and the RC file
# that references it, and for generating the .res file:
$(_VC_MANIFEST_BASENAME).auto.res : $(_VC_MANIFEST_BASENAME).auto.rc
$(_VC_MANIFEST_BASENAME).auto.rc : $(_VC_MANIFEST_BASENAME).auto.manifest
type <<$@
#include <winuser.h>
1RT_MANIFEST"$(_VC_MANIFEST_BASENAME).auto.manifest"
<< KEEP
$(_VC_MANIFEST_BASENAME).auto.manifest :
type <<$@
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
</assembly>
<< KEEP
####################################################
# Commands to generate initial empty manifest file and the RC file
# that references it, and for generating the .res file:
$(_VC_MANIFEST_BASENAME).auto.res : $(_VC_MANIFEST_BASENAME).auto.rc
$(_VC_MANIFEST_BASENAME).auto.rc : $(_VC_MANIFEST_BASENAME).auto.manifest
type <<$@
#include <winuser.h>
1RT_MANIFEST"$(_VC_MANIFEST_BASENAME).auto.manifest"
<< KEEP
$(_VC_MANIFEST_BASENAME).auto.manifest :
type <<$@
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
</assembly>
<< KEEP

View File

@@ -90,6 +90,7 @@ LINK32=link.exe
SOURCE="..\dnssec-signzone.c"
# End Source File
# End Source File
# End Group
# Begin Group "Header Files"

View File

@@ -1,7 +1,7 @@
# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2003 Internet Software Consortium.
# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) 1998-2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and/or distribute this software for any
# 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.
#
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: Makefile.in,v 1.74.12.14 2007/08/28 07:19:08 tbox Exp $
# $Id: Makefile.in,v 1.74.2.5 2004/09/06 21:42:06 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -21,7 +21,7 @@ top_srcdir = @top_srcdir@
@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
@BIND9_INCLUDES@
#
# Add database drivers here.
@@ -32,39 +32,36 @@ DBDRIVER_INCLUDES =
DBDRIVER_LIBS =
CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include \
${LWRES_INCLUDES} ${DNS_INCLUDES} ${BIND9_INCLUDES} \
${LWRES_INCLUDES} ${DNS_INCLUDES} \
${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} ${ISC_INCLUDES} \
${DBDRIVER_INCLUDES}
CDEFINES =
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_OPENSSL_LIBS@ @DNS_GSSAPI_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
ISCLIBS = ../../lib/isc/libisc.@A@
LWRESLIBS = ../../lib/lwres/liblwres.@A@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
DNSDEPLIBS = ../../lib/dns/libdns.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCDEPLIBS = ../../lib/isccc/libisccc.@A@
ISCDEPLIBS = ../../lib/isc/libisc.@A@
LWRESDEPLIBS = ../../lib/lwres/liblwres.@A@
BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
DEPLIBS = ${LWRESDEPLIBS} ${DNSDEPLIBS} ${BIND9DEPLIBS} \
DEPLIBS = ${LWRESDEPLIBS} ${DNSDEPLIBS} \
${ISCCFGDEPLIBS} ${ISCCCDEPLIBS} ${ISCDEPLIBS}
LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} \
LIBS = ${LWRESLIBS} ${DNSLIBS} \
${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} ${DBDRIVER_LIBS} @LIBS@
SUBDIRS = unix
TARGETS = named@EXEEXT@ lwresd@EXEEXT@
TARGETS = named lwresd
OBJS = aclconf.@O@ builtin.@O@ client.@O@ config.@O@ control.@O@ \
controlconf.@O@ interfacemgr.@O@ \
OBJS = aclconf.@O@ client.@O@ config.@O@ control.@O@ controlconf.@O@ interfacemgr.@O@ \
listenlist.@O@ log.@O@ logconf.@O@ main.@O@ notify.@O@ \
query.@O@ server.@O@ sortlist.@O@ \
tkeyconf.@O@ tsigconf.@O@ update.@O@ xfrout.@O@ \
@@ -75,8 +72,7 @@ OBJS = aclconf.@O@ builtin.@O@ client.@O@ config.@O@ control.@O@ \
UOBJS = unix/os.@O@
SRCS = aclconf.c builtin.c client.c config.c control.c \
controlconf.c interfacemgr.c \
SRCS = aclconf.c client.c config.c control.c controlconf.c interfacemgr.c \
listenlist.c log.c logconf.c main.c notify.c \
query.c server.c sortlist.c \
tkeyconf.c tsigconf.c update.c xfrout.c \
@@ -94,24 +90,21 @@ MANOBJS = ${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@
main.@O@: main.c
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
-DVERSION=\"${VERSION}\" \
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -DVERSION=\"${VERSION}\" \
-DNS_LOCALSTATEDIR=\"${localstatedir}\" \
-DNS_SYSCONFDIR=\"${sysconfdir}\" -c ${srcdir}/main.c
config.@O@: config.c
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
-DVERSION=\"${VERSION}\" \
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -DVERSION=\"${VERSION}\" \
-DNS_LOCALSTATEDIR=\"${localstatedir}\" \
-c ${srcdir}/config.c
named@EXEEXT@: ${OBJS} ${UOBJS} ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
${OBJS} ${UOBJS} ${LIBS}
named: ${OBJS} ${UOBJS} ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${OBJS} ${UOBJS} ${LIBS}
lwresd@EXEEXT@: named@EXEEXT@
rm -f lwresd@EXEEXT@
@LN@ named@EXEEXT@ lwresd@EXEEXT@
lwresd: named
rm -f lwresd
@LN@ named lwresd
doc man:: ${MANOBJS}
@@ -119,17 +112,16 @@ docclean manclean maintainer-clean::
rm -f ${MANOBJS}
clean distclean maintainer-clean::
rm -f ${TARGETS} ${OBJS}
rm -f ${TARGETS}
installdirs:
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man5
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
install:: named@EXEEXT@ lwresd@EXEEXT@ installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named@EXEEXT@ ${DESTDIR}${sbindir}
(cd ${DESTDIR}${sbindir}; rm -f lwresd@EXEEXT@; @LN@ named@EXEEXT@ lwresd@EXEEXT@)
install:: named lwresd installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named ${DESTDIR}${sbindir}
(cd ${DESTDIR}${sbindir}; rm -f lwresd; @LN@ named lwresd)
${INSTALL_DATA} ${srcdir}/named.8 ${DESTDIR}${mandir}/man8
${INSTALL_DATA} ${srcdir}/lwresd.8 ${DESTDIR}${mandir}/man8
${INSTALL_DATA} ${srcdir}/named.conf.5 ${DESTDIR}${mandir}/man5

View File

@@ -1,8 +1,8 @@
/*
* Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* 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.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: aclconf.c,v 1.27.12.10 2007/08/28 07:19:08 tbox Exp $ */
/* $Id: aclconf.c,v 1.27.2.5 2006/03/02 00:37:17 marka Exp $ */
#include <config.h>
@@ -23,8 +23,6 @@
#include <isc/string.h> /* Required for HP/UX (and others?) */
#include <isc/util.h>
#include <isccfg/namedconf.h>
#include <dns/acl.h>
#include <dns/fixedname.h>
#include <dns/log.h>

View File

@@ -1,228 +0,0 @@
/*
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001-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: builtin.c,v 1.4.106.4 2004/03/08 04:04:18 marka Exp $ */
/*
* The built-in "version", "hostname", "id" and "authors" databases.
*/
#include <config.h>
#include <string.h>
#include <stdio.h>
#include <isc/print.h>
#include <isc/result.h>
#include <isc/util.h>
#include <dns/sdb.h>
#include <dns/result.h>
#include <named/builtin.h>
#include <named/globals.h>
#include <named/server.h>
#include <named/os.h>
typedef struct builtin builtin_t;
static isc_result_t do_version_lookup(dns_sdblookup_t *lookup);
static isc_result_t do_hostname_lookup(dns_sdblookup_t *lookup);
static isc_result_t do_authors_lookup(dns_sdblookup_t *lookup);
static isc_result_t do_id_lookup(dns_sdblookup_t *lookup);
/*
* We can't use function pointers as the db_data directly
* because ANSI C does not guarantee that function pointers
* can safely be cast to void pointers and back.
*/
struct builtin {
isc_result_t (*do_lookup)(dns_sdblookup_t *lookup);
};
static builtin_t version_builtin = { do_version_lookup };
static builtin_t hostname_builtin = { do_hostname_lookup };
static builtin_t authors_builtin = { do_authors_lookup };
static builtin_t id_builtin = { do_id_lookup };
static dns_sdbimplementation_t *builtin_impl;
static isc_result_t
builtin_lookup(const char *zone, const char *name, void *dbdata,
dns_sdblookup_t *lookup)
{
builtin_t *b = (builtin_t *) dbdata;
UNUSED(zone);
if (strcmp(name, "@") == 0)
return (b->do_lookup(lookup));
else
return (ISC_R_NOTFOUND);
}
static isc_result_t
put_txt(dns_sdblookup_t *lookup, const char *text) {
unsigned char buf[256];
unsigned int len = strlen(text);
if (len > 255)
len = 255; /* Silently truncate */
buf[0] = len;
memcpy(&buf[1], text, len);
return (dns_sdb_putrdata(lookup, dns_rdatatype_txt, 0, buf, len + 1));
}
static isc_result_t
do_version_lookup(dns_sdblookup_t *lookup) {
if (ns_g_server->version_set) {
if (ns_g_server->version == NULL)
return (ISC_R_SUCCESS);
else
return (put_txt(lookup, ns_g_server->version));
} else {
return (put_txt(lookup, ns_g_version));
}
}
static isc_result_t
do_hostname_lookup(dns_sdblookup_t *lookup) {
if (ns_g_server->hostname_set) {
if (ns_g_server->hostname == NULL)
return (ISC_R_SUCCESS);
else
return (put_txt(lookup, ns_g_server->hostname));
} else {
char buf[256];
isc_result_t result = ns_os_gethostname(buf, sizeof(buf));
if (result != ISC_R_SUCCESS)
return (result);
return (put_txt(lookup, buf));
}
}
static isc_result_t
do_authors_lookup(dns_sdblookup_t *lookup) {
isc_result_t result;
const char **p;
static const char *authors[] = {
"Mark Andrews",
"James Brister",
"Ben Cottrell",
"Michael Graff",
"Andreas Gustafsson",
"Bob Halley",
"David Lawrence",
"Danny Mayer",
"Damien Neil",
"Matt Nelson",
"Michael Sawyer",
"Brian Wellington",
NULL
};
/*
* If a version string is specified, disable the authors.bind zone.
*/
if (ns_g_server->version_set)
return (ISC_R_SUCCESS);
for (p = authors; *p != NULL; p++) {
result = put_txt(lookup, *p);
if (result != ISC_R_SUCCESS)
return (result);
}
return (ISC_R_SUCCESS);
}
static isc_result_t
do_id_lookup(dns_sdblookup_t *lookup) {
if (ns_g_server->server_usehostname) {
char buf[256];
isc_result_t result = ns_os_gethostname(buf, sizeof(buf));
if (result != ISC_R_SUCCESS)
return (result);
return (put_txt(lookup, buf));
}
if (ns_g_server->server_id == NULL)
return (ISC_R_SUCCESS);
else
return (put_txt(lookup, ns_g_server->server_id));
}
static isc_result_t
builtin_authority(const char *zone, void *dbdata, dns_sdblookup_t *lookup) {
isc_result_t result;
UNUSED(zone);
UNUSED(dbdata);
result = dns_sdb_putsoa(lookup, "@", "hostmaster", 0);
if (result != ISC_R_SUCCESS)
return (ISC_R_FAILURE);
result = dns_sdb_putrr(lookup, "ns", 0, "@");
if (result != ISC_R_SUCCESS)
return (ISC_R_FAILURE);
return (ISC_R_SUCCESS);
}
static isc_result_t
builtin_create(const char *zone, int argc, char **argv,
void *driverdata, void **dbdata)
{
UNUSED(zone);
UNUSED(driverdata);
if (argc != 1)
return (DNS_R_SYNTAX);
if (strcmp(argv[0], "version") == 0)
*dbdata = &version_builtin;
else if (strcmp(argv[0], "hostname") == 0)
*dbdata = &hostname_builtin;
else if (strcmp(argv[0], "authors") == 0)
*dbdata = &authors_builtin;
else if (strcmp(argv[0], "id") == 0)
*dbdata = &id_builtin;
else
return (ISC_R_NOTIMPLEMENTED);
return (ISC_R_SUCCESS);
}
static dns_sdbmethods_t builtin_methods = {
builtin_lookup,
builtin_authority,
NULL, /* allnodes */
builtin_create,
NULL /* destroy */
};
isc_result_t
ns_builtin_init(void) {
RUNTIME_CHECK(dns_sdb_register("_builtin", &builtin_methods, NULL,
DNS_SDBFLAG_RELATIVEOWNER |
DNS_SDBFLAG_RELATIVERDATA,
ns_g_mctx, &builtin_impl)
== ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
}
void
ns_builtin_deinit(void) {
dns_sdb_unregister(&builtin_impl);
}

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: client.c,v 1.176.2.13.4.38 2007/08/28 07:19:08 tbox Exp $ */
/* $Id: client.c,v 1.176.2.29 2007/08/28 07:18:13 tbox Exp $ */
#include <config.h>
@@ -34,7 +34,6 @@
#include <dns/events.h>
#include <dns/message.h>
#include <dns/rcode.h>
#include <dns/resolver.h>
#include <dns/rdata.h>
#include <dns/rdataclass.h>
#include <dns/rdatalist.h>
@@ -97,7 +96,6 @@ struct ns_clientmgr {
/* Locked by lock. */
isc_boolean_t exiting;
client_list_t active; /* Active clients */
client_list_t recursing; /* Recursing clients */
client_list_t inactive; /* To be recycled */
};
@@ -153,7 +151,7 @@ struct ns_clientmgr {
#define NS_CLIENTSTATE_WORKING 4
/*
* The client object has received a request and is working
* on it. It has a view, and it may have any of a non-reset OPT,
* on it. It has a view, and it may have any of a non-reset OPT,
* recursion quota, and an outstanding write request.
*/
@@ -182,33 +180,6 @@ static void client_start(isc_task_t *task, isc_event_t *event);
static void client_request(isc_task_t *task, isc_event_t *event);
static void ns_client_dumpmessage(ns_client_t *client, const char *reason);
void
ns_client_recursing(ns_client_t *client) {
REQUIRE(NS_CLIENT_VALID(client));
LOCK(&client->manager->lock);
ISC_LIST_UNLINK(*client->list, client, link);
ISC_LIST_APPEND(client->manager->recursing, client, link);
client->list = &client->manager->recursing;
UNLOCK(&client->manager->lock);
}
void
ns_client_killoldestquery(ns_client_t *client) {
ns_client_t *oldest;
REQUIRE(NS_CLIENT_VALID(client));
LOCK(&client->manager->lock);
oldest = ISC_LIST_HEAD(client->manager->recursing);
if (oldest != NULL) {
ns_query_cancel(oldest);
ISC_LIST_UNLINK(*oldest->list, oldest, link);
ISC_LIST_APPEND(client->manager->active, oldest, link);
oldest->list = &client->manager->active;
}
UNLOCK(&client->manager->lock);
}
void
ns_client_settimeout(ns_client_t *client, unsigned int seconds) {
isc_result_t result;
@@ -291,17 +262,8 @@ exit_check(ns_client_t *client) {
}
/*
* I/O cancel is complete. Burn down all state
* related to the current request. Ensure that
* the client is on the active list and not the
* recursing list.
* related to the current request.
*/
LOCK(&client->manager->lock);
if (client->list == &client->manager->recursing) {
ISC_LIST_UNLINK(*client->list, client, link);
ISC_LIST_APPEND(client->manager->active, client, link);
client->list = &client->manager->active;
}
UNLOCK(&client->manager->lock);
ns_client_endrequest(client);
client->state = NS_CLIENTSTATE_READING;
@@ -340,9 +302,9 @@ exit_check(ns_client_t *client) {
isc_quota_detach(&client->tcpquota);
if (client->timerset) {
(void)isc_timer_reset(client->timer,
isc_timertype_inactive,
NULL, NULL, ISC_TRUE);
(void) isc_timer_reset(client->timer,
isc_timertype_inactive,
NULL, NULL, ISC_TRUE);
client->timerset = ISC_FALSE;
}
@@ -475,8 +437,7 @@ exit_check(ns_client_t *client) {
client->list = NULL;
if (manager->exiting &&
ISC_LIST_EMPTY(manager->active) &&
ISC_LIST_EMPTY(manager->inactive) &&
ISC_LIST_EMPTY(manager->recursing))
ISC_LIST_EMPTY(manager->inactive))
destroy_manager = manager;
}
/*
@@ -565,6 +526,7 @@ client_shutdown(isc_task_t *task, isc_event_t *event) {
(void)exit_check(client);
}
static void
ns_client_endrequest(ns_client_t *client) {
INSIST(client->naccepts == 0);
@@ -664,7 +626,7 @@ ns_client_next(ns_client_t *client, isc_result_t result) {
if (client->newstate > newstate)
client->newstate = newstate;
(void)exit_check(client);
(void) exit_check(client);
}
@@ -794,8 +756,7 @@ client_sendpkg(ns_client_t *client, isc_buffer_t *buffer) {
sockflags |= ISC_SOCKFLAG_NORETRY;
}
if ((client->attributes & NS_CLIENTATTR_PKTINFO) != 0 &&
(client->attributes & NS_CLIENTATTR_MULTICAST) == 0)
if ((client->attributes & NS_CLIENTATTR_PKTINFO) != 0)
pktinfo = &client->pktinfo;
else
pktinfo = NULL;
@@ -873,8 +834,6 @@ ns_client_send(ns_client_t *client) {
dns_compress_t cctx;
isc_boolean_t cleanup_cctx = ISC_FALSE;
unsigned char sendbuf[SEND_BUFFER_SIZE];
unsigned int dnssec_opts;
unsigned int preferred_glue;
REQUIRE(NS_CLIENT_VALID(client));
@@ -883,19 +842,6 @@ ns_client_send(ns_client_t *client) {
if ((client->attributes & NS_CLIENTATTR_RA) != 0)
client->message->flags |= DNS_MESSAGEFLAG_RA;
if ((client->attributes & NS_CLIENTATTR_WANTDNSSEC) != 0)
dnssec_opts = 0;
else
dnssec_opts = DNS_MESSAGERENDER_OMITDNSSEC;
preferred_glue = 0;
if (client->view != NULL) {
if (client->view->preferred_glue == dns_rdatatype_a)
preferred_glue = DNS_MESSAGERENDER_PREFER_A;
else if (client->view->preferred_glue == dns_rdatatype_aaaa)
preferred_glue = DNS_MESSAGERENDER_PREFER_AAAA;
}
/*
* XXXRTH The following doesn't deal with TCP buffer resizing.
*/
@@ -931,8 +877,7 @@ ns_client_send(ns_client_t *client) {
goto done;
result = dns_message_rendersection(client->message,
DNS_SECTION_ANSWER,
DNS_MESSAGERENDER_PARTIAL |
dnssec_opts);
DNS_MESSAGERENDER_PARTIAL);
if (result == ISC_R_NOSPACE) {
client->message->flags |= DNS_MESSAGEFLAG_TC;
goto renderend;
@@ -941,8 +886,7 @@ ns_client_send(ns_client_t *client) {
goto done;
result = dns_message_rendersection(client->message,
DNS_SECTION_AUTHORITY,
DNS_MESSAGERENDER_PARTIAL |
dnssec_opts);
DNS_MESSAGERENDER_PARTIAL);
if (result == ISC_R_NOSPACE) {
client->message->flags |= DNS_MESSAGEFLAG_TC;
goto renderend;
@@ -950,8 +894,7 @@ ns_client_send(ns_client_t *client) {
if (result != ISC_R_SUCCESS)
goto done;
result = dns_message_rendersection(client->message,
DNS_SECTION_ADDITIONAL,
preferred_glue | dnssec_opts);
DNS_SECTION_ADDITIONAL, 0);
if (result != ISC_R_SUCCESS && result != ISC_R_NOSPACE)
goto done;
renderend:
@@ -1109,9 +1052,6 @@ client_addopt(ns_client_t *client) {
dns_rdatalist_t *rdatalist;
dns_rdata_t *rdata;
isc_result_t result;
dns_view_t *view;
dns_resolver_t *resolver;
isc_uint16_t udpsize;
REQUIRE(client->opt == NULL); /* XXXRTH free old. */
@@ -1135,18 +1075,16 @@ client_addopt(ns_client_t *client) {
/*
* Set the maximum UDP buffer size.
*/
view = client->view;
resolver = (view != NULL) ? view->resolver : NULL;
if (resolver != NULL)
udpsize = dns_resolver_getudpsize(resolver);
else
udpsize = ns_g_udpsize;
rdatalist->rdclass = udpsize;
rdatalist->rdclass = RECV_BUFFER_SIZE;
/*
* Set EXTENDED-RCODE, VERSION and Z to 0.
* Set EXTENDED-RCODE, VERSION, and Z to 0.
*/
#ifdef ISC_RFC2535
rdatalist->ttl = (client->extflags & DNS_MESSAGEEXTFLAG_REPLYPRESERVE);
#else
rdatalist->ttl = 0;
#endif
/*
* No EDNS options in the default case.
@@ -1159,8 +1097,7 @@ client_addopt(ns_client_t *client) {
ISC_LIST_INIT(rdatalist->rdata);
ISC_LIST_APPEND(rdatalist->rdata, rdata, link);
RUNTIME_CHECK(dns_rdatalist_tordataset(rdatalist, rdataset)
== ISC_R_SUCCESS);
dns_rdatalist_tordataset(rdatalist, rdataset);
client->opt = rdataset;
@@ -1168,13 +1105,13 @@ client_addopt(ns_client_t *client) {
}
static inline isc_boolean_t
allowed(isc_netaddr_t *addr, dns_name_t *signer, dns_acl_t *acl) {
allowed(isc_netaddr_t *addr, dns_acl_t *acl) {
int match;
isc_result_t result;
if (acl == NULL)
return (ISC_TRUE);
result = dns_acl_match(addr, signer, acl, &ns_g_server->aclenv,
result = dns_acl_match(addr, NULL, acl, &ns_g_server->aclenv,
&match, NULL);
if (result == ISC_R_SUCCESS && match > 0)
return (ISC_TRUE);
@@ -1190,7 +1127,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
ns_client_t *client;
isc_socketevent_t *sevent;
isc_result_t result;
isc_result_t sigresult = ISC_R_SUCCESS;
isc_result_t sigresult;
isc_buffer_t *buffer;
isc_buffer_t tbuffer;
dns_view_t *view;
@@ -1208,6 +1145,8 @@ client_request(isc_task_t *task, isc_event_t *event) {
REQUIRE(NS_CLIENT_VALID(client));
REQUIRE(task == client->task);
UNUSED(task);
INSIST(client->recursionquota == NULL);
INSIST(client->state ==
@@ -1251,7 +1190,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
goto cleanup;
client->state = client->newstate = NS_CLIENTSTATE_WORKING;
isc_task_getcurrenttime(task, &client->requesttime);
isc_stdtime_get(&client->requesttime);
client->now = client->requesttime;
if (result != ISC_R_SUCCESS) {
@@ -1309,14 +1248,10 @@ client_request(isc_task_t *task, isc_event_t *event) {
}
}
/*
* Silently drop multicast requests for the present.
* XXXMPA look at when/if mDNS spec stabilizes.
*/
if ((client->attributes & NS_CLIENTATTR_MULTICAST) != 0) {
ns_client_log(client, NS_LOGCATEGORY_CLIENT,
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(2),
"dropping multicast request");
"multicast request");
ns_client_next(client, DNS_R_REFUSED);
goto cleanup;
}
@@ -1383,10 +1318,6 @@ client_request(isc_task_t *task, isc_event_t *event) {
client->message->rcode = dns_rcode_noerror;
/* RFC1123 section 6.1.3.2 */
if ((client->attributes & NS_CLIENTATTR_MULTICAST) != 0)
client->message->flags &= ~DNS_MESSAGEFLAG_RD;
/*
* Deal with EDNS.
*/
@@ -1443,19 +1374,12 @@ client_request(isc_task_t *task, isc_event_t *event) {
}
/*
* Determine the destination address. If the receiving interface is
* bound to a specific address, we simply use it regardless of the
* address family. All IPv4 queries should fall into this case.
* Otherwise, if this is a TCP query, get the address from the
* receiving socket (this needs a system call and can be heavy).
* For IPv6 UDP queries, we get this from the pktinfo structure (if
* supported).
* If all the attempts fail (this can happen due to memory shortage,
* etc), we regard this as an error for safety.
* Determine the destination address. For TCP/IPv6, we get this from
* the receiving socket. For UDP/IPv6, we get it from the pktinfo
* structure (if supported). For IPv4, we have to do with
* the address of the interface where the request was received.
*/
if ((client->interface->flags & NS_INTERFACEFLAG_ANYADDR) == 0)
isc_netaddr_fromsockaddr(&destaddr, &client->interface->addr);
else {
if (client->interface->addr.type.sa.sa_family == AF_INET6) {
result = ISC_R_FAILURE;
if (TCP_CLIENT(client)) {
@@ -1468,24 +1392,8 @@ client_request(isc_task_t *task, isc_event_t *event) {
&destsockaddr);
}
if (result != ISC_R_SUCCESS &&
client->interface->addr.type.sa.sa_family == AF_INET6 &&
(client->attributes & NS_CLIENTATTR_PKTINFO) != 0) {
isc_uint32_t zone = 0;
/*
* XXXJT technically, we should convert the receiving
* interface ID to a proper scope zone ID. However,
* due to the fact there is no standard API for this,
* we only handle link-local addresses and use the
* interface index as link ID. Despite the assumption,
* it should cover most typical cases.
*/
if (IN6_IS_ADDR_LINKLOCAL(&client->pktinfo.ipi6_addr))
zone = (isc_uint32_t)client->pktinfo.ipi6_ifindex;
isc_netaddr_fromin6(&destaddr,
&client->pktinfo.ipi6_addr);
isc_netaddr_setzone(&destaddr, zone);
isc_netaddr_fromin6(&destaddr, &client->pktinfo.ipi6_addr);
result = ISC_R_SUCCESS;
}
if (result != ISC_R_SUCCESS) {
@@ -1496,6 +1404,8 @@ client_request(isc_task_t *task, isc_event_t *event) {
ns_client_next(client, ISC_R_SUCCESS);
goto cleanup;
}
} else {
isc_netaddr_fromsockaddr(&destaddr, &client->interface->addr);
}
/*
@@ -1507,16 +1417,10 @@ client_request(isc_task_t *task, isc_event_t *event) {
if (client->message->rdclass == view->rdclass ||
client->message->rdclass == dns_rdataclass_any)
{
dns_name_t *tsig = NULL;
sigresult = dns_message_rechecksig(client->message,
view);
if (sigresult == ISC_R_SUCCESS)
tsig = client->message->tsigname;
if (allowed(&netaddr, tsig, view->matchclients) &&
allowed(&destaddr, tsig, view->matchdestinations) &&
!((client->message->flags & DNS_MESSAGEFLAG_RD)
== 0 && view->matchrecursiveonly))
if (allowed(&netaddr, view->matchclients) &&
allowed(&destaddr, view->matchdestinations) &&
!((flags & DNS_MESSAGEFLAG_RD) == 0 &&
view->matchrecursiveonly))
{
dns_view_attach(view, &client->view);
break;
@@ -1534,9 +1438,6 @@ client_request(isc_task_t *task, isc_event_t *event) {
*/
isc_buffer_t b;
isc_region_t *r;
dns_message_resetsig(client->message);
r = dns_message_getrawmessage(client->message);
isc_buffer_init(&b, r->base, r->length);
isc_buffer_add(&b, r->length);
@@ -1562,6 +1463,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
* not. We do not log the lack of a signature unless we are
* debugging.
*/
sigresult = dns_message_checksig(client->message, client->view);
client->signer = NULL;
dns_name_init(&client->signername, NULL);
result = dns_message_signer(client->message, &client->signername);
@@ -1579,37 +1481,11 @@ client_request(isc_task_t *task, isc_event_t *event) {
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3),
"request is signed by a nonauthoritative key");
} else {
char tsigrcode[64];
isc_buffer_t b;
dns_name_t *name = NULL;
dns_rcode_t status;
isc_result_t tresult;
/* There is a signature, but it is bad. */
if (dns_message_gettsig(client->message, &name) != NULL) {
char namebuf[DNS_NAME_FORMATSIZE];
dns_name_format(name, namebuf, sizeof(namebuf));
status = client->message->tsigstatus;
isc_buffer_init(&b, tsigrcode, sizeof(tsigrcode) - 1);
tresult = dns_tsigrcode_totext(status, &b);
INSIST(tresult == ISC_R_SUCCESS);
tsigrcode[isc_buffer_usedlength(&b)] = '\0';
ns_client_log(client, DNS_LOGCATEGORY_SECURITY,
NS_LOGMODULE_CLIENT, ISC_LOG_ERROR,
"request has invalid signature: "
"TSIG %s: %s (%s)", namebuf,
isc_result_totext(result), tsigrcode);
} else {
status = client->message->sig0status;
isc_buffer_init(&b, tsigrcode, sizeof(tsigrcode) - 1);
tresult = dns_tsigrcode_totext(status, &b);
INSIST(tresult == ISC_R_SUCCESS);
tsigrcode[isc_buffer_usedlength(&b)] = '\0';
ns_client_log(client, DNS_LOGCATEGORY_SECURITY,
NS_LOGMODULE_CLIENT, ISC_LOG_ERROR,
"request has invalid signature: %s (%s)",
isc_result_totext(result), tsigrcode);
}
ns_client_log(client, DNS_LOGCATEGORY_SECURITY,
NS_LOGMODULE_CLIENT, ISC_LOG_ERROR,
"request has invalid signature: %s",
isc_result_totext(result));
/*
* Accept update messages signed by unknown keys so that
* update forwarding works transparently through slaves
@@ -1626,14 +1502,15 @@ client_request(isc_task_t *task, isc_event_t *event) {
* Decide whether recursive service is available to this client.
* We do this here rather than in the query code so that we can
* set the RA bit correctly on all kinds of responses, not just
* responses to ordinary queries. Note if you can't query the
* cache there is no point in setting RA.
* responses to ordinary queries.
*/
ra = ISC_FALSE;
if (client->view->resolver != NULL &&
client->view->recursion == ISC_TRUE &&
ns_client_checkaclsilent(client, client->view->recursionacl,
ISC_TRUE) == ISC_R_SUCCESS &&
/* XXX this will log too much too early */
ns_client_checkacl(client, "recursion available:",
client->view->recursionacl,
ISC_TRUE, ISC_LOG_DEBUG(1)) == ISC_R_SUCCESS &&
ns_client_checkaclsilent(client, client->view->queryacl,
ISC_TRUE) == ISC_R_SUCCESS)
ra = ISC_TRUE;
@@ -1641,10 +1518,6 @@ client_request(isc_task_t *task, isc_event_t *event) {
if (ra == ISC_TRUE)
client->attributes |= NS_CLIENTATTR_RA;
ns_client_log(client, DNS_LOGCATEGORY_SECURITY, NS_LOGMODULE_CLIENT,
ISC_LOG_DEBUG(3), ra ? "recursion available" :
"recursion not available");
/*
* Dispatch the request.
*/
@@ -1702,7 +1575,7 @@ client_timeout(isc_task_t *task, isc_event_t *event) {
if (client->newstate > NS_CLIENTSTATE_READY)
client->newstate = NS_CLIENTSTATE_READY;
(void)exit_check(client);
(void) exit_check(client);
}
static isc_result_t
@@ -1720,7 +1593,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
REQUIRE(clientp != NULL && *clientp == NULL);
client = isc_mem_get(manager->mctx, sizeof(*client));
client = isc_mem_get(manager->mctx, sizeof *client);
if (client == NULL)
return (ISC_R_NOMEMORY);
@@ -1860,7 +1733,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp) {
isc_task_detach(&client->task);
cleanup_client:
isc_mem_put(manager->mctx, client, sizeof(*client));
isc_mem_put(manager->mctx, client, sizeof *client);
return (result);
}
@@ -1923,8 +1796,8 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
client->state = NS_CLIENTSTATE_READING;
INSIST(client->recursionquota == NULL);
(void)isc_socket_getpeername(client->tcpsocket,
&client->peeraddr);
(void) isc_socket_getpeername(client->tcpsocket,
&client->peeraddr);
client->peeraddr_valid = ISC_TRUE;
ns_client_log(client, NS_LOGCATEGORY_CLIENT,
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3),
@@ -2044,7 +1917,7 @@ client_udprecv(ns_client_t *client) {
isc_result_totext(result));
/*
* This cannot happen in the current implementation, since
* isc_socket_recv2() cannot fail if flags == 0.
* isc_socket_recv2() cannot fail if flags == 0A
*
* If this does fail, we just go idle.
*/
@@ -2076,7 +1949,7 @@ ns_client_detach(ns_client_t **clientp) {
ns_client_log(client, NS_LOGCATEGORY_CLIENT,
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(10),
"ns_client_detach: ref = %d", client->references);
(void)exit_check(client);
(void) exit_check(client);
}
isc_boolean_t
@@ -2115,13 +1988,12 @@ static void
clientmgr_destroy(ns_clientmgr_t *manager) {
REQUIRE(ISC_LIST_EMPTY(manager->active));
REQUIRE(ISC_LIST_EMPTY(manager->inactive));
REQUIRE(ISC_LIST_EMPTY(manager->recursing));
MTRACE("clientmgr_destroy");
DESTROYLOCK(&manager->lock);
manager->magic = 0;
isc_mem_put(manager->mctx, manager, sizeof(*manager));
isc_mem_put(manager->mctx, manager, sizeof *manager);
}
isc_result_t
@@ -2131,7 +2003,7 @@ ns_clientmgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
ns_clientmgr_t *manager;
isc_result_t result;
manager = isc_mem_get(mctx, sizeof(*manager));
manager = isc_mem_get(mctx, sizeof *manager);
if (manager == NULL)
return (ISC_R_NOMEMORY);
@@ -2145,7 +2017,6 @@ ns_clientmgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
manager->exiting = ISC_FALSE;
ISC_LIST_INIT(manager->active);
ISC_LIST_INIT(manager->inactive);
ISC_LIST_INIT(manager->recursing);
manager->magic = MANAGER_MAGIC;
MTRACE("create");
@@ -2155,7 +2026,7 @@ ns_clientmgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
return (ISC_R_SUCCESS);
cleanup_manager:
isc_mem_put(manager->mctx, manager, sizeof(*manager));
isc_mem_put(manager->mctx, manager, sizeof *manager);
return (result);
}
@@ -2176,11 +2047,6 @@ ns_clientmgr_destroy(ns_clientmgr_t **managerp) {
manager->exiting = ISC_TRUE;
for (client = ISC_LIST_HEAD(manager->recursing);
client != NULL;
client = ISC_LIST_NEXT(client, link))
isc_task_shutdown(client->task);
for (client = ISC_LIST_HEAD(manager->active);
client != NULL;
client = ISC_LIST_NEXT(client, link))
@@ -2192,8 +2058,7 @@ ns_clientmgr_destroy(ns_clientmgr_t **managerp) {
isc_task_shutdown(client->task);
if (ISC_LIST_EMPTY(manager->active) &&
ISC_LIST_EMPTY(manager->inactive) &&
ISC_LIST_EMPTY(manager->recursing))
ISC_LIST_EMPTY(manager->inactive))
need_destroy = ISC_TRUE;
UNLOCK(&manager->lock);
@@ -2346,25 +2211,23 @@ ns_client_name(ns_client_t *client, char *peerbuf, size_t len) {
snprintf(peerbuf, len, "@%p", client);
}
void
static void
ns_client_logv(ns_client_t *client, isc_logcategory_t *category,
isc_logmodule_t *module, int level, const char *fmt, va_list ap)
ISC_FORMAT_PRINTF(5, 0);
static void
ns_client_logv(ns_client_t *client, isc_logcategory_t *category,
isc_logmodule_t *module, int level, const char *fmt, va_list ap)
{
char msgbuf[2048];
char peerbuf[ISC_SOCKADDR_FORMATSIZE];
const char *name = "";
const char *sep = "";
vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap);
ns_client_name(client, peerbuf, sizeof(peerbuf));
if (client->view != NULL && strcmp(client->view->name, "_bind") != 0 &&
strcmp(client->view->name, "_default") != 0) {
name = client->view->name;
sep = ": view ";
}
ns_client_name(client, peerbuf, sizeof peerbuf);
isc_log_write(ns_g_lctx, category, module, level,
"client %s%s%s: %s", peerbuf, sep, name, msgbuf);
"client %s: %s", peerbuf, msgbuf);
}
void
@@ -2382,18 +2245,15 @@ ns_client_log(ns_client_t *client, isc_logcategory_t *category,
}
void
ns_client_aclmsg(const char *msg, dns_name_t *name, dns_rdatatype_t type,
dns_rdataclass_t rdclass, char *buf, size_t len)
ns_client_aclmsg(const char *msg, dns_name_t *name, dns_rdataclass_t rdclass,
char *buf, size_t len)
{
char namebuf[DNS_NAME_FORMATSIZE];
char typebuf[DNS_RDATATYPE_FORMATSIZE];
char classbuf[DNS_RDATACLASS_FORMATSIZE];
dns_name_format(name, namebuf, sizeof(namebuf));
dns_rdatatype_format(type, typebuf, sizeof(typebuf));
dns_rdataclass_format(rdclass, classbuf, sizeof(classbuf));
(void)snprintf(buf, len, "%s '%s/%s/%s'", msg, namebuf, typebuf,
classbuf);
(void)snprintf(buf, len, "%s '%s/%s'", msg, namebuf, classbuf);
}
static void
@@ -2430,51 +2290,3 @@ ns_client_dumpmessage(ns_client_t *client, const char *reason) {
if (buf != NULL)
isc_mem_put(client->mctx, buf, len);
}
void
ns_client_dumprecursing(FILE *f, ns_clientmgr_t *manager) {
ns_client_t *client;
char namebuf[DNS_NAME_FORMATSIZE];
char peerbuf[ISC_SOCKADDR_FORMATSIZE];
const char *name;
const char *sep;
REQUIRE(VALID_MANAGER(manager));
LOCK(&manager->lock);
client = ISC_LIST_HEAD(manager->recursing);
while (client != NULL) {
ns_client_name(client, peerbuf, sizeof(peerbuf));
if (client->view != NULL &&
strcmp(client->view->name, "_bind") != 0 &&
strcmp(client->view->name, "_default") != 0) {
name = client->view->name;
sep = ": view ";
} else {
name = "";
sep = "";
}
dns_name_format(client->query.qname, namebuf, sizeof(namebuf));
fprintf(f, "; client %s%s%s: '%s' requesttime %d\n",
peerbuf, sep, name, namebuf, client->requesttime);
client = ISC_LIST_NEXT(client, link);
}
UNLOCK(&manager->lock);
}
void
ns_client_qnamereplace(ns_client_t *client, dns_name_t *name) {
if (client->manager != NULL)
LOCK(&client->manager->lock);
if (client->query.restarts > 0) {
/*
* client->query.qname was dynamically allocated.
*/
dns_message_puttempname(client->message,
&client->query.qname);
}
client->query.qname = name;
if (client->manager != NULL)
UNLOCK(&client->manager->lock);
}

View File

@@ -1,8 +1,8 @@
/*
* Copyright (C) 2004, 2006, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001-2003 Internet Software Consortium.
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001, 2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* 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.
*
@@ -15,11 +15,12 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: config.c,v 1.11.2.4.8.36 2007/09/13 05:18:08 each Exp $ */
/* $Id: config.c,v 1.11.2.9 2006/03/01 01:34:04 marka Exp $ */
#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <isc/buffer.h>
#include <isc/log.h>
@@ -27,15 +28,13 @@
#include <isc/region.h>
#include <isc/result.h>
#include <isc/sockaddr.h>
#include <isc/string.h>
#include <isc/util.h>
#include <isccfg/namedconf.h>
#include <isccfg/cfg.h>
#include <dns/fixedname.h>
#include <dns/name.h>
#include <dns/rdataclass.h>
#include <dns/rdatatype.h>
#include <dns/tsig.h>
#include <dns/zone.h>
@@ -67,7 +66,6 @@ options {\n\
# named-xfer <obsolete>;\n\
# pid-file \"" NS_LOCALSTATEDIR "/named.pid\"; /* or /lwresd.pid */\n\
port 53;\n\
recursing-file \"named.recursing\";\n\
"
#ifdef PATH_RANDOMDEV
"\
@@ -79,11 +77,9 @@ options {\n\
rrset-order {order cyclic;};\n\
serial-queries 20;\n\
serial-query-rate 20;\n\
server-id none;\n\
statistics-file \"named.stats\";\n\
statistics-interval 60;\n\
tcp-clients 100;\n\
tcp-listen-queue 3;\n\
# tkey-dhkey <none>\n\
# tkey-gssapi-credential <none>\n\
# tkey-domain <none>\n\
@@ -93,13 +89,13 @@ options {\n\
treat-cr-as-space true;\n\
use-id-pool true;\n\
use-ixfr true;\n\
edns-udp-size 4096;\n\
version \""VERSION"\";\n\
\n\
/* view */\n\
allow-notify {none;};\n\
allow-update-forwarding {none;};\n\
allow-recursion {any;};\n\
# allow-v6-synthesis <obsolete>;\n\
allow-v6-synthesis {none;};\n\
# sortlist <none>\n\
# topology <none>\n\
auth-nxdomain false;\n\
@@ -122,13 +118,11 @@ options {\n\
max-cache-ttl 604800; /* 1 week */\n\
transfer-format many-answers;\n\
max-cache-size 0;\n\
check-names master fail;\n\
check-names slave warn;\n\
check-names master ignore;\n\
check-names slave ignore;\n\
check-names response ignore;\n\
dnssec-enable no; /* Make yes for 9.4. */ \n\
"
" /* zone */\n\
\n\
/* zone */\n\
allow-query {any;};\n\
allow-transfer {any;};\n\
notify yes;\n\
@@ -140,8 +134,6 @@ options {\n\
# max-ixfr-log-size <obsolete>\n\
transfer-source *;\n\
transfer-source-v6 *;\n\
alt-transfer-source *;\n\
alt-transfer-source-v6 *;\n\
max-transfer-time-in 120;\n\
max-transfer-time-out 120;\n\
max-transfer-idle-in 60;\n\
@@ -150,41 +142,9 @@ options {\n\
min-retry-time 500;\n\
max-refresh-time 2419200; /* 4 weeks */\n\
min-refresh-time 300;\n\
multi-master no;\n\
sig-validity-interval 30; /* days */\n\
zone-statistics false;\n\
max-journal-size unlimited;\n\
ixfr-from-differences false;\n\
};\n\
"
"#\n\
# Zones in the \"_bind\" view are NOT counted in the count of zones.\n\
#\n\
view \"_bind\" chaos {\n\
recursion no;\n\
notify no;\n\
\n\
zone \"version.bind\" chaos {\n\
type master;\n\
database \"_builtin version\";\n\
};\n\
\n\
zone \"hostname.bind\" chaos {\n\
type master;\n\
database \"_builtin hostname\";\n\
};\n\
\n\
zone \"authors.bind\" chaos {\n\
type master;\n\
database \"_builtin authors\";\n\
};\n\
zone \"id.server\" chaos {\n\
type master;\n\
database \"_builtin id\";\n\
};\n\
};\n\
";
};";
isc_result_t
ns_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf) {
@@ -196,10 +156,10 @@ ns_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf) {
}
isc_result_t
ns_config_get(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
ns_config_get(const cfg_obj_t **maps, const char* name, const cfg_obj_t **obj) {
int i;
for (i = 0;; i++) {
for (i = 0; ; i++) {
if (maps[i] == NULL)
return (ISC_R_NOTFOUND);
if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS)
@@ -207,43 +167,6 @@ ns_config_get(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
}
}
isc_result_t
ns_checknames_get(const cfg_obj_t **maps, const char *which,
const cfg_obj_t **obj)
{
const cfg_listelt_t *element;
const cfg_obj_t *checknames;
const cfg_obj_t *type;
const cfg_obj_t *value;
int i;
for (i = 0;; i++) {
if (maps[i] == NULL)
return (ISC_R_NOTFOUND);
checknames = NULL;
if (cfg_map_get(maps[i], "check-names", &checknames) == ISC_R_SUCCESS) {
/*
* Zone map entry is not a list.
*/
if (checknames != NULL && !cfg_obj_islist(checknames)) {
*obj = checknames;
return (ISC_R_SUCCESS);
}
for (element = cfg_list_first(checknames);
element != NULL;
element = cfg_list_next(element)) {
value = cfg_listelt_value(element);
type = cfg_tuple_get(value, "type");
if (strcasecmp(cfg_obj_asstring(type), which) == 0) {
*obj = cfg_tuple_get(value, "mode");
return (ISC_R_SUCCESS);
}
}
}
}
}
int
ns_config_listcount(const cfg_obj_t *list) {
const cfg_listelt_t *e;
@@ -276,27 +199,6 @@ ns_config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
return (result);
}
isc_result_t
ns_config_gettype(const cfg_obj_t *typeobj, dns_rdatatype_t deftype,
dns_rdatatype_t *typep) {
const char *str;
isc_textregion_t r;
isc_result_t result;
if (!cfg_obj_isstring(typeobj)) {
*typep = deftype;
return (ISC_R_SUCCESS);
}
str = cfg_obj_asstring(typeobj);
DE_CONST(str, r.base);
r.length = strlen(str);
result = dns_rdatatype_fromtext(typep, &r);
if (result != ISC_R_SUCCESS)
cfg_obj_log(typeobj, ns_g_lctx, ISC_LOG_ERROR,
"unknown type '%s'", str);
return (result);
}
dns_zonetype_t
ns_config_getzonetype(const cfg_obj_t *zonetypeobj) {
dns_zonetype_t ztype = dns_zone_none;
@@ -328,7 +230,6 @@ ns_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
isc_result_t result;
INSIST(addrsp != NULL && *addrsp == NULL);
INSIST(countp != NULL);
addrlist = cfg_tuple_get(list, "addresses");
count = ns_config_listcount(addrlist);
@@ -381,42 +282,12 @@ ns_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
*addrsp = NULL;
}
static isc_result_t
get_masters_def(const cfg_obj_t *cctx, const char *name,
const cfg_obj_t **ret)
{
isc_result_t result;
const cfg_obj_t *masters = NULL;
const cfg_listelt_t *elt;
result = cfg_map_get(cctx, "masters", &masters);
if (result != ISC_R_SUCCESS)
return (result);
for (elt = cfg_list_first(masters);
elt != NULL;
elt = cfg_list_next(elt)) {
const cfg_obj_t *list;
const char *listname;
list = cfg_listelt_value(elt);
listname = cfg_obj_asstring(cfg_tuple_get(list, "name"));
if (strcasecmp(listname, name) == 0) {
*ret = list;
return (ISC_R_SUCCESS);
}
}
return (ISC_R_NOTFOUND);
}
isc_result_t
ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
isc_mem_t *mctx, isc_sockaddr_t **addrsp,
dns_name_t ***keysp, isc_uint32_t *countp)
{
isc_uint32_t addrcount = 0, keycount = 0, i = 0;
isc_uint32_t listcount = 0, l = 0, j;
isc_uint32_t stackcount = 0, pushed = 0;
isc_uint32_t count, i = 0;
isc_result_t result;
const cfg_listelt_t *element;
const cfg_obj_t *addrlist;
@@ -425,18 +296,12 @@ ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
dns_fixedname_t fname;
isc_sockaddr_t *addrs = NULL;
dns_name_t **keys = NULL;
const char **lists = NULL;
struct {
const cfg_listelt_t *element;
in_port_t port;
} *stack = NULL;
REQUIRE(addrsp != NULL && *addrsp == NULL);
REQUIRE(keysp != NULL && *keysp == NULL);
REQUIRE(countp != NULL);
INSIST(addrsp != NULL && *addrsp == NULL);
newlist:
addrlist = cfg_tuple_get(list, "addresses");
count = ns_config_listcount(addrlist);
portobj = cfg_tuple_get(list, "port");
if (cfg_obj_isuint32(portobj)) {
isc_uint32_t val = cfg_obj_asuint32(portobj);
@@ -455,126 +320,35 @@ ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
result = ISC_R_NOMEMORY;
element = cfg_list_first(addrlist);
resume:
for ( ;
addrs = isc_mem_get(mctx, count * sizeof(isc_sockaddr_t));
if (addrs == NULL)
goto cleanup;
keys = isc_mem_get(mctx, count * sizeof(dns_name_t *));
if (keys == NULL)
goto cleanup;
for (element = cfg_list_first(addrlist);
element != NULL;
element = cfg_list_next(element))
element = cfg_list_next(element), i++)
{
const cfg_obj_t *addr;
const cfg_obj_t *key;
const char *keystr;
isc_buffer_t b;
addr = cfg_tuple_get(cfg_listelt_value(element),
"masterselement");
INSIST(i < count);
addr = cfg_tuple_get(cfg_listelt_value(element), "sockaddr");
key = cfg_tuple_get(cfg_listelt_value(element), "key");
if (!cfg_obj_issockaddr(addr)) {
const char *listname = cfg_obj_asstring(addr);
isc_result_t tresult;
/* Grow lists? */
if (listcount == l) {
void * new;
isc_uint32_t newlen = listcount + 16;
size_t newsize, oldsize;
newsize = newlen * sizeof(*lists);
oldsize = listcount * sizeof(*lists);
new = isc_mem_get(mctx, newsize);
if (new == NULL)
goto cleanup;
if (listcount != 0) {
memcpy(new, lists, oldsize);
isc_mem_put(mctx, lists, oldsize);
}
lists = new;
listcount = newlen;
}
/* Seen? */
for (j = 0; j < l; j++)
if (strcasecmp(lists[j], listname) == 0)
break;
if (j < l)
continue;
tresult = get_masters_def(config, listname, &list);
if (tresult == ISC_R_NOTFOUND) {
cfg_obj_log(addr, ns_g_lctx, ISC_LOG_ERROR,
"masters \"%s\" not found", listname);
result = tresult;
goto cleanup;
}
if (tresult != ISC_R_SUCCESS)
goto cleanup;
lists[l++] = listname;
/* Grow stack? */
if (stackcount == pushed) {
void * new;
isc_uint32_t newlen = stackcount + 16;
size_t newsize, oldsize;
newsize = newlen * sizeof(*stack);
oldsize = stackcount * sizeof(*stack);
new = isc_mem_get(mctx, newsize);
if (new == NULL)
goto cleanup;
if (stackcount != 0) {
memcpy(new, stack, oldsize);
isc_mem_put(mctx, stack, oldsize);
}
stack = new;
stackcount = newlen;
}
/*
* We want to resume processing this list on the
* next element.
*/
stack[pushed].element = cfg_list_next(element);
stack[pushed].port = port;
pushed++;
goto newlist;
}
if (i == addrcount) {
void * new;
isc_uint32_t newlen = addrcount + 16;
size_t newsize, oldsize;
newsize = newlen * sizeof(isc_sockaddr_t);
oldsize = addrcount * sizeof(isc_sockaddr_t);
new = isc_mem_get(mctx, newsize);
if (new == NULL)
goto cleanup;
if (addrcount != 0) {
memcpy(new, addrs, oldsize);
isc_mem_put(mctx, addrs, oldsize);
}
addrs = new;
addrcount = newlen;
newsize = newlen * sizeof(dns_name_t *);
oldsize = keycount * sizeof(dns_name_t *);
new = isc_mem_get(mctx, newsize);
if (new == NULL)
goto cleanup;
if (keycount != 0) {
memcpy(new, keys, oldsize);
isc_mem_put(mctx, keys, oldsize);
}
keys = new;
keycount = newlen;
}
addrs[i] = *cfg_obj_assockaddr(addr);
if (isc_sockaddr_getport(&addrs[i]) == 0)
isc_sockaddr_setport(&addrs[i], port);
keys[i] = NULL;
if (!cfg_obj_isstring(key)) {
i++;
if (!cfg_obj_isstring(key))
continue;
}
keys[i] = isc_mem_get(mctx, sizeof(dns_name_t));
if (keys[i] == NULL)
goto cleanup;
@@ -592,75 +366,29 @@ ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
keys[i]);
if (result != ISC_R_SUCCESS)
goto cleanup;
i++;
}
if (pushed != 0) {
pushed--;
element = stack[pushed].element;
port = stack[pushed].port;
goto resume;
}
if (i < addrcount) {
void * new;
size_t newsize, oldsize;
newsize = i * sizeof(isc_sockaddr_t);
oldsize = addrcount * sizeof(isc_sockaddr_t);
if (i != 0) {
new = isc_mem_get(mctx, newsize);
if (new == NULL)
goto cleanup;
memcpy(new, addrs, newsize);
} else
new = NULL;
isc_mem_put(mctx, addrs, oldsize);
addrs = new;
addrcount = i;
newsize = i * sizeof(dns_name_t *);
oldsize = keycount * sizeof(dns_name_t *);
if (i != 0) {
new = isc_mem_get(mctx, newsize);
if (new == NULL)
goto cleanup;
memcpy(new, keys, newsize);
} else
new = NULL;
isc_mem_put(mctx, keys, oldsize);
keys = new;
keycount = i;
}
if (lists != NULL)
isc_mem_put(mctx, lists, listcount * sizeof(*lists));
if (stack != NULL)
isc_mem_put(mctx, stack, stackcount * sizeof(*stack));
INSIST(keycount == addrcount);
INSIST(i == count);
*addrsp = addrs;
*keysp = keys;
*countp = addrcount;
*countp = count;
return (ISC_R_SUCCESS);
cleanup:
if (addrs != NULL)
isc_mem_put(mctx, addrs, addrcount * sizeof(isc_sockaddr_t));
isc_mem_put(mctx, addrs, count * sizeof(isc_sockaddr_t));
if (keys != NULL) {
for (j = 0; j <= i; j++) {
unsigned int j;
for (j = 0 ; j <= i; j++) {
if (keys[j] == NULL)
continue;
if (dns_name_dynamic(keys[j]))
dns_name_free(keys[j], mctx);
isc_mem_put(mctx, keys[j], sizeof(dns_name_t));
}
isc_mem_put(mctx, keys, keycount * sizeof(dns_name_t *));
isc_mem_put(mctx, keys, count * sizeof(dns_name_t *));
}
if (lists != NULL)
isc_mem_put(mctx, lists, listcount * sizeof(*lists));
if (stack != NULL)
isc_mem_put(mctx, stack, stackcount * sizeof(*stack));
return (result);
}
@@ -694,7 +422,7 @@ ns_config_getport(const cfg_obj_t *config, in_port_t *portp) {
isc_result_t result;
int i;
(void)cfg_map_get(config, "options", &options);
cfg_map_get(config, "options", &options);
i = 0;
if (options != NULL)
maps[i++] = options;

View File

@@ -1,8 +1,8 @@
/*
* Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001-2003 Internet Software Consortium.
* Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* 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.
*
@@ -15,16 +15,15 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: control.c,v 1.7.2.2.2.16 2007/09/13 23:45:58 tbox Exp $ */
/* $Id: control.c,v 1.7.2.6 2005/04/07 02:22:08 marka Exp $ */
#include <config.h>
#include <string.h>
#include <isc/app.h>
#include <isc/event.h>
#include <isc/mem.h>
#include <isc/string.h>
#include <isc/timer.h>
#include <isc/util.h>
#include <dns/result.h>
@@ -35,7 +34,6 @@
#include <named/control.h>
#include <named/log.h>
#include <named/os.h>
#include <named/server.h>
#ifdef HAVE_LIBSCF
#include <named/ns_smf_globals.h>
@@ -62,7 +60,7 @@ ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) {
char *command;
isc_result_t result;
#ifdef HAVE_LIBSCF
ns_smf_want_disable = 0;
char *instance = NULL;
#endif
data = isccc_alist_lookup(message, "_data");
@@ -90,13 +88,11 @@ ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) {
* Compare the 'command' parameter against all known control commands.
*/
if (command_compare(command, NS_COMMAND_RELOAD)) {
result = ns_server_reloadcommand(ns_g_server, command, text);
result = ns_server_reloadcommand(ns_g_server, command);
} else if (command_compare(command, NS_COMMAND_RECONFIG)) {
result = ns_server_reconfigcommand(ns_g_server, command);
} else if (command_compare(command, NS_COMMAND_REFRESH)) {
result = ns_server_refreshcommand(ns_g_server, command, text);
} else if (command_compare(command, NS_COMMAND_RETRANSFER)) {
result = ns_server_retransfercommand(ns_g_server, command);
result = ns_server_refreshcommand(ns_g_server, command);
} else if (command_compare(command, NS_COMMAND_HALT)) {
#ifdef HAVE_LIBSCF
/*
@@ -112,8 +108,17 @@ ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) {
* If we are managed by smf(5) but not in chroot,
* try to disable ourselves the smf way.
*/
if (ns_smf_got_instance == 1 && ns_smf_chroot == 0)
ns_smf_want_disable = 1;
if (ns_smf_got_instance == 1 && ns_smf_chroot == 0) {
result = ns_smf_get_instance(&instance, 1, ns_g_mctx);
if (result == ISC_R_SUCCESS && instance != NULL) {
ns_server_flushonshutdown(ns_g_server,
ISC_FALSE);
result = ns_smf_disable(instance);
}
if (instance != NULL)
isc_mem_free(ns_g_mctx, instance);
return (result);
}
/*
* If ns_smf_got_instance = 0, ns_smf_chroot
* is not relevant and we fall through to
@@ -121,7 +126,6 @@ ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) {
*/
#endif
ns_server_flushonshutdown(ns_g_server, ISC_FALSE);
ns_os_shutdownmsg(command, text);
isc_app_shutdown();
result = ISC_R_SUCCESS;
} else if (command_compare(command, NS_COMMAND_STOP)) {
@@ -130,11 +134,19 @@ ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) {
result = ns_smf_add_message(text);
return (result);
}
if (ns_smf_got_instance == 1 && ns_smf_chroot == 0)
ns_smf_want_disable = 1;
if (ns_smf_got_instance == 1 && ns_smf_chroot == 0) {
result = ns_smf_get_instance(&instance, 1, ns_g_mctx);
if (result == ISC_R_SUCCESS && instance != NULL) {
ns_server_flushonshutdown(ns_g_server,
ISC_TRUE);
result = ns_smf_disable(instance);
}
if (instance != NULL)
isc_mem_free(ns_g_mctx, instance);
return (result);
}
#endif
ns_server_flushonshutdown(ns_g_server, ISC_TRUE);
ns_os_shutdownmsg(command, text);
isc_app_shutdown();
result = ISC_R_SUCCESS;
} else if (command_compare(command, NS_COMMAND_DUMPSTATS)) {
@@ -142,7 +154,7 @@ ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) {
} else if (command_compare(command, NS_COMMAND_QUERYLOG)) {
result = ns_server_togglequerylog(ns_g_server);
} else if (command_compare(command, NS_COMMAND_DUMPDB)) {
ns_server_dumpdb(ns_g_server, command);
ns_server_dumpdb(ns_g_server);
result = ISC_R_SUCCESS;
} else if (command_compare(command, NS_COMMAND_TRACE)) {
result = ns_server_setdebuglevel(ns_g_server, command);
@@ -152,17 +164,8 @@ ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) {
result = ISC_R_SUCCESS;
} else if (command_compare(command, NS_COMMAND_FLUSH)) {
result = ns_server_flushcache(ns_g_server, command);
} else if (command_compare(command, NS_COMMAND_FLUSHNAME)) {
result = ns_server_flushname(ns_g_server, command);
} else if (command_compare(command, NS_COMMAND_STATUS)) {
result = ns_server_status(ns_g_server, text);
} else if (command_compare(command, NS_COMMAND_FREEZE)) {
result = ns_server_freeze(ns_g_server, ISC_TRUE, command);
} else if (command_compare(command, NS_COMMAND_UNFREEZE) ||
command_compare(command, NS_COMMAND_THAW)) {
result = ns_server_freeze(ns_g_server, ISC_FALSE, command);
} else if (command_compare(command, NS_COMMAND_RECURSING)) {
result = ns_server_dumprecursing(ns_g_server);
} else if (command_compare(command, NS_COMMAND_NULL)) {
result = ISC_R_SUCCESS;
} else {

View File

@@ -1,8 +1,8 @@
/*
* Copyright (C) 2004, 2006, 2008 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001-2003 Internet Software Consortium.
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* 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.
*
@@ -15,26 +15,29 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: controlconf.c,v 1.28.2.9.2.13 2008/01/17 23:45:27 tbox Exp $ */
/* $Id: controlconf.c,v 1.28.2.15 2006/12/07 04:52:57 marka Exp $ */
#include <config.h>
#include <isc/base64.h>
#include <isc/buffer.h>
#include <isc/event.h>
#include <isc/file.h>
#include <isc/fsaccess.h>
#include <isc/mem.h>
#include <isc/net.h>
#include <isc/netaddr.h>
#include <isc/print.h>
#include <isc/random.h>
#include <isc/result.h>
#include <isc/stdio.h>
#include <isc/stdtime.h>
#include <isc/string.h>
#include <isc/timer.h>
#include <isc/util.h>
#include <isccfg/namedconf.h>
#include <bind9/check.h>
#include <isccfg/cfg.h>
#include <isccfg/check.h>
#include <isccc/alist.h>
#include <isccc/cc.h>
@@ -45,8 +48,11 @@
#include <isccc/symtab.h>
#include <isccc/util.h>
#include <dns/keyvalues.h>
#include <dns/result.h>
#include <dst/dst.h>
#include <named/config.h>
#include <named/control.h>
#include <named/log.h>
@@ -337,9 +343,9 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
listener = conn->listener;
secret.rstart = NULL;
/* Is the server shutting down? */
if (listener->controls->shuttingdown)
goto cleanup;
/* Is the server shutting down? */
if (listener->controls->shuttingdown)
goto cleanup;
if (conn->ccmsg.result != ISC_R_SUCCESS) {
if (conn->ccmsg.result != ISC_R_CANCELED &&
@@ -356,6 +362,9 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
{
ccregion.rstart = isc_buffer_base(&conn->ccmsg.buffer);
ccregion.rend = isc_buffer_used(&conn->ccmsg.buffer);
if (secret.rstart != NULL)
isc_mem_put(listener->mctx, secret.rstart,
REGION_SIZE(secret));
secret.rstart = isc_mem_get(listener->mctx, key->secret.length);
if (secret.rstart == NULL)
goto cleanup;
@@ -364,8 +373,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
result = isccc_cc_fromwire(&ccregion, &request, &secret);
if (result == ISC_R_SUCCESS)
break;
isc_mem_put(listener->mctx, secret.rstart, REGION_SIZE(secret));
if (result == ISCCC_R_BADAUTH) {
else if (result == ISCCC_R_BADAUTH) {
/*
* For some reason, request is non-NULL when
* isccc_cc_fromwire returns ISCCC_R_BADAUTH.
@@ -386,7 +394,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
/* We shouldn't be getting a reply. */
if (isccc_cc_isreply(request)) {
log_invalid(&conn->ccmsg, ISC_R_FAILURE);
goto cleanup_request;
goto cleanup;
}
isc_stdtime_get(&now);
@@ -397,17 +405,17 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
_ctrl = isccc_alist_lookup(request, "_ctrl");
if (_ctrl == NULL) {
log_invalid(&conn->ccmsg, ISC_R_FAILURE);
goto cleanup_request;
goto cleanup;
}
if (isccc_cc_lookupuint32(_ctrl, "_tim", &sent) == ISC_R_SUCCESS) {
if ((sent + CLOCKSKEW) < now || (sent - CLOCKSKEW) > now) {
log_invalid(&conn->ccmsg, ISCCC_R_CLOCKSKEW);
goto cleanup_request;
goto cleanup;
}
} else {
log_invalid(&conn->ccmsg, ISC_R_FAILURE);
goto cleanup_request;
goto cleanup;
}
/*
@@ -416,7 +424,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
if (isccc_cc_lookupuint32(_ctrl, "_exp", &exp) == ISC_R_SUCCESS &&
now > exp) {
log_invalid(&conn->ccmsg, ISCCC_R_EXPIRED);
goto cleanup_request;
goto cleanup;
}
/*
@@ -426,16 +434,16 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
result = isccc_cc_checkdup(listener->controls->symtab, request, now);
if (result != ISC_R_SUCCESS) {
if (result == ISC_R_EXISTS)
result = ISCCC_R_DUPLICATE;
result = ISCCC_R_DUPLICATE;
log_invalid(&conn->ccmsg, result);
goto cleanup_request;
goto cleanup;
}
if (conn->nonce != 0 &&
(isccc_cc_lookupuint32(_ctrl, "_nonce", &nonce) != ISC_R_SUCCESS ||
conn->nonce != nonce)) {
log_invalid(&conn->ccmsg, ISCCC_R_BADAUTH);
goto cleanup_request;
goto cleanup;
}
/*
@@ -449,7 +457,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
result = isccc_cc_createresponse(request, now, now + 60, &response);
if (result != ISC_R_SUCCESS)
goto cleanup_request;
goto cleanup;
if (eresult != ISC_R_SUCCESS) {
isccc_sexpr_t *data;
@@ -457,7 +465,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
if (data != NULL) {
const char *estr = isc_result_totext(eresult);
if (isccc_cc_definestring(data, "err", estr) == NULL)
goto cleanup_response;
goto cleanup;
}
}
@@ -468,20 +476,20 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
if (data != NULL) {
char *str = (char *)isc_buffer_base(&text);
if (isccc_cc_definestring(data, "text", str) == NULL)
goto cleanup_response;
goto cleanup;
}
}
_ctrl = isccc_alist_lookup(response, "_ctrl");
if (_ctrl == NULL ||
isccc_cc_defineuint32(_ctrl, "_nonce", conn->nonce) == NULL)
goto cleanup_response;
goto cleanup;
ccregion.rstart = conn->buffer + 4;
ccregion.rend = conn->buffer + sizeof(conn->buffer);
result = isccc_cc_towire(response, &ccregion, &secret);
if (result != ISC_R_SUCCESS)
goto cleanup_response;
goto cleanup;
isc_buffer_init(&b, conn->buffer, 4);
len = sizeof(conn->buffer) - REGION_SIZE(ccregion);
isc_buffer_putuint32(&b, len - 4);
@@ -490,27 +498,31 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
result = isc_socket_send(conn->sock, &r, task, control_senddone, conn);
if (result != ISC_R_SUCCESS)
goto cleanup_response;
goto cleanup;
conn->sending = ISC_TRUE;
isc_mem_put(listener->mctx, secret.rstart, REGION_SIZE(secret));
isccc_sexpr_free(&request);
isccc_sexpr_free(&response);
if (secret.rstart != NULL)
isc_mem_put(listener->mctx, secret.rstart,
REGION_SIZE(secret));
if (request != NULL)
isccc_sexpr_free(&request);
if (response != NULL)
isccc_sexpr_free(&response);
return;
cleanup_response:
isccc_sexpr_free(&response);
cleanup_request:
isccc_sexpr_free(&request);
isc_mem_put(listener->mctx, secret.rstart, REGION_SIZE(secret));
cleanup:
if (secret.rstart != NULL)
isc_mem_put(listener->mctx, secret.rstart,
REGION_SIZE(secret));
isc_socket_detach(&conn->sock);
isccc_ccmsg_invalidate(&conn->ccmsg);
conn->ccmsg_valid = ISC_FALSE;
maybe_free_connection(conn);
maybe_free_listener(listener);
if (request != NULL)
isccc_sexpr_free(&request);
if (response != NULL)
isccc_sexpr_free(&response);
}
static void
@@ -534,7 +546,7 @@ newconnection(controllistener_t *listener, isc_socket_t *sock) {
conn = isc_mem_get(listener->mctx, sizeof(*conn));
if (conn == NULL)
return (ISC_R_NOMEMORY);
conn->sock = sock;
isccc_ccmsg_init(listener->mctx, sock, &conn->ccmsg);
conn->ccmsg_valid = ISC_TRUE;
@@ -645,7 +657,7 @@ ns_controls_shutdown(ns_controls_t *controls) {
static isc_result_t
cfgkeylist_find(const cfg_obj_t *keylist, const char *keyname,
const cfg_obj_t **objp)
const cfg_obj_t **objp)
{
const cfg_listelt_t *element;
const char *str;
@@ -793,7 +805,7 @@ register_keys(const cfg_obj_t *control, const cfg_obj_t *keylist,
if (result != ISC_R_SUCCESS) \
goto cleanup; \
} while (0)
static isc_result_t
get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
isc_result_t result;
@@ -813,17 +825,17 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
CHECK(cfg_map_get(config, "key", &key));
keyid = isc_mem_get(mctx, sizeof(*keyid));
if (keyid == NULL)
if (keyid == NULL)
CHECK(ISC_R_NOMEMORY);
keyid->keyname = isc_mem_strdup(mctx,
cfg_obj_asstring(cfg_map_getname(key)));
keyid->secret.base = NULL;
keyid->secret.length = 0;
ISC_LINK_INIT(keyid, link);
if (keyid->keyname == NULL)
if (keyid->keyname == NULL)
CHECK(ISC_R_NOMEMORY);
CHECK(bind9_check_key(key, ns_g_lctx));
CHECK(cfg_check_key(key, ns_g_lctx));
(void)cfg_map_get(key, "algorithm", &algobj);
(void)cfg_map_get(key, "secret", &secretobj);
@@ -876,7 +888,7 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
cfg_parser_destroy(&pctx);
return (result);
}
/*
* Ensures that both '*global_keylistp' and '*control_keylistp' are
* valid or both are NULL.
@@ -930,7 +942,7 @@ update_listener(ns_controls_t *cp, controllistener_t **listenerp,
*listenerp = NULL;
return;
}
/*
* There is already a listener for this sockaddr.
* Update the access list and key information.
@@ -1258,7 +1270,7 @@ ns_controls_configure(ns_controls_t *cp, const cfg_obj_t *config,
isc_sockaddr_setport(&addr, NS_CONTROL_PORT);
isc_sockaddr_format(&addr, socktext, sizeof(socktext));
update_listener(cp, &listener, NULL, NULL,
&addr, NULL, socktext);

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: aclconf.h,v 1.12.208.3 2006/03/02 00:37:20 marka Exp $ */
/* $Id: aclconf.h,v 1.12.2.3 2006/03/02 00:37:17 marka Exp $ */
#ifndef NS_ACLCONF_H
#define NS_ACLCONF_H 1

View File

@@ -1,29 +0,0 @@
/*
* Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or 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: builtin.h,v 1.1.204.6 2007/08/28 07:19:08 tbox Exp $ */
#ifndef NAMED_BUILTIN_H
#define NAMED_BUILTIN_H 1
#include <isc/types.h>
isc_result_t ns_builtin_init(void);
void ns_builtin_deinit(void);
#endif /* NAMED_BUILTIN_H */

View File

@@ -1,6 +1,6 @@
/*
* Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 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
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: client.h,v 1.60.2.2.10.12 2006/06/06 00:11:40 marka Exp $ */
/* $Id: client.h,v 1.60.2.4 2004/07/23 02:57:01 marka Exp $ */
#ifndef NAMED_CLIENT_H
#define NAMED_CLIENT_H 1
@@ -68,13 +68,10 @@
#include <isc/stdtime.h>
#include <isc/quota.h>
#include <dns/fixedname.h>
#include <dns/name.h>
#include <dns/rdataclass.h>
#include <dns/rdatatype.h>
#include <dns/tcpmsg.h>
#include <dns/types.h>
#include <dns/tcpmsg.h>
#include <dns/fixedname.h>
#include <named/types.h>
#include <named/query.h>
@@ -157,8 +154,6 @@ struct ns_client {
#define NS_CLIENTATTR_RA 0x02 /* Client gets recusive service */
#define NS_CLIENTATTR_PKTINFO 0x04 /* pktinfo is valid */
#define NS_CLIENTATTR_MULTICAST 0x08 /* recv'd from multicast */
#define NS_CLIENTATTR_WANTDNSSEC 0x10 /* include dnssec records */
/***
*** Functions
@@ -198,12 +193,6 @@ ns_client_next(ns_client_t *client, isc_result_t result);
* return no response to the client.
*/
void
ns_client_qnamereplace(ns_client_t *client, dns_name_t *name);
/*%
* Replace the qname.
*/
isc_boolean_t
ns_client_shuttingdown(ns_client_t *client);
/*
@@ -316,34 +305,7 @@ ns_client_log(ns_client_t *client, isc_logcategory_t *category,
const char *fmt, ...) ISC_FORMAT_PRINTF(5, 6);
void
ns_client_logv(ns_client_t *client, isc_logcategory_t *category,
isc_logmodule_t *module, int level, const char *fmt, va_list ap) ISC_FORMAT_PRINTF(5, 0);
void
ns_client_aclmsg(const char *msg, dns_name_t *name, dns_rdatatype_t type,
dns_rdataclass_t rdclass, char *buf, size_t len);
#define NS_CLIENT_ACLMSGSIZE(x) \
(DNS_NAME_FORMATSIZE + DNS_RDATATYPE_FORMATSIZE + \
DNS_RDATACLASS_FORMATSIZE + sizeof(x) + sizeof("'/'"))
void
ns_client_recursing(ns_client_t *client);
/*%
* Add client to end of recursing list. If 'killoldest' is true
* kill the oldest recursive client (list head).
*/
void
ns_client_killoldestquery(ns_client_t *client);
/*%
* Kill the oldest recursive query (recursing list head).
*/
void
ns_client_dumprecursing(FILE *f, ns_clientmgr_t *manager);
/*
* Dump the outstanding recursive queries to 'f'.
*/
ns_client_aclmsg(const char *msg, dns_name_t *name, dns_rdataclass_t rdclass,
char *buf, size_t len);
#endif /* NAMED_CLIENT_H */

View File

@@ -1,8 +1,8 @@
/*
* Copyright (C) 2004, 2006, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001-2003 Internet Software Consortium.
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* 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.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: config.h,v 1.4.12.9 2007/08/28 07:19:08 tbox Exp $ */
/* $Id: config.h,v 1.4.2.3 2006/03/02 00:37:17 marka Exp $ */
#ifndef NAMED_CONFIG_H
#define NAMED_CONFIG_H 1
@@ -31,10 +31,6 @@ ns_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf);
isc_result_t
ns_config_get(const cfg_obj_t **maps, const char* name, const cfg_obj_t **obj);
isc_result_t
ns_checknames_get(const cfg_obj_t **maps, const char* name,
const cfg_obj_t **obj);
int
ns_config_listcount(const cfg_obj_t *list);
@@ -42,10 +38,6 @@ isc_result_t
ns_config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
dns_rdataclass_t *classp);
isc_result_t
ns_config_gettype(const cfg_obj_t *typeobj, dns_rdatatype_t deftype,
dns_rdatatype_t *typep);
dns_zonetype_t
ns_config_getzonetype(const cfg_obj_t *zonetypeobj);

View File

@@ -1,6 +1,6 @@
/*
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2001-2003 Internet Software Consortium.
* Copyright (C) 2001, 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
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: control.h,v 1.6.2.2.2.9 2006/03/02 00:37:20 marka Exp $ */
/* $Id: control.h,v 1.6.2.5 2006/03/02 00:37:17 marka Exp $ */
#ifndef NAMED_CONTROL_H
#define NAMED_CONTROL_H 1
@@ -36,19 +36,13 @@
#define NS_COMMAND_RELOAD "reload"
#define NS_COMMAND_RECONFIG "reconfig"
#define NS_COMMAND_REFRESH "refresh"
#define NS_COMMAND_RETRANSFER "retransfer"
#define NS_COMMAND_DUMPSTATS "stats"
#define NS_COMMAND_QUERYLOG "querylog"
#define NS_COMMAND_DUMPDB "dumpdb"
#define NS_COMMAND_TRACE "trace"
#define NS_COMMAND_NOTRACE "notrace"
#define NS_COMMAND_FLUSH "flush"
#define NS_COMMAND_FLUSHNAME "flushname"
#define NS_COMMAND_STATUS "status"
#define NS_COMMAND_FREEZE "freeze"
#define NS_COMMAND_UNFREEZE "unfreeze"
#define NS_COMMAND_THAW "thaw"
#define NS_COMMAND_RECURSING "recursing"
#define NS_COMMAND_NULL "null"
isc_result_t

View File

@@ -1,6 +1,6 @@
/*
* Copyright (C) 2004, 2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
* Copyright (C) 1999-2001 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
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: globals.h,v 1.59.68.7 2006/03/02 00:37:20 marka Exp $ */
/* $Id: globals.h,v 1.59.2.3 2006/03/02 00:37:17 marka Exp $ */
#ifndef NAMED_GLOBALS_H
#define NAMED_GLOBALS_H 1
@@ -45,8 +45,6 @@ EXTERN unsigned int ns_g_cpus INIT(0);
EXTERN isc_taskmgr_t * ns_g_taskmgr INIT(NULL);
EXTERN dns_dispatchmgr_t * ns_g_dispatchmgr INIT(NULL);
EXTERN isc_entropy_t * ns_g_entropy INIT(NULL);
EXTERN isc_entropy_t * ns_g_fallbackentropy INIT(NULL);
/*
* XXXRTH We're going to want multiple timer managers eventually. One
* for really short timers, another for client timers, and one
@@ -86,7 +84,6 @@ EXTERN const char * lwresd_g_resolvconffile INIT("/etc"
"/resolv.conf");
EXTERN isc_boolean_t ns_g_conffileset INIT(ISC_FALSE);
EXTERN isc_boolean_t lwresd_g_useresolvconf INIT(ISC_FALSE);
EXTERN isc_uint16_t ns_g_udpsize INIT(4096);
/*
* Initial resource limits.
@@ -110,8 +107,6 @@ EXTERN const char * lwresd_g_defaultpidfile INIT(NS_LOCALSTATEDIR
"/run/lwresd.pid");
EXTERN const char * ns_g_username INIT(NULL);
EXTERN int ns_g_listen INIT(3);
#undef EXTERN
#undef INIT

View File

@@ -1,8 +1,8 @@
/*
* Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* 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.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: interfacemgr.h,v 1.23.24.10 2007/08/28 07:19:08 tbox Exp $ */
/* $Id: interfacemgr.h,v 1.23.2.1 2004/03/09 06:09:21 marka Exp $ */
#ifndef NAMED_INTERFACEMGR_H
#define NAMED_INTERFACEMGR_H 1
@@ -65,8 +65,6 @@
#define IFACE_MAGIC ISC_MAGIC('I',':','-',')')
#define NS_INTERFACE_VALID(t) ISC_MAGIC_VALID(t, IFACE_MAGIC)
#define NS_INTERFACEFLAG_ANYADDR 0x01U /* bound to "any" address */
struct ns_interface {
unsigned int magic; /* Magic number. */
ns_interfacemgr_t * mgr; /* Interface manager. */
@@ -74,7 +72,6 @@ struct ns_interface {
int references; /* Locked */
unsigned int generation; /* Generation number. */
isc_sockaddr_t addr; /* Address and port. */
unsigned int flags; /* Interface characteristics */
char name[32]; /* Null terminated. */
dns_dispatch_t * udpdispatch; /* UDP dispatcher. */
isc_socket_t * tcpsocket; /* TCP socket. */
@@ -123,20 +120,6 @@ ns_interfacemgr_scan(ns_interfacemgr_t *mgr, isc_boolean_t verbose);
* in named.conf.
*/
void
ns_interfacemgr_adjust(ns_interfacemgr_t *mgr, ns_listenlist_t *list,
isc_boolean_t verbose);
/*
* Similar to ns_interfacemgr_scan(), but this function also tries to see the
* need for an explicit listen-on when a list element in 'list' is going to
* override an already-listening a wildcard interface.
*
* This function does not update localhost and localnets ACLs.
*
* This should be called once on server startup, after configuring views and
* zones.
*/
void
ns_interfacemgr_setlistenon4(ns_interfacemgr_t *mgr, ns_listenlist_t *value);
/*
@@ -167,7 +150,4 @@ ns_interface_shutdown(ns_interface_t *ifp);
* May safely be called multiple times.
*/
void
ns_interfacemgr_dumprecursing(FILE *f, ns_interfacemgr_t *mgr);
#endif /* NAMED_INTERFACEMGR_H */

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: listenlist.h,v 1.10.208.1 2004/03/06 10:21:24 marka Exp $ */
/* $Id: listenlist.h,v 1.10.2.1 2004/03/09 06:09:21 marka Exp $ */
#ifndef NAMED_LISTENLIST_H
#define NAMED_LISTENLIST_H 1

View File

@@ -1,8 +1,8 @@
/*
* Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* 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.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: log.h,v 1.19.12.6 2007/08/28 07:19:08 tbox Exp $ */
/* $Id: log.h,v 1.19.2.1 2004/03/09 06:09:22 marka Exp $ */
#ifndef NAMED_LOG_H
#define NAMED_LOG_H 1
@@ -33,7 +33,6 @@
#define NS_LOGCATEGORY_UPDATE (&ns_g_categories[3])
#define NS_LOGCATEGORY_QUERIES (&ns_g_categories[4])
#define NS_LOGCATEGORY_UNMATCHED (&ns_g_categories[5])
#define NS_LOGCATEGORY_UPDATE_SECURITY (&ns_g_categories[6])
/*
* Backwards compatibility.

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: logconf.h,v 1.10.208.3 2006/03/02 00:37:20 marka Exp $ */
/* $Id: logconf.h,v 1.10.2.3 2006/03/02 00:37:17 marka Exp $ */
#ifndef NAMED_LOGCONF_H
#define NAMED_LOGCONF_H 1

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwaddr.h,v 1.3.208.1 2004/03/06 10:21:24 marka Exp $ */
/* $Id: lwaddr.h,v 1.3.2.1 2004/03/09 06:09:22 marka Exp $ */
#include <lwres/lwres.h>
#include <lwres/net.h>

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwdclient.h,v 1.13.208.1 2004/03/06 10:21:24 marka Exp $ */
/* $Id: lwdclient.h,v 1.13.2.1 2004/03/09 06:09:22 marka Exp $ */
#ifndef NAMED_LWDCLIENT_H
#define NAMED_LWDCLIENT_H 1

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwresd.h,v 1.12.208.3 2006/03/02 00:37:20 marka Exp $ */
/* $Id: lwresd.h,v 1.12.2.3 2006/03/02 00:37:17 marka Exp $ */
#ifndef NAMED_LWRESD_H
#define NAMED_LWRESD_H 1

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwsearch.h,v 1.4.208.1 2004/03/06 10:21:25 marka Exp $ */
/* $Id: lwsearch.h,v 1.4.2.1 2004/03/09 06:09:22 marka Exp $ */
#ifndef NAMED_LWSEARCH_H
#define NAMED_LWSEARCH_H 1

View File

@@ -1,8 +1,8 @@
/*
* Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
* 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.
*
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: main.h,v 1.8.2.2.8.7 2007/08/28 07:19:08 tbox Exp $ */
/* $Id: main.h,v 1.8.2.3 2004/03/09 06:09:22 marka Exp $ */
#ifndef NAMED_MAIN_H
#define NAMED_MAIN_H 1
@@ -26,7 +26,4 @@ ns_main_earlyfatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
void
ns_main_earlywarning(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
void
ns_main_setmemstats(const char *);
#endif /* NAMED_MAIN_H */

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: notify.h,v 1.9.208.1 2004/03/06 10:21:25 marka Exp $ */
/* $Id: notify.h,v 1.9.2.1 2004/03/09 06:09:23 marka Exp $ */
#ifndef NAMED_NOTIFY_H
#define NAMED_NOTIFY_H 1

Some files were not shown because too many files have changed in this diff Show More