Import bind 9.3.0beta3
This commit is contained in:
parent
b997a4053a
commit
1885fbb90d
5243
dist/bind/CHANGES
vendored
Normal file
5243
dist/bind/CHANGES
vendored
Normal file
File diff suppressed because it is too large
Load Diff
30
dist/bind/COPYRIGHT
vendored
Normal file
30
dist/bind/COPYRIGHT
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright (C) 1996-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: COPYRIGHT,v 1.6.2.2.8.2 2004/03/08 04:04:12 marka Exp
|
||||
|
||||
Portions Copyright (C) 1996-2001 Nominum, 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 NOMINUM DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM 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.
|
417
dist/bind/FAQ
vendored
Normal file
417
dist/bind/FAQ
vendored
Normal file
@ -0,0 +1,417 @@
|
||||
|
||||
|
||||
|
||||
Frequently Asked Questions about BIND 9
|
||||
|
||||
|
||||
Q: Why doesn't -u work on Linux 2.2.x when I build with --enable-threads?
|
||||
|
||||
A: Linux threads do not fully implement the Posix threads (pthreads) standard.
|
||||
In particular, setuid() operates only on the current thread, not the full
|
||||
process. Because of this limitation, BIND 9 cannot use setuid() on Linux as it
|
||||
can on all other supported platforms. setuid() cannot be called before
|
||||
creating threads, since the server does not start listening on reserved ports
|
||||
until after threads have started.
|
||||
|
||||
In the 2.2.18 or 2.3.99-pre3 and newer kernels, the ability to preserve
|
||||
capabilities across a setuid() call is present. This allows BIND 9 to call
|
||||
setuid() early, while retaining the ability to bind reserved ports. This is
|
||||
a Linux-specific hack.
|
||||
|
||||
On a 2.2 kernel, BIND 9 does drop many root privileges, so it should be less
|
||||
of a security risk than a root process that has not dropped privileges.
|
||||
|
||||
If Linux threads ever work correctly, this restriction will go away.
|
||||
|
||||
Configuring BIND9 with the --disable-threads option (the default) causes a
|
||||
non-threaded version to be built, which will allow -u to be used.
|
||||
|
||||
|
||||
Q: Why does named log the warning message "no TTL specified - using SOA
|
||||
MINTTL instead"?
|
||||
|
||||
A: Your zone file is illegal according to RFC1035. It must either
|
||||
have a line like
|
||||
|
||||
$TTL 86400
|
||||
|
||||
at the beginning, or the first record in it must have a TTL field,
|
||||
like the "84600" in this example:
|
||||
|
||||
example.com. 86400 IN SOA ns hostmaster ( 1 3600 1800 1814400 3600 )
|
||||
|
||||
Q: Why do I see 5 (or more) copies of named on Linux?
|
||||
|
||||
A: Linux threads each show up as a process under ps. The approximate
|
||||
number of threads running is n+4, where n is the number of CPUs. Note that
|
||||
the amount of memory used is not cumulative; if each process is using 10M of
|
||||
memory, only a total of 10M is used.
|
||||
|
||||
|
||||
Q: Why does BIND 9 log "permission denied" errors accessing its
|
||||
configuration files or zones on my Linux system even though it is running
|
||||
as root?
|
||||
|
||||
A: On Linux, BIND 9 drops most of its root privileges on startup.
|
||||
This including the privilege to open files owned by other users.
|
||||
Therefore, if the server is running as root, the configuration files
|
||||
and zone files should also be owned by root.
|
||||
|
||||
|
||||
Q: Why do I get errors like "dns_zone_load: zone foo/IN: loading master file
|
||||
bar: ran out of space"
|
||||
|
||||
A: This is often caused by TXT records with missing close quotes. Check that
|
||||
all TXT records containing quoted strings have both open and close quotes.
|
||||
|
||||
|
||||
Q: How do I produce a usable core file from a multithreaded named on Linux?
|
||||
|
||||
A: If the Linux kernel is 2.4.7 or newer, multithreaded core dumps
|
||||
are usable (that is, the correct thread is dumped). Otherwise, if using
|
||||
a 2.2 kernel, apply the kernel patch found in contrib/linux/coredump-patch
|
||||
and rebuild the kernel. This patch will cause multithreaded programs to dump
|
||||
the correct thread.
|
||||
|
||||
|
||||
Q: How do I restrict people from looking up the server version?
|
||||
|
||||
A: Put a "version" option containing something other than the real
|
||||
version in the "options" section of named.conf. Note doing this will
|
||||
not prevent attacks and may impede people trying to diagnose problems
|
||||
with your server. Also it is possible to "fingerprint" nameservers to
|
||||
determine their version.
|
||||
|
||||
|
||||
Q: How do I restrict only remote users from looking up the server
|
||||
version?
|
||||
|
||||
A: The following view statement will intercept lookups as the internal
|
||||
view that holds the version information will be matched last. The
|
||||
caveats of the previous answer still apply, of course.
|
||||
|
||||
view "chaos" chaos {
|
||||
match-clients { <those to be refused>; };
|
||||
allow-query { none; };
|
||||
zone "." {
|
||||
type hint;
|
||||
file "/dev/null"; // or any empty file
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Q: What do "no source of entropy found" or "could not open entropy source foo"
|
||||
mean?
|
||||
|
||||
A: The server requires a source of entropy to perform certain operations,
|
||||
mostly DNSSEC related. These messages indicate that you have no source
|
||||
of entropy. On systems with /dev/random or an equivalent, it is used by
|
||||
default. A source of entropy can also be defined using the random-device
|
||||
option in named.conf.
|
||||
|
||||
|
||||
Q: I installed BIND 9 and restarted named, but it's still BIND 8. Why?
|
||||
|
||||
A: BIND 9 is installed under /usr/local by default. BIND 8 is often
|
||||
installed under /usr. Check that the correct named is running.
|
||||
|
||||
|
||||
Q: I'm trying to use TSIG to authenticate dynamic updates or zone
|
||||
transfers. I'm sure I have the keys set up correctly, but the server
|
||||
is rejecting the TSIG. Why?
|
||||
|
||||
A: This may be a clock skew problem. Check that the the clocks on
|
||||
the client and server are properly synchronized (e.g., using ntp).
|
||||
|
||||
|
||||
Q: I'm trying to compile BIND 9, and "make" is failing due to files not
|
||||
being found. Why?
|
||||
|
||||
A: Using a parallel or distributed "make" to build BIND 9 is not
|
||||
supported, and doesn't work. If you are using one of these, use
|
||||
normal make or gmake instead.
|
||||
|
||||
|
||||
Q: I have a BIND 9 master and a BIND 8.2.3 slave, and the master is
|
||||
logging error messages like "notify to 10.0.0.1#53 failed: unexpected
|
||||
end of input". What's wrong?
|
||||
|
||||
A: This error message is caused by a known bug in BIND 8.2.3 and is fixed
|
||||
in BIND 8.2.4. It can be safely ignored - the notify has been acted on by
|
||||
the slave despite the error message.
|
||||
|
||||
|
||||
Q: I keep getting log messages like the following. Why?
|
||||
|
||||
Dec 4 23:47:59 client 10.0.0.1#1355: updating zone 'example.com/IN':
|
||||
update failed: 'RRset exists (value dependent)' prerequisite not
|
||||
satisfied (NXRRSET)
|
||||
|
||||
A: DNS updates allow the update request to test to see if certain
|
||||
conditions are met prior to proceeding with the update. The message
|
||||
above is saying that conditions were not met and the update is not
|
||||
proceeding. See doc/rfc/rfc2136.txt for more details on prerequisites.
|
||||
|
||||
|
||||
Q: I keep getting log messages like the following. Why?
|
||||
|
||||
Jun 21 12:00:00.000 client 10.0.0.1#1234: update denied
|
||||
|
||||
A: Someone is trying to update your DNS data using the RFC2136 Dynamic
|
||||
Update protocol. Windows 2000 machines have a habit of sending dynamic
|
||||
update requests to DNS servers without being specifically configured to
|
||||
do so. If the update requests are coming from a Windows 2000 machine,
|
||||
see <http://support.microsoft.com/support/kb/articles/q246/8/04.asp>
|
||||
for information about how to turn them off.
|
||||
|
||||
|
||||
Q: I see a log message like the following. Why?
|
||||
|
||||
couldn't open pid file '/var/run/named.pid': Permission denied
|
||||
|
||||
A: You are most likely running named as a non-root user, and that user
|
||||
does not have permission to write in /var/run. The common ways of
|
||||
fixing this are to create a /var/run/named directory owned by the named
|
||||
user and set pid-file to "/var/run/named/named.pid", or set
|
||||
pid-file to "named.pid", which will put the file in the directory
|
||||
specified by the directory option (which, in this case, must be writable
|
||||
by the named user).
|
||||
|
||||
|
||||
Q: When I do a "dig . ns", many of the A records for the root
|
||||
servers are missing. Why?
|
||||
|
||||
A: This is normal and harmless. It is a somewhat confusing side effect
|
||||
of the way BIND 9 does RFC2181 trust ranking and of the efforts BIND 9
|
||||
makes to avoid promoting glue into answers.
|
||||
|
||||
When BIND 9 first starts up and primes its cache, it receives the root
|
||||
server addresses as additional data in an authoritative response from
|
||||
a root server, and these records are eligible for inclusion as
|
||||
additional data in responses. Subsequently it receives a subset of
|
||||
the root server addresses as additional data in a non-authoritative
|
||||
(referral) response from a root server. This causes the addresses to
|
||||
now be considered non-authoritative (glue) data, which is not eligible
|
||||
for inclusion in responses.
|
||||
|
||||
The server does have a complete set of root server addresses cached
|
||||
at all times, it just may not include all of them as additional data,
|
||||
depending on whether they were last received as answers or as glue.
|
||||
You can always look up the addresses with explicit queries like
|
||||
"dig a.root-servers.net A".
|
||||
|
||||
|
||||
Q: Zone transfers from my BIND 9 master to my Windows 2000 slave
|
||||
fail. Why?
|
||||
|
||||
A: This may be caused by a bug in the Windows 2000 DNS server where
|
||||
DNS messages larger than 16K are not handled properly. This can be
|
||||
worked around by setting the option "transfer-format one-answer;".
|
||||
Also check whether your zone contains domain names with embedded
|
||||
spaces or other special characters, like "John\032Doe\213s\032Computer",
|
||||
since such names have been known to cause Windows 2000 slaves to
|
||||
incorrectly reject the zone.
|
||||
|
||||
|
||||
Q: Why don't my zones reload when I do an "rndc reload" or SIGHUP?
|
||||
|
||||
A: A zone can be updated either by editing zone files and reloading
|
||||
the server or by dynamic update, but not both. If you have enabled
|
||||
dynamic update for a zone using the "allow-update" option, you are not
|
||||
supposed to edit the zone file by hand, and the server will not
|
||||
attempt to reload it.
|
||||
|
||||
|
||||
Q: I can query the nameserver from the nameserver but not from other
|
||||
machines. Why?
|
||||
|
||||
A: This is usually the result of the firewall configuration stopping
|
||||
the queries and / or the replies.
|
||||
|
||||
|
||||
Q: How can I make a server a slave for both an internal and
|
||||
an external view at the same time? When I tried, both views
|
||||
on the slave were transferred from the same view on the master.
|
||||
|
||||
A: You will need to give the master and slave multiple IP addresses and
|
||||
use those to make sure you reach the correct view on the other machine.
|
||||
|
||||
e.g.
|
||||
Master: 10.0.1.1 (internal), 10.0.1.2 (external, IP alias)
|
||||
internal:
|
||||
match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
|
||||
notify-source 10.0.1.1;
|
||||
transfer-source 10.0.1.1;
|
||||
query-source address 10.0.1.1;
|
||||
external:
|
||||
match-clients { any; };
|
||||
recursion no; // don't offer recursion to the world
|
||||
notify-source 10.0.1.2;
|
||||
transfer-source 10.0.1.2;
|
||||
query-source address 10.0.1.2;
|
||||
|
||||
Slave: 10.0.1.3 (internal), 10.0.1.4 (external, IP alias)
|
||||
internal:
|
||||
match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
|
||||
notify-source 10.0.1.3;
|
||||
transfer-source 10.0.1.3;
|
||||
query-source address 10.0.1.3;
|
||||
external:
|
||||
match-clients { any; };
|
||||
recursion no; // don't offer recursion to the world
|
||||
notify-source 10.0.1.4;
|
||||
transfer-source 10.0.1.4;
|
||||
query-source address 10.0.1.4;
|
||||
|
||||
You put the external address on the alias so that all the other
|
||||
dns clients on these boxes see the internal view by default.
|
||||
|
||||
A: (BIND 9.3 and later) Use TSIG to select the appropriate view.
|
||||
|
||||
Master 10.0.1.1:
|
||||
key "external" {
|
||||
algorithm hmac-md5;
|
||||
secret "xxxxxxxx";
|
||||
};
|
||||
view "internal" {
|
||||
match-clients { !key external; 10.0.1/24; };
|
||||
...
|
||||
};
|
||||
view "external" {
|
||||
match-clients { key external; any; };
|
||||
server 10.0.0.2 { keys external; };
|
||||
recursion no;
|
||||
...
|
||||
};
|
||||
|
||||
Slave 10.0.1.2:
|
||||
key "external" {
|
||||
algorithm hmac-md5;
|
||||
secret "xxxxxxxx";
|
||||
};
|
||||
view "internal" {
|
||||
match-clients { !key external; 10.0.1/24; };
|
||||
};
|
||||
view "external" {
|
||||
match-clients { key external; any; };
|
||||
server 10.0.0.1 { keys external; };
|
||||
recursion no;
|
||||
...
|
||||
};
|
||||
|
||||
|
||||
Q: I have Freebsd 4.x and "rndc-confgen -a" just sits there.
|
||||
|
||||
A: /dev/random is not configured. Use rndcontrol(8) to tell the kernel
|
||||
to use certain interrupts as a source of random events. You can make this
|
||||
permanent by setting rand_irqs in /etc/rc.conf.
|
||||
|
||||
e.g.
|
||||
/etc/rc.conf
|
||||
rand_irqs="3 14 15"
|
||||
|
||||
See also http://people.freebsd.org/~dougb/randomness.html
|
||||
|
||||
|
||||
Q: Why is named listening on UDP port other than 53?
|
||||
|
||||
A: Named uses a system selected port to make queries of other nameservers.
|
||||
This behaviour can be overridden by using query-source to lock down the
|
||||
port and/or address. See also notify-source and transfer-source.
|
||||
|
||||
|
||||
Q: I get error messages like "multiple RRs of singleton type" and
|
||||
"CNAME and other data" when transferring a zone. What does this mean?
|
||||
|
||||
A: These indicate a malformed master zone. You can identify the
|
||||
exact records involved by transferring the zone using dig then
|
||||
running named-checkzone on it.
|
||||
|
||||
e.g.
|
||||
dig axfr example.com @master-server > tmp
|
||||
named-checkzone example.com tmp
|
||||
|
||||
|
||||
Q: I get error messages like "named.conf:99: unexpected end of input" where
|
||||
99 is the last line of named.conf.
|
||||
|
||||
A: Some text editors (notepad and wordpad) fail to put a line termination
|
||||
indication (e.g. CR/LF) on the last line of a text file. This can be fixed
|
||||
by "adding" a blank line to the end of the file. Named expects to see EOF
|
||||
immediately after EOL and treats text files where this is not met as truncated.
|
||||
|
||||
|
||||
Q: I get warning messages like "zone example.com/IN: refresh: failure trying master
|
||||
1.2.3.4#53: timed out".
|
||||
|
||||
A: Check that you can make UDP queries from the slave to the master
|
||||
|
||||
dig +norec example.com soa @1.2.3.4
|
||||
|
||||
A: You could be generating queries faster than the slave can cope with. Lower
|
||||
the serial query rate.
|
||||
|
||||
serial-query-rate 5; // default 20
|
||||
|
||||
Q: How do I share a dynamic zone between multiple views?
|
||||
|
||||
A: You choose one view to be master and the second a slave and transfer
|
||||
the zone between views.
|
||||
|
||||
Master 10.0.1.1:
|
||||
key "external" {
|
||||
algorithm hmac-md5;
|
||||
secret "xxxxxxxx";
|
||||
};
|
||||
|
||||
key "mykey" {
|
||||
algorithm hmac-md5;
|
||||
secret "yyyyyyyy";
|
||||
};
|
||||
|
||||
view "internal" {
|
||||
match-clients { !external; 10.0.1/24; };
|
||||
server 10.0.1.1 {
|
||||
/* Deliver notify messages to external view. */
|
||||
keys { external; };
|
||||
};
|
||||
zone "example.com" {
|
||||
type master;
|
||||
file "internal/example.db";
|
||||
allow-update { key mykey; };
|
||||
notify-also { 10.0.1.1; };
|
||||
};
|
||||
};
|
||||
|
||||
view "external" {
|
||||
match-clients { external; any; };
|
||||
zone "example.com" {
|
||||
type slave;
|
||||
file "external/example.db";
|
||||
masters { 10.0.1.1; };
|
||||
transfer-source { 10.0.1.1; };
|
||||
// allow-update-forwarding { any; };
|
||||
// allow-notify { ... };
|
||||
};
|
||||
};
|
||||
|
||||
Q: I get a error message like "zone wireless.ietf56.ietf.org/IN: loading master
|
||||
file primaries/wireless.ietf56.ietf.org: no owner".
|
||||
|
||||
A: This error is produced when a line in the master file contains leading
|
||||
white space (tab/space) but the is no current record owner name to inherit
|
||||
the name from. Usually this is the result of putting white space before
|
||||
a comment. Forgeting the "@" for the SOA record or indenting the master
|
||||
file.
|
||||
|
||||
|
||||
Q: Why are my logs in GMT (UTC).
|
||||
|
||||
A: You are running chrooted (-t) and have not supplied local timzone
|
||||
information in the chroot area.
|
||||
|
||||
FreeBSD: /etc/localtime
|
||||
Solaris: /etc/TIMEZONE and /usr/share/lib/zoneinfo
|
||||
OSF: /etc/zoneinfo/localtime
|
||||
|
||||
See also tzset(3) and zic(8).
|
59
dist/bind/Makefile.in
vendored
Normal file
59
dist/bind/Makefile.in
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 1998-2002 Internet Software Consortium.
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# Id: Makefile.in,v 1.41.2.2.2.2 2004/03/08 04:04:12 marka Exp
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
@BIND9_VERSION@
|
||||
|
||||
SUBDIRS = make lib bin doc @LIBBIND@
|
||||
TARGETS =
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
distclean::
|
||||
@if [ "X@LIBBIND@" = "X" ] ; then \
|
||||
i=lib/bind; \
|
||||
echo "making $@ in `pwd`/$$i"; \
|
||||
(cd $$i; ${MAKE} ${MAKEDEFS} $@) || exit 1; \
|
||||
fi
|
||||
|
||||
distclean::
|
||||
rm -f config.cache config.h config.log config.status TAGS
|
||||
rm -f libtool isc-config.sh configure.lineno
|
||||
rm -f util/conf.sh docutil/docbook2man-wrapper.sh
|
||||
|
||||
# XXX we should clean libtool stuff too. Only do this after we add rules
|
||||
# to make it.
|
||||
maintainer-clean::
|
||||
rm -f configure
|
||||
|
||||
installdirs:
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir}
|
||||
|
||||
install:: isc-config.sh installdirs
|
||||
${INSTALL_SCRIPT} isc-config.sh ${DESTDIR}${bindir}
|
||||
|
||||
tags:
|
||||
rm -f TAGS
|
||||
find lib bin -name "*.[ch]" -print | @ETAGS@ -
|
||||
|
||||
check: test
|
||||
|
||||
test:
|
||||
(cd bin/tests && ${MAKE} ${MAKEDEFS} test)
|
140
dist/bind/acconfig.h
vendored
Normal file
140
dist/bind/acconfig.h
vendored
Normal file
@ -0,0 +1,140 @@
|
||||
/* $NetBSD: acconfig.h,v 1.1.1.1 2004/05/17 23:43:06 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Id: acconfig.h,v 1.35.2.4.2.7 2004/03/08 04:04:12 marka Exp */
|
||||
|
||||
/***
|
||||
*** This file is not to be included by any public header files, because
|
||||
*** it does not get installed.
|
||||
***/
|
||||
@TOP@
|
||||
|
||||
/* define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef ssize_t
|
||||
|
||||
/* define on DEC OSF to enable 4.4BSD style sa_len support */
|
||||
#undef _SOCKADDR_LEN
|
||||
|
||||
/* define if your system needs pthread_init() before using pthreads */
|
||||
#undef NEED_PTHREAD_INIT
|
||||
|
||||
/* define if your system has sigwait() */
|
||||
#undef HAVE_SIGWAIT
|
||||
|
||||
/* define if sigwait() is the UnixWare flavor */
|
||||
#undef HAVE_UNIXWARE_SIGWAIT
|
||||
|
||||
/* define on Solaris to get sigwait() to work using pthreads semantics */
|
||||
#undef _POSIX_PTHREAD_SEMANTICS
|
||||
|
||||
/* define if LinuxThreads is in use */
|
||||
#undef HAVE_LINUXTHREADS
|
||||
|
||||
/* define if sysconf() is available */
|
||||
#undef HAVE_SYSCONF
|
||||
|
||||
/* define if sysctlbyname() is available */
|
||||
#undef HAVE_SYSCTLBYNAME
|
||||
|
||||
/* 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
|
||||
|
||||
/* define if chroot() is available */
|
||||
#undef HAVE_CHROOT
|
||||
|
||||
/* define if tzset() is available */
|
||||
#undef HAVE_TZSET
|
||||
|
||||
/* define if struct addrinfo exists */
|
||||
#undef HAVE_ADDRINFO
|
||||
|
||||
/* define if getaddrinfo() exists */
|
||||
#undef HAVE_GETADDRINFO
|
||||
|
||||
/* define if gai_strerror() exists */
|
||||
#undef HAVE_GAISTRERROR
|
||||
|
||||
/* define if arc4random() exists */
|
||||
#undef HAVE_ARC4RANDOM
|
||||
|
||||
/* define if pthread_setconcurrency() should be called to tell the
|
||||
* OS how many threads we might want to run.
|
||||
*/
|
||||
#undef CALL_PTHREAD_SETCONCURRENCY
|
||||
|
||||
/* define if IPv6 is not disabled */
|
||||
#undef WANT_IPV6
|
||||
|
||||
/* define if flockfile() is available */
|
||||
#undef HAVE_FLOCKFILE
|
||||
|
||||
/* define if getc_unlocked() is available */
|
||||
#undef HAVE_GETCUNLOCKED
|
||||
|
||||
/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */
|
||||
#undef SHUTUP_SPUTAUX
|
||||
#ifdef SHUTUP_SPUTAUX
|
||||
struct __sFILE;
|
||||
extern __inline int __sputaux(int _c, struct __sFILE *_p);
|
||||
#endif
|
||||
|
||||
/* Shut up warnings about missing sigwait prototype on BSD/OS 4.0* */
|
||||
#undef SHUTUP_SIGWAIT
|
||||
#ifdef SHUTUP_SIGWAIT
|
||||
int sigwait(const unsigned int *set, int *sig);
|
||||
#endif
|
||||
|
||||
/* Shut up warnings from gcc -Wcast-qual on BSD/OS 4.1. */
|
||||
#undef SHUTUP_STDARG_CAST
|
||||
#if defined(SHUTUP_STDARG_CAST) && defined(__GNUC__)
|
||||
#include <stdarg.h> /* Grr. Must be included *every time*. */
|
||||
/*
|
||||
* The silly continuation line is to keep configure from
|
||||
* commenting out the #undef.
|
||||
*/
|
||||
#undef \
|
||||
va_start
|
||||
#define va_start(ap, last) \
|
||||
do { \
|
||||
union { const void *konst; long *var; } _u; \
|
||||
_u.konst = &(last); \
|
||||
ap = (va_list)(_u.var + __va_words(__typeof(last))); \
|
||||
} while (0)
|
||||
#endif /* SHUTUP_STDARG_CAST && __GNUC__ */
|
||||
|
||||
/* define if the system has a random number generating device */
|
||||
#undef PATH_RANDOMDEV
|
||||
|
||||
/* define if pthread_attr_getstacksize() is available */
|
||||
#undef HAVE_PTHREAD_ATTR_GETSTACKSIZE
|
||||
|
||||
/* define if pthread_attr_setstacksize() is available */
|
||||
#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE
|
||||
|
||||
/* define if you have strerror in the C library. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
/* Define if you are running under Compaq TruCluster.. */
|
||||
#undef HAVE_TRUCLUSTER
|
2
dist/bind/aclocal.m4
vendored
Normal file
2
dist/bind/aclocal.m4
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
sinclude(./libtool.m4)dnl
|
||||
|
25
dist/bind/bin/Makefile.in
vendored
Normal file
25
dist/bind/bin/Makefile.in
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 1998-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
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# Id: Makefile.in,v 1.22.208.1 2004/03/06 10:21:10 marka Exp
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
SUBDIRS = named rndc dig dnssec tests nsupdate check
|
||||
TARGETS =
|
||||
|
||||
@BIND9_MAKE_RULES@
|
95
dist/bind/bin/check/Makefile.in
vendored
Normal file
95
dist/bind/bin/check/Makefile.in
vendored
Normal file
@ -0,0 +1,95 @@
|
||||
# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# Id: Makefile.in,v 1.15.2.3.8.5 2004/03/06 10:21:10 marka Exp
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
@BIND9_VERSION@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \
|
||||
${ISC_INCLUDES}
|
||||
|
||||
CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
|
||||
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
||||
BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
|
||||
|
||||
LIBS = @LIBS@
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
# Alphabetically
|
||||
TARGETS = named-checkconf@EXEEXT@ named-checkzone@EXEEXT@
|
||||
|
||||
# Alphabetically
|
||||
SRCS = named-checkconf.c named-checkzone.c check-tool.c
|
||||
|
||||
MANPAGES = named-checkconf.8 named-checkzone.8
|
||||
|
||||
HTMLPAGES = named-checkconf.html named-checkzone.html
|
||||
|
||||
MANOBJS = ${MANPAGES} ${HTMLPAGES}
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
named-checkconf.@O@: named-checkconf.c
|
||||
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
|
||||
-DVERSION=\"${VERSION}\" \
|
||||
-c ${srcdir}/named-checkconf.c
|
||||
|
||||
named-checkzone.@O@: named-checkzone.c
|
||||
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
|
||||
-DVERSION=\"${VERSION}\" \
|
||||
-c ${srcdir}/named-checkzone.c
|
||||
|
||||
named-checkconf@EXEEXT@: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \
|
||||
${ISCCFGDEPLIBS} ${BIND9DEPLIBS}
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} -o $@ \
|
||||
named-checkconf.@O@ check-tool.@O@ ${BIND9LIBS} ${ISCCFGLIBS} \
|
||||
${DNSLIBS} ${ISCLIBS} ${LIBS}
|
||||
|
||||
named-checkzone@EXEEXT@: named-checkzone.@O@ check-tool.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} -o $@ \
|
||||
named-checkzone.@O@ check-tool.@O@ ${DNSLIBS} ${ISCLIBS} ${LIBS}
|
||||
|
||||
doc man:: ${MANOBJS}
|
||||
|
||||
docclean manclean maintainer-clean::
|
||||
rm -f ${MANOBJS}
|
||||
|
||||
installdirs:
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
|
||||
|
||||
install:: named-checkconf@EXEEXT@ named-checkzone@EXEEXT@ installdirs
|
||||
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkconf@EXEEXT@ ${DESTDIR}${sbindir}
|
||||
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkzone@EXEEXT@ ${DESTDIR}${sbindir}
|
||||
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8; done
|
||||
|
||||
clean distclean::
|
||||
rm -f ${TARGETS} r1.htm
|
161
dist/bind/bin/check/check-tool.c
vendored
Normal file
161
dist/bind/bin/check/check-tool.c
vendored
Normal file
@ -0,0 +1,161 @@
|
||||
/* $NetBSD: check-tool.c,v 1.1.1.1 2004/05/17 23:43:17 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Id: check-tool.c,v 1.4.12.5 2004/03/08 04:04:13 marka Exp */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "check-tool.h"
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/stdio.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/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;
|
||||
|
||||
isc_result_t
|
||||
setup_logging(isc_mem_t *mctx, isc_log_t **logp) {
|
||||
isc_logdestination_t destination;
|
||||
isc_logconfig_t *logconfig = NULL;
|
||||
isc_log_t *log = NULL;
|
||||
|
||||
RUNTIME_CHECK(isc_log_create(mctx, &log, &logconfig) == ISC_R_SUCCESS);
|
||||
isc_log_setcontext(log);
|
||||
|
||||
destination.file.stream = stdout;
|
||||
destination.file.name = NULL;
|
||||
destination.file.versions = ISC_LOG_ROLLNEVER;
|
||||
destination.file.maximum_size = 0;
|
||||
RUNTIME_CHECK(isc_log_createchannel(logconfig, "stderr",
|
||||
ISC_LOG_TOFILEDESC,
|
||||
ISC_LOG_DYNAMIC,
|
||||
&destination, 0) == ISC_R_SUCCESS);
|
||||
RUNTIME_CHECK(isc_log_usechannel(logconfig, "stderr",
|
||||
NULL, NULL) == ISC_R_SUCCESS);
|
||||
|
||||
*logp = log;
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
||||
const char *classname, dns_zone_t **zonep)
|
||||
{
|
||||
isc_result_t result;
|
||||
dns_rdataclass_t rdclass;
|
||||
isc_textregion_t region;
|
||||
isc_buffer_t buffer;
|
||||
dns_fixedname_t fixorigin;
|
||||
dns_name_t *origin;
|
||||
dns_zone_t *zone = NULL;
|
||||
|
||||
REQUIRE(zonep == NULL || *zonep == NULL);
|
||||
|
||||
if (debug)
|
||||
fprintf(stderr, "loading \"%s\" from \"%s\" class \"%s\"\n",
|
||||
zonename, filename, classname);
|
||||
|
||||
CHECK(dns_zone_create(&zone, mctx));
|
||||
|
||||
dns_zone_settype(zone, dns_zone_master);
|
||||
|
||||
isc_buffer_init(&buffer, zonename, strlen(zonename));
|
||||
isc_buffer_add(&buffer, strlen(zonename));
|
||||
dns_fixedname_init(&fixorigin);
|
||||
origin = dns_fixedname_name(&fixorigin);
|
||||
CHECK(dns_name_fromtext(origin, &buffer, dns_rootname,
|
||||
ISC_FALSE, NULL));
|
||||
CHECK(dns_zone_setorigin(zone, origin));
|
||||
CHECK(dns_zone_setdbtype(zone, 1, (const char * const *) dbtype));
|
||||
CHECK(dns_zone_setfile(zone, filename));
|
||||
|
||||
DE_CONST(classname, region.base);
|
||||
region.length = strlen(classname);
|
||||
CHECK(dns_rdataclass_fromtext(&rdclass, ®ion));
|
||||
|
||||
dns_zone_setclass(zone, rdclass);
|
||||
dns_zone_setoption(zone, zone_options, ISC_TRUE);
|
||||
dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge);
|
||||
|
||||
CHECK(dns_zone_load(zone));
|
||||
if (zonep != NULL){
|
||||
*zonep = zone;
|
||||
zone = NULL;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
if (zone != NULL)
|
||||
dns_zone_detach(&zone);
|
||||
return (result);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dump_zone(const char *zonename, dns_zone_t *zone, const char *filename)
|
||||
{
|
||||
isc_result_t result;
|
||||
FILE *output = stdout;
|
||||
|
||||
if (debug) {
|
||||
if (filename != NULL)
|
||||
fprintf(stderr, "dumping \"%s\" to \"%s\"\n",
|
||||
zonename, filename);
|
||||
else
|
||||
fprintf(stderr, "dumping \"%s\"\n", zonename);
|
||||
}
|
||||
|
||||
if (filename != NULL) {
|
||||
result = isc_stdio_open(filename, "w+", &output);
|
||||
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stderr, "could not open output "
|
||||
"file \"%s\" for writing\n", filename);
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
result = dns_zone_fulldumptostream(zone, output);
|
||||
|
||||
if (filename != NULL)
|
||||
(void)isc_stdio_close(output);
|
||||
|
||||
return (result);
|
||||
}
|
48
dist/bind/bin/check/check-tool.h
vendored
Normal file
48
dist/bind/bin/check/check-tool.h
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
/* $NetBSD: check-tool.h,v 1.1.1.1 2004/05/17 23:43:17 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Id: check-tool.h,v 1.2.12.5 2004/03/08 04:04:13 marka Exp */
|
||||
|
||||
#ifndef CHECK_TOOL_H
|
||||
#define CHECK_TOOL_H
|
||||
|
||||
#include <isc/lang.h>
|
||||
|
||||
#include <isc/types.h>
|
||||
#include <dns/types.h>
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
setup_logging(isc_mem_t *mctx, isc_log_t **logp);
|
||||
|
||||
isc_result_t
|
||||
load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
||||
const char *classname, dns_zone_t **zonep);
|
||||
|
||||
isc_result_t
|
||||
dump_zone(const char *zonename, dns_zone_t *zone, const char *filename);
|
||||
|
||||
extern int debug;
|
||||
extern isc_boolean_t nomerge;
|
||||
extern unsigned int zone_options;
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif
|
61
dist/bind/bin/check/named-checkconf.8
vendored
Normal file
61
dist/bind/bin/check/named-checkconf.8
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
.\" $NetBSD: named-checkconf.8,v 1.1.1.1 2004/05/17 23:43:17 christos Exp $
|
||||
.\"
|
||||
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
.\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" Id: named-checkconf.8,v 1.11.12.3 2004/03/08 04:04:13 marka Exp
|
||||
.\"
|
||||
.TH "NAMED-CHECKCONF" "8" "June 14, 2000" "BIND9" ""
|
||||
.SH NAME
|
||||
named-checkconf \- named configuration file syntax checking tool
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBnamed-checkconf\fR [ \fB-v\fR ] [ \fB-j\fR ] [ \fB-t \fIdirectory\fB\fR ] \fBfilename\fR [ \fB-z\fR ]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBnamed-checkconf\fR checks the syntax, but not
|
||||
the semantics, of a named configuration file.
|
||||
.SH "OPTIONS"
|
||||
.TP
|
||||
\fB-t \fIdirectory\fB\fR
|
||||
chroot to \fIdirectory\fR so that include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted named.
|
||||
.TP
|
||||
\fB-v\fR
|
||||
Print the version of the \fBnamed-checkconf\fR
|
||||
program and exit.
|
||||
.TP
|
||||
\fB-z\fR
|
||||
Perform a check load the master zonefiles found in
|
||||
\fInamed.conf\fR.
|
||||
.TP
|
||||
\fB-j\fR
|
||||
When loading a zonefile read the journal if it exists.
|
||||
.TP
|
||||
\fBfilename\fR
|
||||
The name of the configuration file to be checked. If not
|
||||
specified, it defaults to \fI/etc/named.conf\fR.
|
||||
.SH "RETURN VALUES"
|
||||
.PP
|
||||
\fBnamed-checkconf\fR returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBnamed\fR(8),
|
||||
\fIBIND 9 Administrator Reference Manual\fR.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
Internet Software Consortium
|
288
dist/bind/bin/check/named-checkconf.c
vendored
Normal file
288
dist/bind/bin/check/named-checkconf.c
vendored
Normal file
@ -0,0 +1,288 @@
|
||||
/* $NetBSD: named-checkconf.c,v 1.1.1.1 2004/05/17 23:43:17 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Id: named-checkconf.c,v 1.12.12.7 2004/03/08 09:04:14 marka Exp */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/dir.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/log.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#include "check-tool.h"
|
||||
|
||||
isc_log_t *logc = NULL;
|
||||
|
||||
#define CHECK(r)\
|
||||
do { \
|
||||
result = (r); \
|
||||
if (result != ISC_R_SUCCESS) \
|
||||
goto cleanup; \
|
||||
} while (0)
|
||||
|
||||
static void
|
||||
usage(void) {
|
||||
fprintf(stderr, "usage: named-checkconf [-j] [-v] [-z] [-t directory] "
|
||||
"[named.conf]\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
directory_callback(const char *clausename, cfg_obj_t *obj, void *arg) {
|
||||
isc_result_t result;
|
||||
char *directory;
|
||||
|
||||
REQUIRE(strcasecmp("directory", clausename) == 0);
|
||||
|
||||
UNUSED(arg);
|
||||
UNUSED(clausename);
|
||||
|
||||
/*
|
||||
* Change directory.
|
||||
*/
|
||||
directory = cfg_obj_asstring(obj);
|
||||
result = isc_dir_chdir(directory);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
cfg_obj_log(obj, logc, ISC_LOG_ERROR,
|
||||
"change directory to '%s' failed: %s\n",
|
||||
directory, isc_result_totext(result));
|
||||
return (result);
|
||||
}
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
configure_zone(const char *vclass, const char *view, cfg_obj_t *zconfig,
|
||||
isc_mem_t *mctx)
|
||||
{
|
||||
isc_result_t result;
|
||||
const char *zclass;
|
||||
const char *zname;
|
||||
const char *zfile;
|
||||
cfg_obj_t *zoptions = NULL;
|
||||
cfg_obj_t *classobj = NULL;
|
||||
cfg_obj_t *typeobj = NULL;
|
||||
cfg_obj_t *fileobj = NULL;
|
||||
cfg_obj_t *dbobj = NULL;
|
||||
|
||||
zname = cfg_obj_asstring(cfg_tuple_get(zconfig, "name"));
|
||||
classobj = cfg_tuple_get(zconfig, "class");
|
||||
if (!cfg_obj_isstring(classobj))
|
||||
zclass = vclass;
|
||||
else
|
||||
zclass = cfg_obj_asstring(classobj);
|
||||
zoptions = cfg_tuple_get(zconfig, "options");
|
||||
cfg_map_get(zoptions, "type", &typeobj);
|
||||
if (typeobj == NULL)
|
||||
return (ISC_R_FAILURE);
|
||||
if (strcasecmp(cfg_obj_asstring(typeobj), "master") != 0)
|
||||
return (ISC_R_SUCCESS);
|
||||
cfg_map_get(zoptions, "database", &dbobj);
|
||||
if (dbobj != NULL)
|
||||
return (ISC_R_SUCCESS);
|
||||
cfg_map_get(zoptions, "file", &fileobj);
|
||||
if (fileobj == NULL)
|
||||
return (ISC_R_FAILURE);
|
||||
zfile = cfg_obj_asstring(fileobj);
|
||||
result = load_zone(mctx, zname, zfile, zclass, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fprintf(stderr, "%s/%s/%s: %s\n", view, zname, zclass,
|
||||
dns_result_totext(result));
|
||||
return(result);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
configure_view(const char *vclass, const char *view, cfg_obj_t *config,
|
||||
cfg_obj_t *vconfig, isc_mem_t *mctx)
|
||||
{
|
||||
cfg_listelt_t *element;
|
||||
cfg_obj_t *voptions;
|
||||
cfg_obj_t *zonelist;
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
isc_result_t tresult;
|
||||
|
||||
voptions = NULL;
|
||||
if (vconfig != NULL)
|
||||
voptions = cfg_tuple_get(vconfig, "options");
|
||||
|
||||
zonelist = NULL;
|
||||
if (voptions != NULL)
|
||||
(void)cfg_map_get(voptions, "zone", &zonelist);
|
||||
else
|
||||
(void)cfg_map_get(config, "zone", &zonelist);
|
||||
|
||||
for (element = cfg_list_first(zonelist);
|
||||
element != NULL;
|
||||
element = cfg_list_next(element))
|
||||
{
|
||||
cfg_obj_t *zconfig = cfg_listelt_value(element);
|
||||
tresult = configure_zone(vclass, view, zconfig, mctx);
|
||||
if (tresult != ISC_R_SUCCESS)
|
||||
result = tresult;
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
|
||||
|
||||
static isc_result_t
|
||||
load_zones_fromconfig(cfg_obj_t *config, isc_mem_t *mctx) {
|
||||
cfg_listelt_t *element;
|
||||
cfg_obj_t *classobj;
|
||||
cfg_obj_t *views;
|
||||
cfg_obj_t *vconfig;
|
||||
const char *vclass;
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
isc_result_t tresult;
|
||||
|
||||
views = NULL;
|
||||
|
||||
(void)cfg_map_get(config, "view", &views);
|
||||
for (element = cfg_list_first(views);
|
||||
element != NULL;
|
||||
element = cfg_list_next(element))
|
||||
{
|
||||
const char *vname;
|
||||
|
||||
vclass = "IN";
|
||||
vconfig = cfg_listelt_value(element);
|
||||
if (vconfig != NULL) {
|
||||
classobj = cfg_tuple_get(vconfig, "class");
|
||||
if (cfg_obj_isstring(classobj))
|
||||
vclass = cfg_obj_asstring(classobj);
|
||||
}
|
||||
vname = cfg_obj_asstring(cfg_tuple_get(vconfig, "name"));
|
||||
tresult = configure_view(vclass, vname, config, vconfig, mctx);
|
||||
if (tresult != ISC_R_SUCCESS)
|
||||
result = tresult;
|
||||
}
|
||||
|
||||
if (views == NULL) {
|
||||
tresult = configure_view("IN", "_default", config, NULL, mctx);
|
||||
if (tresult != ISC_R_SUCCESS)
|
||||
result = tresult;
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
int c;
|
||||
cfg_parser_t *parser = NULL;
|
||||
cfg_obj_t *config = NULL;
|
||||
const char *conffile = NULL;
|
||||
isc_mem_t *mctx = NULL;
|
||||
isc_result_t result;
|
||||
int exit_status = 0;
|
||||
isc_boolean_t load_zones = ISC_FALSE;
|
||||
|
||||
while ((c = isc_commandline_parse(argc, argv, "djt:vz")) != EOF) {
|
||||
switch (c) {
|
||||
case 'd':
|
||||
debug++;
|
||||
break;
|
||||
|
||||
case 'j':
|
||||
nomerge = ISC_FALSE;
|
||||
break;
|
||||
|
||||
case 't':
|
||||
result = isc_dir_chroot(isc_commandline_argument);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stderr, "isc_dir_chroot: %s\n",
|
||||
isc_result_totext(result));
|
||||
exit(1);
|
||||
}
|
||||
result = isc_dir_chdir("/");
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stderr, "isc_dir_chdir: %s\n",
|
||||
isc_result_totext(result));
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
printf(VERSION "\n");
|
||||
exit(0);
|
||||
|
||||
case 'z':
|
||||
load_zones = ISC_TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
if (argv[isc_commandline_index] != NULL)
|
||||
conffile = argv[isc_commandline_index];
|
||||
if (conffile == NULL || conffile[0] == '\0')
|
||||
conffile = NAMED_CONFFILE;
|
||||
|
||||
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
||||
|
||||
RUNTIME_CHECK(setup_logging(mctx, &logc) == ISC_R_SUCCESS);
|
||||
|
||||
dns_result_register();
|
||||
|
||||
RUNTIME_CHECK(cfg_parser_create(mctx, logc, &parser) == ISC_R_SUCCESS);
|
||||
|
||||
cfg_parser_setcallback(parser, directory_callback, NULL);
|
||||
|
||||
if (cfg_parse_file(parser, conffile, &cfg_type_namedconf, &config) !=
|
||||
ISC_R_SUCCESS)
|
||||
exit(1);
|
||||
|
||||
result = bind9_check_namedconf(config, logc, mctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
exit_status = 1;
|
||||
|
||||
if (result == ISC_R_SUCCESS && load_zones) {
|
||||
dns_log_init(logc);
|
||||
dns_log_setcontext(logc);
|
||||
result = load_zones_fromconfig(config, mctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
exit_status = 1;
|
||||
}
|
||||
|
||||
cfg_obj_destroy(parser, &config);
|
||||
|
||||
cfg_parser_destroy(&parser);
|
||||
|
||||
isc_log_destroy(&logc);
|
||||
|
||||
isc_mem_destroy(&mctx);
|
||||
|
||||
return (exit_status);
|
||||
}
|
146
dist/bind/bin/check/named-checkconf.docbook
vendored
Normal file
146
dist/bind/bin/check/named-checkconf.docbook
vendored
Normal file
@ -0,0 +1,146 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
|
||||
<!--
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2001, 2002 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
- purpose with or without fee is hereby granted, provided that the above
|
||||
- copyright notice and this permission notice appear in all copies.
|
||||
-
|
||||
- THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Id: named-checkconf.docbook,v 1.3.2.1.8.4 2004/03/08 04:04:13 marka Exp -->
|
||||
|
||||
<refentry>
|
||||
<refentryinfo>
|
||||
<date>June 14, 2000</date>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle><application>named-checkconf</application></refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>named-checkconf</application></refname>
|
||||
<refpurpose>named configuration file syntax checking tool</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>named-checkconf</command>
|
||||
<arg><option>-v</option></arg>
|
||||
<arg><option>-j</option></arg>
|
||||
<arg><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg choice="req">filename</arg>
|
||||
<arg><option>-z</option></arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para>
|
||||
<command>named-checkconf</command> checks the syntax, but not
|
||||
the semantics, of a named configuration file.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>OPTIONS</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>-t <replaceable class="parameter">directory</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
chroot to <filename>directory</filename> so that include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted named.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-v</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print the version of the <command>named-checkconf</command>
|
||||
program and exit.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-z</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Perform a check load the master zonefiles found in
|
||||
<filename>named.conf</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-j</term>
|
||||
<listitem>
|
||||
<para>
|
||||
When loading a zonefile read the journal if it exists.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>filename</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the configuration file to be checked. If not
|
||||
specified, it defaults to <filename>/etc/named.conf</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>RETURN VALUES</title>
|
||||
<para>
|
||||
<command>named-checkconf</command> returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para>
|
||||
<citerefentry>
|
||||
<refentrytitle>named</refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>AUTHOR</title>
|
||||
<para>
|
||||
<corpauthor>Internet Software Consortium</corpauthor>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
-->
|
||||
|
220
dist/bind/bin/check/named-checkconf.html
vendored
Normal file
220
dist/bind/bin/check/named-checkconf.html
vendored
Normal file
@ -0,0 +1,220 @@
|
||||
<!--
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2001, 2002 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
- purpose with or without fee is hereby granted, provided that the above
|
||||
- copyright notice and this permission notice appear in all copies.
|
||||
-
|
||||
- THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Id: named-checkconf.html,v 1.5.2.1.4.3 2004/03/08 04:04:13 marka Exp -->
|
||||
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>named-checkconf</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
|
||||
"></HEAD
|
||||
><BODY
|
||||
CLASS="REFENTRY"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><H1
|
||||
><A
|
||||
NAME="AEN1"
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>named-checkconf</SPAN
|
||||
></A
|
||||
></H1
|
||||
><DIV
|
||||
CLASS="REFNAMEDIV"
|
||||
><A
|
||||
NAME="AEN9"
|
||||
></A
|
||||
><H2
|
||||
>Name</H2
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>named-checkconf</SPAN
|
||||
> -- named configuration file syntax checking tool</DIV
|
||||
><DIV
|
||||
CLASS="REFSYNOPSISDIV"
|
||||
><A
|
||||
NAME="AEN13"
|
||||
></A
|
||||
><H2
|
||||
>Synopsis</H2
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>named-checkconf</B
|
||||
> [<TT
|
||||
CLASS="OPTION"
|
||||
>-v</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-j</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-t <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>directory</I
|
||||
></TT
|
||||
></TT
|
||||
>] {filename} [<TT
|
||||
CLASS="OPTION"
|
||||
>-z</TT
|
||||
>]</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN26"
|
||||
></A
|
||||
><H2
|
||||
>DESCRIPTION</H2
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>named-checkconf</B
|
||||
> checks the syntax, but not
|
||||
the semantics, of a named configuration file.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN30"
|
||||
></A
|
||||
><H2
|
||||
>OPTIONS</H2
|
||||
><P
|
||||
></P
|
||||
><DIV
|
||||
CLASS="VARIABLELIST"
|
||||
><DL
|
||||
><DT
|
||||
>-t <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>directory</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> chroot to <TT
|
||||
CLASS="FILENAME"
|
||||
>directory</TT
|
||||
> so that include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted named.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-v</DT
|
||||
><DD
|
||||
><P
|
||||
> Print the version of the <B
|
||||
CLASS="COMMAND"
|
||||
>named-checkconf</B
|
||||
>
|
||||
program and exit.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-z</DT
|
||||
><DD
|
||||
><P
|
||||
> Perform a check load the master zonefiles found in
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>named.conf</TT
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-j</DT
|
||||
><DD
|
||||
><P
|
||||
> When loading a zonefile read the journal if it exists.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>filename</DT
|
||||
><DD
|
||||
><P
|
||||
> The name of the configuration file to be checked. If not
|
||||
specified, it defaults to <TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/named.conf</TT
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN58"
|
||||
></A
|
||||
><H2
|
||||
>RETURN VALUES</H2
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>named-checkconf</B
|
||||
> returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN62"
|
||||
></A
|
||||
><H2
|
||||
>SEE ALSO</H2
|
||||
><P
|
||||
> <SPAN
|
||||
CLASS="CITEREFENTRY"
|
||||
><SPAN
|
||||
CLASS="REFENTRYTITLE"
|
||||
>named</SPAN
|
||||
>(8)</SPAN
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>BIND 9 Administrator Reference Manual</I
|
||||
>.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN69"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
><P
|
||||
> Internet Software Consortium
|
||||
</P
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
96
dist/bind/bin/check/named-checkzone.8
vendored
Normal file
96
dist/bind/bin/check/named-checkzone.8
vendored
Normal file
@ -0,0 +1,96 @@
|
||||
.\" $NetBSD: named-checkzone.8,v 1.1.1.1 2004/05/17 23:43:17 christos Exp $
|
||||
.\"
|
||||
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
.\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" Id: named-checkzone.8,v 1.11.2.1.8.3 2004/03/08 04:04:14 marka Exp
|
||||
.\"
|
||||
.TH "NAMED-CHECKZONE" "8" "June 13, 2000" "BIND9" ""
|
||||
.SH NAME
|
||||
named-checkzone \- zone file validity checking tool
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBnamed-checkzone\fR [ \fB-d\fR ] [ \fB-j\fR ] [ \fB-q\fR ] [ \fB-v\fR ] [ \fB-c \fIclass\fB\fR ] [ \fB-k \fImode\fB\fR ] [ \fB-n \fImode\fB\fR ] [ \fB-o \fIfilename\fB\fR ] [ \fB-t \fIdirectory\fB\fR ] [ \fB-w \fIdirectory\fB\fR ] [ \fB-D\fR ] \fBzonename\fR \fBfilename\fR
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBnamed-checkzone\fR checks the syntax and integrity of
|
||||
a zone file. It performs the same checks as \fBnamed\fR
|
||||
does when loading a zone. This makes
|
||||
\fBnamed-checkzone\fR useful for checking zone
|
||||
files before configuring them into a name server.
|
||||
.SH "OPTIONS"
|
||||
.TP
|
||||
\fB-d\fR
|
||||
Enable debugging.
|
||||
.TP
|
||||
\fB-q\fR
|
||||
Quiet mode - exit code only.
|
||||
.TP
|
||||
\fB-v\fR
|
||||
Print the version of the \fBnamed-checkzone\fR
|
||||
program and exit.
|
||||
.TP
|
||||
\fB-j\fR
|
||||
When loading the zone file read the journal if it exists.
|
||||
.TP
|
||||
\fB-c \fIclass\fB\fR
|
||||
Specify the class of the zone. If not specified "IN" is assumed.
|
||||
.TP
|
||||
\fB-k \fImode\fB\fR
|
||||
Perform \fB"check-name"\fR checks with the specified failure mode.
|
||||
Possible modes are \fB"fail"\fR,
|
||||
\fB"warn"\fR (default) and
|
||||
\fB"ignore"\fR.
|
||||
.TP
|
||||
\fB-n \fImode\fB\fR
|
||||
Specify whether NS records should be checked to see if they
|
||||
are addresses. Possible modes are \fB"fail"\fR,
|
||||
\fB"warn"\fR (default) and
|
||||
\fB"ignore"\fR.
|
||||
.TP
|
||||
\fB-o \fIfilename\fB\fR
|
||||
Write zone output to \fIdirectory\fR.
|
||||
.TP
|
||||
\fB-t \fIdirectory\fB\fR
|
||||
chroot to \fIdirectory\fR so that include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted named.
|
||||
.TP
|
||||
\fB-w \fIdirectory\fB\fR
|
||||
chdir to \fIdirectory\fR so that relative
|
||||
filenames in master file $INCLUDE directives work. This
|
||||
is similar to the directory clause in
|
||||
\fInamed.conf\fR.
|
||||
.TP
|
||||
\fB-D\fR
|
||||
Dump zone file in canonical format.
|
||||
.TP
|
||||
\fBzonename\fR
|
||||
The domain name of the zone being checked.
|
||||
.TP
|
||||
\fBfilename\fR
|
||||
The name of the zone file.
|
||||
.SH "RETURN VALUES"
|
||||
.PP
|
||||
\fBnamed-checkzone\fR returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBnamed\fR(8),
|
||||
\fIRFC 1035\fR,
|
||||
\fIBIND 9 Administrator Reference Manual\fR.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
Internet Software Consortium
|
202
dist/bind/bin/check/named-checkzone.c
vendored
Normal file
202
dist/bind/bin/check/named-checkzone.c
vendored
Normal file
@ -0,0 +1,202 @@
|
||||
/* $NetBSD: named-checkzone.c,v 1.1.1.1 2004/05/17 23:43:17 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Id: named-checkzone.c,v 1.13.2.3.8.9 2004/03/06 10:21:11 marka Exp */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <isc/app.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/dir.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/socket.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/task.h>
|
||||
#include <isc/timer.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/db.h>
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/zone.h>
|
||||
|
||||
#include "check-tool.h"
|
||||
|
||||
static int quiet = 0;
|
||||
static isc_mem_t *mctx = NULL;
|
||||
dns_zone_t *zone = NULL;
|
||||
dns_zonetype_t zonetype = dns_zone_master;
|
||||
static int dumpzone = 0;
|
||||
static const char *output_filename;
|
||||
|
||||
#define ERRRET(result, function) \
|
||||
do { \
|
||||
if (result != ISC_R_SUCCESS) { \
|
||||
if (!quiet) \
|
||||
fprintf(stderr, "%s() returned %s\n", \
|
||||
function, dns_result_totext(result)); \
|
||||
return (result); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static void
|
||||
usage(void) {
|
||||
fprintf(stderr,
|
||||
"usage: named-checkzone [-djqvD] [-c class] [-o output] "
|
||||
"[-t directory] [-w directory] [-k option] zonename filename\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static void
|
||||
destroy(void) {
|
||||
if (zone != NULL)
|
||||
dns_zone_detach(&zone);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
int c;
|
||||
char *origin = NULL;
|
||||
char *filename = NULL;
|
||||
isc_log_t *lctx = NULL;
|
||||
isc_result_t result;
|
||||
char classname_in[] = "IN";
|
||||
char *classname = classname_in;
|
||||
const char *workdir = NULL;
|
||||
|
||||
while ((c = isc_commandline_parse(argc, argv, "c:dijk:n:qst:o:vw:D")) != EOF) {
|
||||
switch (c) {
|
||||
case 'c':
|
||||
classname = isc_commandline_argument;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
debug++;
|
||||
break;
|
||||
|
||||
case 'j':
|
||||
nomerge = ISC_FALSE;
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
if (!strcmp(isc_commandline_argument, "ignore"))
|
||||
zone_options &= ~(DNS_ZONEOPT_CHECKNS|
|
||||
DNS_ZONEOPT_FATALNS);
|
||||
else if (!strcmp(isc_commandline_argument, "warn")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKNS;
|
||||
zone_options &= ~DNS_ZONEOPT_FATALNS;
|
||||
} else if (!strcmp(isc_commandline_argument, "fail"))
|
||||
zone_options |= DNS_ZONEOPT_CHECKNS|
|
||||
DNS_ZONEOPT_FATALNS;
|
||||
break;
|
||||
|
||||
case 'k':
|
||||
if (!strcmp(isc_commandline_argument, "check-names")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMES;
|
||||
} else if (!strcmp(isc_commandline_argument,
|
||||
"check-names-fail")) {
|
||||
zone_options |= DNS_ZONEOPT_CHECKNAMES |
|
||||
DNS_ZONEOPT_CHECKNAMESFAIL;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'q':
|
||||
quiet++;
|
||||
break;
|
||||
|
||||
case 't':
|
||||
result = isc_dir_chroot(isc_commandline_argument);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stderr, "isc_dir_chroot: %s: %s\n",
|
||||
isc_commandline_argument,
|
||||
isc_result_totext(result));
|
||||
exit(1);
|
||||
}
|
||||
result = isc_dir_chdir("/");
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stderr, "isc_dir_chdir: %s\n",
|
||||
isc_result_totext(result));
|
||||
exit(1);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
output_filename = isc_commandline_argument;
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
printf(VERSION "\n");
|
||||
exit(0);
|
||||
|
||||
case 'w':
|
||||
workdir = isc_commandline_argument;
|
||||
break;
|
||||
|
||||
case 'D':
|
||||
dumpzone++;
|
||||
break;
|
||||
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
if (workdir != NULL) {
|
||||
result = isc_dir_chdir(workdir);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stderr, "isc_dir_chdir: %s: %s\n",
|
||||
workdir, isc_result_totext(result));
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (isc_commandline_index + 2 > argc)
|
||||
usage();
|
||||
|
||||
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
||||
if (!quiet) {
|
||||
RUNTIME_CHECK(setup_logging(mctx, &lctx) == ISC_R_SUCCESS);
|
||||
dns_log_init(lctx);
|
||||
dns_log_setcontext(lctx);
|
||||
}
|
||||
|
||||
dns_result_register();
|
||||
|
||||
origin = argv[isc_commandline_index++];
|
||||
filename = argv[isc_commandline_index++];
|
||||
result = load_zone(mctx, origin, filename, classname, &zone);
|
||||
|
||||
if (result == ISC_R_SUCCESS && dumpzone) {
|
||||
result = dump_zone(origin, zone, output_filename);
|
||||
}
|
||||
|
||||
if (!quiet && result == ISC_R_SUCCESS)
|
||||
fprintf(stdout, "OK\n");
|
||||
destroy();
|
||||
if (lctx != NULL)
|
||||
isc_log_destroy(&lctx);
|
||||
isc_mem_destroy(&mctx);
|
||||
return ((result == ISC_R_SUCCESS) ? 0 : 1);
|
||||
}
|
236
dist/bind/bin/check/named-checkzone.docbook
vendored
Normal file
236
dist/bind/bin/check/named-checkzone.docbook
vendored
Normal file
@ -0,0 +1,236 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
|
||||
<!--
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2001, 2002 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
- purpose with or without fee is hereby granted, provided that the above
|
||||
- copyright notice and this permission notice appear in all copies.
|
||||
-
|
||||
- THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Id: named-checkzone.docbook,v 1.3.2.2.8.6 2004/03/08 04:04:14 marka Exp -->
|
||||
|
||||
<refentry>
|
||||
<refentryinfo>
|
||||
<date>June 13, 2000</date>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle><application>named-checkzone</application></refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>named-checkzone</application></refname>
|
||||
<refpurpose>zone file validity checking tool</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>named-checkzone</command>
|
||||
<arg><option>-d</option></arg>
|
||||
<arg><option>-j</option></arg>
|
||||
<arg><option>-q</option></arg>
|
||||
<arg><option>-v</option></arg>
|
||||
<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg><option>-k <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-n <replaceable class="parameter">mode</replaceable></option></arg>
|
||||
<arg><option>-o <replaceable class="parameter">filename</replaceable></option></arg>
|
||||
<arg><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg><option>-w <replaceable class="parameter">directory</replaceable></option></arg>
|
||||
<arg><option>-D</option></arg>
|
||||
<arg choice="req">zonename</arg>
|
||||
<arg choice="req">filename</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para>
|
||||
<command>named-checkzone</command> checks the syntax and integrity of
|
||||
a zone file. It performs the same checks as <command>named</command>
|
||||
does when loading a zone. This makes
|
||||
<command>named-checkzone</command> useful for checking zone
|
||||
files before configuring them into a name server.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>OPTIONS</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>-d</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Enable debugging.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-q</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Quiet mode - exit code only.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-v</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print the version of the <command>named-checkzone</command>
|
||||
program and exit.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-j</term>
|
||||
<listitem>
|
||||
<para>
|
||||
When loading the zone file read the journal if it exists.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<varlistentry>
|
||||
<term>-c <replaceable class="parameter">class</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the class of the zone. If not specified "IN" is assumed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-k <replaceable class="parameter">mode</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Perform <command>"check-name"</command> checks with the specified failure mode.
|
||||
Possible modes are <command>"fail"</command>,
|
||||
<command>"warn"</command> (default) and
|
||||
<command>"ignore"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-n <replaceable class="parameter">mode</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify whether NS records should be checked to see if they
|
||||
are addresses. Possible modes are <command>"fail"</command>,
|
||||
<command>"warn"</command> (default) and
|
||||
<command>"ignore"</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-o <replaceable class="parameter">filename</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Write zone output to <filename>directory</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-t <replaceable class="parameter">directory</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
chroot to <filename>directory</filename> so that include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted named.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-w <replaceable class="parameter">directory</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
chdir to <filename>directory</filename> so that relative
|
||||
filenames in master file $INCLUDE directives work. This
|
||||
is similar to the directory clause in
|
||||
<filename>named.conf</filename>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-D</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Dump zone file in canonical format.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>zonename</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The domain name of the zone being checked.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>filename</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the zone file.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>RETURN VALUES</title>
|
||||
<para>
|
||||
<command>named-checkzone</command> returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para>
|
||||
<citerefentry>
|
||||
<refentrytitle>named</refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citetitle>RFC 1035</citetitle>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>AUTHOR</title>
|
||||
<para>
|
||||
<corpauthor>Internet Software Consortium</corpauthor>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
-->
|
||||
|
391
dist/bind/bin/check/named-checkzone.html
vendored
Normal file
391
dist/bind/bin/check/named-checkzone.html
vendored
Normal file
@ -0,0 +1,391 @@
|
||||
<!--
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2001, 2002 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
- purpose with or without fee is hereby granted, provided that the above
|
||||
- copyright notice and this permission notice appear in all copies.
|
||||
-
|
||||
- THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Id: named-checkzone.html,v 1.5.2.2.4.3 2004/03/08 04:04:14 marka Exp -->
|
||||
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>named-checkzone</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
|
||||
"></HEAD
|
||||
><BODY
|
||||
CLASS="REFENTRY"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><H1
|
||||
><A
|
||||
NAME="AEN1"
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>named-checkzone</SPAN
|
||||
></A
|
||||
></H1
|
||||
><DIV
|
||||
CLASS="REFNAMEDIV"
|
||||
><A
|
||||
NAME="AEN9"
|
||||
></A
|
||||
><H2
|
||||
>Name</H2
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>named-checkzone</SPAN
|
||||
> -- zone file validity checking tool</DIV
|
||||
><DIV
|
||||
CLASS="REFSYNOPSISDIV"
|
||||
><A
|
||||
NAME="AEN13"
|
||||
></A
|
||||
><H2
|
||||
>Synopsis</H2
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>named-checkzone</B
|
||||
> [<TT
|
||||
CLASS="OPTION"
|
||||
>-d</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-j</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-q</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-v</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-c <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>class</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-k <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>mode</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-n <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>mode</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-o <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>filename</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-t <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>directory</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-w <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>directory</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-D</TT
|
||||
>] {zonename} {filename}</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN46"
|
||||
></A
|
||||
><H2
|
||||
>DESCRIPTION</H2
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>named-checkzone</B
|
||||
> checks the syntax and integrity of
|
||||
a zone file. It performs the same checks as <B
|
||||
CLASS="COMMAND"
|
||||
>named</B
|
||||
>
|
||||
does when loading a zone. This makes
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>named-checkzone</B
|
||||
> useful for checking zone
|
||||
files before configuring them into a name server.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN52"
|
||||
></A
|
||||
><H2
|
||||
>OPTIONS</H2
|
||||
><P
|
||||
></P
|
||||
><DIV
|
||||
CLASS="VARIABLELIST"
|
||||
><DL
|
||||
><DT
|
||||
>-d</DT
|
||||
><DD
|
||||
><P
|
||||
> Enable debugging.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-q</DT
|
||||
><DD
|
||||
><P
|
||||
> Quiet mode - exit code only.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-v</DT
|
||||
><DD
|
||||
><P
|
||||
> Print the version of the <B
|
||||
CLASS="COMMAND"
|
||||
>named-checkzone</B
|
||||
>
|
||||
program and exit.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-j</DT
|
||||
><DD
|
||||
><P
|
||||
> When loading the zone file read the journal if it exists.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-c <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>class</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specify the class of the zone. If not specified "IN" is assumed.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-k <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>mode</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Perform <B
|
||||
CLASS="COMMAND"
|
||||
>"check-name"</B
|
||||
> checks with the specified failure mode.
|
||||
Possible modes are <B
|
||||
CLASS="COMMAND"
|
||||
>"fail"</B
|
||||
>,
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>"warn"</B
|
||||
> (default) and
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>"ignore"</B
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-n <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>mode</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specify whether NS records should be checked to see if they
|
||||
are addresses. Possible modes are <B
|
||||
CLASS="COMMAND"
|
||||
>"fail"</B
|
||||
>,
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>"warn"</B
|
||||
> (default) and
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>"ignore"</B
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-o <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>filename</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Write zone output to <TT
|
||||
CLASS="FILENAME"
|
||||
>directory</TT
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-t <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>directory</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> chroot to <TT
|
||||
CLASS="FILENAME"
|
||||
>directory</TT
|
||||
> so that include
|
||||
directives in the configuration file are processed as if
|
||||
run by a similarly chrooted named.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-w <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>directory</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> chdir to <TT
|
||||
CLASS="FILENAME"
|
||||
>directory</TT
|
||||
> so that relative
|
||||
filenames in master file $INCLUDE directives work. This
|
||||
is similar to the directory clause in
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>named.conf</TT
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-D</DT
|
||||
><DD
|
||||
><P
|
||||
> Dump zone file in canonical format.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>zonename</DT
|
||||
><DD
|
||||
><P
|
||||
> The domain name of the zone being checked.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>filename</DT
|
||||
><DD
|
||||
><P
|
||||
> The name of the zone file.
|
||||
</P
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN125"
|
||||
></A
|
||||
><H2
|
||||
>RETURN VALUES</H2
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>named-checkzone</B
|
||||
> returns an exit status of 1 if
|
||||
errors were detected and 0 otherwise.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN129"
|
||||
></A
|
||||
><H2
|
||||
>SEE ALSO</H2
|
||||
><P
|
||||
> <SPAN
|
||||
CLASS="CITEREFENTRY"
|
||||
><SPAN
|
||||
CLASS="REFENTRYTITLE"
|
||||
>named</SPAN
|
||||
>(8)</SPAN
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>RFC 1035</I
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>BIND 9 Administrator Reference Manual</I
|
||||
>.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN137"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
><P
|
||||
> Internet Software Consortium
|
||||
</P
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
111
dist/bind/bin/check/win32/namedcheckconf.dsp
vendored
Normal file
111
dist/bind/bin/check/win32/namedcheckconf.dsp
vendored
Normal file
@ -0,0 +1,111 @@
|
||||
# Microsoft Developer Studio Project File - Name="namedcheckconf" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=namedcheckconf - 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 "namedcheckconf.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 "namedcheckconf.mak" CFG="namedcheckconf - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "namedcheckconf - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "namedcheckconf - 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)" == "namedcheckconf - 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 /MT /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 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 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 /machine:I386 /out:"../../../Build/Release/named-checkconf.exe"
|
||||
|
||||
!ELSEIF "$(CFG)" == "namedcheckconf - 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 /MTd /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
|
||||
# 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 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 /debug /machine:I386 /out:"../../../Build/Debug/named-checkconf.exe" /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "namedcheckconf - Win32 Release"
|
||||
# Name "namedcheckconf - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE="..\check-tool.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE="..\named-checkconf.c"
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE="..\check-tool.h"
|
||||
# End Source File
|
||||
# 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
|
29
dist/bind/bin/check/win32/namedcheckconf.dsw
vendored
Normal file
29
dist/bind/bin/check/win32/namedcheckconf.dsw
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "namedcheckconf"=".\namedcheckconf.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
289
dist/bind/bin/check/win32/namedcheckconf.mak
vendored
Normal file
289
dist/bind/bin/check/win32/namedcheckconf.mak
vendored
Normal file
@ -0,0 +1,289 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on namedcheckconf.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=namedcheckconf - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to namedcheckconf - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "namedcheckconf - Win32 Release" && "$(CFG)" != "namedcheckconf - 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 "namedcheckconf.mak" CFG="namedcheckconf - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "namedcheckconf - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "namedcheckconf - 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
|
||||
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "namedcheckconf - Win32 Release"
|
||||
|
||||
OUTDIR=.\Release
|
||||
INTDIR=.\Release
|
||||
# Begin Custom Macros
|
||||
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"
|
||||
-@erase "$(INTDIR)\named-checkconf.sbr"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(OUTDIR)\namedcheckconf.bsc"
|
||||
-@erase "..\..\..\Build\Release\named-checkconf.exe"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP_PROJ=/nologo /MT /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)
|
||||
<<
|
||||
|
||||
!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"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP_PROJ=/nologo /MTd /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)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
.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) $<
|
||||
<<
|
||||
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("namedcheckconf.dep")
|
||||
!INCLUDE "namedcheckconf.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "namedcheckconf.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "namedcheckconf - Win32 Release" || "$(CFG)" == "namedcheckconf - Win32 Debug"
|
||||
SOURCE="..\check-tool.c"
|
||||
|
||||
"$(INTDIR)\check-tool.obj" "$(INTDIR)\check-tool.sbr" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE="..\named-checkconf.c"
|
||||
|
||||
"$(INTDIR)\named-checkconf.obj" "$(INTDIR)\named-checkconf.sbr" : $(SOURCE) "$(INTDIR)"
|
||||
$(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
|
||||
|
112
dist/bind/bin/check/win32/namedcheckzone.dsp
vendored
Normal file
112
dist/bind/bin/check/win32/namedcheckzone.dsp
vendored
Normal file
@ -0,0 +1,112 @@
|
||||
# Microsoft Developer Studio Project File - Name="namedcheckzone" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=namedcheckzone - 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 "namedcheckzone.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 "namedcheckzone.mak" CFG="namedcheckzone - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "namedcheckzone - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "namedcheckzone - 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)" == "namedcheckzone - 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 /MT /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 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 ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /machine:I386 /out:"../../../Build/Release/named-checkzone.exe"
|
||||
|
||||
!ELSEIF "$(CFG)" == "namedcheckzone - 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 /MTd /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 "__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"
|
||||
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 ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../../Build/Debug/named-checkzone.exe" /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "namedcheckzone - Win32 Release"
|
||||
# Name "namedcheckzone - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE="..\check-tool.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE="..\named-checkzone.c"
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE="..\check-tool.h"
|
||||
# End Source File
|
||||
# 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
|
29
dist/bind/bin/check/win32/namedcheckzone.dsw
vendored
Normal file
29
dist/bind/bin/check/win32/namedcheckzone.dsw
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "namedcheckzone"=".\namedcheckzone.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
305
dist/bind/bin/check/win32/namedcheckzone.mak
vendored
Normal file
305
dist/bind/bin/check/win32/namedcheckzone.mak
vendored
Normal file
@ -0,0 +1,305 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on namedcheckzone.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=namedcheckzone - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to namedcheckzone - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "namedcheckzone - Win32 Release" && "$(CFG)" != "namedcheckzone - 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 "namedcheckzone.mak" CFG="namedcheckzone - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "namedcheckzone - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "namedcheckzone - 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)" == "namedcheckzone - Win32 Release"
|
||||
|
||||
OUTDIR=.\Release
|
||||
INTDIR=.\Release
|
||||
|
||||
!IF "$(RECURSE)" == "0"
|
||||
|
||||
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)\named-checkzone.obj"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "..\..\..\Build\Release\named-checkzone.exe"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MT /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
|
||||
|
||||
.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)\namedcheckzone.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)\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"
|
||||
|
||||
"..\..\..\Build\Release\named-checkzone.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "namedcheckzone - Win32 Debug"
|
||||
|
||||
OUTDIR=.\Debug
|
||||
INTDIR=.\Debug
|
||||
# Begin Custom Macros
|
||||
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"
|
||||
-@erase "$(INTDIR)\named-checkzone.sbr"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(INTDIR)\vc60.pdb"
|
||||
-@erase "$(OUTDIR)\named-checkzone.pdb"
|
||||
-@erase "$(OUTDIR)\namedcheckzone.bsc"
|
||||
-@erase "..\..\..\Build\Debug\named-checkzone.exe"
|
||||
-@erase "..\..\..\Build\Debug\named-checkzone.ilk"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MTd /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 "__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)\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/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"
|
||||
|
||||
"..\..\..\Build\Debug\named-checkzone.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("namedcheckzone.dep")
|
||||
!INCLUDE "namedcheckzone.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "namedcheckzone.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!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
|
||||
|
101
dist/bind/bin/dig/Makefile.in
vendored
Normal file
101
dist/bind/bin/dig/Makefile.in
vendored
Normal file
@ -0,0 +1,101 @@
|
||||
# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# Id: Makefile.in,v 1.25.12.10 2004/04/13 05:47:32 marka Exp
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
@BIND9_VERSION@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${BIND9_INCLUDES} \
|
||||
${ISC_INCLUDES} ${LWRES_INCLUDES}
|
||||
|
||||
CDEFINES = -DVERSION=\"${VERSION}\"
|
||||
CWARNINGS =
|
||||
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||
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}
|
||||
|
||||
LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} ${ISCLIBS} \
|
||||
${ISCCFGLIBS} @LIBS@
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
TARGETS = dig@EXEEXT@ host@EXEEXT@ nslookup@EXEEXT@
|
||||
|
||||
OBJS = dig.@O@ dighost.@O@ host.@O@ nslookup.@O@
|
||||
|
||||
UOBJS =
|
||||
|
||||
SRCS = dig.c dighost.c host.c nslookup.c
|
||||
|
||||
MANPAGES = dig.1 host.1
|
||||
|
||||
HTMLPAGES = dig.html host.html
|
||||
|
||||
MANOBJS = ${MANPAGES} ${HTMLPAGES}
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} -o $@ \
|
||||
dig.@O@ dighost.@O@ ${UOBJS} ${LIBS}
|
||||
|
||||
host@EXEEXT@: host.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} -o $@ \
|
||||
host.@O@ dighost.@O@ ${UOBJS} ${LIBS}
|
||||
|
||||
nslookup@EXEEXT@: nslookup.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} -o $@ \
|
||||
nslookup.@O@ dighost.@O@ ${UOBJS} ${LIBS}
|
||||
|
||||
doc man:: ${MANOBJS}
|
||||
|
||||
docclean manclean maintainer-clean::
|
||||
rm -f ${MANOBJS}
|
||||
|
||||
clean distclean maintainer-clean::
|
||||
rm -f ${TARGETS}
|
||||
|
||||
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
|
402
dist/bind/bin/dig/dig.1
vendored
Normal file
402
dist/bind/bin/dig/dig.1
vendored
Normal file
@ -0,0 +1,402 @@
|
||||
.\" $NetBSD: dig.1,v 1.1.1.1 2004/05/17 23:43:17 christos Exp $
|
||||
.\"
|
||||
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
.\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" Id: dig.1,v 1.14.2.4.2.5 2004/04/13 04:11:03 marka Exp
|
||||
.\"
|
||||
.TH "DIG" "1" "Jun 30, 2000" "BIND9" ""
|
||||
.SH NAME
|
||||
dig \- DNS lookup utility
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBdig\fR [ \fB@server\fR ] [ \fB-b \fIaddress\fB\fR ] [ \fB-c \fIclass\fB\fR ] [ \fB-f \fIfilename\fB\fR ] [ \fB-k \fIfilename\fB\fR ] [ \fB-p \fIport#\fB\fR ] [ \fB-t \fItype\fB\fR ] [ \fB-x \fIaddr\fB\fR ] [ \fB-y \fIname:key\fB\fR ] [ \fB-4\fR ] [ \fB-6\fR ] [ \fBname\fR ] [ \fBtype\fR ] [ \fBclass\fR ] [ \fBqueryopt\fR\fI...\fR ]
|
||||
.sp
|
||||
\fBdig\fR [ \fB-h\fR ]
|
||||
.sp
|
||||
\fBdig\fR [ \fBglobal-queryopt\fR\fI...\fR ] [ \fBquery\fR\fI...\fR ]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBdig\fR (domain information groper) is a flexible tool
|
||||
for interrogating DNS name servers. It performs DNS lookups and
|
||||
displays the answers that are returned from the name server(s) that
|
||||
were queried. Most DNS administrators use \fBdig\fR to
|
||||
troubleshoot DNS problems because of its flexibility, ease of use and
|
||||
clarity of output. Other lookup tools tend to have less functionality
|
||||
than \fBdig\fR.
|
||||
.PP
|
||||
Although \fBdig\fR is normally used with command-line
|
||||
arguments, it also has a batch mode of operation for reading lookup
|
||||
requests from a file. A brief summary of its command-line arguments
|
||||
and options is printed when the \fB-h\fR option is given.
|
||||
Unlike earlier versions, the BIND9 implementation of
|
||||
\fBdig\fR allows multiple lookups to be issued from the
|
||||
command line.
|
||||
.PP
|
||||
Unless it is told to query a specific name server,
|
||||
\fBdig\fR will try each of the servers listed in
|
||||
\fI/etc/resolv.conf\fR.
|
||||
.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 \fBdig\fR via
|
||||
\fI${HOME}/.digrc\fR. This file is read and any options in it
|
||||
are applied before the command line arguments.
|
||||
.SH "SIMPLE USAGE"
|
||||
.PP
|
||||
A typical invocation of \fBdig\fR looks like:
|
||||
.sp
|
||||
.nf
|
||||
dig @server name type
|
||||
.sp
|
||||
.fi
|
||||
where:
|
||||
.TP
|
||||
\fBserver\fR
|
||||
is the name or IP address of the name server to query. This can be an IPv4
|
||||
address in dotted-decimal notation or an IPv6
|
||||
address in colon-delimited notation. When the supplied
|
||||
\fIserver\fR argument is a hostname,
|
||||
\fBdig\fR resolves that name before querying that name
|
||||
server. If no \fIserver\fR argument is provided,
|
||||
\fBdig\fR consults \fI/etc/resolv.conf\fR
|
||||
and queries the name servers listed there. The reply from the name
|
||||
server that responds is displayed.
|
||||
.TP
|
||||
\fBname\fR
|
||||
is the name of the resource record that is to be looked up.
|
||||
.TP
|
||||
\fBtype\fR
|
||||
indicates what type of query is required \(em
|
||||
ANY, A, MX, SIG, etc.
|
||||
\fItype\fR can be any valid query type. If no
|
||||
\fItype\fR argument is supplied,
|
||||
\fBdig\fR will perform a lookup for an A record.
|
||||
.SH "OPTIONS"
|
||||
.PP
|
||||
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>"
|
||||
.PP
|
||||
The default query class (IN for internet) is overridden by the
|
||||
\fB-c\fR option. \fIclass\fR is any valid
|
||||
class, such as HS for Hesiod records or CH for CHAOSNET records.
|
||||
.PP
|
||||
The \fB-f\fR option makes \fBdig \fR operate
|
||||
in batch mode by reading a list of lookup requests to process from the
|
||||
file \fIfilename\fR. The file contains a number of
|
||||
queries, one per line. Each entry in the file should be organised in
|
||||
the same way they would be presented as queries to
|
||||
\fBdig\fR using the command-line interface.
|
||||
.PP
|
||||
If a non-standard port number is to be queried, the
|
||||
\fB-p\fR option is used. \fIport#\fR is
|
||||
the port number that \fBdig\fR 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 BIND9. The default query type "A", unless the
|
||||
\fB-x\fR option is supplied to indicate a reverse lookup.
|
||||
A zone transfer can be requested by specifying a type of AXFR. When
|
||||
an incremental zone transfer (IXFR) is required,
|
||||
\fItype\fR is set to ixfr=N.
|
||||
The incremental zone transfer will contain the changes made to the zone
|
||||
since the serial number in the zone's SOA record was
|
||||
\fIN\fR.
|
||||
.PP
|
||||
Reverse lookups - mapping addresses to names - are simplified by the
|
||||
\fB-x\fR option. \fIaddr\fR is an IPv4
|
||||
address in dotted-decimal notation, or a colon-delimited IPv6 address.
|
||||
When this option is used, there is no need to provide the
|
||||
\fIname\fR, \fIclass\fR and
|
||||
\fItype\fR 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.
|
||||
.PP
|
||||
To sign the DNS queries sent by \fBdig\fR and their
|
||||
responses using transaction signatures (TSIG), specify a TSIG key file
|
||||
using the \fB-k\fR option. You can also specify the TSIG
|
||||
key itself on the command line using the \fB-y\fR option;
|
||||
\fIname\fR is the name of the TSIG key and
|
||||
\fIkey\fR is the actual key. The key is a base-64
|
||||
encoded string, typically generated by \fBdnssec-keygen\fR(8).
|
||||
Caution should be taken when using the \fB-y\fR option on
|
||||
multi-user systems as the key can be visible in the output from
|
||||
\fBps\fR(1) or in the shell's history file. When
|
||||
using TSIG authentication with \fBdig\fR, the name
|
||||
server that is queried needs to know the key and algorithm that is
|
||||
being used. In BIND, this is done by providing appropriate
|
||||
\fBkey\fR and \fBserver\fR statements in
|
||||
\fInamed.conf\fR.
|
||||
.SH "QUERY OPTIONS"
|
||||
.PP
|
||||
\fBdig\fR provides a number of query options which affect
|
||||
the way in which lookups are made and the results displayed. Some of
|
||||
these set or reset flag bits in the query header, some determine which
|
||||
sections of the answer get printed, and others determine the timeout
|
||||
and retry strategies.
|
||||
.PP
|
||||
Each query option is identified by a keyword preceded by a plus sign
|
||||
(+). Some keywords set or reset an option. These may be preceded
|
||||
by the string no to negate the meaning of that keyword. Other
|
||||
keywords assign values to options like the timeout interval. They
|
||||
have the form \fB+keyword=value\fR.
|
||||
The query options are:
|
||||
.TP
|
||||
\fB+[no]tcp\fR
|
||||
Use [do not use] TCP when querying name servers. The default
|
||||
behaviour is to use UDP unless an AXFR or IXFR query is requested, in
|
||||
which case a TCP connection is used.
|
||||
.TP
|
||||
\fB+[no]vc\fR
|
||||
Use [do not use] TCP when querying name servers. This alternate
|
||||
syntax to \fI+[no]tcp\fR is provided for backwards
|
||||
compatibility. The "vc" stands for "virtual circuit".
|
||||
.TP
|
||||
\fB+[no]ignore\fR
|
||||
Ignore truncation in UDP responses instead of retrying with TCP. By
|
||||
default, TCP retries are performed.
|
||||
.TP
|
||||
\fB+domain=somename\fR
|
||||
Set the search list to contain the single domain
|
||||
\fIsomename\fR, as if specified in a
|
||||
\fBdomain\fR directive in
|
||||
\fI/etc/resolv.conf\fR, and enable search list
|
||||
processing as if the \fI+search\fR option were given.
|
||||
.TP
|
||||
\fB+[no]search\fR
|
||||
Use [do not use] the search list defined by the searchlist or domain
|
||||
directive in \fIresolv.conf\fR (if any).
|
||||
The search list is not used by default.
|
||||
.TP
|
||||
\fB+[no]defname\fR
|
||||
Deprecated, treated as a synonym for \fI+[no]search\fR
|
||||
.TP
|
||||
\fB+[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.
|
||||
.TP
|
||||
\fB+[no]adflag\fR
|
||||
Set [do not set] the AD (authentic data) bit in the query. The AD bit
|
||||
currently has a standard meaning only in responses, not in queries,
|
||||
but the ability to set the bit in the query is provided for
|
||||
completeness.
|
||||
.TP
|
||||
\fB+[no]cdflag\fR
|
||||
Set [do not set] the CD (checking disabled) bit in the query. This
|
||||
requests the server to not perform DNSSEC validation of responses.
|
||||
.TP
|
||||
\fB+[no]cl\fR
|
||||
Display [do not display] the CLASS when printing the record.
|
||||
.TP
|
||||
\fB+[no]ttlid\fR
|
||||
Display [do not display] the TTL when printing the record.
|
||||
.TP
|
||||
\fB+[no]recurse\fR
|
||||
Toggle the setting of the RD (recursion desired) bit in the query.
|
||||
This bit is set by default, which means \fBdig\fR
|
||||
normally sends recursive queries. Recursion is automatically disabled
|
||||
when the \fI+nssearch\fR or
|
||||
\fI+trace\fR query options are used.
|
||||
.TP
|
||||
\fB+[no]nssearch\fR
|
||||
When this option is set, \fBdig\fR attempts to find the
|
||||
authoritative name servers for the zone containing the name being
|
||||
looked up and display the SOA record that each name server has for the
|
||||
zone.
|
||||
.TP
|
||||
\fB+[no]trace\fR
|
||||
Toggle tracing of the delegation path from the root name servers for
|
||||
the name being looked up. Tracing is disabled by default. When
|
||||
tracing is enabled, \fBdig\fR makes iterative queries to
|
||||
resolve the name being looked up. It will follow referrals from the
|
||||
root servers, showing the answer from each server that was used to
|
||||
resolve the lookup.
|
||||
.TP
|
||||
\fB+[no]cmd\fR
|
||||
toggles the printing of the initial comment in the output identifying
|
||||
the version of \fBdig\fR and the query options that have
|
||||
been applied. This comment is printed by default.
|
||||
.TP
|
||||
\fB+[no]short\fR
|
||||
Provide a terse answer. The default is to print the answer in a
|
||||
verbose form.
|
||||
.TP
|
||||
\fB+[no]identify\fR
|
||||
Show [or do not show] the IP address and port number that supplied the
|
||||
answer when the \fI+short\fR option is enabled. If
|
||||
short form answers are requested, the default is not to show the
|
||||
source address and port number of the server that provided the answer.
|
||||
.TP
|
||||
\fB+[no]comments\fR
|
||||
Toggle the display of comment lines in the output. The default is to
|
||||
print comments.
|
||||
.TP
|
||||
\fB+[no]stats\fR
|
||||
This query option toggles the printing of statistics: when the query
|
||||
was made, the size of the reply and so on. The default behaviour is
|
||||
to print the query statistics.
|
||||
.TP
|
||||
\fB+[no]qr\fR
|
||||
Print [do not print] the query as it is sent.
|
||||
By default, the query is not printed.
|
||||
.TP
|
||||
\fB+[no]question\fR
|
||||
Print [do not print] the question section of a query when an answer is
|
||||
returned. The default is to print the question section as a comment.
|
||||
.TP
|
||||
\fB+[no]answer\fR
|
||||
Display [do not display] the answer section of a reply. The default
|
||||
is to display it.
|
||||
.TP
|
||||
\fB+[no]authority\fR
|
||||
Display [do not display] the authority section of a reply. The
|
||||
default is to display it.
|
||||
.TP
|
||||
\fB+[no]additional\fR
|
||||
Display [do not display] the additional section of a reply.
|
||||
The default is to display it.
|
||||
.TP
|
||||
\fB+[no]all\fR
|
||||
Set or clear all display flags.
|
||||
.TP
|
||||
\fB+time=T\fR
|
||||
Sets the timeout for a query to
|
||||
\fIT\fR seconds. The default time out is 5 seconds.
|
||||
An attempt to set \fIT\fR to less than 1 will result
|
||||
in a query timeout of 1 second being applied.
|
||||
.TP
|
||||
\fB+tries=T\fR
|
||||
Sets the number of times to try 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.
|
||||
.TP
|
||||
\fB+retry=T\fR
|
||||
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.
|
||||
.TP
|
||||
\fB+ndots=D\fR
|
||||
Set the number of dots that have to appear in
|
||||
\fIname\fR to \fID\fR for it to be
|
||||
considered absolute. The default value is that defined using the
|
||||
ndots statement in \fI/etc/resolv.conf\fR, or 1 if no
|
||||
ndots statement is present. Names with fewer dots are interpreted as
|
||||
relative names and will be searched for in the domains listed in the
|
||||
\fBsearch\fR or \fBdomain\fR directive in
|
||||
\fI/etc/resolv.conf\fR.
|
||||
.TP
|
||||
\fB+bufsize=B\fR
|
||||
Set the UDP message buffer size advertised using EDNS0 to
|
||||
\fIB\fR bytes. The maximum and minimum sizes of this
|
||||
buffer are 65535 and 0 respectively. Values outside this range are
|
||||
rounded up or down appropriately.
|
||||
.TP
|
||||
\fB+[no]multiline\fR
|
||||
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 \fBdig\fR output.
|
||||
.TP
|
||||
\fB+[no]fail\fR
|
||||
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
|
||||
behaviour.
|
||||
.TP
|
||||
\fB+[no]besteffort\fR
|
||||
Attempt to display the contents of messages which are malformed.
|
||||
The default is to not display malformed answers.
|
||||
.TP
|
||||
\fB+[no]dnssec\fR
|
||||
Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO)
|
||||
in the OPT record in the additional section of the query.
|
||||
.TP
|
||||
\fB+[no]sigchase\fR
|
||||
Chase DNSSEC signature chains. Requires dig be compiled with
|
||||
-DDIG_SIGCHASE.
|
||||
.TP
|
||||
\fB+trusted-key=####\fR
|
||||
Specify a trusted key to be used with \fB+sigchase\fR.
|
||||
Requires dig be compiled with -DDIG_SIGCHASE.
|
||||
.TP
|
||||
\fB+[no]topdown\fR
|
||||
When chasing DNSSEC signature chains perform a top down validation.
|
||||
Requires dig be compiled with -DDIG_SIGCHASE.
|
||||
.SH "MULTIPLE QUERIES"
|
||||
.PP
|
||||
The BIND 9 implementation of \fBdig \fR supports
|
||||
specifying multiple queries on the command line (in addition to
|
||||
supporting the \fB-f\fR batch file option). Each of those
|
||||
queries can be supplied with its own set of flags, options and query
|
||||
options.
|
||||
.PP
|
||||
In this case, each \fIquery\fR argument represent an
|
||||
individual query in the command-line syntax described above. Each
|
||||
consists of any of the standard options and flags, the name to be
|
||||
looked up, an optional query type and class and any query options that
|
||||
should be applied to that query.
|
||||
.PP
|
||||
A global set of query options, which should be applied to all queries,
|
||||
can also be supplied. These global query options must precede the
|
||||
first tuple of name, class, type, options, flags, and query options
|
||||
supplied on the command line. Any global query options (except
|
||||
the \fB+[no]cmd\fR option) can be
|
||||
overridden by a query-specific set of query options. For example:
|
||||
.sp
|
||||
.nf
|
||||
dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
|
||||
.sp
|
||||
.fi
|
||||
shows how \fBdig\fR could be used from the command line
|
||||
to make three lookups: an ANY query for www.isc.org, a
|
||||
reverse lookup of 127.0.0.1 and a query for the NS records of
|
||||
isc.org.
|
||||
A global query option of \fI+qr\fR is applied, so
|
||||
that \fBdig\fR shows the initial query it made for each
|
||||
lookup. The final query has a local query option of
|
||||
\fI+noqr\fR which means that \fBdig\fR
|
||||
will not print the initial query when it looks up the NS records for
|
||||
isc.org.
|
||||
.SH "FILES"
|
||||
.PP
|
||||
\fI/etc/resolv.conf\fR
|
||||
.PP
|
||||
\fI${HOME}/.digrc\fR
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBhost\fR(1),
|
||||
\fBnamed\fR(8),
|
||||
\fBdnssec-keygen\fR(8),
|
||||
\fIRFC1035\fR.
|
||||
.SH "BUGS"
|
||||
.PP
|
||||
There are probably too many query options.
|
608
dist/bind/bin/dig/dig.docbook
vendored
Normal file
608
dist/bind/bin/dig/dig.docbook
vendored
Normal file
@ -0,0 +1,608 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
|
||||
<!--
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
- purpose with or without fee is hereby granted, provided that the above
|
||||
- copyright notice and this permission notice appear in all copies.
|
||||
-
|
||||
- THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Id: dig.docbook,v 1.4.2.7.4.8 2004/04/13 03:00:05 marka Exp -->
|
||||
|
||||
<refentry>
|
||||
|
||||
<refentryinfo>
|
||||
<date>Jun 30, 2000</date>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>dig</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>dig</refname>
|
||||
<refpurpose>DNS lookup utility</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>dig</command>
|
||||
<arg choice=opt>@server</arg>
|
||||
<arg><option>-b <replaceable class="parameter">address</replaceable></option></arg>
|
||||
<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg><option>-f <replaceable class="parameter">filename</replaceable></option></arg>
|
||||
<arg><option>-k <replaceable class="parameter">filename</replaceable></option></arg>
|
||||
<arg><option>-p <replaceable class="parameter">port#</replaceable></option></arg>
|
||||
<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>
|
||||
<arg choice=opt rep=repeat>queryopt</arg>
|
||||
</cmdsynopsis>
|
||||
|
||||
<cmdsynopsis>
|
||||
<command>dig</command>
|
||||
<arg><option>-h</option></arg>
|
||||
</cmdsynopsis>
|
||||
|
||||
<cmdsynopsis>
|
||||
<command>dig</command>
|
||||
<arg choice=opt rep=repeat>global-queryopt</arg>
|
||||
<arg choice=opt rep=repeat>query</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para>
|
||||
<command>dig</command> (domain information groper) is a flexible tool
|
||||
for interrogating DNS name servers. It performs DNS lookups and
|
||||
displays the answers that are returned from the name server(s) that
|
||||
were queried. Most DNS administrators use <command>dig</command> to
|
||||
troubleshoot DNS problems because of its flexibility, ease of use and
|
||||
clarity of output. Other lookup tools tend to have less functionality
|
||||
than <command>dig</command>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Although <command>dig</command> is normally used with command-line
|
||||
arguments, it also has a batch mode of operation for reading lookup
|
||||
requests from a file. A brief summary of its command-line arguments
|
||||
and options is printed when the <option>-h</option> option is given.
|
||||
Unlike earlier versions, the BIND9 implementation of
|
||||
<command>dig</command> allows multiple lookups to be issued from the
|
||||
command line.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Unless it is told to query a specific name server,
|
||||
<command>dig</command> will try each of the servers listed in
|
||||
<filename>/etc/resolv.conf</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When no command line arguments or options are given, will perform an
|
||||
NS query for "." (the root).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
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>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SIMPLE USAGE</title>
|
||||
|
||||
<para>
|
||||
A typical invocation of <command>dig</command> looks like:
|
||||
<programlisting> dig @server name type </programlisting> where:
|
||||
|
||||
<variablelist>
|
||||
|
||||
<varlistentry><term><constant>server</constant></term>
|
||||
<listitem><para>
|
||||
is the name or IP address of the name server to query. This can be an IPv4
|
||||
address in dotted-decimal notation or an IPv6
|
||||
address in colon-delimited notation. When the supplied
|
||||
<parameter>server</parameter> argument is a hostname,
|
||||
<command>dig</command> resolves that name before querying that name
|
||||
server. If no <parameter>server</parameter> argument is provided,
|
||||
<command>dig</command> consults <filename>/etc/resolv.conf</filename>
|
||||
and queries the name servers listed there. The reply from the name
|
||||
server that responds is displayed.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><constant>name</constant></term>
|
||||
<listitem><para>
|
||||
is the name of the resource record that is to be looked up.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><constant>type</constant></term>
|
||||
<listitem><para>
|
||||
indicates what type of query is required —
|
||||
ANY, A, MX, SIG, etc.
|
||||
<parameter>type</parameter> can be any valid query type. If no
|
||||
<parameter>type</parameter> argument is supplied,
|
||||
<command>dig</command> will perform a lookup for an A record.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>OPTIONS</title>
|
||||
|
||||
<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 "#<port>"
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The default query class (IN for internet) is overridden by the
|
||||
<option>-c</option> option. <parameter>class</parameter> is any valid
|
||||
class, such as HS for Hesiod records or CH for CHAOSNET records.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <option>-f</option> option makes <command>dig </command> operate
|
||||
in batch mode by reading a list of lookup requests to process from the
|
||||
file <parameter>filename</parameter>. The file contains a number of
|
||||
queries, one per line. Each entry in the file should be organised in
|
||||
the same way they would be presented as queries to
|
||||
<command>dig</command> using the command-line interface.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
If a non-standard port number is to be queried, the
|
||||
<option>-p</option> option is used. <parameter>port#</parameter> is
|
||||
the port number that <command>dig</command> 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.
|
||||
</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
|
||||
supported in BIND9. The default query type "A", unless the
|
||||
<option>-x</option> option is supplied to indicate a reverse lookup.
|
||||
A zone transfer can be requested by specifying a type of AXFR. When
|
||||
an incremental zone transfer (IXFR) is required,
|
||||
<parameter>type</parameter> is set to <literal>ixfr=N</literal>.
|
||||
The incremental zone transfer will contain the changes made to the zone
|
||||
since the serial number in the zone's SOA record was
|
||||
<parameter>N</parameter>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Reverse lookups - mapping addresses to names - are simplified by the
|
||||
<option>-x</option> option. <parameter>addr</parameter> is an IPv4
|
||||
address in dotted-decimal notation, or a colon-delimited IPv6 address.
|
||||
When this option is used, there is no need to provide the
|
||||
<parameter>name</parameter>, <parameter>class</parameter> and
|
||||
<parameter>type</parameter> arguments. <command>dig</command>
|
||||
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.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To sign the DNS queries sent by <command>dig</command> and their
|
||||
responses using transaction signatures (TSIG), specify a TSIG key file
|
||||
using the <option>-k</option> option. You can also specify the TSIG
|
||||
key itself on the command line using the <option>-y</option> option;
|
||||
<parameter>name</parameter> is the name of the TSIG key and
|
||||
<parameter>key</parameter> is the actual key. The key is a base-64
|
||||
encoded string, typically generated by <citerefentry>
|
||||
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>.
|
||||
|
||||
Caution should be taken when using the <option>-y</option> option on
|
||||
multi-user systems as the key can be visible in the output from
|
||||
<citerefentry> <refentrytitle>ps</refentrytitle><manvolnum>1
|
||||
</manvolnum> </citerefentry> or in the shell's history file. When
|
||||
using TSIG authentication with <command>dig</command>, the name
|
||||
server that is queried needs to know the key and algorithm that is
|
||||
being used. In BIND, this is done by providing appropriate
|
||||
<command>key</command> and <command>server</command> statements in
|
||||
<filename>named.conf</filename>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>QUERY OPTIONS</title>
|
||||
|
||||
<para>
|
||||
<command>dig</command> provides a number of query options which affect
|
||||
the way in which lookups are made and the results displayed. Some of
|
||||
these set or reset flag bits in the query header, some determine which
|
||||
sections of the answer get printed, and others determine the timeout
|
||||
and retry strategies.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Each query option is identified by a keyword preceded by a plus sign
|
||||
(<literal>+</literal>). Some keywords set or reset an option. These may be preceded
|
||||
by the string <literal>no</literal> to negate the meaning of that keyword. Other
|
||||
keywords assign values to options like the timeout interval. They
|
||||
have the form <option>+keyword=value</option>.
|
||||
The query options are:
|
||||
|
||||
<variablelist>
|
||||
|
||||
<varlistentry><term><option>+[no]tcp</option></term>
|
||||
<listitem><para>
|
||||
Use [do not use] TCP when querying name servers. The default
|
||||
behaviour is to use UDP unless an AXFR or IXFR query is requested, in
|
||||
which case a TCP connection is used.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]vc</option></term>
|
||||
<listitem><para>
|
||||
Use [do not use] TCP when querying name servers. This alternate
|
||||
syntax to <parameter>+[no]tcp</parameter> is provided for backwards
|
||||
compatibility. The "vc" stands for "virtual circuit".
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]ignore</option></term>
|
||||
<listitem><para>
|
||||
Ignore truncation in UDP responses instead of retrying with TCP. By
|
||||
default, TCP retries are performed.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+domain=somename</option></term>
|
||||
<listitem><para>
|
||||
Set the search list to contain the single domain
|
||||
<parameter>somename</parameter>, as if specified in a
|
||||
<command>domain</command> directive in
|
||||
<filename>/etc/resolv.conf</filename>, and enable search list
|
||||
processing as if the <parameter>+search</parameter> option were given.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]search</option></term>
|
||||
<listitem><para>
|
||||
Use [do not use] the search list defined by the searchlist or domain
|
||||
directive in <filename>resolv.conf</filename> (if any).
|
||||
The search list is not used by default.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]defname</option></term>
|
||||
<listitem><para>
|
||||
Deprecated, treated as a synonym for <parameter>+[no]search</parameter>
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]aaonly</option></term>
|
||||
<listitem><para>
|
||||
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>
|
||||
<listitem><para>
|
||||
Set [do not set] the AD (authentic data) bit in the query. The AD bit
|
||||
currently has a standard meaning only in responses, not in queries,
|
||||
but the ability to set the bit in the query is provided for
|
||||
completeness.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]cdflag</option></term>
|
||||
<listitem><para>
|
||||
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.
|
||||
This bit is set by default, which means <command>dig</command>
|
||||
normally sends recursive queries. Recursion is automatically disabled
|
||||
when the <parameter>+nssearch</parameter> or
|
||||
<parameter>+trace</parameter> query options are used.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]nssearch</option></term>
|
||||
<listitem><para>
|
||||
When this option is set, <command>dig</command> attempts to find the
|
||||
authoritative name servers for the zone containing the name being
|
||||
looked up and display the SOA record that each name server has for the
|
||||
zone.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]trace</option></term>
|
||||
<listitem><para>
|
||||
Toggle tracing of the delegation path from the root name servers for
|
||||
the name being looked up. Tracing is disabled by default. When
|
||||
tracing is enabled, <command>dig</command> makes iterative queries to
|
||||
resolve the name being looked up. It will follow referrals from the
|
||||
root servers, showing the answer from each server that was used to
|
||||
resolve the lookup.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]cmd</option></term>
|
||||
<listitem><para>
|
||||
toggles the printing of the initial comment in the output identifying
|
||||
the version of <command>dig</command> and the query options that have
|
||||
been applied. This comment is printed by default.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]short</option></term>
|
||||
<listitem><para>
|
||||
Provide a terse answer. The default is to print the answer in a
|
||||
verbose form.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]identify</option></term>
|
||||
<listitem><para>
|
||||
Show [or do not show] the IP address and port number that supplied the
|
||||
answer when the <parameter>+short</parameter> option is enabled. If
|
||||
short form answers are requested, the default is not to show the
|
||||
source address and port number of the server that provided the answer.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]comments</option></term>
|
||||
<listitem><para>
|
||||
Toggle the display of comment lines in the output. The default is to
|
||||
print comments.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]stats</option></term>
|
||||
<listitem><para>
|
||||
This query option toggles the printing of statistics: when the query
|
||||
was made, the size of the reply and so on. The default behaviour is
|
||||
to print the query statistics.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]qr</option></term>
|
||||
<listitem><para>
|
||||
Print [do not print] the query as it is sent.
|
||||
By default, the query is not printed.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]question</option></term>
|
||||
<listitem><para>
|
||||
Print [do not print] the question section of a query when an answer is
|
||||
returned. The default is to print the question section as a comment.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]answer</option></term>
|
||||
<listitem><para>
|
||||
Display [do not display] the answer section of a reply. The default
|
||||
is to display it.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]authority</option></term>
|
||||
<listitem><para>
|
||||
Display [do not display] the authority section of a reply. The
|
||||
default is to display it.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]additional</option></term>
|
||||
<listitem><para>
|
||||
Display [do not display] the additional section of a reply.
|
||||
The default is to display it.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]all</option></term>
|
||||
<listitem><para>
|
||||
Set or clear all display flags.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+time=T</option></term>
|
||||
<listitem><para>
|
||||
|
||||
Sets the timeout for a query to
|
||||
<parameter>T</parameter> seconds. The default time out is 5 seconds.
|
||||
An attempt to set <parameter>T</parameter> to less than 1 will result
|
||||
in a query timeout of 1 second being applied.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+tries=T</option></term>
|
||||
<listitem><para>
|
||||
Sets the number of times to try 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.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+ndots=D</option></term>
|
||||
<listitem><para>
|
||||
Set the number of dots that have to appear in
|
||||
<parameter>name</parameter> to <parameter>D</parameter> for it to be
|
||||
considered absolute. The default value is that defined using the
|
||||
ndots statement in <filename>/etc/resolv.conf</filename>, or 1 if no
|
||||
ndots statement is present. Names with fewer dots are interpreted as
|
||||
relative names and will be searched for in the domains listed in the
|
||||
<option>search</option> or <option>domain</option> directive in
|
||||
<filename>/etc/resolv.conf</filename>.
|
||||
</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+bufsize=B</option></term>
|
||||
<listitem><para>
|
||||
Set the UDP message buffer size advertised using EDNS0 to
|
||||
<parameter>B</parameter> bytes. The maximum and minimum sizes of this
|
||||
buffer are 65535 and 0 respectively. Values outside this range are
|
||||
rounded up or down appropriately.
|
||||
</para>
|
||||
</listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><option>+[no]multiline</option></term>
|
||||
<listitem><para>
|
||||
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>
|
||||
|
||||
<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
|
||||
behaviour.
|
||||
</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>
|
||||
|
||||
<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>
|
||||
Specify a trusted key to be used with <option>+sigchase</option>.
|
||||
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>
|
||||
|
||||
|
||||
|
||||
</variablelist>
|
||||
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>MULTIPLE QUERIES</title>
|
||||
|
||||
<para>
|
||||
The BIND 9 implementation of <command>dig </command> supports
|
||||
specifying multiple queries on the command line (in addition to
|
||||
supporting the <option>-f</option> batch file option). Each of those
|
||||
queries can be supplied with its own set of flags, options and query
|
||||
options.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
In this case, each <parameter>query</parameter> argument represent an
|
||||
individual query in the command-line syntax described above. Each
|
||||
consists of any of the standard options and flags, the name to be
|
||||
looked up, an optional query type and class and any query options that
|
||||
should be applied to that query.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
A global set of query options, which should be applied to all queries,
|
||||
can also be supplied. These global query options must precede the
|
||||
first tuple of name, class, type, options, flags, and query options
|
||||
supplied on the command line. Any global query options (except
|
||||
the <option>+[no]cmd</option> option) can be
|
||||
overridden by a query-specific set of query options. For example:
|
||||
<programlisting>
|
||||
dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
|
||||
</programlisting>
|
||||
shows how <command>dig</command> could be used from the command line
|
||||
to make three lookups: an ANY query for <literal>www.isc.org</literal>, a
|
||||
reverse lookup of 127.0.0.1 and a query for the NS records of
|
||||
<literal>isc.org</literal>.
|
||||
|
||||
A global query option of <parameter>+qr</parameter> is applied, so
|
||||
that <command>dig</command> shows the initial query it made for each
|
||||
lookup. The final query has a local query option of
|
||||
<parameter>+noqr</parameter> which means that <command>dig</command>
|
||||
will not print the initial query when it looks up the NS records for
|
||||
<literal>isc.org</literal>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>FILES</title>
|
||||
<para>
|
||||
<filename>/etc/resolv.conf</filename>
|
||||
</para>
|
||||
<para>
|
||||
<filename>${HOME}/.digrc</filename>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para>
|
||||
<citerefentry>
|
||||
<refentrytitle>host</refentrytitle><manvolnum>1</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citetitle>RFC1035</citetitle>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>BUGS </title>
|
||||
<para>
|
||||
There are probably too many query options.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
1255
dist/bind/bin/dig/dig.html
vendored
Normal file
1255
dist/bind/bin/dig/dig.html
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5066
dist/bind/bin/dig/dighost.c
vendored
Normal file
5066
dist/bind/bin/dig/dighost.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
138
dist/bind/bin/dig/host.1
vendored
Normal file
138
dist/bind/bin/dig/host.1
vendored
Normal file
@ -0,0 +1,138 @@
|
||||
.\" $NetBSD: host.1,v 1.1.1.1 2004/05/17 23:43:19 christos Exp $
|
||||
.\"
|
||||
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
.\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" Id: host.1,v 1.11.2.1.4.4 2004/04/13 04:11:03 marka Exp
|
||||
.\"
|
||||
.TH "HOST" "1" "Jun 30, 2000" "BIND9" ""
|
||||
.SH NAME
|
||||
host \- DNS lookup utility
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBhost\fR [ \fB-aCdlnrTwv\fR ] [ \fB-c \fIclass\fB\fR ] [ \fB-N \fIndots\fB\fR ] [ \fB-R \fInumber\fB\fR ] [ \fB-t \fItype\fB\fR ] [ \fB-W \fIwait\fB\fR ] [ \fB-4\fR ] [ \fB-6\fR ] \fBname\fR [ \fBserver\fR ]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBhost\fR
|
||||
is a simple utility for performing DNS lookups.
|
||||
It is normally used to convert names to IP addresses and vice versa.
|
||||
When no arguments or options are given,
|
||||
\fBhost\fR
|
||||
prints a short summary of its command line arguments and options.
|
||||
.PP
|
||||
\fIname\fR is the domain name that is to be looked
|
||||
up. It can also be a dotted-decimal IPv4 address or a colon-delimited
|
||||
IPv6 address, in which case \fBhost\fR will by default
|
||||
perform a reverse lookup for that address.
|
||||
\fIserver\fR is an optional argument which is either
|
||||
the name or IP address of the name server that \fBhost\fR
|
||||
should query instead of the server or servers listed in
|
||||
\fI/etc/resolv.conf\fR.
|
||||
.PP
|
||||
The \fB-a\fR (all) option is equivalent to setting the
|
||||
\fB-v\fR option and asking \fBhost\fR to make
|
||||
a query of type ANY.
|
||||
.PP
|
||||
When the \fB-C\fR option is used, \fBhost\fR
|
||||
will attempt to display the SOA records for zone
|
||||
\fIname\fR from all the listed authoritative name
|
||||
servers for that zone. The list of name servers is defined by the NS
|
||||
records that are found for the zone.
|
||||
.PP
|
||||
The \fB-c\fR option instructs to make a DNS query of class
|
||||
\fIclass\fR. This can be used to lookup Hesiod or
|
||||
Chaosnet class resource records. The default class is IN (Internet).
|
||||
.PP
|
||||
Verbose output is generated by \fBhost\fR when the
|
||||
\fB-d\fR or \fB-v\fR option is used. The two
|
||||
options are equivalent. They have been provided for backwards
|
||||
compatibility. In previous versions, the \fB-d\fR option
|
||||
switched on debugging traces and \fB-v\fR enabled verbose
|
||||
output.
|
||||
.PP
|
||||
List mode is selected by the \fB-l\fR 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.
|
||||
.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.
|
||||
.PP
|
||||
The \fB-N\fR option sets the number of dots that have to be
|
||||
in \fIname\fR for it to be considered absolute. The
|
||||
default value is that defined using the ndots statement in
|
||||
\fI/etc/resolv.conf\fR, or 1 if no ndots statement is
|
||||
present. Names with fewer dots are interpreted as relative names and
|
||||
will be searched for in the domains listed in the \fBsearch\fR
|
||||
or \fBdomain\fR directive in
|
||||
\fI/etc/resolv.conf\fR.
|
||||
.PP
|
||||
The number of UDP retries for a lookup can be changed with the
|
||||
\fB-R\fR option. \fInumber\fR indicates
|
||||
how many times \fBhost\fR will repeat a query that does
|
||||
not get answered. The default number of retries is 1. If
|
||||
\fInumber\fR is negative or zero, the number of
|
||||
retries will default to 1.
|
||||
.PP
|
||||
Non-recursive queries can be made via the \fB-r\fR option.
|
||||
Setting this option clears the \fBRD\fR \(em recursion
|
||||
desired \(em bit in the query which \fBhost\fR makes.
|
||||
This should mean that the name server receiving the query will not
|
||||
attempt to resolve \fIname\fR. The
|
||||
\fB-r\fR option enables \fBhost\fR to mimic
|
||||
the behaviour of a name server by making non-recursive queries and
|
||||
expecting to receive answers to those queries that are usually
|
||||
referrals to other name servers.
|
||||
.PP
|
||||
By default \fBhost\fR uses UDP when making queries. The
|
||||
\fB-T\fR 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 can be any recognised query type: CNAME,
|
||||
NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
|
||||
\fBhost\fR automatically selects an appropriate query
|
||||
type. By default it looks for A records, but if the
|
||||
\fB-C\fR 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).
|
||||
.PP
|
||||
The time to wait for a reply can be controlled through the
|
||||
\fB-W\fR and \fB-w\fR options. The
|
||||
\fB-W\fR option makes \fBhost\fR wait for
|
||||
\fIwait\fR seconds. If \fIwait\fR
|
||||
is less than one, the wait interval is set to one second. When the
|
||||
\fB-w\fR option is used, \fBhost\fR will
|
||||
effectively wait forever for a reply. The time to wait for a response
|
||||
will be set to the number of seconds given by the hardware's maximum
|
||||
value for an integer quantity.
|
||||
.SH "FILES"
|
||||
.PP
|
||||
\fI/etc/resolv.conf\fR
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBdig\fR(1),
|
||||
\fBnamed\fR(8).
|
756
dist/bind/bin/dig/host.c
vendored
Normal file
756
dist/bind/bin/dig/host.c
vendored
Normal file
@ -0,0 +1,756 @@
|
||||
/* $NetBSD: host.c,v 1.1.1.1 2004/05/17 23:43:19 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Id: host.c,v 1.76.2.5.2.9 2004/04/13 03:00:06 marka Exp */
|
||||
|
||||
#include <config.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>
|
||||
#include <dns/message.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatatype.h>
|
||||
|
||||
#include <dig/dig.h>
|
||||
|
||||
extern ISC_LIST(dig_lookup_t) lookup_list;
|
||||
extern dig_serverlist_t server_list;
|
||||
extern ISC_LIST(dig_searchlist_t) search_list;
|
||||
|
||||
extern isc_boolean_t have_ipv4, have_ipv6;
|
||||
extern isc_boolean_t usesearch;
|
||||
extern isc_boolean_t debugging;
|
||||
extern unsigned int timeout;
|
||||
extern isc_mem_t *mctx;
|
||||
extern int ndots;
|
||||
extern int tries;
|
||||
extern char *progname;
|
||||
extern isc_task_t *global_task;
|
||||
extern int fatalexit;
|
||||
|
||||
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 const char *opcodetext[] = {
|
||||
"QUERY",
|
||||
"IQUERY",
|
||||
"STATUS",
|
||||
"RESERVED3",
|
||||
"NOTIFY",
|
||||
"UPDATE",
|
||||
"RESERVED6",
|
||||
"RESERVED7",
|
||||
"RESERVED8",
|
||||
"RESERVED9",
|
||||
"RESERVED10",
|
||||
"RESERVED11",
|
||||
"RESERVED12",
|
||||
"RESERVED13",
|
||||
"RESERVED14",
|
||||
"RESERVED15"
|
||||
};
|
||||
|
||||
static const char *rcodetext[] = {
|
||||
"NOERROR",
|
||||
"FORMERR",
|
||||
"SERVFAIL",
|
||||
"NXDOMAIN",
|
||||
"NOTIMP",
|
||||
"REFUSED",
|
||||
"YXDOMAIN",
|
||||
"YXRRSET",
|
||||
"NXRRSET",
|
||||
"NOTAUTH",
|
||||
"NOTZONE",
|
||||
"RESERVED11",
|
||||
"RESERVED12",
|
||||
"RESERVED13",
|
||||
"RESERVED14",
|
||||
"RESERVED15",
|
||||
"BADVERS"
|
||||
};
|
||||
|
||||
struct rtype {
|
||||
unsigned int type;
|
||||
const char *text;
|
||||
};
|
||||
|
||||
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"
|
||||
" [-R number] hostname [server]\n"
|
||||
" -a is equivalent to -v -t *\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"
|
||||
" -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"
|
||||
" -t specifies the query type\n"
|
||||
" -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);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void
|
||||
dighost_shutdown(void) {
|
||||
isc_app_shutdown();
|
||||
}
|
||||
|
||||
void
|
||||
received(int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
||||
isc_time_t now;
|
||||
int diff;
|
||||
|
||||
if (!short_form) {
|
||||
char fromtext[ISC_SOCKADDR_FORMATSIZE];
|
||||
isc_sockaddr_format(from, fromtext, sizeof(fromtext));
|
||||
TIME_NOW(&now);
|
||||
diff = (int) isc_time_microdiff(&now, &query->time_sent);
|
||||
printf("Received %u bytes from %s in %d ms\n",
|
||||
bytes, fromtext, diff/1000);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
trying(char *frm, dig_lookup_t *lookup) {
|
||||
UNUSED(lookup);
|
||||
|
||||
if (!short_form)
|
||||
printf("Trying \"%s\"\n", frm);
|
||||
}
|
||||
|
||||
static void
|
||||
say_message(dns_name_t *name, const char *msg, dns_rdata_t *rdata,
|
||||
dig_query_t *query)
|
||||
{
|
||||
isc_buffer_t *b = NULL;
|
||||
char namestr[DNS_NAME_FORMATSIZE];
|
||||
isc_region_t r;
|
||||
isc_result_t result;
|
||||
unsigned int bufsize = BUFSIZ;
|
||||
|
||||
dns_name_format(name, namestr, sizeof(namestr));
|
||||
retry:
|
||||
result = isc_buffer_allocate(mctx, &b, bufsize);
|
||||
check_result(result, "isc_buffer_allocate");
|
||||
result = dns_rdata_totext(rdata, NULL, b);
|
||||
if (result == ISC_R_NOSPACE) {
|
||||
isc_buffer_free(&b);
|
||||
bufsize *= 2;
|
||||
goto retry;
|
||||
}
|
||||
check_result(result, "dns_rdata_totext");
|
||||
isc_buffer_usedregion(b, &r);
|
||||
if (query->lookup->identify_previous_line) {
|
||||
printf("Nameserver %s:\n\t",
|
||||
query->servname);
|
||||
}
|
||||
printf("%s %s %.*s", namestr,
|
||||
msg, (int)r.length, (char *)r.base);
|
||||
if (query->lookup->identify) {
|
||||
printf(" on server %s", query->servname);
|
||||
}
|
||||
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,
|
||||
dig_query_t *query)
|
||||
{
|
||||
dns_name_t *name, *print_name;
|
||||
dns_rdataset_t *rdataset;
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
isc_buffer_t target;
|
||||
isc_result_t result, loopresult;
|
||||
isc_region_t r;
|
||||
dns_name_t empty_name;
|
||||
char t[4096];
|
||||
isc_boolean_t first;
|
||||
isc_boolean_t no_rdata;
|
||||
|
||||
if (sectionid == DNS_SECTION_QUESTION)
|
||||
no_rdata = ISC_TRUE;
|
||||
else
|
||||
no_rdata = ISC_FALSE;
|
||||
|
||||
if (headers)
|
||||
printf(";; %s SECTION:\n", section_name);
|
||||
|
||||
dns_name_init(&empty_name, NULL);
|
||||
|
||||
result = dns_message_firstname(msg, sectionid);
|
||||
if (result == ISC_R_NOMORE)
|
||||
return (ISC_R_SUCCESS);
|
||||
else if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
for (;;) {
|
||||
name = NULL;
|
||||
dns_message_currentname(msg, sectionid, &name);
|
||||
|
||||
isc_buffer_init(&target, t, sizeof(t));
|
||||
first = ISC_TRUE;
|
||||
print_name = name;
|
||||
|
||||
for (rdataset = ISC_LIST_HEAD(name->list);
|
||||
rdataset != NULL;
|
||||
rdataset = ISC_LIST_NEXT(rdataset, link)) {
|
||||
if (query->lookup->rdtype == dns_rdatatype_axfr &&
|
||||
!((!list_addresses &&
|
||||
(list_type == dns_rdatatype_any ||
|
||||
rdataset->type == list_type)) ||
|
||||
(list_addresses &&
|
||||
(rdataset->type == dns_rdatatype_a ||
|
||||
rdataset->type == dns_rdatatype_aaaa ||
|
||||
rdataset->type == dns_rdatatype_ns ||
|
||||
rdataset->type == dns_rdatatype_ptr))))
|
||||
continue;
|
||||
if (!short_form) {
|
||||
result = dns_rdataset_totext(rdataset,
|
||||
print_name,
|
||||
ISC_FALSE,
|
||||
no_rdata,
|
||||
&target);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
#ifdef USEINITALWS
|
||||
if (first) {
|
||||
print_name = &empty_name;
|
||||
first = ISC_FALSE;
|
||||
}
|
||||
#else
|
||||
UNUSED(first); /* Shut up compiler. */
|
||||
#endif
|
||||
} 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:
|
||||
say_message(print_name, rtt,
|
||||
&rdata, query);
|
||||
dns_rdata_reset(&rdata);
|
||||
loopresult =
|
||||
dns_rdataset_next(rdataset);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!short_form) {
|
||||
isc_buffer_usedregion(&target, &r);
|
||||
if (no_rdata)
|
||||
printf(";%.*s", (int)r.length,
|
||||
(char *)r.base);
|
||||
else
|
||||
printf("%.*s", (int)r.length, (char *)r.base);
|
||||
}
|
||||
|
||||
result = dns_message_nextname(msg, sectionid);
|
||||
if (result == ISC_R_NOMORE)
|
||||
break;
|
||||
else if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
printrdata(dns_message_t *msg, dns_rdataset_t *rdataset, dns_name_t *owner,
|
||||
const char *set_name, isc_boolean_t headers)
|
||||
{
|
||||
isc_buffer_t target;
|
||||
isc_result_t result;
|
||||
isc_region_t r;
|
||||
char t[4096];
|
||||
|
||||
UNUSED(msg);
|
||||
if (headers)
|
||||
printf(";; %s SECTION:\n", set_name);
|
||||
|
||||
isc_buffer_init(&target, t, sizeof(t));
|
||||
|
||||
result = dns_rdataset_totext(rdataset, owner, ISC_FALSE, ISC_FALSE,
|
||||
&target);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
isc_buffer_usedregion(&target, &r);
|
||||
printf("%.*s", (int)r.length, (char *)r.base);
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
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) {
|
||||
char sockstr[ISC_SOCKADDR_FORMATSIZE];
|
||||
|
||||
printf("Using domain server:\n");
|
||||
printf("Name: %s\n", query->servname);
|
||||
isc_sockaddr_format(&query->sockaddr, sockstr,
|
||||
sizeof(sockstr));
|
||||
printf("Address: %s\n", sockstr);
|
||||
printf("Aliases: \n\n");
|
||||
}
|
||||
|
||||
if (msg->rcode != 0) {
|
||||
char namestr[DNS_NAME_FORMATSIZE];
|
||||
dns_name_format(query->lookup->name, namestr, sizeof(namestr));
|
||||
printf("Host %s not found: %d(%s)\n", namestr,
|
||||
msg->rcode, 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;
|
||||
|
||||
/* Add AAAA and MX lookups. */
|
||||
|
||||
dns_name_format(query->lookup->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],
|
||||
msg->id);
|
||||
printf(";; flags: ");
|
||||
if ((msg->flags & DNS_MESSAGEFLAG_QR) != 0) {
|
||||
printf("qr");
|
||||
did_flag = ISC_TRUE;
|
||||
}
|
||||
if ((msg->flags & DNS_MESSAGEFLAG_AA) != 0) {
|
||||
printf("%saa", did_flag ? " " : "");
|
||||
did_flag = ISC_TRUE;
|
||||
}
|
||||
if ((msg->flags & DNS_MESSAGEFLAG_TC) != 0) {
|
||||
printf("%stc", did_flag ? " " : "");
|
||||
did_flag = ISC_TRUE;
|
||||
}
|
||||
if ((msg->flags & DNS_MESSAGEFLAG_RD) != 0) {
|
||||
printf("%srd", did_flag ? " " : "");
|
||||
did_flag = ISC_TRUE;
|
||||
}
|
||||
if ((msg->flags & DNS_MESSAGEFLAG_RA) != 0) {
|
||||
printf("%sra", did_flag ? " " : "");
|
||||
did_flag = ISC_TRUE;
|
||||
}
|
||||
if ((msg->flags & DNS_MESSAGEFLAG_AD) != 0) {
|
||||
printf("%sad", did_flag ? " " : "");
|
||||
did_flag = ISC_TRUE;
|
||||
}
|
||||
if ((msg->flags & DNS_MESSAGEFLAG_CD) != 0) {
|
||||
printf("%scd", did_flag ? " " : "");
|
||||
did_flag = ISC_TRUE;
|
||||
}
|
||||
printf("; QUERY: %u, ANSWER: %u, "
|
||||
"AUTHORITY: %u, ADDITIONAL: %u\n",
|
||||
msg->counts[DNS_SECTION_QUESTION],
|
||||
msg->counts[DNS_SECTION_ANSWER],
|
||||
msg->counts[DNS_SECTION_AUTHORITY],
|
||||
msg->counts[DNS_SECTION_ADDITIONAL]);
|
||||
opt = dns_message_getopt(msg);
|
||||
if (opt != NULL)
|
||||
printf(";; EDNS: version: %u, udp=%u\n",
|
||||
(unsigned int)((opt->ttl & 0x00ff0000) >> 16),
|
||||
(unsigned int)opt->rdclass);
|
||||
tsigname = NULL;
|
||||
tsig = dns_message_gettsig(msg, &tsigname);
|
||||
if (tsig != NULL)
|
||||
printf(";; PSEUDOSECTIONS: TSIG\n");
|
||||
}
|
||||
if (! ISC_LIST_EMPTY(msg->sections[DNS_SECTION_QUESTION]) &&
|
||||
!short_form) {
|
||||
printf("\n");
|
||||
result = printsection(msg, DNS_SECTION_QUESTION, "QUESTION",
|
||||
ISC_TRUE, query);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
if (! ISC_LIST_EMPTY(msg->sections[DNS_SECTION_ANSWER])) {
|
||||
if (!short_form)
|
||||
printf("\n");
|
||||
result = printsection(msg, DNS_SECTION_ANSWER, "ANSWER",
|
||||
ISC_TF(!short_form), query);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
|
||||
if (! ISC_LIST_EMPTY(msg->sections[DNS_SECTION_AUTHORITY]) &&
|
||||
!short_form) {
|
||||
printf("\n");
|
||||
result = printsection(msg, DNS_SECTION_AUTHORITY, "AUTHORITY",
|
||||
ISC_TRUE, query);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
if (! ISC_LIST_EMPTY(msg->sections[DNS_SECTION_ADDITIONAL]) &&
|
||||
!short_form) {
|
||||
printf("\n");
|
||||
result = printsection(msg, DNS_SECTION_ADDITIONAL,
|
||||
"ADDITIONAL", ISC_TRUE, query);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
if ((tsig != NULL) && !short_form) {
|
||||
printf("\n");
|
||||
result = printrdata(msg, tsig, tsigname,
|
||||
"PSEUDOSECTION TSIG", ISC_TRUE);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
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);
|
||||
}
|
||||
|
||||
static void
|
||||
parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
||||
char hostname[MXNAME];
|
||||
dig_lookup_t *lookup;
|
||||
int c;
|
||||
char store[MXNAME];
|
||||
isc_textregion_t tr;
|
||||
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"))
|
||||
!= EOF) {
|
||||
switch (c) {
|
||||
case 'l':
|
||||
lookup->tcp_mode = ISC_TRUE;
|
||||
lookup->rdtype = dns_rdatatype_axfr;
|
||||
lookup->rdtypeset = ISC_TRUE;
|
||||
fatalexit = 3;
|
||||
break;
|
||||
case 'v':
|
||||
case 'd':
|
||||
short_form = ISC_FALSE;
|
||||
break;
|
||||
case 'r':
|
||||
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,
|
||||
(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;
|
||||
break;
|
||||
case 'c':
|
||||
tr.base = isc_commandline_argument;
|
||||
tr.length = strlen(isc_commandline_argument);
|
||||
result = dns_rdataclass_fromtext(&rdclass,
|
||||
(isc_textregion_t *)&tr);
|
||||
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatalexit = 2;
|
||||
fatal("invalid class: %s\n",
|
||||
isc_commandline_argument);
|
||||
} else {
|
||||
lookup->rdclass = rdclass;
|
||||
lookup->rdclassset = ISC_TRUE;
|
||||
}
|
||||
default_lookups = ISC_FALSE;
|
||||
break;
|
||||
case 'a':
|
||||
if (!lookup->rdtypeset ||
|
||||
lookup->rdtype != dns_rdatatype_axfr)
|
||||
lookup->rdtype = dns_rdatatype_any;
|
||||
list_type = dns_rdatatype_any;
|
||||
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':
|
||||
/*
|
||||
* The timer routines are coded such that
|
||||
* timeout==MAXINT doesn't enable the timer
|
||||
*/
|
||||
timeout = INT_MAX;
|
||||
break;
|
||||
case 'W':
|
||||
timeout = atoi(isc_commandline_argument);
|
||||
if (timeout < 1)
|
||||
timeout = 1;
|
||||
break;
|
||||
case 'R':
|
||||
tries = atoi(isc_commandline_argument) + 1;
|
||||
if (tries < 2)
|
||||
tries = 2;
|
||||
break;
|
||||
case 'T':
|
||||
lookup->tcp_mode = ISC_TRUE;
|
||||
break;
|
||||
case 'C':
|
||||
debug("showing all SOAs");
|
||||
lookup->rdtype = dns_rdatatype_ns;
|
||||
lookup->rdtypeset = ISC_TRUE;
|
||||
lookup->rdclass = dns_rdataclass_in;
|
||||
lookup->rdclassset = ISC_TRUE;
|
||||
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",
|
||||
isc_commandline_argument);
|
||||
ndots = atoi(isc_commandline_argument);
|
||||
break;
|
||||
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)
|
||||
show_usage();
|
||||
|
||||
strncpy(hostname, argv[isc_commandline_index], sizeof(hostname));
|
||||
hostname[sizeof(hostname)-1]=0;
|
||||
if (argc > isc_commandline_index + 1) {
|
||||
set_nameserver(argv[isc_commandline_index+1]);
|
||||
debug("server is %s", argv[isc_commandline_index+1]);
|
||||
listed_server = ISC_TRUE;
|
||||
}
|
||||
|
||||
lookup->pending = ISC_FALSE;
|
||||
if (get_reverse(store, sizeof(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;
|
||||
}
|
||||
lookup->new_search = ISC_TRUE;
|
||||
ISC_LIST_APPEND(lookup_list, lookup, link);
|
||||
|
||||
usesearch = ISC_TRUE;
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
fatalexit = 1;
|
||||
|
||||
debug("main()");
|
||||
progname = argv[0];
|
||||
result = isc_app_start();
|
||||
check_result(result, "isc_app_start");
|
||||
setup_libs();
|
||||
parse_args(ISC_FALSE, argc, argv);
|
||||
setup_system();
|
||||
result = isc_app_onrun(mctx, global_task, onrun_callback, NULL);
|
||||
check_result(result, "isc_app_onrun");
|
||||
isc_app_run();
|
||||
cancel_all();
|
||||
destroy_libs();
|
||||
isc_app_finish();
|
||||
return ((seen_error == 0) ? 0 : 1);
|
||||
}
|
||||
|
212
dist/bind/bin/dig/host.docbook
vendored
Normal file
212
dist/bind/bin/dig/host.docbook
vendored
Normal file
@ -0,0 +1,212 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
|
||||
<!--
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
- purpose with or without fee is hereby granted, provided that the above
|
||||
- copyright notice and this permission notice appear in all copies.
|
||||
-
|
||||
- THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Id: host.docbook,v 1.2.2.2.4.5 2004/04/13 01:26:26 marka Exp -->
|
||||
|
||||
<refentry>
|
||||
|
||||
<refentryinfo>
|
||||
<date>Jun 30, 2000</date>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>host</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>host</refname>
|
||||
<refpurpose>DNS lookup utility</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>host</command>
|
||||
<arg><option>-aCdlnrTwv</option></arg>
|
||||
<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
|
||||
<arg><option>-N <replaceable class="parameter">ndots</replaceable></option></arg>
|
||||
<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>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para>
|
||||
<command>host</command>
|
||||
is a simple utility for performing DNS lookups.
|
||||
It is normally used to convert names to IP addresses and vice versa.
|
||||
When no arguments or options are given,
|
||||
<command>host</command>
|
||||
prints a short summary of its command line arguments and options.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<parameter>name</parameter> is the domain name that is to be looked
|
||||
up. It can also be a dotted-decimal IPv4 address or a colon-delimited
|
||||
IPv6 address, in which case <command>host</command> will by default
|
||||
perform a reverse lookup for that address.
|
||||
<parameter>server</parameter> is an optional argument which is either
|
||||
the name or IP address of the name server that <command>host</command>
|
||||
should query instead of the server or servers listed in
|
||||
<filename>/etc/resolv.conf</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <option>-a</option> (all) option is equivalent to setting the
|
||||
<option>-v</option> option and asking <command>host</command> to make
|
||||
a query of type ANY.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
When the <option>-C</option> option is used, <command>host</command>
|
||||
will attempt to display the SOA records for zone
|
||||
<parameter>name</parameter> from all the listed authoritative name
|
||||
servers for that zone. The list of name servers is defined by the NS
|
||||
records that are found for the zone.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <option>-c</option> option instructs to make a DNS query of class
|
||||
<parameter>class</parameter>. This can be used to lookup Hesiod or
|
||||
Chaosnet class resource records. The default class is IN (Internet).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Verbose output is generated by <command>host</command> when the
|
||||
<option>-d</option> or <option>-v</option> option is used. The two
|
||||
options are equivalent. They have been provided for backwards
|
||||
compatibility. In previous versions, the <option>-d</option> option
|
||||
switched on debugging traces and <option>-v</option> enabled verbose
|
||||
output.
|
||||
</para>
|
||||
|
||||
<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.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <option>-i</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.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The <option>-N</option> option sets the number of dots that have to be
|
||||
in <parameter>name</parameter> for it to be considered absolute. The
|
||||
default value is that defined using the ndots statement in
|
||||
<filename>/etc/resolv.conf</filename>, or 1 if no ndots statement is
|
||||
present. Names with fewer dots are interpreted as relative names and
|
||||
will be searched for in the domains listed in the <type>search</type>
|
||||
or <type>domain</type> directive in
|
||||
<filename>/etc/resolv.conf</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The number of UDP retries for a lookup can be changed with the
|
||||
<option>-R</option> option. <parameter>number</parameter> indicates
|
||||
how many times <command>host</command> will repeat a query that does
|
||||
not get answered. The default number of retries is 1. If
|
||||
<parameter>number</parameter> is negative or zero, the number of
|
||||
retries will default to 1.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Non-recursive queries can be made via the <option>-r</option> option.
|
||||
Setting this option clears the <type>RD</type> — recursion
|
||||
desired — bit in the query which <command>host</command> makes.
|
||||
This should mean that the name server receiving the query will not
|
||||
attempt to resolve <parameter>name</parameter>. The
|
||||
<option>-r</option> option enables <command>host</command> to mimic
|
||||
the behaviour of a name server by making non-recursive queries and
|
||||
expecting to receive answers to those queries that are usually
|
||||
referrals to other name servers.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
By default <command>host</command> uses UDP when making queries. The
|
||||
<option>-T</option> 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.
|
||||
</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 recognised query type: CNAME,
|
||||
NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
|
||||
<command>host</command> automatically selects an appropriate query
|
||||
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).
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The time to wait for a reply can be controlled through the
|
||||
<option>-W</option> and <option>-w</option> options. The
|
||||
<option>-W</option> option makes <command>host</command> wait for
|
||||
<parameter>wait</parameter> seconds. If <parameter>wait</parameter>
|
||||
is less than one, the wait interval is set to one second. When the
|
||||
<option>-w</option> option is used, <command>host</command> will
|
||||
effectively wait forever for a reply. The time to wait for a response
|
||||
will be set to the number of seconds given by the hardware's maximum
|
||||
value for an integer quantity.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>FILES</title>
|
||||
<para>
|
||||
<filename>/etc/resolv.conf</filename>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>SEE ALSO</title>
|
||||
<para>
|
||||
<citerefentry>
|
||||
<refentrytitle>dig</refentrytitle><manvolnum>1</manvolnum>
|
||||
</citerefentry>,
|
||||
<citerefentry>
|
||||
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
</refentry>
|
470
dist/bind/bin/dig/host.html
vendored
Normal file
470
dist/bind/bin/dig/host.html
vendored
Normal file
@ -0,0 +1,470 @@
|
||||
<!--
|
||||
- Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
-
|
||||
- Permission to use, copy, modify, and distribute this software for any
|
||||
- purpose with or without fee is hereby granted, provided that the above
|
||||
- copyright notice and this permission notice appear in all copies.
|
||||
-
|
||||
- THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
- AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
- PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- Id: host.html,v 1.4.2.1.4.5 2004/04/13 04:11:04 marka Exp -->
|
||||
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>host</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
|
||||
"></HEAD
|
||||
><BODY
|
||||
CLASS="REFENTRY"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><H1
|
||||
><A
|
||||
NAME="AEN1"
|
||||
>host</A
|
||||
></H1
|
||||
><DIV
|
||||
CLASS="REFNAMEDIV"
|
||||
><A
|
||||
NAME="AEN8"
|
||||
></A
|
||||
><H2
|
||||
>Name</H2
|
||||
>host -- DNS lookup utility</DIV
|
||||
><DIV
|
||||
CLASS="REFSYNOPSISDIV"
|
||||
><A
|
||||
NAME="AEN11"
|
||||
></A
|
||||
><H2
|
||||
>Synopsis</H2
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> [<TT
|
||||
CLASS="OPTION"
|
||||
>-aCdlnrTwv</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-c <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>class</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-N <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>ndots</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-R <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>number</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-t <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>type</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-W <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>wait</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-4</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-6</TT
|
||||
>] {name} [server]</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN37"
|
||||
></A
|
||||
><H2
|
||||
>DESCRIPTION</H2
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
>
|
||||
is a simple utility for performing DNS lookups.
|
||||
It is normally used to convert names to IP addresses and vice versa.
|
||||
When no arguments or options are given,
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
>
|
||||
prints a short summary of its command line arguments and options.</P
|
||||
><P
|
||||
><TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>name</I
|
||||
></TT
|
||||
> is the domain name that is to be looked
|
||||
up. It can also be a dotted-decimal IPv4 address or a colon-delimited
|
||||
IPv6 address, in which case <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> will by default
|
||||
perform a reverse lookup for that address.
|
||||
<TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>server</I
|
||||
></TT
|
||||
> is an optional argument which is either
|
||||
the name or IP address of the name server that <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
>
|
||||
should query instead of the server or servers listed in
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/resolv.conf</TT
|
||||
>.</P
|
||||
><P
|
||||
>The <TT
|
||||
CLASS="OPTION"
|
||||
>-a</TT
|
||||
> (all) option is equivalent to setting the
|
||||
<TT
|
||||
CLASS="OPTION"
|
||||
>-v</TT
|
||||
> option and asking <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> to make
|
||||
a query of type ANY.</P
|
||||
><P
|
||||
>When the <TT
|
||||
CLASS="OPTION"
|
||||
>-C</TT
|
||||
> option is used, <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
>
|
||||
will attempt to display the SOA records for zone
|
||||
<TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>name</I
|
||||
></TT
|
||||
> from all the listed authoritative name
|
||||
servers for that zone. The list of name servers is defined by the NS
|
||||
records that are found for the zone.</P
|
||||
><P
|
||||
>The <TT
|
||||
CLASS="OPTION"
|
||||
>-c</TT
|
||||
> option instructs to make a DNS query of class
|
||||
<TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>class</I
|
||||
></TT
|
||||
>. This can be used to lookup Hesiod or
|
||||
Chaosnet class resource records. The default class is IN (Internet).</P
|
||||
><P
|
||||
>Verbose output is generated by <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> when the
|
||||
<TT
|
||||
CLASS="OPTION"
|
||||
>-d</TT
|
||||
> or <TT
|
||||
CLASS="OPTION"
|
||||
>-v</TT
|
||||
> option is used. The two
|
||||
options are equivalent. They have been provided for backwards
|
||||
compatibility. In previous versions, the <TT
|
||||
CLASS="OPTION"
|
||||
>-d</TT
|
||||
> option
|
||||
switched on debugging traces and <TT
|
||||
CLASS="OPTION"
|
||||
>-v</TT
|
||||
> enabled verbose
|
||||
output.</P
|
||||
><P
|
||||
>List mode is selected by the <TT
|
||||
CLASS="OPTION"
|
||||
>-l</TT
|
||||
> option. This makes
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> perform a zone transfer for zone
|
||||
<TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>name</I
|
||||
></TT
|
||||
>. Transfer the zone printing out the NS, PTR
|
||||
and address records (A/AAAA). If combined with <TT
|
||||
CLASS="OPTION"
|
||||
>-a</TT
|
||||
>
|
||||
all records will be printed. </P
|
||||
><P
|
||||
>The <TT
|
||||
CLASS="OPTION"
|
||||
>-i</TT
|
||||
>
|
||||
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.</P
|
||||
><P
|
||||
>The <TT
|
||||
CLASS="OPTION"
|
||||
>-N</TT
|
||||
> option sets the number of dots that have to be
|
||||
in <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>name</I
|
||||
></TT
|
||||
> for it to be considered absolute. The
|
||||
default value is that defined using the ndots statement in
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/resolv.conf</TT
|
||||
>, or 1 if no ndots statement is
|
||||
present. Names with fewer dots are interpreted as relative names and
|
||||
will be searched for in the domains listed in the <SPAN
|
||||
CLASS="TYPE"
|
||||
>search</SPAN
|
||||
>
|
||||
or <SPAN
|
||||
CLASS="TYPE"
|
||||
>domain</SPAN
|
||||
> directive in
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/resolv.conf</TT
|
||||
>.</P
|
||||
><P
|
||||
>The number of UDP retries for a lookup can be changed with the
|
||||
<TT
|
||||
CLASS="OPTION"
|
||||
>-R</TT
|
||||
> option. <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>number</I
|
||||
></TT
|
||||
> indicates
|
||||
how many times <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> will repeat a query that does
|
||||
not get answered. The default number of retries is 1. If
|
||||
<TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>number</I
|
||||
></TT
|
||||
> is negative or zero, the number of
|
||||
retries will default to 1.</P
|
||||
><P
|
||||
>Non-recursive queries can be made via the <TT
|
||||
CLASS="OPTION"
|
||||
>-r</TT
|
||||
> option.
|
||||
Setting this option clears the <SPAN
|
||||
CLASS="TYPE"
|
||||
>RD</SPAN
|
||||
> — recursion
|
||||
desired — bit in the query which <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> makes.
|
||||
This should mean that the name server receiving the query will not
|
||||
attempt to resolve <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>name</I
|
||||
></TT
|
||||
>. The
|
||||
<TT
|
||||
CLASS="OPTION"
|
||||
>-r</TT
|
||||
> option enables <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> to mimic
|
||||
the behaviour of a name server by making non-recursive queries and
|
||||
expecting to receive answers to those queries that are usually
|
||||
referrals to other name servers.</P
|
||||
><P
|
||||
>By default <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> uses UDP when making queries. The
|
||||
<TT
|
||||
CLASS="OPTION"
|
||||
>-T</TT
|
||||
> 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.</P
|
||||
><P
|
||||
>The <TT
|
||||
CLASS="OPTION"
|
||||
>-4</TT
|
||||
> option forces <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> to only
|
||||
use IPv4 query transport. The <TT
|
||||
CLASS="OPTION"
|
||||
>-6</TT
|
||||
> option forces
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> to only use IPv6 query transport.</P
|
||||
><P
|
||||
>The <TT
|
||||
CLASS="OPTION"
|
||||
>-t</TT
|
||||
> option is used to select the query type.
|
||||
<TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>type</I
|
||||
></TT
|
||||
> can be any recognised query type: CNAME,
|
||||
NS, SOA, SIG, KEY, AXFR, etc. When no query type is specified,
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> automatically selects an appropriate query
|
||||
type. By default it looks for A records, but if the
|
||||
<TT
|
||||
CLASS="OPTION"
|
||||
>-C</TT
|
||||
> option was given, queries will be made for SOA
|
||||
records, and if <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>name</I
|
||||
></TT
|
||||
> is a dotted-decimal IPv4
|
||||
address or colon-delimited IPv6 address, <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> 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).</P
|
||||
><P
|
||||
>The time to wait for a reply can be controlled through the
|
||||
<TT
|
||||
CLASS="OPTION"
|
||||
>-W</TT
|
||||
> and <TT
|
||||
CLASS="OPTION"
|
||||
>-w</TT
|
||||
> options. The
|
||||
<TT
|
||||
CLASS="OPTION"
|
||||
>-W</TT
|
||||
> option makes <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> wait for
|
||||
<TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>wait</I
|
||||
></TT
|
||||
> seconds. If <TT
|
||||
CLASS="PARAMETER"
|
||||
><I
|
||||
>wait</I
|
||||
></TT
|
||||
>
|
||||
is less than one, the wait interval is set to one second. When the
|
||||
<TT
|
||||
CLASS="OPTION"
|
||||
>-w</TT
|
||||
> option is used, <B
|
||||
CLASS="COMMAND"
|
||||
>host</B
|
||||
> will
|
||||
effectively wait forever for a reply. The time to wait for a response
|
||||
will be set to the number of seconds given by the hardware's maximum
|
||||
value for an integer quantity.</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN115"
|
||||
></A
|
||||
><H2
|
||||
>FILES</H2
|
||||
><P
|
||||
><TT
|
||||
CLASS="FILENAME"
|
||||
>/etc/resolv.conf</TT
|
||||
></P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN119"
|
||||
></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
|
||||
>.</P
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
332
dist/bind/bin/dig/include/dig/dig.h
vendored
Normal file
332
dist/bind/bin/dig/include/dig/dig.h
vendored
Normal file
@ -0,0 +1,332 @@
|
||||
/* $NetBSD: dig.h,v 1.1.1.1 2004/05/17 23:43:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Id: dig.h,v 1.71.2.6.2.5 2004/04/13 03:00:07 marka Exp */
|
||||
|
||||
#ifndef DIG_H
|
||||
#define DIG_H
|
||||
|
||||
#include <dns/rdatalist.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#include <isc/boolean.h>
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/bufferlist.h>
|
||||
#include <isc/formatcheck.h>
|
||||
#include <isc/lang.h>
|
||||
#include <isc/list.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/socket.h>
|
||||
|
||||
#define MXSERV 6
|
||||
#define MXNAME (DNS_NAME_MAXTEXT+1)
|
||||
#define MXRD 32
|
||||
#define BUFSIZE 512
|
||||
#define COMMSIZE 0xffff
|
||||
#ifndef RESOLV_CONF
|
||||
#define RESOLV_CONF "/etc/resolv.conf"
|
||||
#endif
|
||||
#define OUTPUTBUF 32767
|
||||
#define MAXRRLIMIT 0xffffffff
|
||||
#define MAXTIMEOUT 0xffff
|
||||
#define MAXTRIES 0xffffffff
|
||||
#define MAXNDOTS 0xffff
|
||||
#define MAXPORT 0xffff
|
||||
#define MAXSERIAL 0xffffffff
|
||||
|
||||
/*
|
||||
* Default timeout values
|
||||
*/
|
||||
#define TCP_TIMEOUT 10
|
||||
#define UDP_TIMEOUT 5
|
||||
|
||||
#define SERVER_TIMEOUT 1
|
||||
|
||||
#define LOOKUP_LIMIT 64
|
||||
/*
|
||||
* Lookup_limit is just a limiter, keeping too many lookups from being
|
||||
* created. It's job is mainly to prevent the program from running away
|
||||
* in a tight loop of constant lookups. It's value is arbitrary.
|
||||
*/
|
||||
|
||||
#define ROOTNS 1
|
||||
/*
|
||||
* Set the number of root servers to ask for information when running in
|
||||
* trace mode.
|
||||
* XXXMWS -- trace mode is currently semi-broken, and this number *MUST*
|
||||
* be 1.
|
||||
*/
|
||||
|
||||
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;
|
||||
|
||||
struct dig_lookup {
|
||||
isc_boolean_t
|
||||
pending, /* Pending a successful answer */
|
||||
waiting_connect,
|
||||
doing_xfr,
|
||||
ns_search_only, /* dig +nssearch, host -C */
|
||||
identify, /* Append an "on server <foo>" message */
|
||||
identify_previous_line, /* Prepend a "Nameserver <foo>:"
|
||||
message, with newline and tab */
|
||||
ignore,
|
||||
recurse,
|
||||
aaonly,
|
||||
adflag,
|
||||
cdflag,
|
||||
trace, /* dig +trace */
|
||||
trace_root, /* initial query for either +trace or +nssearch */
|
||||
tcp_mode,
|
||||
ip6_int,
|
||||
comments,
|
||||
stats,
|
||||
section_question,
|
||||
section_answer,
|
||||
section_authority,
|
||||
section_additional,
|
||||
servfail_stops,
|
||||
new_search,
|
||||
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;
|
||||
char namespace[BUFSIZE];
|
||||
char onamespace[BUFSIZE];
|
||||
isc_buffer_t namebuf;
|
||||
isc_buffer_t onamebuf;
|
||||
isc_buffer_t sendbuf;
|
||||
char *sendspace;
|
||||
dns_name_t *name;
|
||||
isc_timer_t *timer;
|
||||
isc_interval_t interval;
|
||||
dns_message_t *sendmsg;
|
||||
dns_name_t *oname;
|
||||
ISC_LINK(dig_lookup_t) link;
|
||||
ISC_LIST(dig_query_t) q;
|
||||
dig_query_t *current_query;
|
||||
dig_serverlist_t my_server_list;
|
||||
dig_searchlist_t *origin;
|
||||
dig_query_t *xfr_q;
|
||||
isc_uint32_t retries;
|
||||
int nsfound;
|
||||
isc_uint16_t udpsize;
|
||||
isc_uint32_t ixfr_serial;
|
||||
isc_buffer_t rdatabuf;
|
||||
char rdatastore[MXNAME];
|
||||
dst_context_t *tsigctx;
|
||||
isc_buffer_t *querysig;
|
||||
isc_uint32_t msgcounter;
|
||||
};
|
||||
|
||||
struct dig_query {
|
||||
dig_lookup_t *lookup;
|
||||
isc_boolean_t waiting_connect,
|
||||
first_pass,
|
||||
first_soa_rcvd,
|
||||
second_rr_rcvd,
|
||||
first_repeat_rcvd,
|
||||
recv_made,
|
||||
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;
|
||||
isc_bufferlist_t sendlist,
|
||||
recvlist,
|
||||
lengthlist;
|
||||
isc_buffer_t recvbuf,
|
||||
lengthbuf,
|
||||
slbuf;
|
||||
char *recvspace,
|
||||
lengthspace[4],
|
||||
slspace[4];
|
||||
isc_socket_t *sock;
|
||||
ISC_LINK(dig_query_t) link;
|
||||
isc_sockaddr_t sockaddr;
|
||||
isc_time_t time_sent;
|
||||
};
|
||||
|
||||
struct dig_server {
|
||||
char servername[MXNAME];
|
||||
ISC_LINK(dig_server_t) link;
|
||||
};
|
||||
|
||||
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
|
||||
/*
|
||||
* Routines in dighost.c.
|
||||
*/
|
||||
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,
|
||||
isc_boolean_t strict);
|
||||
|
||||
void
|
||||
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
|
||||
|
||||
void
|
||||
debug(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
|
||||
|
||||
void
|
||||
check_result(isc_result_t result, const char *msg);
|
||||
|
||||
void
|
||||
setup_lookup(dig_lookup_t *lookup);
|
||||
|
||||
void
|
||||
do_lookup(dig_lookup_t *lookup);
|
||||
|
||||
void
|
||||
start_lookup(void);
|
||||
|
||||
void
|
||||
onrun_callback(isc_task_t *task, isc_event_t *event);
|
||||
|
||||
int
|
||||
dhmain(int argc, char **argv);
|
||||
|
||||
void
|
||||
setup_libs(void);
|
||||
|
||||
void
|
||||
setup_system(void);
|
||||
|
||||
dig_lookup_t *
|
||||
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);
|
||||
|
||||
void
|
||||
flush_server_list(void);
|
||||
|
||||
void
|
||||
set_nameserver(char *opt);
|
||||
|
||||
void
|
||||
clone_server_list(dig_serverlist_t src,
|
||||
dig_serverlist_t *dest);
|
||||
|
||||
void
|
||||
cancel_all(void);
|
||||
|
||||
void
|
||||
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);
|
||||
/*
|
||||
* Print the final result of the lookup.
|
||||
*/
|
||||
|
||||
void
|
||||
received(int bytes, isc_sockaddr_t *from, dig_query_t *query);
|
||||
/*
|
||||
* Print a message about where and when the response
|
||||
* was received from, like the final comment in the
|
||||
* output of "dig".
|
||||
*/
|
||||
|
||||
void
|
||||
trying(char *frm, dig_lookup_t *lookup);
|
||||
|
||||
void
|
||||
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
|
903
dist/bind/bin/dig/nslookup.c
vendored
Normal file
903
dist/bind/bin/dig/nslookup.c
vendored
Normal file
@ -0,0 +1,903 @@
|
||||
/* $NetBSD: nslookup.c,v 1.1.1.1 2004/05/17 23:43:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Id: nslookup.c,v 1.90.2.4.2.4 2004/04/13 03:00:06 marka Exp */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <isc/app.h>
|
||||
#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>
|
||||
#include <isc/task.h>
|
||||
#include <isc/netaddr.h>
|
||||
|
||||
#include <dns/message.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/byaddr.h>
|
||||
|
||||
#ifdef DIG_SIGCHASE
|
||||
#ifndef DIG_SIGCHASE_BU
|
||||
#define DIG_SIGCHASE_BU 1
|
||||
#endif
|
||||
#ifndef DIG_SIGCHASE_TD
|
||||
#define DIG_SIGCHASE_TD 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <dig/dig.h>
|
||||
|
||||
extern ISC_LIST(dig_lookup_t) lookup_list;
|
||||
extern dig_serverlist_t server_list;
|
||||
extern ISC_LIST(dig_searchlist_t) search_list;
|
||||
|
||||
extern isc_boolean_t usesearch, debugging;
|
||||
extern in_port_t port;
|
||||
extern unsigned int timeout;
|
||||
extern isc_mem_t *mctx;
|
||||
extern int tries;
|
||||
extern int lookup_counter;
|
||||
extern isc_task_t *global_task;
|
||||
extern char *progname;
|
||||
|
||||
static isc_boolean_t short_form = ISC_TRUE,
|
||||
tcpmode = ISC_FALSE, deprecation_msg = ISC_TRUE,
|
||||
identify = ISC_FALSE, stats = ISC_TRUE,
|
||||
comments = ISC_TRUE, section_question = ISC_TRUE,
|
||||
section_answer = ISC_TRUE, section_authority = ISC_TRUE,
|
||||
section_additional = ISC_TRUE, recurse = ISC_TRUE,
|
||||
aaonly = ISC_FALSE;
|
||||
static isc_boolean_t in_use = ISC_FALSE;
|
||||
static char defclass[MXRD] = "IN";
|
||||
static char deftype[MXRD] = "A";
|
||||
static isc_event_t *global_event = NULL;
|
||||
|
||||
static char domainopt[DNS_NAME_MAXTEXT];
|
||||
|
||||
static const char *rcodetext[] = {
|
||||
"NOERROR",
|
||||
"FORMERR",
|
||||
"SERVFAIL",
|
||||
"NXDOMAIN",
|
||||
"NOTIMP",
|
||||
"REFUSED",
|
||||
"YXDOMAIN",
|
||||
"YXRRSET",
|
||||
"NXRRSET",
|
||||
"NOTAUTH",
|
||||
"NOTZONE",
|
||||
"RESERVED11",
|
||||
"RESERVED12",
|
||||
"RESERVED13",
|
||||
"RESERVED14",
|
||||
"RESERVED15",
|
||||
"BADVERS"
|
||||
};
|
||||
|
||||
static const char *rtypetext[] = {
|
||||
"rtype_0 = ", /* 0 */
|
||||
"internet address = ", /* 1 */
|
||||
"nameserver = ", /* 2 */
|
||||
"md = ", /* 3 */
|
||||
"mf = ", /* 4 */
|
||||
"canonical name = ", /* 5 */
|
||||
"soa = ", /* 6 */
|
||||
"mb = ", /* 7 */
|
||||
"mg = ", /* 8 */
|
||||
"mr = ", /* 9 */
|
||||
"rtype_10 = ", /* 10 */
|
||||
"protocol = ", /* 11 */
|
||||
"name = ", /* 12 */
|
||||
"hinfo = ", /* 13 */
|
||||
"minfo = ", /* 14 */
|
||||
"mail exchanger = ", /* 15 */
|
||||
"text = ", /* 16 */
|
||||
"rp = ", /* 17 */
|
||||
"afsdb = ", /* 18 */
|
||||
"x25 address = ", /* 19 */
|
||||
"isdn address = ", /* 20 */
|
||||
"rt = ", /* 21 */
|
||||
"nsap = ", /* 22 */
|
||||
"nsap_ptr = ", /* 23 */
|
||||
"signature = ", /* 24 */
|
||||
"key = ", /* 25 */
|
||||
"px = ", /* 26 */
|
||||
"gpos = ", /* 27 */
|
||||
"has AAAA address ", /* 28 */
|
||||
"loc = ", /* 29 */
|
||||
"next = ", /* 30 */
|
||||
"rtype_31 = ", /* 31 */
|
||||
"rtype_32 = ", /* 32 */
|
||||
"service = ", /* 33 */
|
||||
"rtype_34 = ", /* 34 */
|
||||
"naptr = ", /* 35 */
|
||||
"kx = ", /* 36 */
|
||||
"cert = ", /* 37 */
|
||||
"v6 address = ", /* 38 */
|
||||
"dname = ", /* 39 */
|
||||
"rtype_40 = ", /* 40 */
|
||||
"optional = " /* 41 */
|
||||
};
|
||||
|
||||
#define N_KNOWN_RRTYPES (sizeof(rtypetext) / sizeof(rtypetext[0]))
|
||||
|
||||
static void flush_lookup_list(void);
|
||||
static void getinput(isc_task_t *task, isc_event_t *event);
|
||||
|
||||
void
|
||||
dighost_shutdown(void) {
|
||||
isc_event_t *event = global_event;
|
||||
|
||||
flush_lookup_list();
|
||||
debug("dighost_shutdown()");
|
||||
|
||||
if (!in_use) {
|
||||
isc_app_shutdown();
|
||||
return;
|
||||
}
|
||||
|
||||
isc_task_send(global_task, &event);
|
||||
}
|
||||
|
||||
static void
|
||||
printsoa(dns_rdata_t *rdata) {
|
||||
dns_rdata_soa_t soa;
|
||||
isc_result_t result;
|
||||
char namebuf[DNS_NAME_FORMATSIZE];
|
||||
|
||||
result = dns_rdata_tostruct(rdata, &soa, NULL);
|
||||
check_result(result, "dns_rdata_tostruct");
|
||||
|
||||
dns_name_format(&soa.origin, namebuf, sizeof(namebuf));
|
||||
printf("\torigin = %s\n", namebuf);
|
||||
dns_name_format(&soa.contact, namebuf, sizeof(namebuf));
|
||||
printf("\tmail addr = %s\n", namebuf);
|
||||
printf("\tserial = %u\n", soa.serial);
|
||||
printf("\trefresh = %u\n", soa.refresh);
|
||||
printf("\tretry = %u\n", soa.retry);
|
||||
printf("\texpire = %u\n", soa.expire);
|
||||
printf("\tminimum = %u\n", soa.minimum);
|
||||
dns_rdata_freestruct(&soa);
|
||||
}
|
||||
|
||||
static void
|
||||
printa(dns_rdata_t *rdata) {
|
||||
isc_result_t result;
|
||||
char text[sizeof("255.255.255.255")];
|
||||
isc_buffer_t b;
|
||||
|
||||
isc_buffer_init(&b, text, sizeof(text));
|
||||
result = dns_rdata_totext(rdata, NULL, &b);
|
||||
check_result(result, "dns_rdata_totext");
|
||||
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;
|
||||
isc_buffer_t *b = NULL;
|
||||
unsigned int size = 1024;
|
||||
isc_boolean_t done = ISC_FALSE;
|
||||
|
||||
if (rdata->type < N_KNOWN_RRTYPES)
|
||||
printf("%s", rtypetext[rdata->type]);
|
||||
else
|
||||
printf("rdata_%d = ", rdata->type);
|
||||
|
||||
while (!done) {
|
||||
result = isc_buffer_allocate(mctx, &b, size);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
check_result(result, "isc_buffer_allocate");
|
||||
result = dns_rdata_totext(rdata, NULL, b);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
printf("%.*s\n", (int)isc_buffer_usedlength(b),
|
||||
(char *)isc_buffer_base(b));
|
||||
done = ISC_TRUE;
|
||||
} else if (result != ISC_R_NOSPACE)
|
||||
check_result(result, "dns_rdata_totext");
|
||||
isc_buffer_free(&b);
|
||||
size *= 2;
|
||||
}
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
printsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
|
||||
dns_section_t section) {
|
||||
isc_result_t result, loopresult;
|
||||
dns_name_t *name;
|
||||
dns_rdataset_t *rdataset = NULL;
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
char namebuf[DNS_NAME_FORMATSIZE];
|
||||
|
||||
UNUSED(query);
|
||||
UNUSED(headers);
|
||||
|
||||
debug("printsection()");
|
||||
|
||||
result = dns_message_firstname(msg, section);
|
||||
if (result == ISC_R_NOMORE)
|
||||
return (ISC_R_SUCCESS);
|
||||
else if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
for (;;) {
|
||||
name = NULL;
|
||||
dns_message_currentname(msg, section,
|
||||
&name);
|
||||
for (rdataset = ISC_LIST_HEAD(name->list);
|
||||
rdataset != NULL;
|
||||
rdataset = ISC_LIST_NEXT(rdataset, link)) {
|
||||
loopresult = dns_rdataset_first(rdataset);
|
||||
while (loopresult == ISC_R_SUCCESS) {
|
||||
dns_rdataset_current(rdataset, &rdata);
|
||||
switch (rdata.type) {
|
||||
case dns_rdatatype_a:
|
||||
if (section != DNS_SECTION_ANSWER)
|
||||
goto def_short_section;
|
||||
dns_name_format(name, namebuf,
|
||||
sizeof(namebuf));
|
||||
printf("Name:\t%s\n", namebuf);
|
||||
printa(&rdata);
|
||||
break;
|
||||
case dns_rdatatype_soa:
|
||||
dns_name_format(name, namebuf,
|
||||
sizeof(namebuf));
|
||||
printf("%s\n", namebuf);
|
||||
printsoa(&rdata);
|
||||
break;
|
||||
default:
|
||||
def_short_section:
|
||||
dns_name_format(name, namebuf,
|
||||
sizeof(namebuf));
|
||||
printf("%s\t", namebuf);
|
||||
printrdata(&rdata);
|
||||
break;
|
||||
}
|
||||
dns_rdata_reset(&rdata);
|
||||
loopresult = dns_rdataset_next(rdataset);
|
||||
}
|
||||
}
|
||||
result = dns_message_nextname(msg, section);
|
||||
if (result == ISC_R_NOMORE)
|
||||
break;
|
||||
else if (result != ISC_R_SUCCESS) {
|
||||
return (result);
|
||||
}
|
||||
}
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
detailsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
|
||||
dns_section_t section) {
|
||||
isc_result_t result, loopresult;
|
||||
dns_name_t *name;
|
||||
dns_rdataset_t *rdataset = NULL;
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
char namebuf[DNS_NAME_FORMATSIZE];
|
||||
|
||||
UNUSED(query);
|
||||
|
||||
debug("detailsection()");
|
||||
|
||||
if (headers) {
|
||||
switch (section) {
|
||||
case DNS_SECTION_QUESTION:
|
||||
puts(" QUESTIONS:");
|
||||
break;
|
||||
case DNS_SECTION_ANSWER:
|
||||
puts(" ANSWERS:");
|
||||
break;
|
||||
case DNS_SECTION_AUTHORITY:
|
||||
puts(" AUTHORITY RECORDS:");
|
||||
break;
|
||||
case DNS_SECTION_ADDITIONAL:
|
||||
puts(" ADDITIONAL RECORDS:");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
result = dns_message_firstname(msg, section);
|
||||
if (result == ISC_R_NOMORE)
|
||||
return (ISC_R_SUCCESS);
|
||||
else if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
for (;;) {
|
||||
name = NULL;
|
||||
dns_message_currentname(msg, section,
|
||||
&name);
|
||||
for (rdataset = ISC_LIST_HEAD(name->list);
|
||||
rdataset != NULL;
|
||||
rdataset = ISC_LIST_NEXT(rdataset, link)) {
|
||||
if (section == DNS_SECTION_QUESTION) {
|
||||
dns_name_format(name, namebuf,
|
||||
sizeof(namebuf));
|
||||
printf("\t%s, ", namebuf);
|
||||
dns_rdatatype_format(rdataset->type,
|
||||
namebuf,
|
||||
sizeof(namebuf));
|
||||
printf("type = %s, ", namebuf);
|
||||
dns_rdataclass_format(rdataset->rdclass,
|
||||
namebuf,
|
||||
sizeof(namebuf));
|
||||
printf("class = %s\n", namebuf);
|
||||
}
|
||||
loopresult = dns_rdataset_first(rdataset);
|
||||
while (loopresult == ISC_R_SUCCESS) {
|
||||
dns_rdataset_current(rdataset, &rdata);
|
||||
|
||||
dns_name_format(name, namebuf,
|
||||
sizeof(namebuf));
|
||||
printf(" -> %s\n", namebuf);
|
||||
|
||||
switch (rdata.type) {
|
||||
case dns_rdatatype_soa:
|
||||
printsoa(&rdata);
|
||||
break;
|
||||
default:
|
||||
printf("\t");
|
||||
printrdata(&rdata);
|
||||
}
|
||||
dns_rdata_reset(&rdata);
|
||||
loopresult = dns_rdataset_next(rdataset);
|
||||
}
|
||||
}
|
||||
result = dns_message_nextname(msg, section);
|
||||
if (result == ISC_R_NOMORE)
|
||||
break;
|
||||
else if (result != ISC_R_SUCCESS) {
|
||||
return (result);
|
||||
}
|
||||
}
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
void
|
||||
received(int bytes, isc_sockaddr_t *from, dig_query_t *query)
|
||||
{
|
||||
UNUSED(bytes);
|
||||
UNUSED(from);
|
||||
UNUSED(query);
|
||||
}
|
||||
|
||||
void
|
||||
trying(char *frm, dig_lookup_t *lookup) {
|
||||
UNUSED(frm);
|
||||
UNUSED(lookup);
|
||||
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
||||
char servtext[ISC_SOCKADDR_FORMATSIZE];
|
||||
|
||||
debug("printmessage()");
|
||||
|
||||
isc_sockaddr_format(&query->sockaddr, servtext, sizeof(servtext));
|
||||
printf("Server:\t\t%s\n", query->servname);
|
||||
printf("Address:\t%s\n", servtext);
|
||||
|
||||
puts("");
|
||||
|
||||
if (!short_form) {
|
||||
isc_boolean_t headers = ISC_TRUE;
|
||||
puts("------------");
|
||||
/* detailheader(query, msg);*/
|
||||
detailsection(query, msg, headers, DNS_SECTION_QUESTION);
|
||||
detailsection(query, msg, headers, DNS_SECTION_ANSWER);
|
||||
detailsection(query, msg, headers, DNS_SECTION_AUTHORITY);
|
||||
detailsection(query, msg, headers, DNS_SECTION_ADDITIONAL);
|
||||
puts("------------");
|
||||
}
|
||||
|
||||
if (msg->rcode != 0) {
|
||||
char nametext[DNS_NAME_FORMATSIZE];
|
||||
dns_name_format(query->lookup->name,
|
||||
nametext, sizeof(nametext));
|
||||
printf("** server can't find %s: %s\n", nametext,
|
||||
rcodetext[msg->rcode]);
|
||||
debug("returning with rcode == 0");
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
if ((msg->flags & DNS_MESSAGEFLAG_AA) == 0)
|
||||
puts("Non-authoritative answer:");
|
||||
if (!ISC_LIST_EMPTY(msg->sections[DNS_SECTION_ANSWER]))
|
||||
printsection(query, msg, headers, DNS_SECTION_ANSWER);
|
||||
else
|
||||
printf("*** Can't find %s: No answer\n",
|
||||
query->lookup->textname);
|
||||
|
||||
if (((msg->flags & DNS_MESSAGEFLAG_AA) == 0) &&
|
||||
(query->lookup->rdtype != dns_rdatatype_a)) {
|
||||
puts("\nAuthoritative answers can be found from:");
|
||||
printsection(query, msg, headers,
|
||||
DNS_SECTION_AUTHORITY);
|
||||
printsection(query, msg, headers,
|
||||
DNS_SECTION_ADDITIONAL);
|
||||
}
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static void
|
||||
show_settings(isc_boolean_t full, isc_boolean_t serv_only) {
|
||||
dig_server_t *srv;
|
||||
isc_sockaddr_t sockaddr;
|
||||
dig_searchlist_t *listent;
|
||||
|
||||
srv = ISC_LIST_HEAD(server_list);
|
||||
|
||||
while (srv != NULL) {
|
||||
char sockstr[ISC_SOCKADDR_FORMATSIZE];
|
||||
|
||||
get_address(srv->servername, port, &sockaddr);
|
||||
isc_sockaddr_format(&sockaddr, sockstr, sizeof(sockstr));
|
||||
printf("Default server: %s\nAddress: %s\n",
|
||||
srv->servername, sockstr);
|
||||
if (!full)
|
||||
return;
|
||||
srv = ISC_LIST_NEXT(srv, link);
|
||||
}
|
||||
if (serv_only)
|
||||
return;
|
||||
printf("\nSet options:\n");
|
||||
printf(" %s\t\t\t%s\t\t%s\n",
|
||||
tcpmode ? "vc" : "novc",
|
||||
short_form ? "nodebug" : "debug",
|
||||
debugging ? "d2" : "nod2");
|
||||
printf(" %s\t\t%s\n",
|
||||
usesearch ? "search" : "nosearch",
|
||||
recurse ? "recurse" : "norecurse");
|
||||
printf(" timeout = %d\t\tretry = %d\tport = %d\n",
|
||||
timeout, tries, port);
|
||||
printf(" querytype = %-8s\tclass = %s\n", deftype, defclass);
|
||||
printf(" srchlist = ");
|
||||
for (listent = ISC_LIST_HEAD(search_list);
|
||||
listent != NULL;
|
||||
listent = ISC_LIST_NEXT(listent, link)) {
|
||||
printf("%s", listent->origin);
|
||||
if (ISC_LIST_NEXT(listent, link) != NULL)
|
||||
printf("/");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
static isc_boolean_t
|
||||
testtype(char *typetext) {
|
||||
isc_result_t result;
|
||||
isc_textregion_t tr;
|
||||
dns_rdatatype_t rdtype;
|
||||
|
||||
tr.base = typetext;
|
||||
tr.length = strlen(typetext);
|
||||
result = dns_rdatatype_fromtext(&rdtype, &tr);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
return (ISC_TRUE);
|
||||
else {
|
||||
printf("unknown query type: %s\n", typetext);
|
||||
return (ISC_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
static isc_boolean_t
|
||||
testclass(char *typetext) {
|
||||
isc_result_t result;
|
||||
isc_textregion_t tr;
|
||||
dns_rdataclass_t rdclass;
|
||||
|
||||
tr.base = typetext;
|
||||
tr.length = strlen(typetext);
|
||||
result = dns_rdataclass_fromtext(&rdclass, &tr);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
return (ISC_TRUE);
|
||||
else {
|
||||
printf("unknown query class: %s\n", typetext);
|
||||
return (ISC_FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
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) {
|
||||
if (strncasecmp(opt, "all", 4) == 0) {
|
||||
show_settings(ISC_TRUE, ISC_FALSE);
|
||||
} else if (strncasecmp(opt, "class=", 6) == 0) {
|
||||
if (testclass(&opt[6]))
|
||||
safecpy(defclass, &opt[6], sizeof(defclass));
|
||||
} else if (strncasecmp(opt, "cl=", 3) == 0) {
|
||||
if (testclass(&opt[3]))
|
||||
safecpy(defclass, &opt[3], sizeof(defclass));
|
||||
} else if (strncasecmp(opt, "type=", 5) == 0) {
|
||||
if (testtype(&opt[5]))
|
||||
safecpy(deftype, &opt[5], sizeof(deftype));
|
||||
} else if (strncasecmp(opt, "ty=", 3) == 0) {
|
||||
if (testtype(&opt[3]))
|
||||
safecpy(deftype, &opt[3], sizeof(deftype));
|
||||
} else if (strncasecmp(opt, "querytype=", 10) == 0) {
|
||||
if (testtype(&opt[10]))
|
||||
safecpy(deftype, &opt[10], sizeof(deftype));
|
||||
} else if (strncasecmp(opt, "query=", 6) == 0) {
|
||||
if (testtype(&opt[6]))
|
||||
safecpy(deftype, &opt[6], sizeof(deftype));
|
||||
} else if (strncasecmp(opt, "qu=", 3) == 0) {
|
||||
if (testtype(&opt[3]))
|
||||
safecpy(deftype, &opt[3], sizeof(deftype));
|
||||
} else if (strncasecmp(opt, "q=", 2) == 0) {
|
||||
if (testtype(&opt[2]))
|
||||
safecpy(deftype, &opt[2], sizeof(deftype));
|
||||
} else if (strncasecmp(opt, "domain=", 7) == 0) {
|
||||
safecpy(domainopt, &opt[7], sizeof(domainopt));
|
||||
set_search_domain(domainopt);
|
||||
usesearch = ISC_TRUE;
|
||||
} else if (strncasecmp(opt, "do=", 3) == 0) {
|
||||
safecpy(domainopt, &opt[3], sizeof(domainopt));
|
||||
set_search_domain(domainopt);
|
||||
usesearch = ISC_TRUE;
|
||||
} else if (strncasecmp(opt, "port=", 5) == 0) {
|
||||
set_port(&opt[5]);
|
||||
} else if (strncasecmp(opt, "po=", 3) == 0) {
|
||||
set_port(&opt[3]);
|
||||
} else if (strncasecmp(opt, "timeout=", 8) == 0) {
|
||||
set_timeout(&opt[8]);
|
||||
} else if (strncasecmp(opt, "t=", 2) == 0) {
|
||||
set_timeout(&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]);
|
||||
} else if (strncasecmp(opt, "ret=", 4) == 0) {
|
||||
set_tries(&opt[4]);
|
||||
} else if (strncasecmp(opt, "def", 3) == 0) {
|
||||
usesearch = ISC_TRUE;
|
||||
} else if (strncasecmp(opt, "nodef", 5) == 0) {
|
||||
usesearch = ISC_FALSE;
|
||||
} else if (strncasecmp(opt, "vc", 3) == 0) {
|
||||
tcpmode = ISC_TRUE;
|
||||
} else if (strncasecmp(opt, "novc", 5) == 0) {
|
||||
tcpmode = ISC_FALSE;
|
||||
} else if (strncasecmp(opt, "deb", 3) == 0) {
|
||||
short_form = ISC_FALSE;
|
||||
} else if (strncasecmp(opt, "nodeb", 5) == 0) {
|
||||
short_form = ISC_TRUE;
|
||||
} else if (strncasecmp(opt, "d2", 2) == 0) {
|
||||
debugging = ISC_TRUE;
|
||||
} else if (strncasecmp(opt, "nod2", 4) == 0) {
|
||||
debugging = ISC_FALSE;
|
||||
} else if (strncasecmp(opt, "search", 3) == 0) {
|
||||
usesearch = ISC_TRUE;
|
||||
} else if (strncasecmp(opt, "nosearch", 5) == 0) {
|
||||
usesearch = ISC_FALSE;
|
||||
} else if (strncasecmp(opt, "sil", 3) == 0) {
|
||||
deprecation_msg = ISC_FALSE;
|
||||
} else {
|
||||
printf("*** Invalid option: %s\n", opt);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
addlookup(char *opt) {
|
||||
dig_lookup_t *lookup;
|
||||
isc_result_t result;
|
||||
isc_textregion_t tr;
|
||||
dns_rdatatype_t rdtype;
|
||||
dns_rdataclass_t rdclass;
|
||||
char store[MXNAME];
|
||||
|
||||
debug("addlookup()");
|
||||
tr.base = deftype;
|
||||
tr.length = strlen(deftype);
|
||||
result = dns_rdatatype_fromtext(&rdtype, &tr);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
printf("unknown query type: %s\n", deftype);
|
||||
rdclass = dns_rdatatype_a;
|
||||
}
|
||||
tr.base = defclass;
|
||||
tr.length = strlen(defclass);
|
||||
result = dns_rdataclass_fromtext(&rdclass, &tr);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
printf("unknown query class: %s\n", defclass);
|
||||
rdclass = dns_rdataclass_in;
|
||||
}
|
||||
lookup = make_empty_lookup();
|
||||
if (get_reverse(store, sizeof(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;
|
||||
} else {
|
||||
safecpy(lookup->textname, opt, sizeof(lookup->textname));
|
||||
lookup->rdtype = rdtype;
|
||||
lookup->rdtypeset = ISC_TRUE;
|
||||
}
|
||||
lookup->rdclass = rdclass;
|
||||
lookup->rdclassset = ISC_TRUE;
|
||||
lookup->trace = ISC_FALSE;
|
||||
lookup->trace_root = lookup->trace;
|
||||
lookup->ns_search_only = ISC_FALSE;
|
||||
lookup->identify = identify;
|
||||
lookup->recurse = recurse;
|
||||
lookup->aaonly = aaonly;
|
||||
lookup->retries = tries;
|
||||
lookup->udpsize = 0;
|
||||
lookup->comments = comments;
|
||||
lookup->tcp_mode = tcpmode;
|
||||
lookup->stats = stats;
|
||||
lookup->section_question = section_question;
|
||||
lookup->section_answer = section_answer;
|
||||
lookup->section_authority = section_authority;
|
||||
lookup->section_additional = section_additional;
|
||||
lookup->new_search = ISC_TRUE;
|
||||
ISC_LIST_INIT(lookup->q);
|
||||
ISC_LINK_INIT(lookup, link);
|
||||
ISC_LIST_APPEND(lookup_list, lookup, link);
|
||||
lookup->origin = NULL;
|
||||
ISC_LIST_INIT(lookup->my_server_list);
|
||||
debug("looking up %s", lookup->textname);
|
||||
}
|
||||
|
||||
static void
|
||||
get_next_command(void) {
|
||||
char *buf;
|
||||
char *ptr, *arg;
|
||||
char *input;
|
||||
|
||||
buf = isc_mem_allocate(mctx, COMMSIZE);
|
||||
if (buf == NULL)
|
||||
fatal("memory allocation failure");
|
||||
fputs("> ", stderr);
|
||||
isc_app_block();
|
||||
ptr = fgets(buf, COMMSIZE, stdin);
|
||||
isc_app_unblock();
|
||||
if (ptr == NULL) {
|
||||
in_use = ISC_FALSE;
|
||||
goto cleanup;
|
||||
}
|
||||
input = buf;
|
||||
ptr = next_token(&input, " \t\r\n");
|
||||
if (ptr == NULL)
|
||||
goto cleanup;
|
||||
arg = next_token(&input, " \t\r\n");
|
||||
if ((strcasecmp(ptr, "set") == 0) &&
|
||||
(arg != NULL))
|
||||
setoption(arg);
|
||||
else if ((strcasecmp(ptr, "server") == 0) ||
|
||||
(strcasecmp(ptr, "lserver") == 0)) {
|
||||
set_nameserver(arg);
|
||||
show_settings(ISC_TRUE, ISC_TRUE);
|
||||
} else if (strcasecmp(ptr, "exit") == 0) {
|
||||
in_use = ISC_FALSE;
|
||||
goto cleanup;
|
||||
} else if (strcasecmp(ptr, "help") == 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) {
|
||||
printf("The '%s' command is not implemented.\n", ptr);
|
||||
goto cleanup;
|
||||
} else
|
||||
addlookup(ptr);
|
||||
cleanup:
|
||||
isc_mem_free(mctx, buf);
|
||||
}
|
||||
|
||||
static void
|
||||
parse_args(int argc, char **argv) {
|
||||
isc_boolean_t have_lookup = ISC_FALSE;
|
||||
|
||||
usesearch = ISC_TRUE;
|
||||
for (argc--, argv++; argc > 0; argc--, argv++) {
|
||||
debug("main parsing %s", argv[0]);
|
||||
if (argv[0][0] == '-') {
|
||||
if (argv[0][1] != 0)
|
||||
setoption(&argv[0][1]);
|
||||
else
|
||||
have_lookup = ISC_TRUE;
|
||||
} else {
|
||||
if (!have_lookup) {
|
||||
have_lookup = ISC_TRUE;
|
||||
in_use = ISC_TRUE;
|
||||
addlookup(argv[0]);
|
||||
}
|
||||
else
|
||||
set_nameserver(argv[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
flush_lookup_list(void) {
|
||||
dig_lookup_t *l, *lp;
|
||||
dig_query_t *q, *qp;
|
||||
dig_server_t *s, *sp;
|
||||
|
||||
lookup_counter = 0;
|
||||
l = ISC_LIST_HEAD(lookup_list);
|
||||
while (l != NULL) {
|
||||
q = ISC_LIST_HEAD(l->q);
|
||||
while (q != NULL) {
|
||||
if (q->sock != NULL) {
|
||||
isc_socket_cancel(q->sock, NULL,
|
||||
ISC_SOCKCANCEL_ALL);
|
||||
isc_socket_detach(&q->sock);
|
||||
}
|
||||
if (ISC_LINK_LINKED(&q->recvbuf, link))
|
||||
ISC_LIST_DEQUEUE(q->recvlist, &q->recvbuf,
|
||||
link);
|
||||
if (ISC_LINK_LINKED(&q->lengthbuf, link))
|
||||
ISC_LIST_DEQUEUE(q->lengthlist, &q->lengthbuf,
|
||||
link);
|
||||
isc_buffer_invalidate(&q->recvbuf);
|
||||
isc_buffer_invalidate(&q->lengthbuf);
|
||||
qp = q;
|
||||
q = ISC_LIST_NEXT(q, link);
|
||||
ISC_LIST_DEQUEUE(l->q, qp, link);
|
||||
isc_mem_free(mctx, qp);
|
||||
}
|
||||
s = ISC_LIST_HEAD(l->my_server_list);
|
||||
while (s != NULL) {
|
||||
sp = s;
|
||||
s = ISC_LIST_NEXT(s, link);
|
||||
ISC_LIST_DEQUEUE(l->my_server_list, sp, link);
|
||||
isc_mem_free(mctx, sp);
|
||||
|
||||
}
|
||||
if (l->sendmsg != NULL)
|
||||
dns_message_destroy(&l->sendmsg);
|
||||
if (l->timer != NULL)
|
||||
isc_timer_detach(&l->timer);
|
||||
lp = l;
|
||||
l = ISC_LIST_NEXT(l, link);
|
||||
ISC_LIST_DEQUEUE(lookup_list, lp, link);
|
||||
isc_mem_free(mctx, lp);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
getinput(isc_task_t *task, isc_event_t *event) {
|
||||
UNUSED(task);
|
||||
if (global_event == NULL)
|
||||
global_event = event;
|
||||
while (in_use) {
|
||||
get_next_command();
|
||||
if (ISC_LIST_HEAD(lookup_list) != NULL) {
|
||||
start_lookup();
|
||||
return;
|
||||
}
|
||||
}
|
||||
isc_app_shutdown();
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
isc_result_t result;
|
||||
|
||||
ISC_LIST_INIT(lookup_list);
|
||||
ISC_LIST_INIT(server_list);
|
||||
ISC_LIST_INIT(search_list);
|
||||
|
||||
result = isc_app_start();
|
||||
check_result(result, "isc_app_start");
|
||||
|
||||
setup_libs();
|
||||
progname = argv[0];
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
||||
if (deprecation_msg) {
|
||||
fputs(
|
||||
"Note: nslookup is deprecated and may be removed from future releases.\n"
|
||||
"Consider using the `dig' or `host' programs instead. Run nslookup with\n"
|
||||
"the `-sil[ent]' option to prevent this message from appearing.\n", stderr);
|
||||
}
|
||||
setup_system();
|
||||
if (domainopt[0] != '\0')
|
||||
set_search_domain(domainopt);
|
||||
if (in_use)
|
||||
result = isc_app_onrun(mctx, global_task, onrun_callback,
|
||||
NULL);
|
||||
else
|
||||
result = isc_app_onrun(mctx, global_task, getinput, NULL);
|
||||
check_result(result, "isc_app_onrun");
|
||||
in_use = ISC_TF(!in_use);
|
||||
|
||||
(void)isc_app_run();
|
||||
|
||||
puts("");
|
||||
debug("done, and starting to shut down");
|
||||
if (global_event != NULL)
|
||||
isc_event_free(&global_event);
|
||||
cancel_all();
|
||||
destroy_libs();
|
||||
isc_app_finish();
|
||||
|
||||
return (0);
|
||||
}
|
111
dist/bind/bin/dig/win32/dig.dsp
vendored
Normal file
111
dist/bind/bin/dig/win32/dig.dsp
vendored
Normal file
@ -0,0 +1,111 @@
|
||||
# Microsoft Developer Studio Project File - Name="dig" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=dig - 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 "dig.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 "dig.mak" CFG="dig - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "dig - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "dig - 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)" == "dig - 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 /MT /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/dns/sec/dst/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 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 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/dig.exe"
|
||||
|
||||
!ELSEIF "$(CFG)" == "dig - 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 /MTd /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/dns/sec/dst/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
|
||||
# SUBTRACT CPP /X /u /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 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/dig.exe" /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "dig - Win32 Release"
|
||||
# Name "dig - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\dig.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\dighost.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# 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"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
29
dist/bind/bin/dig/win32/dig.dsw
vendored
Normal file
29
dist/bind/bin/dig/win32/dig.dsw
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "dig"=".\dig.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
328
dist/bind/bin/dig/win32/dig.mak
vendored
Normal file
328
dist/bind/bin/dig/win32/dig.mak
vendored
Normal file
@ -0,0 +1,328 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on dig.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=dig - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to dig - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "dig - Win32 Release" && "$(CFG)" != "dig - 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 "dig.mak" CFG="dig - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "dig - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "dig - 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
|
||||
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "dig - Win32 Release"
|
||||
|
||||
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"
|
||||
-@erase "..\..\..\Build\Release\dig.exe"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP_PROJ=/nologo /MT /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/dns/sec/dst/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)
|
||||
<<
|
||||
|
||||
!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"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP_PROJ=/nologo /MTd /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/dns/sec/dst/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)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
.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) $<
|
||||
<<
|
||||
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("dig.dep")
|
||||
!INCLUDE "dig.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "dig.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "dig - Win32 Release" || "$(CFG)" == "dig - Win32 Debug"
|
||||
SOURCE=..\dig.c
|
||||
|
||||
!IF "$(CFG)" == "dig - Win32 Release"
|
||||
|
||||
|
||||
"$(INTDIR)\dig.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "dig - Win32 Debug"
|
||||
|
||||
|
||||
"$(INTDIR)\dig.obj" "$(INTDIR)\dig.sbr" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
SOURCE=..\dighost.c
|
||||
|
||||
!IF "$(CFG)" == "dig - Win32 Release"
|
||||
|
||||
|
||||
"$(INTDIR)\dighost.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "dig - Win32 Debug"
|
||||
|
||||
|
||||
"$(INTDIR)\dighost.obj" "$(INTDIR)\dighost.sbr" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!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
|
||||
|
107
dist/bind/bin/dig/win32/host.dsp
vendored
Normal file
107
dist/bind/bin/dig/win32/host.dsp
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
# Microsoft Developer Studio Project File - Name="host" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=host - 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 "host.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 "host.mak" CFG="host - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "host - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "host - 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)" == "host - 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 /MT /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/dns/sec/dst/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 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 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/host.exe"
|
||||
|
||||
!ELSEIF "$(CFG)" == "host - 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 /MTd /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/dns/sec/dst/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
|
||||
# SUBTRACT CPP /X /u /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 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/host.exe" /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "host - Win32 Release"
|
||||
# Name "host - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# 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=..\host.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
|
29
dist/bind/bin/dig/win32/host.dsw
vendored
Normal file
29
dist/bind/bin/dig/win32/host.dsw
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "host"=".\host.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
328
dist/bind/bin/dig/win32/host.mak
vendored
Normal file
328
dist/bind/bin/dig/win32/host.mak
vendored
Normal file
@ -0,0 +1,328 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on host.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=host - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to host - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "host - Win32 Release" && "$(CFG)" != "host - 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 "host.mak" CFG="host - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "host - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "host - 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
|
||||
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "host - Win32 Release"
|
||||
|
||||
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"
|
||||
-@erase "..\..\..\Build\Release\host.exe"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP_PROJ=/nologo /MT /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/dns/sec/dst/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)
|
||||
<<
|
||||
|
||||
!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"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP_PROJ=/nologo /MTd /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/dns/sec/dst/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)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
.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) $<
|
||||
<<
|
||||
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("host.dep")
|
||||
!INCLUDE "host.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "host.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "host - Win32 Release" || "$(CFG)" == "host - Win32 Debug"
|
||||
SOURCE=..\dighost.c
|
||||
|
||||
!IF "$(CFG)" == "host - Win32 Release"
|
||||
|
||||
|
||||
"$(INTDIR)\dighost.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "host - Win32 Debug"
|
||||
|
||||
|
||||
"$(INTDIR)\dighost.obj" "$(INTDIR)\dighost.sbr" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
SOURCE=..\host.c
|
||||
|
||||
!IF "$(CFG)" == "host - Win32 Release"
|
||||
|
||||
|
||||
"$(INTDIR)\host.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "host - Win32 Debug"
|
||||
|
||||
|
||||
"$(INTDIR)\host.obj" "$(INTDIR)\host.sbr" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!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
|
||||
|
107
dist/bind/bin/dig/win32/nslookup.dsp
vendored
Normal file
107
dist/bind/bin/dig/win32/nslookup.dsp
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
# Microsoft Developer Studio Project File - Name="nslookup" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=nslookup - 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 "nslookup.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 "nslookup.mak" CFG="nslookup - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "nslookup - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "nslookup - 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)" == "nslookup - 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 /MT /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/dns/sec/dst/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 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 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"
|
||||
|
||||
!ELSEIF "$(CFG)" == "nslookup - 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 /MTd /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/dns/sec/dst/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
|
||||
# SUBTRACT CPP /X /u /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 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
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "nslookup - Win32 Release"
|
||||
# Name "nslookup - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# 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
|
||||
# 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
|
29
dist/bind/bin/dig/win32/nslookup.dsw
vendored
Normal file
29
dist/bind/bin/dig/win32/nslookup.dsw
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "nslookup"=".\nslookup.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
328
dist/bind/bin/dig/win32/nslookup.mak
vendored
Normal file
328
dist/bind/bin/dig/win32/nslookup.mak
vendored
Normal file
@ -0,0 +1,328 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on nslookup.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=nslookup - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to nslookup - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "nslookup - Win32 Release" && "$(CFG)" != "nslookup - 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 "nslookup.mak" CFG="nslookup - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "nslookup - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "nslookup - 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
|
||||
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "nslookup - Win32 Release"
|
||||
|
||||
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"
|
||||
-@erase "..\..\..\Build\Release\nslookup.exe"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP_PROJ=/nologo /MT /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/dns/sec/dst/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)
|
||||
<<
|
||||
|
||||
!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"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP_PROJ=/nologo /MTd /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/dns/sec/dst/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)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
.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) $<
|
||||
<<
|
||||
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("nslookup.dep")
|
||||
!INCLUDE "nslookup.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "nslookup.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "nslookup - Win32 Release" || "$(CFG)" == "nslookup - Win32 Debug"
|
||||
SOURCE=..\dighost.c
|
||||
|
||||
!IF "$(CFG)" == "nslookup - Win32 Release"
|
||||
|
||||
|
||||
"$(INTDIR)\dighost.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "nslookup - Win32 Debug"
|
||||
|
||||
|
||||
"$(INTDIR)\dighost.obj" "$(INTDIR)\dighost.sbr" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
SOURCE=..\nslookup.c
|
||||
|
||||
!IF "$(CFG)" == "nslookup - Win32 Release"
|
||||
|
||||
|
||||
"$(INTDIR)\nslookup.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "nslookup - Win32 Debug"
|
||||
|
||||
|
||||
"$(INTDIR)\nslookup.obj" "$(INTDIR)\nslookup.sbr" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!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
|
||||
|
82
dist/bind/bin/dnssec/Makefile.in
vendored
Normal file
82
dist/bind/bin/dnssec/Makefile.in
vendored
Normal file
@ -0,0 +1,82 @@
|
||||
# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 2000-2002 Internet Software Consortium.
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# Id: Makefile.in,v 1.19.12.8 2004/03/08 04:04:16 marka Exp
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
@BIND9_VERSION@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES}
|
||||
|
||||
CDEFINES = -DVERSION=\"${VERSION}\"
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
ISCLIBS = ../../lib/isc/libisc.@A@
|
||||
|
||||
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
||||
ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
||||
|
||||
DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS}
|
||||
|
||||
LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@
|
||||
|
||||
# Alphabetically
|
||||
TARGETS = dnssec-keygen@EXEEXT@ dnssec-signzone@EXEEXT@
|
||||
|
||||
OBJS = dnssectool.@O@
|
||||
|
||||
SRCS = dnssec-keygen.c dnssec-signzone.c dnssectool.c
|
||||
|
||||
MANPAGES = dnssec-keygen.8 dnssec-signzone.8
|
||||
|
||||
HTMLPAGES = dnssec-keygen.html dnssec-signzone.html
|
||||
|
||||
MANOBJS = ${MANPAGES} ${HTMLPAGES}
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
dnssec-keygen@EXEEXT@: dnssec-keygen.@O@ ${OBJS} ${DEPLIBS}
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} -o $@ \
|
||||
dnssec-keygen.@O@ ${OBJS} ${LIBS}
|
||||
|
||||
dnssec-signzone.@O@: dnssec-signzone.c
|
||||
${LIBTOOL_MODE_COMPILE} ${PURIFY} ${CC} ${ALL_CFLAGS} -c $<
|
||||
|
||||
dnssec-signzone@EXEEXT@: dnssec-signzone.@O@ ${OBJS} ${DEPLIBS}
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} -o $@ \
|
||||
dnssec-signzone.@O@ ${OBJS} ${LIBS}
|
||||
|
||||
doc man:: ${MANOBJS}
|
||||
|
||||
docclean manclean maintainer-clean::
|
||||
rm -f ${MANOBJS}
|
||||
|
||||
installdirs:
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
|
||||
|
||||
install:: ${TARGETS} installdirs
|
||||
for t in ${TARGETS}; do ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} $$t ${DESTDIR}${sbindir}; done
|
||||
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8; done
|
||||
|
||||
clean distclean::
|
||||
rm -f ${TARGETS}
|
||||
|
173
dist/bind/bin/dnssec/dnssec-keygen.8
vendored
Normal file
173
dist/bind/bin/dnssec/dnssec-keygen.8
vendored
Normal file
@ -0,0 +1,173 @@
|
||||
.\" $NetBSD: dnssec-keygen.8,v 1.1.1.1 2004/05/17 23:43:20 christos Exp $
|
||||
.\"
|
||||
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
.\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" Id: dnssec-keygen.8,v 1.19.12.3 2004/03/08 04:04:16 marka Exp
|
||||
.\"
|
||||
.TH "DNSSEC-KEYGEN" "8" "June 30, 2000" "BIND9" ""
|
||||
.SH NAME
|
||||
dnssec-keygen \- DNSSEC key generation tool
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBdnssec-keygen\fR \fB-a \fIalgorithm\fB\fR \fB-b \fIkeysize\fB\fR \fB-n \fInametype\fB\fR [ \fB-c \fIclass\fB\fR ] [ \fB-e\fR ] [ \fB-f \fIflag\fB\fR ] [ \fB-g \fIgenerator\fB\fR ] [ \fB-h\fR ] [ \fB-p \fIprotocol\fB\fR ] [ \fB-r \fIrandomdev\fB\fR ] [ \fB-s \fIstrength\fB\fR ] [ \fB-t \fItype\fB\fR ] [ \fB-v \fIlevel\fB\fR ] \fBname\fR
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBdnssec-keygen\fR 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"
|
||||
.TP
|
||||
\fB-a \fIalgorithm\fB\fR
|
||||
Selects the cryptographic algorithm. The value of
|
||||
\fBalgorithm\fR must be one of RSAMD5 or RSA,
|
||||
DSA, DH (Diffie Hellman), or HMAC-MD5. These values
|
||||
are case insensitive.
|
||||
|
||||
Note that for DNSSEC, DSA is a mandatory to implement algorithm,
|
||||
and RSA is recommended. For TSIG, HMAC-MD5 is mandatory.
|
||||
.TP
|
||||
\fB-b \fIkeysize\fB\fR
|
||||
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.
|
||||
.TP
|
||||
\fB-n \fInametype\fB\fR
|
||||
Specifies the owner type of the key. The value of
|
||||
\fBnametype\fR 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.
|
||||
.TP
|
||||
\fB-c \fIclass\fB\fR
|
||||
Indicates that the DNS record containing the key should have
|
||||
the specified class. If not specified, class IN is used.
|
||||
.TP
|
||||
\fB-e\fR
|
||||
If generating an RSA key, use a large exponent.
|
||||
.TP
|
||||
\fB-f \fIflag\fB\fR
|
||||
Set the specified flag in the flag field of the key record.
|
||||
The only recognized flag is KSK (Key Signing Key).
|
||||
.TP
|
||||
\fB-g \fIgenerator\fB\fR
|
||||
If generating a Diffie Hellman key, use this generator.
|
||||
Allowed values are 2 and 5. If no generator
|
||||
is specified, a known prime from RFC 2539 will be used
|
||||
if possible; otherwise the default is 2.
|
||||
.TP
|
||||
\fB-h\fR
|
||||
Prints a short summary of the options and arguments to
|
||||
\fBdnssec-keygen\fR.
|
||||
.TP
|
||||
\fB-p \fIprotocol\fB\fR
|
||||
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.
|
||||
.TP
|
||||
\fB-r \fIrandomdev\fB\fR
|
||||
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.
|
||||
.TP
|
||||
\fB-s \fIstrength\fB\fR
|
||||
Specifies the strength value of the key. The strength is
|
||||
a number between 0 and 15, and currently has no defined
|
||||
purpose in DNSSEC.
|
||||
.TP
|
||||
\fB-t \fItype\fB\fR
|
||||
Indicates the use of the key. \fBtype\fR must be
|
||||
one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
|
||||
is AUTHCONF. AUTH refers to the ability to authenticate
|
||||
data, and CONF the ability to encrypt data.
|
||||
.TP
|
||||
\fB-v \fIlevel\fB\fR
|
||||
Sets the debugging level.
|
||||
.SH "GENERATED KEYS"
|
||||
.PP
|
||||
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. These strings can be used as arguments
|
||||
to \fBdnssec-makekeyset\fR.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fInnnn\fR is the key name.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fIaaa\fR is the numeric representation of the
|
||||
algorithm.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fIiiiii\fR is the key identifier (or footprint).
|
||||
.PP
|
||||
\fBdnssec-keygen\fR creates two file, with names based
|
||||
on the printed string. \fIKnnnn.+aaa+iiiii.key\fR
|
||||
contains the public key, and
|
||||
\fIKnnnn.+aaa+iiiii.private\fR contains the private
|
||||
key.
|
||||
.PP
|
||||
.PP
|
||||
The \fI.key\fR file contains a DNS KEY record that
|
||||
can be inserted into a zone file (directly or with a $INCLUDE
|
||||
statement).
|
||||
.PP
|
||||
.PP
|
||||
The \fI.private\fR file contains algorithm specific
|
||||
fields. For obvious security reasons, this file does not have
|
||||
general read permission.
|
||||
.PP
|
||||
.PP
|
||||
Both \fI.key\fR and \fI.private\fR
|
||||
files are generated for symmetric encryption algorithm such as
|
||||
HMAC-MD5, even though the public and private key are equivalent.
|
||||
.PP
|
||||
.SH "EXAMPLE"
|
||||
.PP
|
||||
To generate a 768-bit DSA key for the domain
|
||||
\fBexample.com\fR, the following command would be
|
||||
issued:
|
||||
.PP
|
||||
\fBdnssec-keygen -a DSA -b 768 -n ZONE example.com\fR
|
||||
.PP
|
||||
The command would print a string of the form:
|
||||
.PP
|
||||
\fBKexample.com.+003+26160\fR
|
||||
.PP
|
||||
In this example, \fBdnssec-keygen\fR creates
|
||||
the files \fIKexample.com.+003+26160.key\fR and
|
||||
\fIKexample.com.+003+26160.private\fR
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBdnssec-makekeyset\fR(8),
|
||||
\fBdnssec-signkey\fR(8),
|
||||
\fBdnssec-signzone\fR(8),
|
||||
\fIBIND 9 Administrator Reference Manual\fR,
|
||||
\fIRFC 2535\fR,
|
||||
\fIRFC 2845\fR,
|
||||
\fIRFC 2539\fR.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
Internet Software Consortium
|
405
dist/bind/bin/dnssec/dnssec-keygen.c
vendored
Normal file
405
dist/bind/bin/dnssec/dnssec-keygen.c
vendored
Normal file
@ -0,0 +1,405 @@
|
||||
/* $NetBSD: dnssec-keygen.c,v 1.1.1.1 2004/05/17 23:43:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Portions Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Portions Copyright (C) 2000-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-keygen.c,v 1.48.2.1.10.10 2004/03/10 02:55:50 marka Exp */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/keyvalues.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/secalg.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#include "dnssectool.h"
|
||||
|
||||
#define MAX_RSA 4096 /* should be long enough... */
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
static void
|
||||
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, " -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, " 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\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, "Output:\n");
|
||||
fprintf(stderr, " K<name>+<alg>+<id>.key, "
|
||||
"K<name>+<alg>+<id>.private\n");
|
||||
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
char *algname = NULL, *nametype = NULL, *type = NULL;
|
||||
char *classname = NULL;
|
||||
char *endp;
|
||||
dst_key_t *key = NULL, *oldkey;
|
||||
dns_fixedname_t fname;
|
||||
dns_name_t *name;
|
||||
isc_uint16_t flags = 0;
|
||||
dns_secalg_t alg;
|
||||
isc_boolean_t conflict = ISC_FALSE, null_key = ISC_FALSE;
|
||||
isc_mem_t *mctx = NULL;
|
||||
int ch, rsa_exp = 0, generator = 0, param = 0;
|
||||
int protocol = -1, size = -1, signatory = 0;
|
||||
isc_result_t ret;
|
||||
isc_textregion_t r;
|
||||
char filename[255];
|
||||
isc_buffer_t buf;
|
||||
isc_log_t *log = NULL;
|
||||
isc_entropy_t *ectx = NULL;
|
||||
dns_rdataclass_t rdclass;
|
||||
int options = DST_TYPE_PRIVATE | DST_TYPE_PUBLIC;
|
||||
|
||||
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)
|
||||
{
|
||||
switch (ch) {
|
||||
case 'a':
|
||||
algname = isc_commandline_argument;
|
||||
break;
|
||||
case 'b':
|
||||
size = strtol(isc_commandline_argument, &endp, 10);
|
||||
if (*endp != '\0' || size < 0)
|
||||
fatal("-b requires a non-negative number");
|
||||
break;
|
||||
case 'c':
|
||||
classname = isc_commandline_argument;
|
||||
break;
|
||||
case 'e':
|
||||
rsa_exp = 1;
|
||||
break;
|
||||
case 'f':
|
||||
if (strcasecmp(isc_commandline_argument, "KSK") == 0)
|
||||
flags |= 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;
|
||||
break;
|
||||
case 't':
|
||||
type = isc_commandline_argument;
|
||||
break;
|
||||
case 'p':
|
||||
protocol = strtol(isc_commandline_argument, &endp, 10);
|
||||
if (*endp != '\0' || protocol < 0 || protocol > 255)
|
||||
fatal("-p must be followed by a number "
|
||||
"[0..255]");
|
||||
break;
|
||||
case 's':
|
||||
signatory = strtol(isc_commandline_argument,
|
||||
&endp, 10);
|
||||
if (*endp != '\0' || signatory < 0 || signatory > 15)
|
||||
fatal("-s must be followed by a number "
|
||||
"[0..15]");
|
||||
break;
|
||||
case 'r':
|
||||
setup_entropy(mctx, isc_commandline_argument, &ectx);
|
||||
break;
|
||||
case 'v':
|
||||
endp = NULL;
|
||||
verbose = strtol(isc_commandline_argument, &endp, 0);
|
||||
if (*endp != '\0')
|
||||
fatal("-v must be followed by a number");
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
usage();
|
||||
default:
|
||||
fprintf(stderr, "%s: invalid argument -%c\n",
|
||||
program, ch);
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
if (ectx == NULL)
|
||||
setup_entropy(mctx, NULL, &ectx);
|
||||
ret = dst_lib_init(mctx, ectx,
|
||||
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
|
||||
if (ret != ISC_R_SUCCESS)
|
||||
fatal("could not initialize dst");
|
||||
|
||||
setup_logging(verbose, mctx, &log);
|
||||
|
||||
if (argc < isc_commandline_index + 1)
|
||||
fatal("the key name was not specified");
|
||||
if (argc > isc_commandline_index + 1)
|
||||
fatal("extraneous arguments");
|
||||
|
||||
if (algname == NULL)
|
||||
fatal("no algorithm was specified");
|
||||
if (strcasecmp(algname, "HMAC-MD5") == 0)
|
||||
alg = DST_ALG_HMACMD5;
|
||||
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 (type != NULL) {
|
||||
if (strcasecmp(type, "NOAUTH") == 0)
|
||||
flags |= DNS_KEYTYPE_NOAUTH;
|
||||
else if (strcasecmp(type, "NOCONF") == 0)
|
||||
flags |= DNS_KEYTYPE_NOCONF;
|
||||
else if (strcasecmp(type, "NOAUTHCONF") == 0) {
|
||||
flags |= (DNS_KEYTYPE_NOAUTH | DNS_KEYTYPE_NOCONF);
|
||||
if (size < 0)
|
||||
size = 0;
|
||||
}
|
||||
else if (strcasecmp(type, "AUTHCONF") == 0)
|
||||
/* nothing */;
|
||||
else
|
||||
fatal("invalid type %s", type);
|
||||
}
|
||||
|
||||
if (size < 0)
|
||||
fatal("key size not specified (-b option)");
|
||||
|
||||
switch (alg) {
|
||||
case DNS_KEYALG_RSAMD5:
|
||||
case DNS_KEYALG_RSASHA1:
|
||||
if (size != 0 && (size < 512 || size > MAX_RSA))
|
||||
fatal("RSA key size %d out of range", size);
|
||||
break;
|
||||
case DNS_KEYALG_DH:
|
||||
if (size != 0 && (size < 128 || size > 4096))
|
||||
fatal("DH key size %d out of range", size);
|
||||
break;
|
||||
case DNS_KEYALG_DSA:
|
||||
if (size != 0 && !dsa_size_ok(size))
|
||||
fatal("invalid DSS key size: %d", size);
|
||||
break;
|
||||
case DST_ALG_HMACMD5:
|
||||
if (size < 1 || size > 512)
|
||||
fatal("HMAC-MD5 key size %d out of range", size);
|
||||
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_DH && generator != 0)
|
||||
fatal("specified DH generator for a non-DH key");
|
||||
|
||||
if (nametype == NULL)
|
||||
fatal("no nametype specified");
|
||||
if (strcasecmp(nametype, "zone") == 0)
|
||||
flags |= DNS_KEYOWNER_ZONE;
|
||||
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);
|
||||
|
||||
rdclass = strtoclass(classname);
|
||||
|
||||
flags |= signatory;
|
||||
|
||||
if (protocol == -1)
|
||||
protocol = DNS_KEYPROTO_DNSSEC;
|
||||
|
||||
if ((flags & DNS_KEYFLAG_TYPEMASK) == DNS_KEYTYPE_NOKEY) {
|
||||
if (size > 0)
|
||||
fatal("specified null key with non-zero size");
|
||||
if ((flags & DNS_KEYFLAG_SIGNATORYMASK) != 0)
|
||||
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],
|
||||
strlen(argv[isc_commandline_index]));
|
||||
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],
|
||||
isc_result_totext(ret));
|
||||
|
||||
switch(alg) {
|
||||
case DNS_KEYALG_RSAMD5:
|
||||
case DNS_KEYALG_RSASHA1:
|
||||
param = rsa_exp;
|
||||
break;
|
||||
case DNS_KEYALG_DH:
|
||||
param = generator;
|
||||
break;
|
||||
case DNS_KEYALG_DSA:
|
||||
case DST_ALG_HMACMD5:
|
||||
param = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((flags & DNS_KEYFLAG_TYPEMASK) == DNS_KEYTYPE_NOKEY)
|
||||
null_key = ISC_TRUE;
|
||||
|
||||
isc_buffer_init(&buf, filename, sizeof(filename) - 1);
|
||||
|
||||
do {
|
||||
conflict = ISC_FALSE;
|
||||
oldkey = NULL;
|
||||
|
||||
/* generate the key */
|
||||
ret = dst_key_generate(name, alg, size, param, flags, protocol,
|
||||
rdclass, mctx, &key);
|
||||
isc_entropy_stopcallbacksources(ectx);
|
||||
|
||||
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));
|
||||
fatal("failed to generate key %s/%s: %s\n",
|
||||
namestr, algstr, isc_result_totext(ret));
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Try to read a key with the same name, alg and id from disk.
|
||||
* If there is one we must continue generating a new one
|
||||
* unless we were asked to generate a null key, in which
|
||||
* case we return failure.
|
||||
*/
|
||||
ret = dst_key_fromfile(name, dst_key_id(key), alg,
|
||||
DST_TYPE_PRIVATE, NULL, mctx, &oldkey);
|
||||
/* do not overwrite an existing key */
|
||||
if (ret == ISC_R_SUCCESS) {
|
||||
dst_key_free(&oldkey);
|
||||
conflict = ISC_TRUE;
|
||||
if (null_key)
|
||||
break;
|
||||
}
|
||||
if (conflict == ISC_TRUE) {
|
||||
if (verbose > 0) {
|
||||
isc_buffer_clear(&buf);
|
||||
ret = dst_key_buildfilename(key, 0, NULL, &buf);
|
||||
fprintf(stderr,
|
||||
"%s: %s already exists, "
|
||||
"generating a new key\n",
|
||||
program, filename);
|
||||
}
|
||||
dst_key_free(&key);
|
||||
}
|
||||
|
||||
} while (conflict == ISC_TRUE);
|
||||
|
||||
if (conflict)
|
||||
fatal("cannot generate a null key when a key with id 0 "
|
||||
"already exists");
|
||||
|
||||
ret = dst_key_tofile(key, options, NULL);
|
||||
if (ret != ISC_R_SUCCESS) {
|
||||
char keystr[KEY_FORMATSIZE];
|
||||
key_format(key, keystr, sizeof(keystr));
|
||||
fatal("failed to write key %s: %s\n", keystr,
|
||||
isc_result_totext(ret));
|
||||
}
|
||||
|
||||
isc_buffer_clear(&buf);
|
||||
ret = dst_key_buildfilename(key, 0, NULL, &buf);
|
||||
printf("%s\n", filename);
|
||||
dst_key_free(&key);
|
||||
|
||||
cleanup_logging(&log);
|
||||
cleanup_entropy(&ectx);
|
||||
dst_lib_destroy();
|
||||
if (verbose > 10)
|
||||
isc_mem_stats(mctx, stdout);
|
||||
isc_mem_destroy(&mctx);
|
||||
|
||||
return (0);
|
||||
}
|
337
dist/bind/bin/dnssec/dnssec-keygen.docbook
vendored
Normal file
337
dist/bind/bin/dnssec/dnssec-keygen.docbook
vendored
Normal file
@ -0,0 +1,337 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
|
||||
<!--
|
||||
- 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: dnssec-keygen.docbook,v 1.3.12.4 2004/03/08 04:04:16 marka Exp -->
|
||||
|
||||
<refentry>
|
||||
<refentryinfo>
|
||||
<date>June 30, 2000</date>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle><application>dnssec-keygen</application></refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>dnssec-keygen</application></refname>
|
||||
<refpurpose>DNSSEC key generation tool</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>dnssec-keygen</command>
|
||||
<arg choice="req">-a <replaceable class="parameter">algorithm</replaceable></arg>
|
||||
<arg choice="req">-b <replaceable class="parameter">keysize</replaceable></arg>
|
||||
<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>-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>
|
||||
<arg><option>-t <replaceable class="parameter">type</replaceable></option></arg>
|
||||
<arg><option>-v <replaceable class="parameter">level</replaceable></option></arg>
|
||||
<arg choice="req">name</arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1>
|
||||
<title>DESCRIPTION</title>
|
||||
<para>
|
||||
<command>dnssec-keygen</command> 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.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>OPTIONS</title>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>-a <replaceable class="parameter">algorithm</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Selects the cryptographic algorithm. The value of
|
||||
<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 that for DNSSEC, DSA is a mandatory to implement algorithm,
|
||||
and RSA is recommended. For TSIG, HMAC-MD5 is mandatory.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-b <replaceable class="parameter">keysize</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
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.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-n <replaceable class="parameter">nametype</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the owner type of the key. The value of
|
||||
<option>nametype</option> 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.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-c <replaceable class="parameter">class</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Indicates that the DNS record containing the key should have
|
||||
the specified class. If not specified, class IN is used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-e</term>
|
||||
<listitem>
|
||||
<para>
|
||||
If generating an RSA 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 record.
|
||||
The only recognized flag is KSK (Key Signing Key).
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-g <replaceable class="parameter">generator</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If generating a Diffie Hellman key, use this generator.
|
||||
Allowed values are 2 and 5. If no generator
|
||||
is specified, a known prime from RFC 2539 will be used
|
||||
if possible; otherwise the default is 2.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-h</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints a short summary of the options and arguments to
|
||||
<command>dnssec-keygen</command>.
|
||||
</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).
|
||||
Other possible values for this argument are listed in
|
||||
RFC 2535 and its successors.
|
||||
</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>-s <replaceable class="parameter">strength</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the strength value of the key. The strength is
|
||||
a number between 0 and 15, and currently has no defined
|
||||
purpose in DNSSEC.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-t <replaceable class="parameter">type</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Indicates the use of the key. <option>type</option> must be
|
||||
one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
|
||||
is AUTHCONF. AUTH refers to the ability to authenticate
|
||||
data, and CONF the ability to encrypt data.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-v <replaceable class="parameter">level</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the debugging level.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>GENERATED KEYS</title>
|
||||
<para>
|
||||
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. These strings can be used as arguments
|
||||
to <command>dnssec-makekeyset</command>.
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<filename>nnnn</filename> is the key name.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<filename>aaa</filename> is the numeric representation of the
|
||||
algorithm.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<filename>iiiii</filename> is the key identifier (or footprint).
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>
|
||||
<command>dnssec-keygen</command> creates two file, with names based
|
||||
on the printed string. <filename>Knnnn.+aaa+iiiii.key</filename>
|
||||
contains the public key, and
|
||||
<filename>Knnnn.+aaa+iiiii.private</filename> contains the private
|
||||
key.
|
||||
</para>
|
||||
<para>
|
||||
The <filename>.key</filename> file contains a DNS KEY record that
|
||||
can be inserted into a zone file (directly or with a $INCLUDE
|
||||
statement).
|
||||
</para>
|
||||
<para>
|
||||
The <filename>.private</filename> file contains algorithm specific
|
||||
fields. For obvious security reasons, this file does not have
|
||||
general read permission.
|
||||
</para>
|
||||
<para>
|
||||
Both <filename>.key</filename> and <filename>.private</filename>
|
||||
files are generated for symmetric encryption algorithm such as
|
||||
HMAC-MD5, even though the public and private key are equivalent.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>EXAMPLE</title>
|
||||
<para>
|
||||
To generate a 768-bit DSA key for the domain
|
||||
<userinput>example.com</userinput>, the following command would be
|
||||
issued:
|
||||
</para>
|
||||
<para>
|
||||
<userinput>dnssec-keygen -a DSA -b 768 -n ZONE example.com</userinput>
|
||||
</para>
|
||||
<para>
|
||||
The command would print a string of the form:
|
||||
</para>
|
||||
<para>
|
||||
<userinput>Kexample.com.+003+26160</userinput>
|
||||
</para>
|
||||
<para>
|
||||
In this example, <command>dnssec-keygen</command> creates
|
||||
the files <filename>Kexample.com.+003+26160.key</filename> and
|
||||
<filename>Kexample.com.+003+26160.private</filename>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<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>
|
||||
</citerefentry>,
|
||||
<citetitle>BIND 9 Administrator Reference Manual</citetitle>,
|
||||
<citetitle>RFC 2535</citetitle>,
|
||||
<citetitle>RFC 2845</citetitle>,
|
||||
<citetitle>RFC 2539</citetitle>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>AUTHOR</title>
|
||||
<para>
|
||||
<corpauthor>Internet Software Consortium</corpauthor>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
-->
|
595
dist/bind/bin/dnssec/dnssec-keygen.html
vendored
Normal file
595
dist/bind/bin/dnssec/dnssec-keygen.html
vendored
Normal file
@ -0,0 +1,595 @@
|
||||
<!--
|
||||
- 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: dnssec-keygen.html,v 1.5.2.1.4.3 2004/03/08 04:04:17 marka Exp -->
|
||||
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>dnssec-keygen</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
|
||||
"></HEAD
|
||||
><BODY
|
||||
CLASS="REFENTRY"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><H1
|
||||
><A
|
||||
NAME="AEN1"
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>dnssec-keygen</SPAN
|
||||
></A
|
||||
></H1
|
||||
><DIV
|
||||
CLASS="REFNAMEDIV"
|
||||
><A
|
||||
NAME="AEN9"
|
||||
></A
|
||||
><H2
|
||||
>Name</H2
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>dnssec-keygen</SPAN
|
||||
> -- DNSSEC key generation tool</DIV
|
||||
><DIV
|
||||
CLASS="REFSYNOPSISDIV"
|
||||
><A
|
||||
NAME="AEN13"
|
||||
></A
|
||||
><H2
|
||||
>Synopsis</H2
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
> {-a <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>algorithm</I
|
||||
></TT
|
||||
>} {-b <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>keysize</I
|
||||
></TT
|
||||
>} {-n <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>nametype</I
|
||||
></TT
|
||||
>} [<TT
|
||||
CLASS="OPTION"
|
||||
>-c <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>class</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-e</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-f <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>flag</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-g <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>generator</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-h</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-p <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>protocol</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-r <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>randomdev</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-s <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>strength</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-t <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>type</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-v <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>level</I
|
||||
></TT
|
||||
></TT
|
||||
>] {name}</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN51"
|
||||
></A
|
||||
><H2
|
||||
>DESCRIPTION</H2
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
> 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.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN55"
|
||||
></A
|
||||
><H2
|
||||
>OPTIONS</H2
|
||||
><P
|
||||
></P
|
||||
><DIV
|
||||
CLASS="VARIABLELIST"
|
||||
><DL
|
||||
><DT
|
||||
>-a <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>algorithm</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Selects the cryptographic algorithm. The value of
|
||||
<TT
|
||||
CLASS="OPTION"
|
||||
>algorithm</TT
|
||||
> must be one of RSAMD5 or RSA,
|
||||
DSA, DH (Diffie Hellman), or HMAC-MD5. These values
|
||||
are case insensitive.
|
||||
</P
|
||||
><P
|
||||
> Note that for DNSSEC, DSA is a mandatory to implement algorithm,
|
||||
and RSA is recommended. For TSIG, HMAC-MD5 is mandatory.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-b <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>keysize</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> 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.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-n <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>nametype</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specifies the owner type of the key. The value of
|
||||
<TT
|
||||
CLASS="OPTION"
|
||||
>nametype</TT
|
||||
> 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.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-c <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>class</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Indicates that the DNS record containing the key should have
|
||||
the specified class. If not specified, class IN is used.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-e</DT
|
||||
><DD
|
||||
><P
|
||||
> If generating an RSA key, use a large exponent.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-f <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>flag</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Set the specified flag in the flag field of the key record.
|
||||
The only recognized flag is KSK (Key Signing Key).
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-g <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>generator</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> If generating a Diffie Hellman key, use this generator.
|
||||
Allowed values are 2 and 5. If no generator
|
||||
is specified, a known prime from RFC 2539 will be used
|
||||
if possible; otherwise the default is 2.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-h</DT
|
||||
><DD
|
||||
><P
|
||||
> Prints a short summary of the options and arguments to
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-p <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>protocol</I
|
||||
></TT
|
||||
></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).
|
||||
Other possible values for this argument are listed in
|
||||
RFC 2535 and its successors.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-r <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>randomdev</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specifies the source of randomness. If the operating
|
||||
system does not provide a <TT
|
||||
CLASS="FILENAME"
|
||||
>/dev/random</TT
|
||||
>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <TT
|
||||
CLASS="FILENAME"
|
||||
>randomdev</TT
|
||||
> specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>keyboard</TT
|
||||
> indicates that keyboard
|
||||
input should be used.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-s <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>strength</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specifies the strength value of the key. The strength is
|
||||
a number between 0 and 15, and currently has no defined
|
||||
purpose in DNSSEC.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-t <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>type</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Indicates the use of the key. <TT
|
||||
CLASS="OPTION"
|
||||
>type</TT
|
||||
> must be
|
||||
one of AUTHCONF, NOAUTHCONF, NOAUTH, or NOCONF. The default
|
||||
is AUTHCONF. AUTH refers to the ability to authenticate
|
||||
data, and CONF the ability to encrypt data.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-v <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>level</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Sets the debugging level.
|
||||
</P
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN129"
|
||||
></A
|
||||
><H2
|
||||
>GENERATED KEYS</H2
|
||||
><P
|
||||
> When <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
> completes successfully,
|
||||
it prints a string of the form <TT
|
||||
CLASS="FILENAME"
|
||||
>Knnnn.+aaa+iiiii</TT
|
||||
>
|
||||
to the standard output. This is an identification string for
|
||||
the key it has generated. These strings can be used as arguments
|
||||
to <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-makekeyset</B
|
||||
>.
|
||||
</P
|
||||
><P
|
||||
></P
|
||||
><UL
|
||||
><LI
|
||||
><P
|
||||
> <TT
|
||||
CLASS="FILENAME"
|
||||
>nnnn</TT
|
||||
> is the key name.
|
||||
</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
> <TT
|
||||
CLASS="FILENAME"
|
||||
>aaa</TT
|
||||
> is the numeric representation of the
|
||||
algorithm.
|
||||
</P
|
||||
></LI
|
||||
><LI
|
||||
><P
|
||||
> <TT
|
||||
CLASS="FILENAME"
|
||||
>iiiii</TT
|
||||
> is the key identifier (or footprint).
|
||||
</P
|
||||
></LI
|
||||
></UL
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
> creates two file, with names based
|
||||
on the printed string. <TT
|
||||
CLASS="FILENAME"
|
||||
>Knnnn.+aaa+iiiii.key</TT
|
||||
>
|
||||
contains the public key, and
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>Knnnn.+aaa+iiiii.private</TT
|
||||
> contains the private
|
||||
key.
|
||||
</P
|
||||
><P
|
||||
> The <TT
|
||||
CLASS="FILENAME"
|
||||
>.key</TT
|
||||
> file contains a DNS KEY record that
|
||||
can be inserted into a zone file (directly or with a $INCLUDE
|
||||
statement).
|
||||
</P
|
||||
><P
|
||||
> The <TT
|
||||
CLASS="FILENAME"
|
||||
>.private</TT
|
||||
> file contains algorithm specific
|
||||
fields. For obvious security reasons, this file does not have
|
||||
general read permission.
|
||||
</P
|
||||
><P
|
||||
> Both <TT
|
||||
CLASS="FILENAME"
|
||||
>.key</TT
|
||||
> and <TT
|
||||
CLASS="FILENAME"
|
||||
>.private</TT
|
||||
>
|
||||
files are generated for symmetric encryption algorithm such as
|
||||
HMAC-MD5, even though the public and private key are equivalent.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN156"
|
||||
></A
|
||||
><H2
|
||||
>EXAMPLE</H2
|
||||
><P
|
||||
> To generate a 768-bit DSA key for the domain
|
||||
<TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>example.com</B
|
||||
></TT
|
||||
>, the following command would be
|
||||
issued:
|
||||
</P
|
||||
><P
|
||||
> <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>dnssec-keygen -a DSA -b 768 -n ZONE example.com</B
|
||||
></TT
|
||||
>
|
||||
</P
|
||||
><P
|
||||
> The command would print a string of the form:
|
||||
</P
|
||||
><P
|
||||
> <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>Kexample.com.+003+26160</B
|
||||
></TT
|
||||
>
|
||||
</P
|
||||
><P
|
||||
> In this example, <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
> creates
|
||||
the files <TT
|
||||
CLASS="FILENAME"
|
||||
>Kexample.com.+003+26160.key</TT
|
||||
> and
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>Kexample.com.+003+26160.private</TT
|
||||
>
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN169"
|
||||
></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
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>BIND 9 Administrator Reference Manual</I
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>RFC 2535</I
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>RFC 2845</I
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>RFC 2539</I
|
||||
>.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN185"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
><P
|
||||
> Internet Software Consortium
|
||||
</P
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
115
dist/bind/bin/dnssec/dnssec-makekeyset.8
vendored
Normal file
115
dist/bind/bin/dnssec/dnssec-makekeyset.8
vendored
Normal file
@ -0,0 +1,115 @@
|
||||
.\" $NetBSD: dnssec-makekeyset.8,v 1.1.1.1 2004/05/17 23:43:20 christos Exp $
|
||||
.\"
|
||||
.\" Copyright (C) 2004 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.2.4.1 2004/03/06 07:41:39 marka Exp
|
||||
.\"
|
||||
.TH "DNSSEC-MAKEKEYSET" "8" "June 30, 2000" "BIND9" ""
|
||||
.SH NAME
|
||||
dnssec-makekeyset \- DNSSEC zone signing tool
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBdnssec-makekeyset\fR [ \fB-a\fR ] [ \fB-s \fIstart-time\fB\fR ] [ \fB-e \fIend-time\fB\fR ] [ \fB-h\fR ] [ \fB-p\fR ] [ \fB-r \fIrandomdev\fB\fR ] [ \fB-t\fIttl\fB\fR ] [ \fB-v \fIlevel\fB\fR ] \fBkey\fR\fI...\fR
|
||||
.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"
|
||||
.TP
|
||||
\fB-a\fR
|
||||
Verify all generated signatures.
|
||||
.TP
|
||||
\fB-s \fIstart-time\fB\fR
|
||||
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.
|
||||
.TP
|
||||
\fB-e \fIend-time\fB\fR
|
||||
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.
|
||||
.TP
|
||||
\fB-h\fR
|
||||
Prints a short summary of the options and arguments to
|
||||
\fBdnssec-makekeyset\fR.
|
||||
.TP
|
||||
\fB-p\fR
|
||||
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.
|
||||
.TP
|
||||
\fB-r \fIrandomdev\fB\fR
|
||||
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.
|
||||
.TP
|
||||
\fB-t \fIttl\fB\fR
|
||||
Specify the TTL (time to live) of the KEY and SIG records.
|
||||
The default is 3600 seconds.
|
||||
.TP
|
||||
\fB-v \fIlevel\fB\fR
|
||||
Sets the debugging level.
|
||||
.TP
|
||||
\fBkey\fR
|
||||
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.
|
||||
.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),
|
||||
\fIBIND 9 Administrator Reference Manual\fR,
|
||||
\fIRFC 2535\fR.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
Internet Software Consortium
|
402
dist/bind/bin/dnssec/dnssec-makekeyset.c
vendored
Normal file
402
dist/bind/bin/dnssec/dnssec-makekeyset.c
vendored
Normal file
@ -0,0 +1,402 @@
|
||||
/* $NetBSD: dnssec-makekeyset.c,v 1.1.1.1 2004/05/17 23:43:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Portions Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Portions Copyright (C) 2000-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-makekeyset.c,v 1.52.2.1.10.6 2004/03/08 04:04:17 marka Exp */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/db.h>
|
||||
#include <dns/diff.h>
|
||||
#include <dns/dnssec.h>
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/secalg.h>
|
||||
#include <dns/time.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#include "dnssectool.h"
|
||||
|
||||
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, "Version: %s\n", VERSION);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[]) {
|
||||
int i, ch;
|
||||
char *startstr = NULL, *endstr = NULL;
|
||||
dns_fixedname_t fdomain;
|
||||
dns_name_t *domain = NULL;
|
||||
char *output = NULL;
|
||||
char *endp;
|
||||
unsigned char data[65536];
|
||||
dns_db_t *db;
|
||||
dns_dbversion_t *version;
|
||||
dns_diff_t diff;
|
||||
dns_difftuple_t *tuple;
|
||||
dns_fixedname_t tname;
|
||||
dst_key_t *key = NULL;
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
dns_rdataset_t rdataset;
|
||||
dns_rdataclass_t rdclass;
|
||||
isc_result_t result;
|
||||
isc_buffer_t b;
|
||||
isc_region_t r;
|
||||
isc_log_t *log = NULL;
|
||||
keynode_t *keynode;
|
||||
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':
|
||||
setup_entropy(mctx, isc_commandline_argument, &ectx);
|
||||
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();
|
||||
|
||||
if (ectx == NULL)
|
||||
setup_entropy(mctx, NULL, &ectx);
|
||||
eflags = ISC_ENTROPY_BLOCKING;
|
||||
if (!pseudorandom)
|
||||
eflags |= ISC_ENTROPY_GOODONLY;
|
||||
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_diff_init(mctx, &diff);
|
||||
rdclass = 0;
|
||||
|
||||
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 (rdclass == 0)
|
||||
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 (domain == NULL) {
|
||||
dns_fixedname_init(&fdomain);
|
||||
domain = dns_fixedname_name(&fdomain);
|
||||
dns_name_copy(dst_key_name(key), domain, NULL);
|
||||
} else if (!dns_name_equal(domain, dst_key_name(key))) {
|
||||
char str[DNS_NAME_FORMATSIZE];
|
||||
dns_name_format(domain, str, sizeof(str));
|
||||
fatal("all keys must have the same owner - %s "
|
||||
"and %s do not match", str, namestr);
|
||||
}
|
||||
|
||||
if (output == NULL) {
|
||||
output = isc_mem_allocate(mctx,
|
||||
strlen("keyset-") +
|
||||
strlen(namestr) + 1);
|
||||
if (output == NULL)
|
||||
fatal("out of memory");
|
||||
sprintf(output, "keyset-%s", namestr);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
dns_rdata_reset(&rdata);
|
||||
isc_buffer_init(&b, data, sizeof(data));
|
||||
result = dst_key_todns(key, &b);
|
||||
dst_key_free(&key);
|
||||
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, rdclass, dns_rdatatype_dnskey, &r);
|
||||
tuple = NULL;
|
||||
result = dns_difftuple_create(mctx, DNS_DIFFOP_ADD,
|
||||
domain, ttl, &rdata, &tuple);
|
||||
check_result(result, "dns_difftuple_create");
|
||||
dns_diff_append(&diff, &tuple);
|
||||
}
|
||||
|
||||
db = NULL;
|
||||
result = dns_db_create(mctx, "rbt", dns_rootname, dns_dbtype_zone,
|
||||
rdclass, 0, NULL, &db);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("failed to create a database");
|
||||
|
||||
version = NULL;
|
||||
dns_db_newversion(db, &version);
|
||||
|
||||
result = dns_diff_apply(&diff, db, version);
|
||||
check_result(result, "dns_diff_apply");
|
||||
dns_diff_clear(&diff);
|
||||
|
||||
dns_fixedname_init(&tname);
|
||||
dns_rdataset_init(&rdataset);
|
||||
result = dns_db_find(db, domain, version, dns_rdatatype_dnskey, 0, 0,
|
||||
NULL, dns_fixedname_name(&tname), &rdataset,
|
||||
NULL);
|
||||
check_result(result, "dns_db_find");
|
||||
|
||||
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))
|
||||
{
|
||||
dns_rdata_reset(&rdata);
|
||||
isc_buffer_init(&b, data, sizeof(data));
|
||||
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));
|
||||
}
|
||||
}
|
||||
tuple = NULL;
|
||||
result = dns_difftuple_create(mctx, DNS_DIFFOP_ADD,
|
||||
domain, ttl, &rdata, &tuple);
|
||||
check_result(result, "dns_difftuple_create");
|
||||
dns_diff_append(&diff, &tuple);
|
||||
}
|
||||
|
||||
result = dns_diff_apply(&diff, db, version);
|
||||
check_result(result, "dns_diff_apply");
|
||||
dns_diff_clear(&diff);
|
||||
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
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);
|
||||
}
|
233
dist/bind/bin/dnssec/dnssec-makekeyset.docbook
vendored
Normal file
233
dist/bind/bin/dnssec/dnssec-makekeyset.docbook
vendored
Normal file
@ -0,0 +1,233 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
|
||||
<!--
|
||||
- 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: dnssec-makekeyset.docbook,v 1.2.2.3.4.1 2004/03/06 10:21:15 marka Exp -->
|
||||
|
||||
<refentry>
|
||||
<refentryinfo>
|
||||
<date>June 30, 2000</date>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle><application>dnssec-makekeyset</application></refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<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 Software Consortium</corpauthor>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
-->
|
407
dist/bind/bin/dnssec/dnssec-makekeyset.html
vendored
Normal file
407
dist/bind/bin/dnssec/dnssec-makekeyset.html
vendored
Normal file
@ -0,0 +1,407 @@
|
||||
<!--
|
||||
- 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: dnssec-makekeyset.html,v 1.4.2.2.4.1 2004/03/06 10:21:15 marka Exp -->
|
||||
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>dnssec-makekeyset</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
|
||||
"></HEAD
|
||||
><BODY
|
||||
CLASS="REFENTRY"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><H1
|
||||
><A
|
||||
NAME="AEN1"
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>dnssec-makekeyset</SPAN
|
||||
></A
|
||||
></H1
|
||||
><DIV
|
||||
CLASS="REFNAMEDIV"
|
||||
><A
|
||||
NAME="AEN9"
|
||||
></A
|
||||
><H2
|
||||
>Name</H2
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>dnssec-makekeyset</SPAN
|
||||
> -- DNSSEC zone signing tool</DIV
|
||||
><DIV
|
||||
CLASS="REFSYNOPSISDIV"
|
||||
><A
|
||||
NAME="AEN13"
|
||||
></A
|
||||
><H2
|
||||
>Synopsis</H2
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-makekeyset</B
|
||||
> [<TT
|
||||
CLASS="OPTION"
|
||||
>-a</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-s <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>start-time</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-e <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>end-time</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-h</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-p</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-r <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>randomdev</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-t</TT
|
||||
><TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>ttl</I
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-v <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>level</I
|
||||
></TT
|
||||
></TT
|
||||
>] {key...}</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN38"
|
||||
></A
|
||||
><H2
|
||||
>DESCRIPTION</H2
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-makekeyset</B
|
||||
> generates a key set from one
|
||||
or more keys created by <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
>. 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
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>keyset-nnnn.</TT
|
||||
>, where <TT
|
||||
CLASS="FILENAME"
|
||||
>nnnn</TT
|
||||
>
|
||||
is the zone name.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN45"
|
||||
></A
|
||||
><H2
|
||||
>OPTIONS</H2
|
||||
><P
|
||||
></P
|
||||
><DIV
|
||||
CLASS="VARIABLELIST"
|
||||
><DL
|
||||
><DT
|
||||
>-a</DT
|
||||
><DD
|
||||
><P
|
||||
> Verify all generated signatures.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-s <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>start-time</I
|
||||
></TT
|
||||
></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 <TT
|
||||
CLASS="OPTION"
|
||||
>start-time</TT
|
||||
> is specified, the current
|
||||
time is used.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-e <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>end-time</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specify the date and time when the generated SIG records
|
||||
expire. As with <TT
|
||||
CLASS="OPTION"
|
||||
>start-time</TT
|
||||
>, 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 <TT
|
||||
CLASS="OPTION"
|
||||
>end-time</TT
|
||||
> is
|
||||
specified, 30 days from the start time is used as a default.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-h</DT
|
||||
><DD
|
||||
><P
|
||||
> Prints a short summary of the options and arguments to
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-makekeyset</B
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-p</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
|
||||
>-r <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>randomdev</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specifies the source of randomness. If the operating
|
||||
system does not provide a <TT
|
||||
CLASS="FILENAME"
|
||||
>/dev/random</TT
|
||||
>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <TT
|
||||
CLASS="FILENAME"
|
||||
>randomdev</TT
|
||||
> specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>keyboard</TT
|
||||
> indicates that keyboard
|
||||
input should be used.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-t <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>ttl</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specify the TTL (time to live) of the KEY and SIG records.
|
||||
The default is 3600 seconds.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-v <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>level</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Sets the debugging level.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>key</DT
|
||||
><DD
|
||||
><P
|
||||
> The list of keys to be included in the keyset file. These keys
|
||||
are expressed in the form <TT
|
||||
CLASS="FILENAME"
|
||||
>Knnnn.+aaa+iiiii</TT
|
||||
>
|
||||
as generated by <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN98"
|
||||
></A
|
||||
><H2
|
||||
>EXAMPLE</H2
|
||||
><P
|
||||
> The following command generates a keyset containing the DSA key for
|
||||
<TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>example.com</B
|
||||
></TT
|
||||
> generated in the
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
> man page.
|
||||
</P
|
||||
><P
|
||||
> <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>dnssec-makekeyset -t 86400 -s 20000701120000 -e +2592000 Kexample.com.+003+26160</B
|
||||
></TT
|
||||
>
|
||||
</P
|
||||
><P
|
||||
> In this example, <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-makekeyset</B
|
||||
> creates
|
||||
the file <TT
|
||||
CLASS="FILENAME"
|
||||
>keyset-example.com.</TT
|
||||
>. This file
|
||||
contains the specified key and a self-generated signature.
|
||||
</P
|
||||
><P
|
||||
> The DNS administrator for <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>example.com</B
|
||||
></TT
|
||||
> could
|
||||
send <TT
|
||||
CLASS="FILENAME"
|
||||
>keyset-example.com.</TT
|
||||
> to the DNS
|
||||
administrator for <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>.com</B
|
||||
></TT
|
||||
> 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"
|
||||
><A
|
||||
NAME="AEN112"
|
||||
></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
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>BIND 9 Administrator Reference Manual</I
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>RFC 2535</I
|
||||
>.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN123"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
><P
|
||||
> Internet Software Consortium
|
||||
</P
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
110
dist/bind/bin/dnssec/dnssec-signkey.8
vendored
Normal file
110
dist/bind/bin/dnssec/dnssec-signkey.8
vendored
Normal file
@ -0,0 +1,110 @@
|
||||
.\" $NetBSD: dnssec-signkey.8,v 1.1.1.1 2004/05/17 23:43:20 christos Exp $
|
||||
.\"
|
||||
.\" Copyright (C) 2004 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.1.4.1 2004/03/06 07:41:39 marka Exp
|
||||
.\"
|
||||
.TH "DNSSEC-SIGNKEY" "8" "June 30, 2000" "BIND9" ""
|
||||
.SH NAME
|
||||
dnssec-signkey \- DNSSEC key set signing tool
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBdnssec-signkey\fR [ \fB-a\fR ] [ \fB-c \fIclass\fB\fR ] [ \fB-s \fIstart-time\fB\fR ] [ \fB-e \fIend-time\fB\fR ] [ \fB-h\fR ] [ \fB-p\fR ] [ \fB-r \fIrandomdev\fB\fR ] [ \fB-v \fIlevel\fB\fR ] \fBkeyset\fR \fBkey\fR\fI...\fR
|
||||
.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"
|
||||
.TP
|
||||
\fB-a\fR
|
||||
Verify all generated signatures.
|
||||
.TP
|
||||
\fB-c \fIclass\fB\fR
|
||||
Specifies the DNS class of the key sets.
|
||||
.TP
|
||||
\fB-s \fIstart-time\fB\fR
|
||||
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.
|
||||
.TP
|
||||
\fB-e \fIend-time\fB\fR
|
||||
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.
|
||||
.TP
|
||||
\fB-h\fR
|
||||
Prints a short summary of the options and arguments to
|
||||
\fBdnssec-signkey\fR.
|
||||
.TP
|
||||
\fB-p\fR
|
||||
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.
|
||||
.TP
|
||||
\fB-r \fIrandomdev\fB\fR
|
||||
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.
|
||||
.TP
|
||||
\fB-v \fIlevel\fB\fR
|
||||
Sets the debugging level.
|
||||
.TP
|
||||
\fBkeyset\fR
|
||||
The file containing the child's keyset.
|
||||
.TP
|
||||
\fBkey\fR
|
||||
The keys used to sign the child's keyset.
|
||||
.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 Software Consortium
|
449
dist/bind/bin/dnssec/dnssec-signkey.c
vendored
Normal file
449
dist/bind/bin/dnssec/dnssec-signkey.c
vendored
Normal file
@ -0,0 +1,449 @@
|
||||
/* $NetBSD: dnssec-signkey.c,v 1.1.1.1 2004/05/17 23:43:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Portions Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Portions Copyright (C) 2000-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.2.2.6 2004/03/08 04:04:17 marka Exp */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <isc/string.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/db.h>
|
||||
#include <dns/dbiterator.h>
|
||||
#include <dns/diff.h>
|
||||
#include <dns/dnssec.h>
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdataclass.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;
|
||||
|
||||
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, "Version: %s\n", VERSION);
|
||||
|
||||
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)) {
|
||||
dst_key_free(&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_rrsig_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[65536];
|
||||
dns_db_t *db;
|
||||
dns_dbnode_t *node;
|
||||
dns_dbversion_t *version;
|
||||
dns_diff_t diff;
|
||||
dns_difftuple_t *tuple;
|
||||
dns_dbiterator_t *dbiter;
|
||||
dns_rdatasetiter_t *rdsiter;
|
||||
dst_key_t *key = NULL;
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
dns_rdata_t sigrdata = DNS_RDATA_INIT;
|
||||
dns_rdataset_t rdataset, sigrdataset;
|
||||
dns_rdata_rrsig_t sig;
|
||||
isc_result_t result;
|
||||
isc_buffer_t b;
|
||||
isc_log_t *log = NULL;
|
||||
keynode_t *keynode;
|
||||
isc_boolean_t pseudorandom = ISC_FALSE;
|
||||
unsigned int eflags;
|
||||
dns_rdataclass_t rdclass;
|
||||
isc_boolean_t tryverify = ISC_FALSE;
|
||||
isc_boolean_t settime = 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':
|
||||
setup_entropy(mctx, isc_commandline_argument, &ectx);
|
||||
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();
|
||||
|
||||
rdclass = strtoclass(classname);
|
||||
|
||||
if (ectx == NULL)
|
||||
setup_entropy(mctx, NULL, &ectx);
|
||||
eflags = ISC_ENTROPY_BLOCKING;
|
||||
if (!pseudorandom)
|
||||
eflags |= ISC_ENTROPY_GOODONLY;
|
||||
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");
|
||||
|
||||
if (startstr != NULL) {
|
||||
starttime = strtotime(startstr, now, now);
|
||||
endtime = strtotime(endstr, now, starttime);
|
||||
settime = ISC_TRUE;
|
||||
}
|
||||
|
||||
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");
|
||||
sprintf(output, "signedkey-%s", 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_dnskey, 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);
|
||||
|
||||
dns_diff_init(mctx, &diff);
|
||||
|
||||
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));
|
||||
}
|
||||
if (!settime) {
|
||||
starttime = sig.timesigned;
|
||||
endtime = sig.timeexpire;
|
||||
settime = ISC_TRUE;
|
||||
}
|
||||
dns_rdata_freestruct(&sig);
|
||||
dns_rdata_reset(&sigrdata);
|
||||
result = dns_rdataset_next(&sigrdataset);
|
||||
} while (result == ISC_R_SUCCESS);
|
||||
|
||||
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");
|
||||
|
||||
argc -= 1;
|
||||
argv += 1;
|
||||
|
||||
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));
|
||||
|
||||
dns_rdata_reset(&rdata);
|
||||
isc_buffer_init(&b, data, sizeof(data));
|
||||
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));
|
||||
}
|
||||
}
|
||||
tuple = NULL;
|
||||
result = dns_difftuple_create(mctx, DNS_DIFFOP_ADD,
|
||||
domain, rdataset.ttl,
|
||||
&rdata, &tuple);
|
||||
check_result(result, "dns_difftuple_create");
|
||||
dns_diff_append(&diff, &tuple);
|
||||
dst_key_free(&key);
|
||||
}
|
||||
|
||||
result = dns_db_deleterdataset(db, node, version, dns_rdatatype_rrsig,
|
||||
dns_rdatatype_dnskey);
|
||||
check_result(result, "dns_db_deleterdataset");
|
||||
|
||||
result = dns_diff_apply(&diff, db, version);
|
||||
check_result(result, "dns_diff_apply");
|
||||
dns_diff_clear(&diff);
|
||||
|
||||
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(&sigrdataset);
|
||||
|
||||
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);
|
||||
cleanup_entropy(&ectx);
|
||||
dst_lib_destroy();
|
||||
if (verbose > 10)
|
||||
isc_mem_stats(mctx, stdout);
|
||||
isc_mem_destroy(&mctx);
|
||||
return (0);
|
||||
}
|
237
dist/bind/bin/dnssec/dnssec-signkey.docbook
vendored
Normal file
237
dist/bind/bin/dnssec/dnssec-signkey.docbook
vendored
Normal file
@ -0,0 +1,237 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
|
||||
<!--
|
||||
- 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: dnssec-signkey.docbook,v 1.2.2.2.4.1 2004/03/06 10:21:15 marka Exp -->
|
||||
|
||||
<refentry>
|
||||
<refentryinfo>
|
||||
<date>June 30, 2000</date>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle><application>dnssec-signkey</application></refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<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 Software Consortium</corpauthor>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
-->
|
407
dist/bind/bin/dnssec/dnssec-signkey.html
vendored
Normal file
407
dist/bind/bin/dnssec/dnssec-signkey.html
vendored
Normal file
@ -0,0 +1,407 @@
|
||||
<!--
|
||||
- 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: dnssec-signkey.html,v 1.4.2.1.4.1 2004/03/06 10:21:15 marka Exp -->
|
||||
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>dnssec-signkey</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
|
||||
"></HEAD
|
||||
><BODY
|
||||
CLASS="REFENTRY"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><H1
|
||||
><A
|
||||
NAME="AEN1"
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>dnssec-signkey</SPAN
|
||||
></A
|
||||
></H1
|
||||
><DIV
|
||||
CLASS="REFNAMEDIV"
|
||||
><A
|
||||
NAME="AEN9"
|
||||
></A
|
||||
><H2
|
||||
>Name</H2
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>dnssec-signkey</SPAN
|
||||
> -- DNSSEC key set signing tool</DIV
|
||||
><DIV
|
||||
CLASS="REFSYNOPSISDIV"
|
||||
><A
|
||||
NAME="AEN13"
|
||||
></A
|
||||
><H2
|
||||
>Synopsis</H2
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-signkey</B
|
||||
> [<TT
|
||||
CLASS="OPTION"
|
||||
>-a</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-c <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>class</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-s <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>start-time</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-e <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>end-time</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-h</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-p</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-r <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>randomdev</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-v <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>level</I
|
||||
></TT
|
||||
></TT
|
||||
>] {keyset} {key...}</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN39"
|
||||
></A
|
||||
><H2
|
||||
>DESCRIPTION</H2
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-signkey</B
|
||||
> signs a keyset. Typically
|
||||
the keyset will be for a child zone, and will have been generated
|
||||
by <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-makekeyset</B
|
||||
>. The child zone's keyset
|
||||
is signed with the zone keys for its parent zone. The output file
|
||||
is of the form <TT
|
||||
CLASS="FILENAME"
|
||||
>signedkey-nnnn.</TT
|
||||
>, where
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>nnnn</TT
|
||||
> is the zone name.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN46"
|
||||
></A
|
||||
><H2
|
||||
>OPTIONS</H2
|
||||
><P
|
||||
></P
|
||||
><DIV
|
||||
CLASS="VARIABLELIST"
|
||||
><DL
|
||||
><DT
|
||||
>-a</DT
|
||||
><DD
|
||||
><P
|
||||
> Verify all generated signatures.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-c <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>class</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specifies the DNS class of the key sets.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-s <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>start-time</I
|
||||
></TT
|
||||
></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 <TT
|
||||
CLASS="OPTION"
|
||||
>start-time</TT
|
||||
> is specified, the current
|
||||
time is used.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-e <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>end-time</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specify the date and time when the generated SIG records
|
||||
expire. As with <TT
|
||||
CLASS="OPTION"
|
||||
>start-time</TT
|
||||
>, 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 <TT
|
||||
CLASS="OPTION"
|
||||
>end-time</TT
|
||||
> is
|
||||
specified, 30 days from the start time is used as a default.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-h</DT
|
||||
><DD
|
||||
><P
|
||||
> Prints a short summary of the options and arguments to
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-signkey</B
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-p</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
|
||||
>-r <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>randomdev</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specifies the source of randomness. If the operating
|
||||
system does not provide a <TT
|
||||
CLASS="FILENAME"
|
||||
>/dev/random</TT
|
||||
>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <TT
|
||||
CLASS="FILENAME"
|
||||
>randomdev</TT
|
||||
> specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>keyboard</TT
|
||||
> indicates that keyboard
|
||||
input should be used.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-v <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>level</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Sets the debugging level.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>keyset</DT
|
||||
><DD
|
||||
><P
|
||||
> The file containing the child's keyset.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>key</DT
|
||||
><DD
|
||||
><P
|
||||
> The keys used to sign the child's keyset.
|
||||
</P
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN101"
|
||||
></A
|
||||
><H2
|
||||
>EXAMPLE</H2
|
||||
><P
|
||||
> The DNS administrator for a DNSSEC-aware <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>.com</B
|
||||
></TT
|
||||
>
|
||||
zone would use the following command to sign the
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>keyset</TT
|
||||
> file for <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>example.com</B
|
||||
></TT
|
||||
>
|
||||
created by <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-makekeyset</B
|
||||
> with a key generated
|
||||
by <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
>:
|
||||
</P
|
||||
><P
|
||||
> <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>dnssec-signkey keyset-example.com. Kcom.+003+51944</B
|
||||
></TT
|
||||
>
|
||||
</P
|
||||
><P
|
||||
> In this example, <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-signkey</B
|
||||
> creates
|
||||
the file <TT
|
||||
CLASS="FILENAME"
|
||||
>signedkey-example.com.</TT
|
||||
>, which
|
||||
contains the <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>example.com</B
|
||||
></TT
|
||||
> keys and the
|
||||
signatures by the <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>.com</B
|
||||
></TT
|
||||
> keys.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN116"
|
||||
></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"
|
||||
><A
|
||||
NAME="AEN128"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
><P
|
||||
> Internet Software Consortium
|
||||
</P
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
172
dist/bind/bin/dnssec/dnssec-signzone.8
vendored
Normal file
172
dist/bind/bin/dnssec/dnssec-signzone.8
vendored
Normal file
@ -0,0 +1,172 @@
|
||||
.\" $NetBSD: dnssec-signzone.8,v 1.1.1.1 2004/05/17 23:43:20 christos Exp $
|
||||
.\"
|
||||
.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2003 Internet Software Consortium.
|
||||
.\"
|
||||
.\" Permission to use, copy, modify, and distribute this software for any
|
||||
.\" purpose with or without fee is hereby granted, provided that the above
|
||||
.\" copyright notice and this permission notice appear in all copies.
|
||||
.\"
|
||||
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
.\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
.\" PERFORMANCE OF THIS SOFTWARE.
|
||||
.\"
|
||||
.\" Id: dnssec-signzone.8,v 1.23.2.1.4.4 2004/03/15 01:02:42 marka Exp
|
||||
.\"
|
||||
.TH "DNSSEC-SIGNZONE" "8" "June 30, 2000" "BIND9" ""
|
||||
.SH NAME
|
||||
dnssec-signzone \- DNSSEC zone signing tool
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBdnssec-signzone\fR [ \fB-a\fR ] [ \fB-c \fIclass\fB\fR ] [ \fB-d \fIdirectory\fB\fR ] [ \fB-e \fIend-time\fB\fR ] [ \fB-f \fIoutput-file\fB\fR ] [ \fB-g\fR ] [ \fB-h\fR ] [ \fB-k \fIkey\fB\fR ] [ \fB-l \fIdomain\fB\fR ] [ \fB-i \fIinterval\fB\fR ] [ \fB-n \fInthreads\fB\fR ] [ \fB-o \fIorigin\fB\fR ] [ \fB-p\fR ] [ \fB-r \fIrandomdev\fB\fR ] [ \fB-s \fIstart-time\fB\fR ] [ \fB-t\fR ] [ \fB-v \fIlevel\fB\fR ] [ \fB-z\fR ] \fBzonefile\fR [ \fBkey\fR\fI...\fR ]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBdnssec-signzone\fR signs a zone. It generates NSEC
|
||||
and RRSIG 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"
|
||||
.TP
|
||||
\fB-a\fR
|
||||
Verify all generated signatures.
|
||||
.TP
|
||||
\fB-c \fIclass\fB\fR
|
||||
Specifies the DNS class of the zone.
|
||||
.TP
|
||||
\fB-k \fIkey\fB\fR
|
||||
Treat specified key as a key signing key ignoring any
|
||||
key flags. This option may be specified multiple times.
|
||||
.TP
|
||||
\fB-l \fIdomain\fB\fR
|
||||
Generate a DLV set in addition to the key (DNSKEY) and DS sets.
|
||||
The domain is appended to the name of the records.
|
||||
.TP
|
||||
\fB-d \fIdirectory\fB\fR
|
||||
Look for \fIsignedkey\fR files in
|
||||
\fBdirectory\fR as the directory
|
||||
.TP
|
||||
\fB-g\fR
|
||||
Generate DS records for child zones from keyset files.
|
||||
Existing DS records will be removed.
|
||||
.TP
|
||||
\fB-s \fIstart-time\fB\fR
|
||||
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 \fBstart-time\fR is specified, the current
|
||||
time minus 1 hour (to allow for clock skew) is used.
|
||||
.TP
|
||||
\fB-e \fIend-time\fB\fR
|
||||
Specify the date and time when the generated RRSIG 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.
|
||||
.TP
|
||||
\fB-f \fIoutput-file\fB\fR
|
||||
The name of the output file containing the signed zone. The
|
||||
default is to append \fI.signed\fR to the
|
||||
input file.
|
||||
.TP
|
||||
\fB-h\fR
|
||||
Prints a short summary of the options and arguments to
|
||||
\fBdnssec-signzone\fR.
|
||||
.TP
|
||||
\fB-i \fIinterval\fB\fR
|
||||
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.
|
||||
|
||||
The default cycle interval is one quarter of the difference
|
||||
between the signature end and start times. So if neither
|
||||
\fBend-time\fR 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.
|
||||
.TP
|
||||
\fB-n \fIncpus\fB\fR
|
||||
Specifies the number of threads to use. By default, one
|
||||
thread is started for each detected CPU.
|
||||
.TP
|
||||
\fB-o \fIorigin\fB\fR
|
||||
The zone origin. If not specified, the name of the zone file
|
||||
is assumed to be the origin.
|
||||
.TP
|
||||
\fB-p\fR
|
||||
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.
|
||||
.TP
|
||||
\fB-r \fIrandomdev\fB\fR
|
||||
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.
|
||||
.TP
|
||||
\fB-t\fR
|
||||
Print statistics at completion.
|
||||
.TP
|
||||
\fB-v \fIlevel\fB\fR
|
||||
Sets the debugging level.
|
||||
.TP
|
||||
\fB-z\fR
|
||||
Ignore KSK flag on key when determining what to sign.
|
||||
.TP
|
||||
\fBzonefile\fR
|
||||
The file containing the zone to be signed.
|
||||
Sets the debugging level.
|
||||
.TP
|
||||
\fBkey\fR
|
||||
The keys used to sign the zone. If no keys are specified, the
|
||||
default all zone keys that have private key files in the
|
||||
current directory.
|
||||
.SH "EXAMPLE"
|
||||
.PP
|
||||
The following command signs the \fBexample.com\fR
|
||||
zone with the DSA key generated in the \fBdnssec-keygen\fR
|
||||
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
|
||||
\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.
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fBdnssec-keygen\fR(8),
|
||||
\fBdnssec-signkey\fR(8),
|
||||
\fIBIND 9 Administrator Reference Manual\fR,
|
||||
\fIRFC 2535\fR.
|
||||
.SH "AUTHOR"
|
||||
.PP
|
||||
Internet Software Consortium
|
2055
dist/bind/bin/dnssec/dnssec-signzone.c
vendored
Normal file
2055
dist/bind/bin/dnssec/dnssec-signzone.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
368
dist/bind/bin/dnssec/dnssec-signzone.docbook
vendored
Normal file
368
dist/bind/bin/dnssec/dnssec-signzone.docbook
vendored
Normal file
@ -0,0 +1,368 @@
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
|
||||
<!--
|
||||
- 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: dnssec-signzone.docbook,v 1.2.2.2.4.6 2004/03/10 02:55:51 marka Exp -->
|
||||
|
||||
<refentry>
|
||||
<refentryinfo>
|
||||
<date>June 30, 2000</date>
|
||||
</refentryinfo>
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle><application>dnssec-signzone</application></refentrytitle>
|
||||
<manvolnum>8</manvolnum>
|
||||
<refmiscinfo>BIND9</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname><application>dnssec-signzone</application></refname>
|
||||
<refpurpose>DNSSEC zone signing tool</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>dnssec-signzone</command>
|
||||
<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>-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>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<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. 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>
|
||||
|
||||
<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 zone.
|
||||
</para>
|
||||
</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>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
|
||||
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.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-e <replaceable class="parameter">end-time</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specify the date and time when the generated RRSIG 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>-f <replaceable class="parameter">output-file</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The name of the output file containing the signed zone. The
|
||||
default is to append <filename>.signed</filename> to the
|
||||
input file.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-h</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Prints a short summary of the options and arguments to
|
||||
<command>dnssec-signzone</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-i <replaceable class="parameter">interval</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
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
|
||||
cycle interval, it is retained. Otherwise, it is considered
|
||||
to be expiring soon, and it will be replaced.
|
||||
</para>
|
||||
<para>
|
||||
The default cycle interval is one quarter of the difference
|
||||
between the signature end and start times. So if neither
|
||||
<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
|
||||
are due to expire in less than 7.5 days, they would be
|
||||
replaced.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-n <replaceable class="parameter">ncpus</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the number of threads to use. By default, one
|
||||
thread is started for each detected CPU.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-o <replaceable class="parameter">origin</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The zone origin. If not specified, the name of the zone file
|
||||
is assumed to be the origin.
|
||||
</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</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Print statistics at completion.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-v <replaceable class="parameter">level</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Sets the debugging level.
|
||||
</para>
|
||||
</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>
|
||||
<para>
|
||||
The file containing the zone to be signed.
|
||||
Sets the debugging level.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>key</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The keys used to sign the zone. If no keys are specified, the
|
||||
default all zone keys that have private key files in the
|
||||
current directory.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title>EXAMPLE</title>
|
||||
<para>
|
||||
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>
|
||||
<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>
|
||||
</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 Software Consortium</corpauthor>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
<!--
|
||||
- Local variables:
|
||||
- mode: sgml
|
||||
- End:
|
||||
-->
|
619
dist/bind/bin/dnssec/dnssec-signzone.html
vendored
Normal file
619
dist/bind/bin/dnssec/dnssec-signzone.html
vendored
Normal file
@ -0,0 +1,619 @@
|
||||
<!--
|
||||
- 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: dnssec-signzone.html,v 1.4.2.1.4.4 2004/03/15 01:02:42 marka Exp -->
|
||||
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>dnssec-signzone</TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
|
||||
"></HEAD
|
||||
><BODY
|
||||
CLASS="REFENTRY"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><H1
|
||||
><A
|
||||
NAME="AEN1"
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>dnssec-signzone</SPAN
|
||||
></A
|
||||
></H1
|
||||
><DIV
|
||||
CLASS="REFNAMEDIV"
|
||||
><A
|
||||
NAME="AEN9"
|
||||
></A
|
||||
><H2
|
||||
>Name</H2
|
||||
><SPAN
|
||||
CLASS="APPLICATION"
|
||||
>dnssec-signzone</SPAN
|
||||
> -- DNSSEC zone signing tool</DIV
|
||||
><DIV
|
||||
CLASS="REFSYNOPSISDIV"
|
||||
><A
|
||||
NAME="AEN13"
|
||||
></A
|
||||
><H2
|
||||
>Synopsis</H2
|
||||
><P
|
||||
><B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-signzone</B
|
||||
> [<TT
|
||||
CLASS="OPTION"
|
||||
>-a</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-c <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>class</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-d <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>directory</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-e <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>end-time</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-f <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>output-file</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-g</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-h</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-k <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>key</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-l <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>domain</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-i <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>interval</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-n <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>nthreads</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-o <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>origin</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-p</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-r <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>randomdev</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-s <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>start-time</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-t</TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-v <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>level</I
|
||||
></TT
|
||||
></TT
|
||||
>] [<TT
|
||||
CLASS="OPTION"
|
||||
>-z</TT
|
||||
>] {zonefile} [key...]</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN66"
|
||||
></A
|
||||
><H2
|
||||
>DESCRIPTION</H2
|
||||
><P
|
||||
> <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-signzone</B
|
||||
> signs a zone. It generates NSEC
|
||||
and RRSIG records and produces a signed version of the zone. If there
|
||||
is a <TT
|
||||
CLASS="FILENAME"
|
||||
>signedkey</TT
|
||||
> 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
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>signedkey</TT
|
||||
> file for each child zone.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN72"
|
||||
></A
|
||||
><H2
|
||||
>OPTIONS</H2
|
||||
><P
|
||||
></P
|
||||
><DIV
|
||||
CLASS="VARIABLELIST"
|
||||
><DL
|
||||
><DT
|
||||
>-a</DT
|
||||
><DD
|
||||
><P
|
||||
> Verify all generated signatures.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-c <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>class</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specifies the DNS class of the zone.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-k <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>key</I
|
||||
></TT
|
||||
></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
|
||||
>-l <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>domain</I
|
||||
></TT
|
||||
></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
|
||||
>-d <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>directory</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Look for <TT
|
||||
CLASS="FILENAME"
|
||||
>signedkey</TT
|
||||
> files in
|
||||
<TT
|
||||
CLASS="OPTION"
|
||||
>directory</TT
|
||||
> as the directory
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-g</DT
|
||||
><DD
|
||||
><P
|
||||
> Generate DS records for child zones from keyset files.
|
||||
Existing DS records will be removed.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-s <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>start-time</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> 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 <TT
|
||||
CLASS="OPTION"
|
||||
>start-time</TT
|
||||
> is specified, the current
|
||||
time minus 1 hour (to allow for clock skew) is used.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-e <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>end-time</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specify the date and time when the generated RRSIG records
|
||||
expire. As with <TT
|
||||
CLASS="OPTION"
|
||||
>start-time</TT
|
||||
>, 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 <TT
|
||||
CLASS="OPTION"
|
||||
>end-time</TT
|
||||
> is
|
||||
specified, 30 days from the start time is used as a default.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-f <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>output-file</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> The name of the output file containing the signed zone. The
|
||||
default is to append <TT
|
||||
CLASS="FILENAME"
|
||||
>.signed</TT
|
||||
> to the
|
||||
input file.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-h</DT
|
||||
><DD
|
||||
><P
|
||||
> Prints a short summary of the options and arguments to
|
||||
<B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-signzone</B
|
||||
>.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-i <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>interval</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> When a previously signed zone is passed as input, records
|
||||
may be resigned. The <TT
|
||||
CLASS="OPTION"
|
||||
>interval</TT
|
||||
> 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.
|
||||
</P
|
||||
><P
|
||||
> The default cycle interval is one quarter of the difference
|
||||
between the signature end and start times. So if neither
|
||||
<TT
|
||||
CLASS="OPTION"
|
||||
>end-time</TT
|
||||
> or <TT
|
||||
CLASS="OPTION"
|
||||
>start-time</TT
|
||||
>
|
||||
are specified, <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-signzone</B
|
||||
> 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.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-n <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>ncpus</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specifies the number of threads to use. By default, one
|
||||
thread is started for each detected CPU.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-o <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>origin</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> The zone origin. If not specified, the name of the zone file
|
||||
is assumed to be the origin.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-p</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
|
||||
>-r <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>randomdev</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Specifies the source of randomness. If the operating
|
||||
system does not provide a <TT
|
||||
CLASS="FILENAME"
|
||||
>/dev/random</TT
|
||||
>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <TT
|
||||
CLASS="FILENAME"
|
||||
>randomdev</TT
|
||||
> specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>keyboard</TT
|
||||
> indicates that keyboard
|
||||
input should be used.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-t</DT
|
||||
><DD
|
||||
><P
|
||||
> Print statistics at completion.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-v <TT
|
||||
CLASS="REPLACEABLE"
|
||||
><I
|
||||
>level</I
|
||||
></TT
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
> Sets the debugging level.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>-z</DT
|
||||
><DD
|
||||
><P
|
||||
> Ignore KSK flag on key when determining what to sign.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>zonefile</DT
|
||||
><DD
|
||||
><P
|
||||
> The file containing the zone to be signed.
|
||||
Sets the debugging level.
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
>key</DT
|
||||
><DD
|
||||
><P
|
||||
> The keys used to sign the zone. If no keys are specified, the
|
||||
default all zone keys that have private key files in the
|
||||
current directory.
|
||||
</P
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN182"
|
||||
></A
|
||||
><H2
|
||||
>EXAMPLE</H2
|
||||
><P
|
||||
> The following command signs the <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>example.com</B
|
||||
></TT
|
||||
>
|
||||
zone with the DSA key generated in the <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-keygen</B
|
||||
>
|
||||
man page. The zone's keys must be in the zone. If there are
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>signedkey</TT
|
||||
> files associated with this zone
|
||||
or any child zones, they must be in the current directory.
|
||||
<TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>example.com</B
|
||||
></TT
|
||||
>, the following command would be
|
||||
issued:
|
||||
</P
|
||||
><P
|
||||
> <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>dnssec-signzone -o example.com db.example.com Kexample.com.+003+26160</B
|
||||
></TT
|
||||
>
|
||||
</P
|
||||
><P
|
||||
> The command would print a string of the form:
|
||||
</P
|
||||
><P
|
||||
> In this example, <B
|
||||
CLASS="COMMAND"
|
||||
>dnssec-signzone</B
|
||||
> creates
|
||||
the file <TT
|
||||
CLASS="FILENAME"
|
||||
>db.example.com.signed</TT
|
||||
>. This file
|
||||
should be referenced in a zone statement in a
|
||||
<TT
|
||||
CLASS="FILENAME"
|
||||
>named.conf</TT
|
||||
> file.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN196"
|
||||
></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
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>BIND 9 Administrator Reference Manual</I
|
||||
>,
|
||||
<I
|
||||
CLASS="CITETITLE"
|
||||
>RFC 2535</I
|
||||
>.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN207"
|
||||
></A
|
||||
><H2
|
||||
>AUTHOR</H2
|
||||
><P
|
||||
> Internet Software Consortium
|
||||
</P
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
307
dist/bind/bin/dnssec/dnssectool.c
vendored
Normal file
307
dist/bind/bin/dnssec/dnssectool.c
vendored
Normal file
@ -0,0 +1,307 @@
|
||||
/* $NetBSD: dnssectool.c,v 1.1.1.1 2004/05/17 23:43:21 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 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: dnssectool.c,v 1.31.2.3.2.4 2004/03/08 02:07:38 marka Exp */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#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>
|
||||
#include <isc/print.h>
|
||||
|
||||
#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>
|
||||
#include <dns/time.h>
|
||||
|
||||
#include "dnssectool.h"
|
||||
|
||||
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 fatalcallback_t *fatalcallback = NULL;
|
||||
|
||||
void
|
||||
fatal(const char *format, ...) {
|
||||
va_list args;
|
||||
|
||||
fprintf(stderr, "%s: ", program);
|
||||
va_start(args, format);
|
||||
vfprintf(stderr, format, args);
|
||||
va_end(args);
|
||||
fprintf(stderr, "\n");
|
||||
if (fatalcallback != NULL)
|
||||
(*fatalcallback)();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void
|
||||
setfatalcallback(fatalcallback_t *callback) {
|
||||
fatalcallback = callback;
|
||||
}
|
||||
|
||||
void
|
||||
check_result(isc_result_t result, const char *message) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("%s: %s", message, isc_result_totext(result));
|
||||
}
|
||||
|
||||
void
|
||||
vbprintf(int level, const char *fmt, ...) {
|
||||
va_list ap;
|
||||
if (level > verbose)
|
||||
return;
|
||||
va_start(ap, fmt);
|
||||
fprintf(stderr, "%s: ", program);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void
|
||||
type_format(const dns_rdatatype_t type, char *cp, unsigned int size) {
|
||||
isc_buffer_t b;
|
||||
isc_region_t r;
|
||||
isc_result_t result;
|
||||
|
||||
isc_buffer_init(&b, cp, size - 1);
|
||||
result = dns_rdatatype_totext(type, &b);
|
||||
check_result(result, "dns_rdatatype_totext()");
|
||||
isc_buffer_usedregion(&b, &r);
|
||||
r.base[r.length] = 0;
|
||||
}
|
||||
|
||||
void
|
||||
alg_format(const dns_secalg_t alg, char *cp, unsigned int size) {
|
||||
isc_buffer_t b;
|
||||
isc_region_t r;
|
||||
isc_result_t result;
|
||||
|
||||
isc_buffer_init(&b, cp, size - 1);
|
||||
result = dns_secalg_totext(alg, &b);
|
||||
check_result(result, "dns_secalg_totext()");
|
||||
isc_buffer_usedregion(&b, &r);
|
||||
r.base[r.length] = 0;
|
||||
}
|
||||
|
||||
void
|
||||
sig_format(dns_rdata_rrsig_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));
|
||||
snprintf(cp, size, "%s/%s/%d", namestr, algstr, sig->keyid);
|
||||
}
|
||||
|
||||
void
|
||||
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));
|
||||
snprintf(cp, size, "%s/%s/%d", namestr, algstr, dst_key_id(key));
|
||||
}
|
||||
|
||||
void
|
||||
setup_logging(int verbose, isc_mem_t *mctx, isc_log_t **logp) {
|
||||
isc_result_t result;
|
||||
isc_logdestination_t destination;
|
||||
isc_logconfig_t *logconfig = NULL;
|
||||
isc_log_t *log = NULL;
|
||||
int level;
|
||||
|
||||
switch (verbose) {
|
||||
case 0:
|
||||
/*
|
||||
* We want to see warnings about things like out-of-zone
|
||||
* data in the master file even when not verbose.
|
||||
*/
|
||||
level = ISC_LOG_WARNING;
|
||||
break;
|
||||
case 1:
|
||||
level = ISC_LOG_INFO;
|
||||
break;
|
||||
default:
|
||||
level = ISC_LOG_DEBUG(verbose - 2 + 1);
|
||||
break;
|
||||
}
|
||||
|
||||
RUNTIME_CHECK(isc_log_create(mctx, &log, &logconfig) == ISC_R_SUCCESS);
|
||||
isc_log_setcontext(log);
|
||||
dns_log_init(log);
|
||||
dns_log_setcontext(log);
|
||||
|
||||
RUNTIME_CHECK(isc_log_settag(logconfig, program) == ISC_R_SUCCESS);
|
||||
|
||||
/*
|
||||
* Set up a channel similar to default_stderr except:
|
||||
* - the logging level is passed in
|
||||
* - the program name and logging level are printed
|
||||
* - no time stamp is printed
|
||||
*/
|
||||
destination.file.stream = stderr;
|
||||
destination.file.name = NULL;
|
||||
destination.file.versions = ISC_LOG_ROLLNEVER;
|
||||
destination.file.maximum_size = 0;
|
||||
result = isc_log_createchannel(logconfig, "stderr",
|
||||
ISC_LOG_TOFILEDESC,
|
||||
level,
|
||||
&destination,
|
||||
ISC_LOG_PRINTTAG|ISC_LOG_PRINTLEVEL);
|
||||
check_result(result, "isc_log_createchannel()");
|
||||
|
||||
RUNTIME_CHECK(isc_log_usechannel(logconfig, "stderr",
|
||||
NULL, NULL) == ISC_R_SUCCESS);
|
||||
|
||||
*logp = log;
|
||||
}
|
||||
|
||||
void
|
||||
cleanup_logging(isc_log_t **logp) {
|
||||
isc_log_t *log;
|
||||
|
||||
REQUIRE(logp != NULL);
|
||||
|
||||
log = *logp;
|
||||
if (log == NULL)
|
||||
return;
|
||||
isc_log_destroy(&log);
|
||||
isc_log_setcontext(NULL);
|
||||
dns_log_setcontext(NULL);
|
||||
logp = NULL;
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
if (*ectx == NULL) {
|
||||
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) {
|
||||
usekeyboard = ISC_ENTROPY_KEYBOARDYES;
|
||||
randomfile = NULL;
|
||||
}
|
||||
|
||||
result = isc_entropy_usebestsource(*ectx, &source, randomfile,
|
||||
usekeyboard);
|
||||
|
||||
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));
|
||||
}
|
||||
isc_entropy_detach(ectx);
|
||||
}
|
||||
|
||||
isc_stdtime_t
|
||||
strtotime(const char *str, isc_int64_t now, isc_int64_t base) {
|
||||
isc_int64_t val, offset;
|
||||
isc_result_t result;
|
||||
char *endp;
|
||||
|
||||
if (str[0] == '+') {
|
||||
offset = strtol(str + 1, &endp, 0);
|
||||
if (*endp != '\0')
|
||||
fatal("time value %s is invalid", str);
|
||||
val = base + offset;
|
||||
} else if (strncmp(str, "now+", 4) == 0) {
|
||||
offset = strtol(str + 4, &endp, 0);
|
||||
if (*endp != '\0')
|
||||
fatal("time value %s is invalid", str);
|
||||
val = now + offset;
|
||||
} else if (strlen(str) == 8U) {
|
||||
char timestr[15];
|
||||
sprintf(timestr, "%s000000", str);
|
||||
result = dns_time64_fromtext(timestr, &val);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("time value %s is invalid", str);
|
||||
} else {
|
||||
result = dns_time64_fromtext(str, &val);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("time value %s is invalid", str);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
78
dist/bind/bin/dnssec/dnssectool.h
vendored
Normal file
78
dist/bind/bin/dnssec/dnssectool.h
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
/* $NetBSD: dnssectool.h,v 1.1.1.1 2004/05/17 23:43:21 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 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: dnssectool.h,v 1.15.12.3 2004/03/08 04:04:18 marka Exp */
|
||||
|
||||
#ifndef DNSSECTOOL_H
|
||||
#define DNSSECTOOL_H 1
|
||||
|
||||
#include <isc/log.h>
|
||||
#include <isc/stdtime.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dst/dst.h>
|
||||
|
||||
typedef void (fatalcallback_t)(void);
|
||||
|
||||
void
|
||||
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
|
||||
|
||||
void
|
||||
setfatalcallback(fatalcallback_t *callback);
|
||||
|
||||
void
|
||||
check_result(isc_result_t result, const char *message);
|
||||
|
||||
void
|
||||
vbprintf(int level, const char *fmt, ...) ISC_FORMAT_PRINTF(2, 3);
|
||||
|
||||
void
|
||||
type_format(const dns_rdatatype_t type, char *cp, unsigned int size);
|
||||
#define TYPE_FORMATSIZE 10
|
||||
|
||||
void
|
||||
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);
|
||||
#define SIG_FORMATSIZE (DNS_NAME_FORMATSIZE + ALG_FORMATSIZE + sizeof("65535"))
|
||||
|
||||
void
|
||||
key_format(const dst_key_t *key, char *cp, unsigned int size);
|
||||
#define KEY_FORMATSIZE (DNS_NAME_FORMATSIZE + ALG_FORMATSIZE + sizeof("65535"))
|
||||
|
||||
void
|
||||
setup_logging(int verbose, isc_mem_t *mctx, isc_log_t **logp);
|
||||
|
||||
void
|
||||
cleanup_logging(isc_log_t **logp);
|
||||
|
||||
void
|
||||
setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx);
|
||||
|
||||
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);
|
||||
|
||||
#endif /* DNSSEC_DNSSECTOOL_H */
|
107
dist/bind/bin/dnssec/win32/keygen.dsp
vendored
Normal file
107
dist/bind/bin/dnssec/win32/keygen.dsp
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
# Microsoft Developer Studio Project File - Name="keygen" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=keygen - 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 "keygen.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 "keygen.mak" CFG="keygen - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "keygen - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "keygen - 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)" == "keygen - 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 /MT /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/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 ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /machine:I386 /out:"../../../Build/Release/dnssec-keygen.exe"
|
||||
|
||||
!ELSEIF "$(CFG)" == "keygen - 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 /MTd /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/dns/sec/dst/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 ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../../Build/Debug/dnssec-keygen.exe" /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "keygen - Win32 Release"
|
||||
# Name "keygen - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE="..\dnssec-keygen.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\dnssectool.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
|
29
dist/bind/bin/dnssec/win32/keygen.dsw
vendored
Normal file
29
dist/bind/bin/dnssec/win32/keygen.dsw
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "keygen"=".\keygen.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
227
dist/bind/bin/dnssec/win32/keygen.mak
vendored
Normal file
227
dist/bind/bin/dnssec/win32/keygen.mak
vendored
Normal file
@ -0,0 +1,227 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on keygen.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=keygen - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to keygen - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "keygen - Win32 Release" && "$(CFG)" != "keygen - 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 "keygen.mak" CFG="keygen - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "keygen - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "keygen - 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)" == "keygen - Win32 Release"
|
||||
|
||||
OUTDIR=.\Release
|
||||
INTDIR=.\Release
|
||||
|
||||
ALL : "..\..\..\Build\Release\dnssec-keygen.exe"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\dnssec-keygen.obj"
|
||||
-@erase "$(INTDIR)\dnssectool.obj"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "..\..\..\Build\Release\dnssec-keygen.exe"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /D "NDEBUG" /D "__STDC__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\keygen.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)\keygen.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-keygen.pdb" /machine:I386 /out:"../../../Build/Release/dnssec-keygen.exe"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\dnssec-keygen.obj" \
|
||||
"$(INTDIR)\dnssectool.obj"
|
||||
|
||||
"..\..\..\Build\Release\dnssec-keygen.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "keygen - Win32 Debug"
|
||||
|
||||
OUTDIR=.\Debug
|
||||
INTDIR=.\Debug
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Debug
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "..\..\..\Build\Debug\dnssec-keygen.exe" "$(OUTDIR)\keygen.bsc"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\dnssec-keygen.obj"
|
||||
-@erase "$(INTDIR)\dnssec-keygen.sbr"
|
||||
-@erase "$(INTDIR)\dnssectool.obj"
|
||||
-@erase "$(INTDIR)\dnssectool.sbr"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(INTDIR)\vc60.pdb"
|
||||
-@erase "$(OUTDIR)\dnssec-keygen.pdb"
|
||||
-@erase "$(OUTDIR)\keygen.bsc"
|
||||
-@erase "..\..\..\Build\Debug\dnssec-keygen.exe"
|
||||
-@erase "..\..\..\Build\Debug\dnssec-keygen.ilk"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MTd /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/dns/sec/dst/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)\keygen.bsc"
|
||||
BSC32_SBRS= \
|
||||
"$(INTDIR)\dnssec-keygen.sbr" \
|
||||
"$(INTDIR)\dnssectool.sbr"
|
||||
|
||||
"$(OUTDIR)\keygen.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-keygen.pdb" /debug /machine:I386 /out:"../../../Build/Debug/dnssec-keygen.exe" /pdbtype:sept
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\dnssec-keygen.obj" \
|
||||
"$(INTDIR)\dnssectool.obj"
|
||||
|
||||
"..\..\..\Build\Debug\dnssec-keygen.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("keygen.dep")
|
||||
!INCLUDE "keygen.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "keygen.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "keygen - Win32 Release" || "$(CFG)" == "keygen - Win32 Debug"
|
||||
SOURCE="..\dnssec-keygen.c"
|
||||
|
||||
!IF "$(CFG)" == "keygen - Win32 Release"
|
||||
|
||||
|
||||
"$(INTDIR)\dnssec-keygen.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "keygen - Win32 Debug"
|
||||
|
||||
|
||||
"$(INTDIR)\dnssec-keygen.obj" "$(INTDIR)\dnssec-keygen.sbr" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
SOURCE=..\dnssectool.c
|
||||
|
||||
!IF "$(CFG)" == "keygen - Win32 Release"
|
||||
|
||||
|
||||
"$(INTDIR)\dnssectool.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "keygen - Win32 Debug"
|
||||
|
||||
|
||||
"$(INTDIR)\dnssectool.obj" "$(INTDIR)\dnssectool.sbr" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
107
dist/bind/bin/dnssec/win32/makekeyset.dsp
vendored
Normal file
107
dist/bind/bin/dnssec/win32/makekeyset.dsp
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
# 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 /MT /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/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 ../../../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 /MTd /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/dns/sec/dst/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 ../../../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
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\dnssectool.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
|
29
dist/bind/bin/dnssec/win32/makekeyset.dsw
vendored
Normal file
29
dist/bind/bin/dnssec/win32/makekeyset.dsw
vendored
Normal 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>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
227
dist/bind/bin/dnssec/win32/makekeyset.mak
vendored
Normal file
227
dist/bind/bin/dnssec/win32/makekeyset.mak
vendored
Normal file
@ -0,0 +1,227 @@
|
||||
# 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"
|
||||
|
||||
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"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/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)
|
||||
<<
|
||||
|
||||
!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"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MTd /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/dns/sec/dst/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)
|
||||
<<
|
||||
|
||||
!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
|
||||
|
103
dist/bind/bin/dnssec/win32/nsupdate.dsp
vendored
Normal file
103
dist/bind/bin/dnssec/win32/nsupdate.dsp
vendored
Normal file
@ -0,0 +1,103 @@
|
||||
# Microsoft Developer Studio Project File - Name="nsupdate" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=nsupdate - 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 "nsupdate.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 "nsupdate.mak" CFG="nsupdate - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "nsupdate - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "nsupdate - 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)" == "nsupdate - 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 /MT /W3 /GX /O2 /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /I "../../../lib/lwres/win32/include/lwres" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/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
|
||||
# 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 ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib ../../../lib/lwres/win32/Release/liblwres.lib user32.lib advapi32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"../../../Build/Release/nsupdate.exe"
|
||||
|
||||
!ELSEIF "$(CFG)" == "nsupdate - 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 /MTd /W3 /Gm /GX /ZI /Od /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /I "../../../lib/lwres/win32/include/lwres" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/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"
|
||||
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 ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib ../../../lib/lwres/win32/Debug/liblwres.lib user32.lib advapi32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../../Build/Debug/nsupdate.exe" /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "nsupdate - Win32 Release"
|
||||
# Name "nsupdate - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\nsupdate.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
|
29
dist/bind/bin/dnssec/win32/nsupdate.dsw
vendored
Normal file
29
dist/bind/bin/dnssec/win32/nsupdate.dsw
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "nsupdate"=".\nsupdate.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
107
dist/bind/bin/dnssec/win32/signkey.dsp
vendored
Normal file
107
dist/bind/bin/dnssec/win32/signkey.dsp
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
# 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 /MT /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/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 ../../../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 /MTd /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/dns/sec/dst/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 ../../../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
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\dnssectool.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
|
29
dist/bind/bin/dnssec/win32/signkey.dsw
vendored
Normal file
29
dist/bind/bin/dnssec/win32/signkey.dsw
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "signkey"=".\signkey.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
227
dist/bind/bin/dnssec/win32/signkey.mak
vendored
Normal file
227
dist/bind/bin/dnssec/win32/signkey.mak
vendored
Normal file
@ -0,0 +1,227 @@
|
||||
# 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"
|
||||
|
||||
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"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/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)
|
||||
<<
|
||||
|
||||
!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"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MTd /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/dns/sec/dst/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)
|
||||
<<
|
||||
|
||||
!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
|
||||
|
107
dist/bind/bin/dnssec/win32/signzone.dsp
vendored
Normal file
107
dist/bind/bin/dnssec/win32/signzone.dsp
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
# Microsoft Developer Studio Project File - Name="signzone" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=signzone - 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 "signzone.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 "signzone.mak" CFG="signzone - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "signzone - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "signzone - 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)" == "signzone - 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 /MT /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/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 ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /machine:I386 /out:"../../../Build/Release/dnssec-signzone.exe"
|
||||
|
||||
!ELSEIF "$(CFG)" == "signzone - 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 /MTd /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/dns/sec/dst/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 ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../../Build/Debug/dnssec-signzone.exe" /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "signzone - Win32 Release"
|
||||
# Name "signzone - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE="..\dnssec-signzone.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\dnssectool.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
|
29
dist/bind/bin/dnssec/win32/signzone.dsw
vendored
Normal file
29
dist/bind/bin/dnssec/win32/signzone.dsw
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "signzone"=".\signzone.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
227
dist/bind/bin/dnssec/win32/signzone.mak
vendored
Normal file
227
dist/bind/bin/dnssec/win32/signzone.mak
vendored
Normal file
@ -0,0 +1,227 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on signzone.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=signzone - Win32 Debug
|
||||
!MESSAGE No configuration specified. Defaulting to signzone - Win32 Debug.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "signzone - Win32 Release" && "$(CFG)" != "signzone - 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 "signzone.mak" CFG="signzone - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "signzone - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "signzone - 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)" == "signzone - Win32 Release"
|
||||
|
||||
OUTDIR=.\Release
|
||||
INTDIR=.\Release
|
||||
|
||||
ALL : "..\..\..\Build\Release\dnssec-signzone.exe"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\dnssec-signzone.obj"
|
||||
-@erase "$(INTDIR)\dnssectool.obj"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "..\..\..\Build\Release\dnssec-signzone.exe"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /D "NDEBUG" /D "__STDC__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\signzone.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)\signzone.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-signzone.pdb" /machine:I386 /out:"../../../Build/Release/dnssec-signzone.exe"
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\dnssec-signzone.obj" \
|
||||
"$(INTDIR)\dnssectool.obj"
|
||||
|
||||
"..\..\..\Build\Release\dnssec-signzone.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "signzone - Win32 Debug"
|
||||
|
||||
OUTDIR=.\Debug
|
||||
INTDIR=.\Debug
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Debug
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "..\..\..\Build\Debug\dnssec-signzone.exe" "$(OUTDIR)\signzone.bsc"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\dnssec-signzone.obj"
|
||||
-@erase "$(INTDIR)\dnssec-signzone.sbr"
|
||||
-@erase "$(INTDIR)\dnssectool.obj"
|
||||
-@erase "$(INTDIR)\dnssectool.sbr"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(INTDIR)\vc60.pdb"
|
||||
-@erase "$(OUTDIR)\dnssec-signzone.pdb"
|
||||
-@erase "$(OUTDIR)\signzone.bsc"
|
||||
-@erase "..\..\..\Build\Debug\dnssec-signzone.exe"
|
||||
-@erase "..\..\..\Build\Debug\dnssec-signzone.ilk"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MTd /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/dns/sec/dst/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)\signzone.bsc"
|
||||
BSC32_SBRS= \
|
||||
"$(INTDIR)\dnssec-signzone.sbr" \
|
||||
"$(INTDIR)\dnssectool.sbr"
|
||||
|
||||
"$(OUTDIR)\signzone.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-signzone.pdb" /debug /machine:I386 /out:"../../../Build/Debug/dnssec-signzone.exe" /pdbtype:sept
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\dnssec-signzone.obj" \
|
||||
"$(INTDIR)\dnssectool.obj"
|
||||
|
||||
"..\..\..\Build\Debug\dnssec-signzone.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("signzone.dep")
|
||||
!INCLUDE "signzone.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "signzone.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "signzone - Win32 Release" || "$(CFG)" == "signzone - Win32 Debug"
|
||||
SOURCE="..\dnssec-signzone.c"
|
||||
|
||||
!IF "$(CFG)" == "signzone - Win32 Release"
|
||||
|
||||
|
||||
"$(INTDIR)\dnssec-signzone.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "signzone - Win32 Debug"
|
||||
|
||||
|
||||
"$(INTDIR)\dnssec-signzone.obj" "$(INTDIR)\dnssec-signzone.sbr" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
SOURCE=..\dnssectool.c
|
||||
|
||||
!IF "$(CFG)" == "signzone - Win32 Release"
|
||||
|
||||
|
||||
"$(INTDIR)\dnssectool.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ELSEIF "$(CFG)" == "signzone - Win32 Debug"
|
||||
|
||||
|
||||
"$(INTDIR)\dnssectool.obj" "$(INTDIR)\dnssectool.sbr" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
131
dist/bind/bin/named/Makefile.in
vendored
Normal file
131
dist/bind/bin/named/Makefile.in
vendored
Normal file
@ -0,0 +1,131 @@
|
||||
# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
# Copyright (C) 1998-2002 Internet Software Consortium.
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
# PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# Id: Makefile.in,v 1.74.12.7 2004/03/08 04:04:18 marka Exp
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
@BIND9_VERSION@
|
||||
|
||||
@BIND9_MAKE_INCLUDES@
|
||||
|
||||
#
|
||||
# Add database drivers here.
|
||||
#
|
||||
DBDRIVER_OBJS =
|
||||
DBDRIVER_SRCS =
|
||||
DBDRIVER_INCLUDES =
|
||||
DBDRIVER_LIBS =
|
||||
|
||||
CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include \
|
||||
${LWRES_INCLUDES} ${DNS_INCLUDES} ${BIND9_INCLUDES} \
|
||||
${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} ${ISC_INCLUDES} \
|
||||
${DBDRIVER_INCLUDES}
|
||||
|
||||
CDEFINES =
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_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} \
|
||||
${ISCCFGDEPLIBS} ${ISCCCDEPLIBS} ${ISCDEPLIBS}
|
||||
|
||||
LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} \
|
||||
${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} ${DBDRIVER_LIBS} @LIBS@
|
||||
|
||||
SUBDIRS = unix
|
||||
|
||||
TARGETS = named@EXEEXT@ lwresd@EXEEXT@
|
||||
|
||||
OBJS = aclconf.@O@ builtin.@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@ \
|
||||
zoneconf.@O@ \
|
||||
lwaddr.@O@ lwresd.@O@ lwdclient.@O@ lwderror.@O@ lwdgabn.@O@ \
|
||||
lwdgnba.@O@ lwdgrbn.@O@ lwdnoop.@O@ lwsearch.@O@ \
|
||||
$(DBDRIVER_OBJS)
|
||||
|
||||
UOBJS = unix/os.@O@
|
||||
|
||||
SRCS = aclconf.c builtin.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 \
|
||||
zoneconf.c \
|
||||
lwaddr.c lwresd.c lwdclient.c lwderror.c lwdgabn.c \
|
||||
lwdgnba.c lwdgrbn.c lwdnoop.c lwsearch.c \
|
||||
$(DBDRIVER_SRCS)
|
||||
|
||||
MANPAGES = named.8 lwresd.8
|
||||
|
||||
HTMLPAGES = named.html lwresd.html
|
||||
|
||||
MANOBJS = ${MANPAGES} ${HTMLPAGES}
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
main.@O@: main.c
|
||||
${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}\" \
|
||||
-DNS_LOCALSTATEDIR=\"${localstatedir}\" \
|
||||
-c ${srcdir}/config.c
|
||||
|
||||
named@EXEEXT@: ${OBJS} ${UOBJS} ${DEPLIBS}
|
||||
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} -o $@ \
|
||||
${OBJS} ${UOBJS} ${LIBS}
|
||||
|
||||
lwresd@EXEEXT@: named@EXEEXT@
|
||||
rm -f lwresd@EXEEXT@
|
||||
@LN@ named@EXEEXT@ lwresd@EXEEXT@
|
||||
|
||||
doc man:: ${MANOBJS}
|
||||
|
||||
docclean manclean maintainer-clean::
|
||||
rm -f ${MANOBJS}
|
||||
|
||||
clean distclean maintainer-clean::
|
||||
rm -f ${TARGETS} ${OBJS}
|
||||
|
||||
installdirs:
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}
|
||||
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
|
||||
|
||||
install:: named@EXEEXT@ lwresd@EXEEXT@ installdirs
|
||||
${LIBTOO_MODE_INSTALL} ${INSTALL_PROGRAM} named@EXEEXT@ ${DESTDIR}${sbindir}
|
||||
(cd ${DESTDIR}${sbindir}; rm -f lwresd@EXEEXT@; @LN@ named@EXEEXT@ lwresd@EXEEXT@)
|
||||
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8; done
|
235
dist/bind/bin/named/aclconf.c
vendored
Normal file
235
dist/bind/bin/named/aclconf.c
vendored
Normal file
@ -0,0 +1,235 @@
|
||||
/* $NetBSD: aclconf.c,v 1.1.1.1 2004/05/17 23:43:21 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Id: aclconf.c,v 1.27.12.3 2004/03/08 04:04:18 marka Exp */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <isc/mem.h>
|
||||
#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>
|
||||
|
||||
#include <named/aclconf.h>
|
||||
|
||||
void
|
||||
ns_aclconfctx_init(ns_aclconfctx_t *ctx) {
|
||||
ISC_LIST_INIT(ctx->named_acl_cache);
|
||||
}
|
||||
|
||||
void
|
||||
ns_aclconfctx_destroy(ns_aclconfctx_t *ctx) {
|
||||
dns_acl_t *dacl, *next;
|
||||
for (dacl = ISC_LIST_HEAD(ctx->named_acl_cache);
|
||||
dacl != NULL;
|
||||
dacl = next)
|
||||
{
|
||||
next = ISC_LIST_NEXT(dacl, nextincache);
|
||||
dns_acl_detach(&dacl);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Find the definition of the named acl whose name is "name".
|
||||
*/
|
||||
static isc_result_t
|
||||
get_acl_def(cfg_obj_t *cctx, char *name, cfg_obj_t **ret) {
|
||||
isc_result_t result;
|
||||
cfg_obj_t *acls = NULL;
|
||||
cfg_listelt_t *elt;
|
||||
|
||||
result = cfg_map_get(cctx, "acl", &acls);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
for (elt = cfg_list_first(acls);
|
||||
elt != NULL;
|
||||
elt = cfg_list_next(elt)) {
|
||||
cfg_obj_t *acl = cfg_listelt_value(elt);
|
||||
const char *aclname = cfg_obj_asstring(cfg_tuple_get(acl, "name"));
|
||||
if (strcasecmp(aclname, name) == 0) {
|
||||
*ret = cfg_tuple_get(acl, "value");
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
}
|
||||
return (ISC_R_NOTFOUND);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
convert_named_acl(cfg_obj_t *nameobj, cfg_obj_t *cctx,
|
||||
ns_aclconfctx_t *ctx, isc_mem_t *mctx,
|
||||
dns_acl_t **target)
|
||||
{
|
||||
isc_result_t result;
|
||||
cfg_obj_t *cacl = NULL;
|
||||
dns_acl_t *dacl;
|
||||
char *aclname = cfg_obj_asstring(nameobj);
|
||||
|
||||
/* Look for an already-converted version. */
|
||||
for (dacl = ISC_LIST_HEAD(ctx->named_acl_cache);
|
||||
dacl != NULL;
|
||||
dacl = ISC_LIST_NEXT(dacl, nextincache))
|
||||
{
|
||||
if (strcasecmp(aclname, dacl->name) == 0) {
|
||||
dns_acl_attach(dacl, target);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
}
|
||||
/* Not yet converted. Convert now. */
|
||||
result = get_acl_def(cctx, aclname, &cacl);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
cfg_obj_log(nameobj, dns_lctx, ISC_LOG_WARNING,
|
||||
"undefined ACL '%s'", aclname);
|
||||
return (result);
|
||||
}
|
||||
result = ns_acl_fromconfig(cacl, cctx, ctx, mctx, &dacl);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
dacl->name = isc_mem_strdup(dacl->mctx, aclname);
|
||||
if (dacl->name == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
ISC_LIST_APPEND(ctx->named_acl_cache, dacl, nextincache);
|
||||
dns_acl_attach(dacl, target);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
convert_keyname(cfg_obj_t *keyobj, isc_mem_t *mctx, dns_name_t *dnsname) {
|
||||
isc_result_t result;
|
||||
isc_buffer_t buf;
|
||||
dns_fixedname_t fixname;
|
||||
unsigned int keylen;
|
||||
const char *txtname = cfg_obj_asstring(keyobj);
|
||||
|
||||
keylen = strlen(txtname);
|
||||
isc_buffer_init(&buf, txtname, keylen);
|
||||
isc_buffer_add(&buf, keylen);
|
||||
dns_fixedname_init(&fixname);
|
||||
result = dns_name_fromtext(dns_fixedname_name(&fixname), &buf,
|
||||
dns_rootname, ISC_FALSE, NULL);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
cfg_obj_log(keyobj, dns_lctx, ISC_LOG_WARNING,
|
||||
"key name '%s' is not a valid domain name",
|
||||
txtname);
|
||||
return (result);
|
||||
}
|
||||
return (dns_name_dup(dns_fixedname_name(&fixname), mctx, dnsname));
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
ns_acl_fromconfig(cfg_obj_t *caml,
|
||||
cfg_obj_t *cctx,
|
||||
ns_aclconfctx_t *ctx,
|
||||
isc_mem_t *mctx,
|
||||
dns_acl_t **target)
|
||||
{
|
||||
isc_result_t result;
|
||||
unsigned int count;
|
||||
dns_acl_t *dacl = NULL;
|
||||
dns_aclelement_t *de;
|
||||
cfg_listelt_t *elt;
|
||||
|
||||
REQUIRE(target != NULL && *target == NULL);
|
||||
|
||||
count = 0;
|
||||
for (elt = cfg_list_first(caml);
|
||||
elt != NULL;
|
||||
elt = cfg_list_next(elt))
|
||||
count++;
|
||||
|
||||
result = dns_acl_create(mctx, count, &dacl);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
de = dacl->elements;
|
||||
for (elt = cfg_list_first(caml);
|
||||
elt != NULL;
|
||||
elt = cfg_list_next(elt))
|
||||
{
|
||||
cfg_obj_t *ce = cfg_listelt_value(elt);
|
||||
if (cfg_obj_istuple(ce)) {
|
||||
/* This must be a negated element. */
|
||||
ce = cfg_tuple_get(ce, "value");
|
||||
de->negative = ISC_TRUE;
|
||||
} else {
|
||||
de->negative = ISC_FALSE;
|
||||
}
|
||||
|
||||
if (cfg_obj_isnetprefix(ce)) {
|
||||
/* Network prefix */
|
||||
de->type = dns_aclelementtype_ipprefix;
|
||||
|
||||
cfg_obj_asnetprefix(ce,
|
||||
&de->u.ip_prefix.address,
|
||||
&de->u.ip_prefix.prefixlen);
|
||||
} else if (cfg_obj_istype(ce, &cfg_type_keyref)) {
|
||||
/* Key name */
|
||||
de->type = dns_aclelementtype_keyname;
|
||||
dns_name_init(&de->u.keyname, NULL);
|
||||
result = convert_keyname(ce, mctx, &de->u.keyname);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
} else if (cfg_obj_islist(ce)) {
|
||||
/* Nested ACL */
|
||||
de->type = dns_aclelementtype_nestedacl;
|
||||
result = ns_acl_fromconfig(ce, cctx, ctx, mctx,
|
||||
&de->u.nestedacl);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
} else if (cfg_obj_isstring(ce)) {
|
||||
/* ACL name */
|
||||
char *name = cfg_obj_asstring(ce);
|
||||
if (strcasecmp(name, "localhost") == 0) {
|
||||
de->type = dns_aclelementtype_localhost;
|
||||
} else if (strcasecmp(name, "localnets") == 0) {
|
||||
de->type = dns_aclelementtype_localnets;
|
||||
} else if (strcasecmp(name, "any") == 0) {
|
||||
de->type = dns_aclelementtype_any;
|
||||
} else if (strcasecmp(name, "none") == 0) {
|
||||
de->type = dns_aclelementtype_any;
|
||||
de->negative = ISC_TF(! de->negative);
|
||||
} else {
|
||||
de->type = dns_aclelementtype_nestedacl;
|
||||
result = convert_named_acl(ce, cctx, ctx, mctx,
|
||||
&de->u.nestedacl);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
}
|
||||
} else {
|
||||
cfg_obj_log(ce, dns_lctx, ISC_LOG_WARNING,
|
||||
"address match list contains "
|
||||
"unsupported element type");
|
||||
result = ISC_R_FAILURE;
|
||||
goto cleanup;
|
||||
}
|
||||
de++;
|
||||
dacl->length++;
|
||||
}
|
||||
|
||||
*target = dacl;
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
cleanup:
|
||||
dns_acl_detach(&dacl);
|
||||
return (result);
|
||||
}
|
230
dist/bind/bin/named/builtin.c
vendored
Normal file
230
dist/bind/bin/named/builtin.c
vendored
Normal file
@ -0,0 +1,230 @@
|
||||
/* $NetBSD: builtin.c,v 1.1.1.1 2004/05/17 23:43:21 christos Exp $ */
|
||||
|
||||
/*
|
||||
* 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);
|
||||
}
|
2354
dist/bind/bin/named/client.c
vendored
Normal file
2354
dist/bind/bin/named/client.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
724
dist/bind/bin/named/config.c
vendored
Normal file
724
dist/bind/bin/named/config.c
vendored
Normal file
@ -0,0 +1,724 @@
|
||||
/* $NetBSD: config.c,v 1.1.1.1 2004/05/17 23:43:21 christos Exp $ */
|
||||
|
||||
/*
|
||||
* 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: config.c,v 1.11.2.4.8.27 2004/04/20 14:12:08 marka Exp */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <isccfg/namedconf.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>
|
||||
|
||||
#include <named/config.h>
|
||||
#include <named/globals.h>
|
||||
|
||||
static char defaultconf[] = "\
|
||||
options {\n\
|
||||
# blackhole {none;};\n"
|
||||
#ifndef WIN32
|
||||
" coresize default;\n\
|
||||
datasize default;\n\
|
||||
files default;\n\
|
||||
stacksize default;\n"
|
||||
#endif
|
||||
" deallocate-on-exit true;\n\
|
||||
# directory <none>\n\
|
||||
dump-file \"named_dump.db\";\n\
|
||||
fake-iquery no;\n\
|
||||
has-old-clients false;\n\
|
||||
heartbeat-interval 60;\n\
|
||||
host-statistics no;\n\
|
||||
interface-interval 60;\n\
|
||||
listen-on {any;};\n\
|
||||
listen-on-v6 {none;};\n\
|
||||
match-mapped-addresses no;\n\
|
||||
memstatistics-file \"named.memstats\";\n\
|
||||
multiple-cnames no;\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
|
||||
"\
|
||||
random-device \"" PATH_RANDOMDEV "\";\n\
|
||||
"
|
||||
#endif
|
||||
"\
|
||||
recursive-clients 1000;\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\
|
||||
transfers-per-ns 2;\n\
|
||||
transfers-in 10;\n\
|
||||
transfers-out 10;\n\
|
||||
treat-cr-as-space true;\n\
|
||||
use-id-pool true;\n\
|
||||
use-ixfr true;\n\
|
||||
edns-udp-size 4096;\n\
|
||||
\n\
|
||||
/* view */\n\
|
||||
allow-notify {none;};\n\
|
||||
allow-update-forwarding {none;};\n\
|
||||
allow-recursion {any;};\n\
|
||||
# allow-v6-synthesis <obsolete>;\n\
|
||||
# sortlist <none>\n\
|
||||
# topology <none>\n\
|
||||
auth-nxdomain false;\n\
|
||||
minimal-responses false;\n\
|
||||
recursion true;\n\
|
||||
provide-ixfr true;\n\
|
||||
request-ixfr true;\n\
|
||||
fetch-glue no;\n\
|
||||
rfc2308-type1 no;\n\
|
||||
additional-from-auth true;\n\
|
||||
additional-from-cache true;\n\
|
||||
query-source address *;\n\
|
||||
query-source-v6 address *;\n\
|
||||
notify-source *;\n\
|
||||
notify-source-v6 *;\n\
|
||||
cleaning-interval 60;\n\
|
||||
min-roots 2;\n\
|
||||
lame-ttl 600;\n\
|
||||
max-ncache-ttl 10800; /* 3 hours */\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 response ignore;\n\
|
||||
dnssec-enable no; /* Make yes for 9.4. */ \n\
|
||||
"
|
||||
|
||||
" /* zone */\n\
|
||||
allow-query {any;};\n\
|
||||
allow-transfer {any;};\n\
|
||||
notify yes;\n\
|
||||
# also-notify <none>\n\
|
||||
dialup no;\n\
|
||||
# forward <none>\n\
|
||||
# forwarders <none>\n\
|
||||
maintain-ixfr-base no;\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\
|
||||
max-transfer-idle-out 60;\n\
|
||||
max-retry-time 1209600; /* 2 weeks */\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 is the count of zones.\n\
|
||||
#\n\
|
||||
view \"_bind\" chaos {\n\
|
||||
recursion 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) {
|
||||
isc_buffer_t b;
|
||||
|
||||
isc_buffer_init(&b, defaultconf, sizeof(defaultconf) - 1);
|
||||
isc_buffer_add(&b, sizeof(defaultconf) - 1);
|
||||
return (cfg_parse_buffer(parser, &b, &cfg_type_namedconf, conf));
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
ns_config_get(cfg_obj_t **maps, const char *name, cfg_obj_t **obj) {
|
||||
int i;
|
||||
|
||||
for (i = 0;; i++) {
|
||||
if (maps[i] == NULL)
|
||||
return (ISC_R_NOTFOUND);
|
||||
if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS)
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
ns_checknames_get(cfg_obj_t **maps, const char *which, cfg_obj_t **obj) {
|
||||
cfg_listelt_t *element;
|
||||
cfg_obj_t *checknames;
|
||||
cfg_obj_t *type;
|
||||
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(cfg_obj_t *list) {
|
||||
cfg_listelt_t *e;
|
||||
int i = 0;
|
||||
|
||||
for (e = cfg_list_first(list); e != NULL; e = cfg_list_next(e))
|
||||
i++;
|
||||
|
||||
return (i);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
ns_config_getclass(cfg_obj_t *classobj, dns_rdataclass_t defclass,
|
||||
dns_rdataclass_t *classp) {
|
||||
char *str;
|
||||
isc_textregion_t r;
|
||||
isc_result_t result;
|
||||
|
||||
if (!cfg_obj_isstring(classobj)) {
|
||||
*classp = defclass;
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
str = cfg_obj_asstring(classobj);
|
||||
r.base = str;
|
||||
r.length = strlen(str);
|
||||
result = dns_rdataclass_fromtext(classp, &r);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
cfg_obj_log(classobj, ns_g_lctx, ISC_LOG_ERROR,
|
||||
"unknown class '%s'", str);
|
||||
return (result);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
ns_config_gettype(cfg_obj_t *typeobj, dns_rdatatype_t deftype,
|
||||
dns_rdatatype_t *typep) {
|
||||
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);
|
||||
r.base = str;
|
||||
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(cfg_obj_t *zonetypeobj) {
|
||||
dns_zonetype_t ztype = dns_zone_none;
|
||||
char *str;
|
||||
|
||||
str = cfg_obj_asstring(zonetypeobj);
|
||||
if (strcasecmp(str, "master") == 0)
|
||||
ztype = dns_zone_master;
|
||||
else if (strcasecmp(str, "slave") == 0)
|
||||
ztype = dns_zone_slave;
|
||||
else if (strcasecmp(str, "stub") == 0)
|
||||
ztype = dns_zone_stub;
|
||||
else
|
||||
INSIST(0);
|
||||
return (ztype);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
ns_config_getiplist(cfg_obj_t *config, cfg_obj_t *list,
|
||||
in_port_t defport, isc_mem_t *mctx,
|
||||
isc_sockaddr_t **addrsp, isc_uint32_t *countp)
|
||||
{
|
||||
int count, i = 0;
|
||||
cfg_obj_t *addrlist;
|
||||
cfg_obj_t *portobj;
|
||||
cfg_listelt_t *element;
|
||||
isc_sockaddr_t *addrs;
|
||||
in_port_t port;
|
||||
isc_result_t result;
|
||||
|
||||
INSIST(addrsp != NULL && *addrsp == NULL);
|
||||
INSIST(countp != NULL);
|
||||
|
||||
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);
|
||||
if (val > ISC_UINT16_MAX) {
|
||||
cfg_obj_log(portobj, ns_g_lctx, ISC_LOG_ERROR,
|
||||
"port '%u' out of range", val);
|
||||
return (ISC_R_RANGE);
|
||||
}
|
||||
port = (in_port_t) val;
|
||||
} else if (defport != 0)
|
||||
port = defport;
|
||||
else {
|
||||
result = ns_config_getport(config, &port);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
|
||||
addrs = isc_mem_get(mctx, count * sizeof(isc_sockaddr_t));
|
||||
if (addrs == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
for (element = cfg_list_first(addrlist);
|
||||
element != NULL;
|
||||
element = cfg_list_next(element), i++)
|
||||
{
|
||||
INSIST(i < count);
|
||||
addrs[i] = *cfg_obj_assockaddr(cfg_listelt_value(element));
|
||||
if (isc_sockaddr_getport(&addrs[i]) == 0)
|
||||
isc_sockaddr_setport(&addrs[i], port);
|
||||
}
|
||||
INSIST(i == count);
|
||||
|
||||
*addrsp = addrs;
|
||||
*countp = count;
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
void
|
||||
ns_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
|
||||
isc_uint32_t count)
|
||||
{
|
||||
INSIST(addrsp != NULL && *addrsp != NULL);
|
||||
|
||||
isc_mem_put(mctx, *addrsp, count * sizeof(isc_sockaddr_t));
|
||||
*addrsp = NULL;
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
get_masters_def(cfg_obj_t *cctx, char *name, cfg_obj_t **ret) {
|
||||
isc_result_t result;
|
||||
cfg_obj_t *masters = NULL;
|
||||
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)) {
|
||||
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(cfg_obj_t *config, 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_result_t result;
|
||||
cfg_listelt_t *element;
|
||||
cfg_obj_t *addrlist;
|
||||
cfg_obj_t *portobj;
|
||||
in_port_t port;
|
||||
dns_fixedname_t fname;
|
||||
isc_sockaddr_t *addrs = NULL;
|
||||
dns_name_t **keys = NULL;
|
||||
char **lists = NULL;
|
||||
struct {
|
||||
cfg_listelt_t *element;
|
||||
in_port_t port;
|
||||
} *stack = NULL;
|
||||
|
||||
REQUIRE(addrsp != NULL && *addrsp == NULL);
|
||||
REQUIRE(keysp != NULL && *keysp == NULL);
|
||||
REQUIRE(countp != NULL);
|
||||
|
||||
newlist:
|
||||
addrlist = cfg_tuple_get(list, "addresses");
|
||||
portobj = cfg_tuple_get(list, "port");
|
||||
if (cfg_obj_isuint32(portobj)) {
|
||||
isc_uint32_t val = cfg_obj_asuint32(portobj);
|
||||
if (val > ISC_UINT16_MAX) {
|
||||
cfg_obj_log(portobj, ns_g_lctx, ISC_LOG_ERROR,
|
||||
"port '%u' out of range", val);
|
||||
return (ISC_R_RANGE);
|
||||
}
|
||||
port = (in_port_t) val;
|
||||
} else {
|
||||
result = ns_config_getport(config, &port);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
|
||||
result = ISC_R_NOMEMORY;
|
||||
|
||||
element = cfg_list_first(addrlist);
|
||||
resume:
|
||||
for ( ;
|
||||
element != NULL;
|
||||
element = cfg_list_next(element))
|
||||
{
|
||||
cfg_obj_t *addr;
|
||||
cfg_obj_t *key;
|
||||
char *keystr;
|
||||
isc_buffer_t b;
|
||||
|
||||
addr = cfg_tuple_get(cfg_listelt_value(element),
|
||||
"masterselement");
|
||||
key = cfg_tuple_get(cfg_listelt_value(element), "key");
|
||||
|
||||
if (!cfg_obj_issockaddr(addr)) {
|
||||
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, newsize);
|
||||
isc_mem_put(mctx, keys, newsize);
|
||||
}
|
||||
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++;
|
||||
continue;
|
||||
}
|
||||
keys[i] = isc_mem_get(mctx, sizeof(dns_name_t));
|
||||
if (keys[i] == NULL)
|
||||
goto cleanup;
|
||||
dns_name_init(keys[i], NULL);
|
||||
|
||||
keystr = cfg_obj_asstring(key);
|
||||
isc_buffer_init(&b, keystr, strlen(keystr));
|
||||
isc_buffer_add(&b, strlen(keystr));
|
||||
dns_fixedname_init(&fname);
|
||||
result = dns_name_fromtext(dns_fixedname_name(&fname), &b,
|
||||
dns_rootname, ISC_FALSE, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
result = dns_name_dup(dns_fixedname_name(&fname), mctx,
|
||||
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);
|
||||
isc_mem_put(mctx, addrs, oldsize);
|
||||
} else
|
||||
new = NULL;
|
||||
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);
|
||||
isc_mem_put(mctx, keys, oldsize);
|
||||
} else
|
||||
new = NULL;
|
||||
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);
|
||||
|
||||
*addrsp = addrs;
|
||||
*keysp = keys;
|
||||
*countp = addrcount;
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
cleanup:
|
||||
if (addrs != NULL)
|
||||
isc_mem_put(mctx, addrs, addrcount * sizeof(isc_sockaddr_t));
|
||||
if (keys != NULL) {
|
||||
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 *));
|
||||
}
|
||||
if (lists != NULL)
|
||||
isc_mem_put(mctx, lists, listcount * sizeof(*lists));
|
||||
if (stack != NULL)
|
||||
isc_mem_put(mctx, stack, stackcount * sizeof(*stack));
|
||||
return (result);
|
||||
}
|
||||
|
||||
void
|
||||
ns_config_putipandkeylist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
|
||||
dns_name_t ***keysp, isc_uint32_t count)
|
||||
{
|
||||
unsigned int i;
|
||||
dns_name_t **keys = *keysp;
|
||||
|
||||
INSIST(addrsp != NULL && *addrsp != NULL);
|
||||
|
||||
isc_mem_put(mctx, *addrsp, count * sizeof(isc_sockaddr_t));
|
||||
for (i = 0; i < count; i++) {
|
||||
if (keys[i] == NULL)
|
||||
continue;
|
||||
if (dns_name_dynamic(keys[i]))
|
||||
dns_name_free(keys[i], mctx);
|
||||
isc_mem_put(mctx, keys[i], sizeof(dns_name_t));
|
||||
}
|
||||
isc_mem_put(mctx, *keysp, count * sizeof(dns_name_t *));
|
||||
*addrsp = NULL;
|
||||
*keysp = NULL;
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
ns_config_getport(cfg_obj_t *config, in_port_t *portp) {
|
||||
cfg_obj_t *maps[3];
|
||||
cfg_obj_t *options = NULL;
|
||||
cfg_obj_t *portobj = NULL;
|
||||
isc_result_t result;
|
||||
int i;
|
||||
|
||||
(void)cfg_map_get(config, "options", &options);
|
||||
i = 0;
|
||||
if (options != NULL)
|
||||
maps[i++] = options;
|
||||
maps[i++] = ns_g_defaults;
|
||||
maps[i] = NULL;
|
||||
|
||||
result = ns_config_get(maps, "port", &portobj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
if (cfg_obj_asuint32(portobj) >= ISC_UINT16_MAX) {
|
||||
cfg_obj_log(portobj, ns_g_lctx, ISC_LOG_ERROR,
|
||||
"port '%u' out of range",
|
||||
cfg_obj_asuint32(portobj));
|
||||
return (ISC_R_RANGE);
|
||||
}
|
||||
*portp = (in_port_t)cfg_obj_asuint32(portobj);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
ns_config_getkeyalgorithm(const char *str, dns_name_t **name)
|
||||
{
|
||||
if (strcasecmp(str, "hmac-md5") == 0 ||
|
||||
strcasecmp(str, "hmac-md5.sig-alg.reg.int") == 0 ||
|
||||
strcasecmp(str, "hmac-md5.sig-alg.reg.int.") == 0)
|
||||
{
|
||||
if (name != NULL)
|
||||
*name = dns_tsig_hmacmd5_name;
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
return (ISC_R_NOTFOUND);
|
||||
}
|
142
dist/bind/bin/named/control.c
vendored
Normal file
142
dist/bind/bin/named/control.c
vendored
Normal file
@ -0,0 +1,142 @@
|
||||
/* $NetBSD: control.c,v 1.1.1.1 2004/05/17 23:43:21 christos Exp $ */
|
||||
|
||||
/*
|
||||
* 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: control.c,v 1.7.2.2.2.10 2004/03/22 01:52:22 marka Exp */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <isc/app.h>
|
||||
#include <isc/event.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/timer.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <isccc/alist.h>
|
||||
#include <isccc/cc.h>
|
||||
#include <isccc/result.h>
|
||||
|
||||
#include <named/control.h>
|
||||
#include <named/log.h>
|
||||
#include <named/os.h>
|
||||
#include <named/server.h>
|
||||
|
||||
static isc_boolean_t
|
||||
command_compare(const char *text, const char *command) {
|
||||
unsigned int commandlen = strlen(command);
|
||||
if (strncasecmp(text, command, commandlen) == 0 &&
|
||||
(text[commandlen] == '\0' ||
|
||||
text[commandlen] == ' ' ||
|
||||
text[commandlen] == '\t'))
|
||||
return (ISC_TRUE);
|
||||
return (ISC_FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is called to process the incoming command
|
||||
* when a control channel message is received.
|
||||
*/
|
||||
isc_result_t
|
||||
ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) {
|
||||
isccc_sexpr_t *data;
|
||||
char *command;
|
||||
isc_result_t result;
|
||||
|
||||
data = isccc_alist_lookup(message, "_data");
|
||||
if (data == NULL) {
|
||||
/*
|
||||
* No data section.
|
||||
*/
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
result = isccc_cc_lookupstring(data, "type", &command);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
/*
|
||||
* We have no idea what this is.
|
||||
*/
|
||||
return (result);
|
||||
}
|
||||
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
|
||||
NS_LOGMODULE_CONTROL, ISC_LOG_DEBUG(1),
|
||||
"received control channel command '%s'",
|
||||
command);
|
||||
|
||||
/*
|
||||
* 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);
|
||||
} 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);
|
||||
} else if (command_compare(command, NS_COMMAND_HALT)) {
|
||||
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)) {
|
||||
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)) {
|
||||
result = ns_server_dumpstats(ns_g_server);
|
||||
} 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);
|
||||
result = ISC_R_SUCCESS;
|
||||
} else if (command_compare(command, NS_COMMAND_TRACE)) {
|
||||
result = ns_server_setdebuglevel(ns_g_server, command);
|
||||
} else if (command_compare(command, NS_COMMAND_NOTRACE)) {
|
||||
ns_g_debuglevel = 0;
|
||||
isc_log_setdebuglevel(ns_g_lctx, ns_g_debuglevel);
|
||||
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)) {
|
||||
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 {
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
|
||||
NS_LOGMODULE_CONTROL, ISC_LOG_WARNING,
|
||||
"unknown control channel command '%s'",
|
||||
command);
|
||||
result = DNS_R_UNKNOWNCOMMAND;
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
1325
dist/bind/bin/named/controlconf.c
vendored
Normal file
1325
dist/bind/bin/named/controlconf.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
74
dist/bind/bin/named/include/named/aclconf.h
vendored
Normal file
74
dist/bind/bin/named/include/named/aclconf.h
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
/* $NetBSD: aclconf.h,v 1.1.1.1 2004/05/17 23:43:24 christos Exp $ */
|
||||
|
||||
/*
|
||||
* 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
|
||||
* 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: aclconf.h,v 1.12.208.1 2004/03/06 10:21:23 marka Exp */
|
||||
|
||||
#ifndef NS_ACLCONF_H
|
||||
#define NS_ACLCONF_H 1
|
||||
|
||||
#include <isc/lang.h>
|
||||
|
||||
#include <isccfg/cfg.h>
|
||||
|
||||
#include <dns/types.h>
|
||||
|
||||
typedef struct ns_aclconfctx {
|
||||
ISC_LIST(dns_acl_t) named_acl_cache;
|
||||
} ns_aclconfctx_t;
|
||||
|
||||
/***
|
||||
*** Functions
|
||||
***/
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
void
|
||||
ns_aclconfctx_init(ns_aclconfctx_t *ctx);
|
||||
/*
|
||||
* Initialize an ACL configuration context.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_aclconfctx_destroy(ns_aclconfctx_t *ctx);
|
||||
/*
|
||||
* Destroy an ACL configuration context.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_acl_fromconfig(cfg_obj_t *caml,
|
||||
cfg_obj_t *cctx,
|
||||
ns_aclconfctx_t *ctx,
|
||||
isc_mem_t *mctx,
|
||||
dns_acl_t **target);
|
||||
/*
|
||||
* Construct a new dns_acl_t from configuration data in 'caml' and
|
||||
* 'cctx'. Memory is allocated through 'mctx'.
|
||||
*
|
||||
* Any named ACLs referred to within 'caml' will be be converted
|
||||
* inte nested dns_acl_t objects. Multiple references to the same
|
||||
* named ACLs will be converted into shared references to a single
|
||||
* nested dns_acl_t object when the referring objects were created
|
||||
* passing the same ACL configuration context 'ctx'.
|
||||
*
|
||||
* On success, attach '*target' to the new dns_acl_t object.
|
||||
*/
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* NS_ACLCONF_H */
|
31
dist/bind/bin/named/include/named/builtin.h
vendored
Normal file
31
dist/bind/bin/named/include/named/builtin.h
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
/* $NetBSD: builtin.h,v 1.1.1.1 2004/05/17 23:43:24 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 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
|
||||
* 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.3 2004/03/08 04:04:20 marka 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 */
|
338
dist/bind/bin/named/include/named/client.h
vendored
Normal file
338
dist/bind/bin/named/include/named/client.h
vendored
Normal file
@ -0,0 +1,338 @@
|
||||
/* $NetBSD: client.h,v 1.1.1.1 2004/05/17 23:43:24 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Id: client.h,v 1.60.2.2.10.7 2004/03/08 04:04:20 marka Exp */
|
||||
|
||||
#ifndef NAMED_CLIENT_H
|
||||
#define NAMED_CLIENT_H 1
|
||||
|
||||
/*****
|
||||
***** Module Info
|
||||
*****/
|
||||
|
||||
/*
|
||||
* Client
|
||||
*
|
||||
* This module defines two objects, ns_client_t and ns_clientmgr_t.
|
||||
*
|
||||
* An ns_client_t object handles incoming DNS requests from clients
|
||||
* on a given network interface.
|
||||
*
|
||||
* Each ns_client_t object can handle only one TCP connection or UDP
|
||||
* request at a time. Therefore, several ns_client_t objects are
|
||||
* typically created to serve each network interface, e.g., one
|
||||
* for handling TCP requests and a few (one per CPU) for handling
|
||||
* UDP requests.
|
||||
*
|
||||
* Incoming requests are classified as queries, zone transfer
|
||||
* requests, update requests, notify requests, etc, and handed off
|
||||
* to the appropriate request handler. When the request has been
|
||||
* fully handled (which can be much later), the ns_client_t must be
|
||||
* notified of this by calling one of the following functions
|
||||
* exactly once in the context of its task:
|
||||
*
|
||||
* ns_client_send() (sending a non-error response)
|
||||
* ns_client_sendraw() (sending a raw response)
|
||||
* ns_client_error() (sending an error response)
|
||||
* ns_client_next() (sending no response)
|
||||
*
|
||||
* This will release any resources used by the request and
|
||||
* and allow the ns_client_t to listen for the next request.
|
||||
*
|
||||
* A ns_clientmgr_t manages a number of ns_client_t objects.
|
||||
* New ns_client_t objects are created by calling
|
||||
* ns_clientmgr_createclients(). They are destroyed by
|
||||
* destroying their manager.
|
||||
*/
|
||||
|
||||
/***
|
||||
*** Imports
|
||||
***/
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/magic.h>
|
||||
#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 <named/types.h>
|
||||
#include <named/query.h>
|
||||
|
||||
/***
|
||||
*** Types
|
||||
***/
|
||||
|
||||
typedef ISC_LIST(ns_client_t) client_list_t;
|
||||
|
||||
struct ns_client {
|
||||
unsigned int magic;
|
||||
isc_mem_t * mctx;
|
||||
ns_clientmgr_t * manager;
|
||||
int state;
|
||||
int newstate;
|
||||
int naccepts;
|
||||
int nreads;
|
||||
int nsends;
|
||||
int nrecvs;
|
||||
int nctls;
|
||||
int references;
|
||||
unsigned int attributes;
|
||||
isc_task_t * task;
|
||||
dns_view_t * view;
|
||||
dns_dispatch_t * dispatch;
|
||||
isc_socket_t * udpsocket;
|
||||
isc_socket_t * tcplistener;
|
||||
isc_socket_t * tcpsocket;
|
||||
unsigned char * tcpbuf;
|
||||
dns_tcpmsg_t tcpmsg;
|
||||
isc_boolean_t tcpmsg_valid;
|
||||
isc_timer_t * timer;
|
||||
isc_boolean_t timerset;
|
||||
dns_message_t * message;
|
||||
isc_socketevent_t * sendevent;
|
||||
isc_socketevent_t * recvevent;
|
||||
unsigned char * recvbuf;
|
||||
dns_rdataset_t * opt;
|
||||
isc_uint16_t udpsize;
|
||||
isc_uint16_t extflags;
|
||||
void (*next)(ns_client_t *);
|
||||
void (*shutdown)(void *arg, isc_result_t result);
|
||||
void *shutdown_arg;
|
||||
ns_query_t query;
|
||||
isc_stdtime_t requesttime;
|
||||
isc_stdtime_t now;
|
||||
dns_name_t signername; /* [T]SIG key name */
|
||||
dns_name_t * signer; /* NULL if not valid sig */
|
||||
isc_boolean_t mortal; /* Die after handling request */
|
||||
isc_quota_t *tcpquota;
|
||||
isc_quota_t *recursionquota;
|
||||
ns_interface_t *interface;
|
||||
isc_sockaddr_t peeraddr;
|
||||
isc_boolean_t peeraddr_valid;
|
||||
struct in6_pktinfo pktinfo;
|
||||
isc_event_t ctlevent;
|
||||
/*
|
||||
* Information about recent FORMERR response(s), for
|
||||
* FORMERR loop avoidance. This is separate for each
|
||||
* client object rather than global only to avoid
|
||||
* the need for locking.
|
||||
*/
|
||||
struct {
|
||||
isc_sockaddr_t addr;
|
||||
isc_stdtime_t time;
|
||||
dns_messageid_t id;
|
||||
} formerrcache;
|
||||
ISC_LINK(ns_client_t) link;
|
||||
/*
|
||||
* The list 'link' is part of, or NULL if not on any list.
|
||||
*/
|
||||
client_list_t *list;
|
||||
};
|
||||
|
||||
#define NS_CLIENT_MAGIC ISC_MAGIC('N','S','C','c')
|
||||
#define NS_CLIENT_VALID(c) ISC_MAGIC_VALID(c, NS_CLIENT_MAGIC)
|
||||
|
||||
#define NS_CLIENTATTR_TCP 0x01
|
||||
#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
|
||||
***/
|
||||
|
||||
/*
|
||||
* Note! These ns_client_ routines MUST be called ONLY from the client's
|
||||
* task in order to ensure synchronization.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_client_send(ns_client_t *client);
|
||||
/*
|
||||
* Finish processing the current client request and
|
||||
* send client->message as a response.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_client_sendraw(ns_client_t *client, dns_message_t *msg);
|
||||
/*
|
||||
* Finish processing the current client request and
|
||||
* send msg as a response using client->message->id for the id.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_client_error(ns_client_t *client, isc_result_t result);
|
||||
/*
|
||||
* Finish processing the current client request and return
|
||||
* an error response to the client. The error response
|
||||
* will have an RCODE determined by 'result'.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_client_next(ns_client_t *client, isc_result_t result);
|
||||
/*
|
||||
* Finish processing the current client request,
|
||||
* return no response to the client.
|
||||
*/
|
||||
|
||||
isc_boolean_t
|
||||
ns_client_shuttingdown(ns_client_t *client);
|
||||
/*
|
||||
* Return ISC_TRUE iff the client is currently shutting down.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_client_attach(ns_client_t *source, ns_client_t **target);
|
||||
/*
|
||||
* Attach '*targetp' to 'source'.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_client_detach(ns_client_t **clientp);
|
||||
/*
|
||||
* Detach '*clientp' from its client.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_client_replace(ns_client_t *client);
|
||||
/*
|
||||
* Try to replace the current client with a new one, so that the
|
||||
* current one can go off and do some lengthy work without
|
||||
* leaving the dispatch/socket without service.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_client_settimeout(ns_client_t *client, unsigned int seconds);
|
||||
/*
|
||||
* Set a timer in the client to go off in the specified amount of time.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_clientmgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
|
||||
isc_timermgr_t *timermgr, ns_clientmgr_t **managerp);
|
||||
/*
|
||||
* Create a client manager.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_clientmgr_destroy(ns_clientmgr_t **managerp);
|
||||
/*
|
||||
* Destroy a client manager and all ns_client_t objects
|
||||
* managed by it.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_clientmgr_createclients(ns_clientmgr_t *manager, unsigned int n,
|
||||
ns_interface_t *ifp, isc_boolean_t tcp);
|
||||
/*
|
||||
* Create up to 'n' clients listening on interface 'ifp'.
|
||||
* If 'tcp' is ISC_TRUE, the clients will listen for TCP connections,
|
||||
* otherwise for UDP requests.
|
||||
*/
|
||||
|
||||
isc_sockaddr_t *
|
||||
ns_client_getsockaddr(ns_client_t *client);
|
||||
/*
|
||||
* Get the socket address of the client whose request is
|
||||
* currently being processed.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_client_checkaclsilent(ns_client_t *client,dns_acl_t *acl,
|
||||
isc_boolean_t default_allow);
|
||||
|
||||
/*
|
||||
* Convenience function for client request ACL checking.
|
||||
*
|
||||
* Check the current client request against 'acl'. If 'acl'
|
||||
* is NULL, allow the request iff 'default_allow' is ISC_TRUE.
|
||||
*
|
||||
* Notes:
|
||||
* This is appropriate for checking allow-update,
|
||||
* allow-query, allow-transfer, etc. It is not appropriate
|
||||
* for checking the blackhole list because we treat positive
|
||||
* matches as "allow" and negative matches as "deny"; in
|
||||
* the case of the blackhole list this would be backwards.
|
||||
*
|
||||
* Requires:
|
||||
* 'client' points to a valid client.
|
||||
* 'acl' points to a valid ACL, or is NULL.
|
||||
*
|
||||
* Returns:
|
||||
* ISC_R_SUCCESS if the request should be allowed
|
||||
* ISC_R_REFUSED if the request should be denied
|
||||
* No other return values are possible.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_client_checkacl(ns_client_t *client,
|
||||
const char *opname, dns_acl_t *acl,
|
||||
isc_boolean_t default_allow,
|
||||
int log_level);
|
||||
/*
|
||||
* Like ns_client_checkacl, but also logs the outcome of the
|
||||
* check at log level 'log_level' if denied, and at debug 3
|
||||
* if approved. Log messages will refer to the request as
|
||||
* an 'opname' request.
|
||||
*
|
||||
* Requires:
|
||||
* Those of ns_client_checkaclsilent(), and:
|
||||
*
|
||||
* 'opname' points to a null-terminated string.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_client_log(ns_client_t *client, isc_logcategory_t *category,
|
||||
isc_logmodule_t *module, int level,
|
||||
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, isc_boolean_t killoldest);
|
||||
/*
|
||||
* Add client to end of recursing list. If 'killoldest' is true
|
||||
* kill the oldest recursive client (list head).
|
||||
*/
|
||||
|
||||
void
|
||||
ns_client_dumprecursing(FILE *f, ns_clientmgr_t *manager);
|
||||
/*
|
||||
* Dump the outstanding recursive queries to 'f'.
|
||||
*/
|
||||
|
||||
#endif /* NAMED_CLIENT_H */
|
77
dist/bind/bin/named/include/named/config.h
vendored
Normal file
77
dist/bind/bin/named/include/named/config.h
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
/* $NetBSD: config.h,v 1.1.1.1 2004/05/17 23:43:24 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 2001, 2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Id: config.h,v 1.4.12.4 2004/04/20 14:12:10 marka Exp */
|
||||
|
||||
#ifndef NAMED_CONFIG_H
|
||||
#define NAMED_CONFIG_H 1
|
||||
|
||||
#include <isccfg/cfg.h>
|
||||
|
||||
#include <dns/types.h>
|
||||
#include <dns/zone.h>
|
||||
|
||||
isc_result_t
|
||||
ns_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf);
|
||||
|
||||
isc_result_t
|
||||
ns_config_get(cfg_obj_t **maps, const char* name, cfg_obj_t **obj);
|
||||
|
||||
isc_result_t
|
||||
ns_checknames_get(cfg_obj_t **maps, const char* name, cfg_obj_t **obj);
|
||||
|
||||
int
|
||||
ns_config_listcount(cfg_obj_t *list);
|
||||
|
||||
isc_result_t
|
||||
ns_config_getclass(cfg_obj_t *classobj, dns_rdataclass_t defclass,
|
||||
dns_rdataclass_t *classp);
|
||||
|
||||
isc_result_t
|
||||
ns_config_gettype(cfg_obj_t *typeobj, dns_rdatatype_t deftype,
|
||||
dns_rdatatype_t *typep);
|
||||
|
||||
dns_zonetype_t
|
||||
ns_config_getzonetype(cfg_obj_t *zonetypeobj);
|
||||
|
||||
isc_result_t
|
||||
ns_config_getiplist(cfg_obj_t *config, cfg_obj_t *list,
|
||||
in_port_t defport, isc_mem_t *mctx,
|
||||
isc_sockaddr_t **addrsp, isc_uint32_t *countp);
|
||||
|
||||
void
|
||||
ns_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
|
||||
isc_uint32_t count);
|
||||
|
||||
isc_result_t
|
||||
ns_config_getipandkeylist(cfg_obj_t *config, cfg_obj_t *list, isc_mem_t *mctx,
|
||||
isc_sockaddr_t **addrsp, dns_name_t ***keys,
|
||||
isc_uint32_t *countp);
|
||||
|
||||
void
|
||||
ns_config_putipandkeylist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
|
||||
dns_name_t ***keys, isc_uint32_t count);
|
||||
|
||||
isc_result_t
|
||||
ns_config_getport(cfg_obj_t *config, in_port_t *portp);
|
||||
|
||||
isc_result_t
|
||||
ns_config_getkeyalgorithm(const char *str, dns_name_t **name);
|
||||
|
||||
#endif /* NAMED_CONFIG_H */
|
89
dist/bind/bin/named/include/named/control.h
vendored
Normal file
89
dist/bind/bin/named/include/named/control.h
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
/* $NetBSD: control.h,v 1.1.1.1 2004/05/17 23:43:24 christos Exp $ */
|
||||
|
||||
/*
|
||||
* 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: control.h,v 1.6.2.2.2.6 2004/03/08 04:04:20 marka Exp */
|
||||
|
||||
#ifndef NAMED_CONTROL_H
|
||||
#define NAMED_CONTROL_H 1
|
||||
|
||||
/*
|
||||
* The name server command channel.
|
||||
*/
|
||||
|
||||
#include <isccc/types.h>
|
||||
|
||||
#include <named/aclconf.h>
|
||||
#include <named/types.h>
|
||||
|
||||
#define NS_CONTROL_PORT 953
|
||||
|
||||
#define NS_COMMAND_STOP "stop"
|
||||
#define NS_COMMAND_HALT "halt"
|
||||
#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_RECURSING "recursing"
|
||||
#define NS_COMMAND_NULL "null"
|
||||
|
||||
isc_result_t
|
||||
ns_controls_create(ns_server_t *server, ns_controls_t **ctrlsp);
|
||||
/*
|
||||
* Create an initial, empty set of command channels for 'server'.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_controls_destroy(ns_controls_t **ctrlsp);
|
||||
/*
|
||||
* Destroy a set of command channels.
|
||||
*
|
||||
* Requires:
|
||||
* Shutdown of the channels has completed.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_controls_configure(ns_controls_t *controls, cfg_obj_t *config,
|
||||
ns_aclconfctx_t *aclconfctx);
|
||||
/*
|
||||
* Configure zero or more command channels into 'controls'
|
||||
* as defined in the configuration parse tree 'config'.
|
||||
* The channels will evaluate ACLs in the context of
|
||||
* 'aclconfctx'.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_controls_shutdown(ns_controls_t *controls);
|
||||
/*
|
||||
* Initiate shutdown of all the command channels in 'controls'.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text);
|
||||
|
||||
#endif /* NAMED_CONTROL_H */
|
120
dist/bind/bin/named/include/named/globals.h
vendored
Normal file
120
dist/bind/bin/named/include/named/globals.h
vendored
Normal file
@ -0,0 +1,120 @@
|
||||
/* $NetBSD: globals.h,v 1.1.1.1 2004/05/17 23:43:24 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2003 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Id: globals.h,v 1.59.68.5 2004/03/08 04:04:20 marka Exp */
|
||||
|
||||
#ifndef NAMED_GLOBALS_H
|
||||
#define NAMED_GLOBALS_H 1
|
||||
|
||||
#include <isc/rwlock.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/net.h>
|
||||
|
||||
#include <isccfg/cfg.h>
|
||||
|
||||
#include <dns/zone.h>
|
||||
|
||||
#include <named/types.h>
|
||||
|
||||
#undef EXTERN
|
||||
#undef INIT
|
||||
#ifdef NS_MAIN
|
||||
#define EXTERN
|
||||
#define INIT(v) = (v)
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#define INIT(v)
|
||||
#endif
|
||||
|
||||
EXTERN isc_mem_t * ns_g_mctx INIT(NULL);
|
||||
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
|
||||
* for zone timers.
|
||||
*/
|
||||
EXTERN isc_timermgr_t * ns_g_timermgr INIT(NULL);
|
||||
EXTERN isc_socketmgr_t * ns_g_socketmgr INIT(NULL);
|
||||
EXTERN cfg_parser_t * ns_g_parser INIT(NULL);
|
||||
EXTERN const char * ns_g_version INIT(VERSION);
|
||||
EXTERN in_port_t ns_g_port INIT(0);
|
||||
EXTERN in_port_t lwresd_g_listenport INIT(0);
|
||||
|
||||
EXTERN ns_server_t * ns_g_server INIT(NULL);
|
||||
|
||||
EXTERN isc_boolean_t ns_g_lwresdonly INIT(ISC_FALSE);
|
||||
|
||||
/*
|
||||
* Logging.
|
||||
*/
|
||||
EXTERN isc_log_t * ns_g_lctx INIT(NULL);
|
||||
EXTERN isc_logcategory_t * ns_g_categories INIT(NULL);
|
||||
EXTERN isc_logmodule_t * ns_g_modules INIT(NULL);
|
||||
EXTERN unsigned int ns_g_debuglevel INIT(0);
|
||||
|
||||
/*
|
||||
* Current configuration information.
|
||||
*/
|
||||
EXTERN cfg_obj_t * ns_g_config INIT(NULL);
|
||||
EXTERN cfg_obj_t * ns_g_defaults INIT(NULL);
|
||||
EXTERN const char * ns_g_conffile INIT(NS_SYSCONFDIR
|
||||
"/named.conf");
|
||||
EXTERN const char * ns_g_keyfile INIT(NS_SYSCONFDIR
|
||||
"/rndc.key");
|
||||
EXTERN const char * lwresd_g_conffile INIT(NS_SYSCONFDIR
|
||||
"/lwresd.conf");
|
||||
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.
|
||||
*/
|
||||
EXTERN isc_resourcevalue_t ns_g_initstacksize INIT(0);
|
||||
EXTERN isc_resourcevalue_t ns_g_initdatasize INIT(0);
|
||||
EXTERN isc_resourcevalue_t ns_g_initcoresize INIT(0);
|
||||
EXTERN isc_resourcevalue_t ns_g_initopenfiles INIT(0);
|
||||
|
||||
/*
|
||||
* Misc.
|
||||
*/
|
||||
EXTERN isc_boolean_t ns_g_coreok INIT(ISC_TRUE);
|
||||
EXTERN const char * ns_g_chrootdir INIT(NULL);
|
||||
EXTERN isc_boolean_t ns_g_foreground INIT(ISC_FALSE);
|
||||
EXTERN isc_boolean_t ns_g_logstderr INIT(ISC_FALSE);
|
||||
|
||||
EXTERN const char * ns_g_defaultpidfile INIT(NS_LOCALSTATEDIR
|
||||
"/run/named.pid");
|
||||
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
|
||||
|
||||
#endif /* NAMED_GLOBALS_H */
|
175
dist/bind/bin/named/include/named/interfacemgr.h
vendored
Normal file
175
dist/bind/bin/named/include/named/interfacemgr.h
vendored
Normal file
@ -0,0 +1,175 @@
|
||||
/* $NetBSD: interfacemgr.h,v 1.1.1.1 2004/05/17 23:43:24 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Id: interfacemgr.h,v 1.23.24.7 2004/04/29 01:31:22 marka Exp */
|
||||
|
||||
#ifndef NAMED_INTERFACEMGR_H
|
||||
#define NAMED_INTERFACEMGR_H 1
|
||||
|
||||
/*****
|
||||
***** Module Info
|
||||
*****/
|
||||
|
||||
/*
|
||||
* Interface manager
|
||||
*
|
||||
* The interface manager monitors the operating system's list
|
||||
* of network interfaces, creating and destroying listeners
|
||||
* as needed.
|
||||
*
|
||||
* Reliability:
|
||||
* No impact expected.
|
||||
*
|
||||
* Resources:
|
||||
*
|
||||
* Security:
|
||||
* The server will only be able to bind to the DNS port on
|
||||
* newly discovered interfaces if it is running as root.
|
||||
*
|
||||
* Standards:
|
||||
* The API for scanning varies greatly among operating systems.
|
||||
* This module attempts to hide the differences.
|
||||
*/
|
||||
|
||||
/***
|
||||
*** Imports
|
||||
***/
|
||||
|
||||
#include <isc/magic.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/socket.h>
|
||||
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <named/listenlist.h>
|
||||
#include <named/types.h>
|
||||
|
||||
/***
|
||||
*** Types
|
||||
***/
|
||||
|
||||
#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. */
|
||||
isc_mutex_t lock;
|
||||
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. */
|
||||
int ntcptarget; /* Desired number of concurrent
|
||||
TCP accepts */
|
||||
int ntcpcurrent; /* Current ditto, locked */
|
||||
ns_clientmgr_t * clientmgr; /* Client manager. */
|
||||
ISC_LINK(ns_interface_t) link;
|
||||
};
|
||||
|
||||
/***
|
||||
*** Functions
|
||||
***/
|
||||
|
||||
isc_result_t
|
||||
ns_interfacemgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
|
||||
isc_socketmgr_t *socketmgr,
|
||||
dns_dispatchmgr_t *dispatchmgr,
|
||||
ns_interfacemgr_t **mgrp);
|
||||
/*
|
||||
* Create a new interface manager.
|
||||
*
|
||||
* Initially, the new manager will not listen on any interfaces.
|
||||
* Call ns_interfacemgr_setlistenon() and/or ns_interfacemgr_setlistenon6()
|
||||
* to set nonempty listen-on lists.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_interfacemgr_attach(ns_interfacemgr_t *source, ns_interfacemgr_t **target);
|
||||
|
||||
void
|
||||
ns_interfacemgr_detach(ns_interfacemgr_t **targetp);
|
||||
|
||||
void
|
||||
ns_interfacemgr_shutdown(ns_interfacemgr_t *mgr);
|
||||
|
||||
void
|
||||
ns_interfacemgr_scan(ns_interfacemgr_t *mgr, isc_boolean_t verbose);
|
||||
/*
|
||||
* Scan the operatings system's list of network interfaces
|
||||
* and create listeners when new interfaces are discovered.
|
||||
* Shut down the sockets for interfaces that go away.
|
||||
*
|
||||
* This should be called once on server startup and then
|
||||
* periodically according to the 'interface-interval' option
|
||||
* 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);
|
||||
/*
|
||||
* Set the IPv4 "listen-on" list of 'mgr' to 'value'.
|
||||
* The previous IPv4 listen-on list is freed.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_interfacemgr_setlistenon6(ns_interfacemgr_t *mgr, ns_listenlist_t *value);
|
||||
/*
|
||||
* Set the IPv6 "listen-on" list of 'mgr' to 'value'.
|
||||
* The previous IPv6 listen-on list is freed.
|
||||
*/
|
||||
|
||||
dns_aclenv_t *
|
||||
ns_interfacemgr_getaclenv(ns_interfacemgr_t *mgr);
|
||||
|
||||
void
|
||||
ns_interface_attach(ns_interface_t *source, ns_interface_t **target);
|
||||
|
||||
void
|
||||
ns_interface_detach(ns_interface_t **targetp);
|
||||
|
||||
void
|
||||
ns_interface_shutdown(ns_interface_t *ifp);
|
||||
/*
|
||||
* Stop listening for queries on interface 'ifp'.
|
||||
* May safely be called multiple times.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_interfacemgr_dumprecursing(FILE *f, ns_interfacemgr_t *mgr);
|
||||
|
||||
#endif /* NAMED_INTERFACEMGR_H */
|
106
dist/bind/bin/named/include/named/listenlist.h
vendored
Normal file
106
dist/bind/bin/named/include/named/listenlist.h
vendored
Normal file
@ -0,0 +1,106 @@
|
||||
/* $NetBSD: listenlist.h,v 1.1.1.1 2004/05/17 23:43:24 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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
|
||||
* 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: listenlist.h,v 1.10.208.1 2004/03/06 10:21:24 marka Exp */
|
||||
|
||||
#ifndef NAMED_LISTENLIST_H
|
||||
#define NAMED_LISTENLIST_H 1
|
||||
|
||||
/*****
|
||||
***** Module Info
|
||||
*****/
|
||||
|
||||
/*
|
||||
* "Listen lists", as in the "listen-on" configuration statement.
|
||||
*/
|
||||
|
||||
/***
|
||||
*** Imports
|
||||
***/
|
||||
#include <isc/net.h>
|
||||
|
||||
#include <dns/types.h>
|
||||
|
||||
/***
|
||||
*** Types
|
||||
***/
|
||||
|
||||
typedef struct ns_listenelt ns_listenelt_t;
|
||||
typedef struct ns_listenlist ns_listenlist_t;
|
||||
|
||||
struct ns_listenelt {
|
||||
isc_mem_t * mctx;
|
||||
in_port_t port;
|
||||
dns_acl_t * acl;
|
||||
ISC_LINK(ns_listenelt_t) link;
|
||||
};
|
||||
|
||||
struct ns_listenlist {
|
||||
isc_mem_t * mctx;
|
||||
int refcount;
|
||||
ISC_LIST(ns_listenelt_t) elts;
|
||||
};
|
||||
|
||||
/***
|
||||
*** Functions
|
||||
***/
|
||||
|
||||
isc_result_t
|
||||
ns_listenelt_create(isc_mem_t *mctx, in_port_t port,
|
||||
dns_acl_t *acl, ns_listenelt_t **target);
|
||||
/*
|
||||
* Create a listen-on list element.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_listenelt_destroy(ns_listenelt_t *elt);
|
||||
/*
|
||||
* Destroy a listen-on list element.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_listenlist_create(isc_mem_t *mctx, ns_listenlist_t **target);
|
||||
/*
|
||||
* Create a new, empty listen-on list.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_listenlist_attach(ns_listenlist_t *source, ns_listenlist_t **target);
|
||||
/*
|
||||
* Attach '*target' to '*source'.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_listenlist_detach(ns_listenlist_t **listp);
|
||||
/*
|
||||
* Detach 'listp'.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_listenlist_default(isc_mem_t *mctx, in_port_t port,
|
||||
isc_boolean_t enabled, ns_listenlist_t **target);
|
||||
/*
|
||||
* Create a listen-on list with default contents, matching
|
||||
* all addresses with port 'port' (if 'enabled' is ISC_TRUE),
|
||||
* or no addresses (if 'enabled' is ISC_FALSE).
|
||||
*/
|
||||
|
||||
#endif /* NAMED_LISTENLIST_H */
|
||||
|
||||
|
98
dist/bind/bin/named/include/named/log.h
vendored
Normal file
98
dist/bind/bin/named/include/named/log.h
vendored
Normal file
@ -0,0 +1,98 @@
|
||||
/* $NetBSD: log.h,v 1.1.1.1 2004/05/17 23:43:24 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Id: log.h,v 1.19.12.3 2004/03/08 04:04:21 marka Exp */
|
||||
|
||||
#ifndef NAMED_LOG_H
|
||||
#define NAMED_LOG_H 1
|
||||
|
||||
#include <isc/log.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
#include <dns/log.h>
|
||||
|
||||
#include <named/globals.h> /* Required for ns_g_(categories|modules). */
|
||||
|
||||
/* Unused slot 0. */
|
||||
#define NS_LOGCATEGORY_CLIENT (&ns_g_categories[1])
|
||||
#define NS_LOGCATEGORY_NETWORK (&ns_g_categories[2])
|
||||
#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.
|
||||
*/
|
||||
#define NS_LOGCATEGORY_GENERAL ISC_LOGCATEGORY_GENERAL
|
||||
|
||||
#define NS_LOGMODULE_MAIN (&ns_g_modules[0])
|
||||
#define NS_LOGMODULE_CLIENT (&ns_g_modules[1])
|
||||
#define NS_LOGMODULE_SERVER (&ns_g_modules[2])
|
||||
#define NS_LOGMODULE_QUERY (&ns_g_modules[3])
|
||||
#define NS_LOGMODULE_INTERFACEMGR (&ns_g_modules[4])
|
||||
#define NS_LOGMODULE_UPDATE (&ns_g_modules[5])
|
||||
#define NS_LOGMODULE_XFER_IN (&ns_g_modules[6])
|
||||
#define NS_LOGMODULE_XFER_OUT (&ns_g_modules[7])
|
||||
#define NS_LOGMODULE_NOTIFY (&ns_g_modules[8])
|
||||
#define NS_LOGMODULE_CONTROL (&ns_g_modules[9])
|
||||
#define NS_LOGMODULE_LWRESD (&ns_g_modules[10])
|
||||
|
||||
isc_result_t
|
||||
ns_log_init(isc_boolean_t safe);
|
||||
/*
|
||||
* Initialize the logging system and set up an initial default
|
||||
* logging default configuration that will be used until the
|
||||
* config file has been read.
|
||||
*
|
||||
* If 'safe' is true, use a default configuration that refrains
|
||||
* from opening files. This is to avoid creating log files
|
||||
* as root.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_log_setdefaultchannels(isc_logconfig_t *lcfg);
|
||||
/*
|
||||
* Set up logging channels according to the named defaults, which
|
||||
* may differ from the logging library defaults. Currently,
|
||||
* this just means setting up default_debug.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_log_setsafechannels(isc_logconfig_t *lcfg);
|
||||
/*
|
||||
* Like ns_log_setdefaultchannels(), but omits any logging to files.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_log_setdefaultcategory(isc_logconfig_t *lcfg);
|
||||
/*
|
||||
* Set up "category default" to go to the right places.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_log_setunmatchedcategory(isc_logconfig_t *lcfg);
|
||||
/*
|
||||
* Set up "category unmatched" to go to the right places.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_log_shutdown(void);
|
||||
|
||||
#endif /* NAMED_LOG_H */
|
34
dist/bind/bin/named/include/named/logconf.h
vendored
Normal file
34
dist/bind/bin/named/include/named/logconf.h
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
/* $NetBSD: logconf.h,v 1.1.1.1 2004/05/17 23:43:24 christos Exp $ */
|
||||
|
||||
/*
|
||||
* 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
|
||||
* 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: logconf.h,v 1.10.208.1 2004/03/06 10:21:24 marka Exp */
|
||||
|
||||
#ifndef NAMED_LOGCONF_H
|
||||
#define NAMED_LOGCONF_H 1
|
||||
|
||||
#include <isc/log.h>
|
||||
|
||||
isc_result_t
|
||||
ns_log_configure(isc_logconfig_t *logconf, cfg_obj_t *logstmt);
|
||||
/*
|
||||
* Set up the logging configuration in '*logconf' according to
|
||||
* the named.conf data in 'logstmt'.
|
||||
*/
|
||||
|
||||
#endif /* NAMED_LOGCONF_H */
|
36
dist/bind/bin/named/include/named/lwaddr.h
vendored
Normal file
36
dist/bind/bin/named/include/named/lwaddr.h
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
/* $NetBSD: lwaddr.h,v 1.1.1.1 2004/05/17 23:43:24 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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
|
||||
* 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: lwaddr.h,v 1.3.208.1 2004/03/06 10:21:24 marka Exp */
|
||||
|
||||
#include <lwres/lwres.h>
|
||||
#include <lwres/net.h>
|
||||
|
||||
isc_result_t
|
||||
lwaddr_netaddr_fromlwresaddr(isc_netaddr_t *na, lwres_addr_t *la);
|
||||
|
||||
isc_result_t
|
||||
lwaddr_sockaddr_fromlwresaddr(isc_sockaddr_t *sa, lwres_addr_t *la,
|
||||
in_port_t port);
|
||||
|
||||
isc_result_t
|
||||
lwaddr_lwresaddr_fromnetaddr(lwres_addr_t *la, isc_netaddr_t *na);
|
||||
|
||||
isc_result_t
|
||||
lwaddr_lwresaddr_fromsockaddr(lwres_addr_t *la, isc_sockaddr_t *sa);
|
232
dist/bind/bin/named/include/named/lwdclient.h
vendored
Normal file
232
dist/bind/bin/named/include/named/lwdclient.h
vendored
Normal file
@ -0,0 +1,232 @@
|
||||
/* $NetBSD: lwdclient.h,v 1.1.1.1 2004/05/17 23:43:25 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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
|
||||
* 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: lwdclient.h,v 1.13.208.1 2004/03/06 10:21:24 marka Exp */
|
||||
|
||||
#ifndef NAMED_LWDCLIENT_H
|
||||
#define NAMED_LWDCLIENT_H 1
|
||||
|
||||
#include <isc/event.h>
|
||||
#include <isc/eventclass.h>
|
||||
#include <isc/netaddr.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/types.h>
|
||||
|
||||
#include <lwres/lwres.h>
|
||||
|
||||
#include <named/lwsearch.h>
|
||||
|
||||
#define LWRD_EVENTCLASS ISC_EVENTCLASS(4242)
|
||||
|
||||
#define LWRD_SHUTDOWN (LWRD_EVENTCLASS + 0x0001)
|
||||
|
||||
struct ns_lwdclient {
|
||||
isc_sockaddr_t address; /* where to reply */
|
||||
struct in6_pktinfo pktinfo;
|
||||
isc_boolean_t pktinfo_valid;
|
||||
ns_lwdclientmgr_t *clientmgr; /* our parent */
|
||||
ISC_LINK(ns_lwdclient_t) link;
|
||||
unsigned int state;
|
||||
void *arg; /* packet processing state */
|
||||
|
||||
/*
|
||||
* Received data info.
|
||||
*/
|
||||
unsigned char buffer[LWRES_RECVLENGTH]; /* receive buffer */
|
||||
isc_uint32_t recvlength; /* length recv'd */
|
||||
lwres_lwpacket_t pkt;
|
||||
|
||||
/*
|
||||
* Send data state. If sendbuf != buffer (that is, the send buffer
|
||||
* isn't our receive buffer) it will be freed to the lwres_context_t.
|
||||
*/
|
||||
unsigned char *sendbuf;
|
||||
isc_uint32_t sendlength;
|
||||
isc_buffer_t recv_buffer;
|
||||
|
||||
/*
|
||||
* gabn (get address by name) state info.
|
||||
*/
|
||||
dns_adbfind_t *find;
|
||||
dns_adbfind_t *v4find;
|
||||
dns_adbfind_t *v6find;
|
||||
unsigned int find_wanted; /* Addresses we want */
|
||||
dns_fixedname_t query_name;
|
||||
dns_fixedname_t target_name;
|
||||
ns_lwsearchctx_t searchctx;
|
||||
lwres_gabnresponse_t gabn;
|
||||
|
||||
/*
|
||||
* gnba (get name by address) state info.
|
||||
*/
|
||||
lwres_gnbaresponse_t gnba;
|
||||
dns_byaddr_t *byaddr;
|
||||
unsigned int options;
|
||||
isc_netaddr_t na;
|
||||
|
||||
/*
|
||||
* grbn (get rrset by name) state info.
|
||||
*
|
||||
* Note: this also uses target_name and searchctx.
|
||||
*/
|
||||
lwres_grbnresponse_t grbn;
|
||||
dns_lookup_t *lookup;
|
||||
dns_rdatatype_t rdtype;
|
||||
|
||||
/*
|
||||
* Alias and address info. This is copied up to the gabn/gnba
|
||||
* structures eventually.
|
||||
*
|
||||
* XXXMLG We can keep all of this in a client since we only service
|
||||
* three packet types right now. If we started handling more,
|
||||
* we'd need to use "arg" above and allocate/destroy things.
|
||||
*/
|
||||
char *aliases[LWRES_MAX_ALIASES];
|
||||
isc_uint16_t aliaslen[LWRES_MAX_ALIASES];
|
||||
lwres_addr_t addrs[LWRES_MAX_ADDRS];
|
||||
};
|
||||
|
||||
/*
|
||||
* Client states.
|
||||
*
|
||||
* _IDLE The client is not doing anything at all.
|
||||
*
|
||||
* _RECV The client is waiting for data after issuing a socket recv().
|
||||
*
|
||||
* _RECVDONE Data has been received, and is being processed.
|
||||
*
|
||||
* _FINDWAIT An adb (or other) request was made that cannot be satisfied
|
||||
* immediately. An event will wake the client up.
|
||||
*
|
||||
* _SEND All data for a response has completed, and a reply was
|
||||
* sent via a socket send() call.
|
||||
*
|
||||
* Badly formatted state table:
|
||||
*
|
||||
* IDLE -> RECV when client has a recv() queued.
|
||||
*
|
||||
* RECV -> RECVDONE when recvdone event received.
|
||||
*
|
||||
* RECVDONE -> SEND if the data for a reply is at hand.
|
||||
* RECVDONE -> FINDWAIT if more searching is needed, and events will
|
||||
* eventually wake us up again.
|
||||
*
|
||||
* FINDWAIT -> SEND when enough data was received to reply.
|
||||
*
|
||||
* SEND -> IDLE when a senddone event was received.
|
||||
*
|
||||
* At any time -> IDLE on error. Sometimes this will be -> SEND
|
||||
* instead, if enough data is on hand to reply with a meaningful
|
||||
* error.
|
||||
*
|
||||
* Packets which are badly formatted may or may not get error returns.
|
||||
*/
|
||||
#define NS_LWDCLIENT_STATEIDLE 1
|
||||
#define NS_LWDCLIENT_STATERECV 2
|
||||
#define NS_LWDCLIENT_STATERECVDONE 3
|
||||
#define NS_LWDCLIENT_STATEFINDWAIT 4
|
||||
#define NS_LWDCLIENT_STATESEND 5
|
||||
#define NS_LWDCLIENT_STATESENDDONE 6
|
||||
|
||||
#define NS_LWDCLIENT_ISIDLE(c) \
|
||||
((c)->state == NS_LWDCLIENT_STATEIDLE)
|
||||
#define NS_LWDCLIENT_ISRECV(c) \
|
||||
((c)->state == NS_LWDCLIENT_STATERECV)
|
||||
#define NS_LWDCLIENT_ISRECVDONE(c) \
|
||||
((c)->state == NS_LWDCLIENT_STATERECVDONE)
|
||||
#define NS_LWDCLIENT_ISFINDWAIT(c) \
|
||||
((c)->state == NS_LWDCLIENT_STATEFINDWAIT)
|
||||
#define NS_LWDCLIENT_ISSEND(c) \
|
||||
((c)->state == NS_LWDCLIENT_STATESEND)
|
||||
|
||||
/*
|
||||
* Overall magic test that means we're not idle.
|
||||
*/
|
||||
#define NS_LWDCLIENT_ISRUNNING(c) (!NS_LWDCLIENT_ISIDLE(c))
|
||||
|
||||
#define NS_LWDCLIENT_SETIDLE(c) \
|
||||
((c)->state = NS_LWDCLIENT_STATEIDLE)
|
||||
#define NS_LWDCLIENT_SETRECV(c) \
|
||||
((c)->state = NS_LWDCLIENT_STATERECV)
|
||||
#define NS_LWDCLIENT_SETRECVDONE(c) \
|
||||
((c)->state = NS_LWDCLIENT_STATERECVDONE)
|
||||
#define NS_LWDCLIENT_SETFINDWAIT(c) \
|
||||
((c)->state = NS_LWDCLIENT_STATEFINDWAIT)
|
||||
#define NS_LWDCLIENT_SETSEND(c) \
|
||||
((c)->state = NS_LWDCLIENT_STATESEND)
|
||||
#define NS_LWDCLIENT_SETSENDDONE(c) \
|
||||
((c)->state = NS_LWDCLIENT_STATESENDDONE)
|
||||
|
||||
struct ns_lwdclientmgr {
|
||||
ns_lwreslistener_t *listener;
|
||||
isc_mem_t *mctx;
|
||||
isc_socket_t *sock; /* socket to use */
|
||||
dns_view_t *view;
|
||||
lwres_context_t *lwctx; /* lightweight proto context */
|
||||
isc_task_t *task; /* owning task */
|
||||
unsigned int flags;
|
||||
ISC_LINK(ns_lwdclientmgr_t) link;
|
||||
ISC_LIST(ns_lwdclient_t) idle; /* idle client slots */
|
||||
ISC_LIST(ns_lwdclient_t) running; /* running clients */
|
||||
};
|
||||
|
||||
#define NS_LWDCLIENTMGR_FLAGRECVPENDING 0x00000001
|
||||
#define NS_LWDCLIENTMGR_FLAGSHUTTINGDOWN 0x00000002
|
||||
|
||||
isc_result_t
|
||||
ns_lwdclientmgr_create(ns_lwreslistener_t *, unsigned int, isc_taskmgr_t *);
|
||||
|
||||
void
|
||||
ns_lwdclient_initialize(ns_lwdclient_t *, ns_lwdclientmgr_t *);
|
||||
|
||||
isc_result_t
|
||||
ns_lwdclient_startrecv(ns_lwdclientmgr_t *);
|
||||
|
||||
void
|
||||
ns_lwdclient_stateidle(ns_lwdclient_t *);
|
||||
|
||||
void
|
||||
ns_lwdclient_recv(isc_task_t *, isc_event_t *);
|
||||
|
||||
void
|
||||
ns_lwdclient_shutdown(isc_task_t *, isc_event_t *);
|
||||
|
||||
void
|
||||
ns_lwdclient_send(isc_task_t *, isc_event_t *);
|
||||
|
||||
isc_result_t
|
||||
ns_lwdclient_sendreply(ns_lwdclient_t *client, isc_region_t *r);
|
||||
|
||||
/*
|
||||
* Processing functions of various types.
|
||||
*/
|
||||
void ns_lwdclient_processgabn(ns_lwdclient_t *, lwres_buffer_t *);
|
||||
void ns_lwdclient_processgnba(ns_lwdclient_t *, lwres_buffer_t *);
|
||||
void ns_lwdclient_processgrbn(ns_lwdclient_t *, lwres_buffer_t *);
|
||||
void ns_lwdclient_processnoop(ns_lwdclient_t *, lwres_buffer_t *);
|
||||
|
||||
void ns_lwdclient_errorpktsend(ns_lwdclient_t *, isc_uint32_t);
|
||||
|
||||
void ns_lwdclient_log(int level, const char *format, ...)
|
||||
ISC_FORMAT_PRINTF(2, 3);
|
||||
|
||||
#endif /* NAMED_LWDCLIENT_H */
|
113
dist/bind/bin/named/include/named/lwresd.h
vendored
Normal file
113
dist/bind/bin/named/include/named/lwresd.h
vendored
Normal file
@ -0,0 +1,113 @@
|
||||
/* $NetBSD: lwresd.h,v 1.1.1.1 2004/05/17 23:43:25 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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
|
||||
* 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: lwresd.h,v 1.12.208.1 2004/03/06 10:21:25 marka Exp */
|
||||
|
||||
#ifndef NAMED_LWRESD_H
|
||||
#define NAMED_LWRESD_H 1
|
||||
|
||||
#include <isc/types.h>
|
||||
#include <isc/sockaddr.h>
|
||||
|
||||
#include <isccfg/cfg.h>
|
||||
|
||||
#include <dns/types.h>
|
||||
|
||||
struct ns_lwresd {
|
||||
unsigned int magic;
|
||||
|
||||
isc_mutex_t lock;
|
||||
dns_view_t *view;
|
||||
ns_lwsearchlist_t *search;
|
||||
unsigned int ndots;
|
||||
isc_mem_t *mctx;
|
||||
isc_boolean_t shutting_down;
|
||||
unsigned int refs;
|
||||
};
|
||||
|
||||
struct ns_lwreslistener {
|
||||
unsigned int magic;
|
||||
|
||||
isc_mutex_t lock;
|
||||
isc_mem_t *mctx;
|
||||
isc_sockaddr_t address;
|
||||
ns_lwresd_t *manager;
|
||||
isc_socket_t *sock;
|
||||
unsigned int refs;
|
||||
ISC_LIST(ns_lwdclientmgr_t) cmgrs;
|
||||
ISC_LINK(ns_lwreslistener_t) link;
|
||||
};
|
||||
|
||||
/*
|
||||
* Configure lwresd.
|
||||
*/
|
||||
isc_result_t
|
||||
ns_lwresd_configure(isc_mem_t *mctx, cfg_obj_t *config);
|
||||
|
||||
isc_result_t
|
||||
ns_lwresd_parseeresolvconf(isc_mem_t *mctx, cfg_parser_t *pctx,
|
||||
cfg_obj_t **configp);
|
||||
|
||||
/*
|
||||
* Trigger shutdown.
|
||||
*/
|
||||
void
|
||||
ns_lwresd_shutdown(void);
|
||||
|
||||
/*
|
||||
* Manager functions
|
||||
*/
|
||||
isc_result_t
|
||||
ns_lwdmanager_create(isc_mem_t *mctx, cfg_obj_t *lwres, ns_lwresd_t **lwresdp);
|
||||
|
||||
void
|
||||
ns_lwdmanager_attach(ns_lwresd_t *source, ns_lwresd_t **targetp);
|
||||
|
||||
void
|
||||
ns_lwdmanager_detach(ns_lwresd_t **lwresdp);
|
||||
|
||||
/*
|
||||
* Listener functions
|
||||
*/
|
||||
void
|
||||
ns_lwreslistener_attach(ns_lwreslistener_t *source,
|
||||
ns_lwreslistener_t **targetp);
|
||||
|
||||
void
|
||||
ns_lwreslistener_detach(ns_lwreslistener_t **listenerp);
|
||||
|
||||
void
|
||||
ns_lwreslistener_unlinkcm(ns_lwreslistener_t *listener, ns_lwdclientmgr_t *cm);
|
||||
|
||||
void
|
||||
ns_lwreslistener_linkcm(ns_lwreslistener_t *listener, ns_lwdclientmgr_t *cm);
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* INTERNAL FUNCTIONS.
|
||||
*/
|
||||
void *
|
||||
ns__lwresd_memalloc(void *arg, size_t size);
|
||||
|
||||
void
|
||||
ns__lwresd_memfree(void *arg, void *mem, size_t size);
|
||||
|
||||
#endif /* NAMED_LWRESD_H */
|
112
dist/bind/bin/named/include/named/lwsearch.h
vendored
Normal file
112
dist/bind/bin/named/include/named/lwsearch.h
vendored
Normal file
@ -0,0 +1,112 @@
|
||||
/* $NetBSD: lwsearch.h,v 1.1.1.1 2004/05/17 23:43:25 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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
|
||||
* 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: lwsearch.h,v 1.4.208.1 2004/03/06 10:21:25 marka Exp */
|
||||
|
||||
#ifndef NAMED_LWSEARCH_H
|
||||
#define NAMED_LWSEARCH_H 1
|
||||
|
||||
#include <isc/mutex.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
#include <dns/types.h>
|
||||
|
||||
#include <named/types.h>
|
||||
|
||||
/*
|
||||
* Lightweight resolver search list types and routines.
|
||||
*
|
||||
* An ns_lwsearchlist_t holds a list of search path elements.
|
||||
*
|
||||
* An ns_lwsearchctx stores the state of search list during a lookup
|
||||
* operation.
|
||||
*/
|
||||
|
||||
struct ns_lwsearchlist {
|
||||
unsigned int magic;
|
||||
|
||||
isc_mutex_t lock;
|
||||
isc_mem_t *mctx;
|
||||
unsigned int refs;
|
||||
dns_namelist_t names;
|
||||
};
|
||||
|
||||
struct ns_lwsearchctx {
|
||||
dns_name_t *relname;
|
||||
dns_name_t *searchname;
|
||||
unsigned int ndots;
|
||||
ns_lwsearchlist_t *list;
|
||||
isc_boolean_t doneexact;
|
||||
isc_boolean_t exactfirst;
|
||||
};
|
||||
|
||||
isc_result_t
|
||||
ns_lwsearchlist_create(isc_mem_t *mctx, ns_lwsearchlist_t **listp);
|
||||
/*
|
||||
* Create an empty search list object.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_lwsearchlist_attach(ns_lwsearchlist_t *source, ns_lwsearchlist_t **target);
|
||||
/*
|
||||
* Attach to a search list object.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_lwsearchlist_detach(ns_lwsearchlist_t **listp);
|
||||
/*
|
||||
* Detach from a search list object.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_lwsearchlist_append(ns_lwsearchlist_t *list, dns_name_t *name);
|
||||
/*
|
||||
* Append an element to a search list. This creates a copy of the name.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_lwsearchctx_init(ns_lwsearchctx_t *sctx, ns_lwsearchlist_t *list,
|
||||
dns_name_t *name, unsigned int ndots);
|
||||
/*
|
||||
* Creates a search list context structure.
|
||||
*/
|
||||
|
||||
void
|
||||
ns_lwsearchctx_first(ns_lwsearchctx_t *sctx);
|
||||
/*
|
||||
* Moves the search list context iterator to the first element, which
|
||||
* is usually the exact name.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_lwsearchctx_next(ns_lwsearchctx_t *sctx);
|
||||
/*
|
||||
* Moves the search list context iterator to the next element.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
ns_lwsearchctx_current(ns_lwsearchctx_t *sctx, dns_name_t *absname);
|
||||
/*
|
||||
* Obtains the current name to be looked up. This involves either
|
||||
* concatenating the name with a search path element, making an
|
||||
* exact name absolute, or doing nothing.
|
||||
*/
|
||||
|
||||
#endif /* NAMED_LWSEARCH_H */
|
34
dist/bind/bin/named/include/named/main.h
vendored
Normal file
34
dist/bind/bin/named/include/named/main.h
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
/* $NetBSD: main.h,v 1.1.1.1 2004/05/17 23:43:25 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (C) 1999-2002 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Id: main.h,v 1.8.2.2.8.4 2004/03/08 04:04:21 marka Exp */
|
||||
|
||||
#ifndef NAMED_MAIN_H
|
||||
#define NAMED_MAIN_H 1
|
||||
|
||||
void
|
||||
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 */
|
56
dist/bind/bin/named/include/named/notify.h
vendored
Normal file
56
dist/bind/bin/named/include/named/notify.h
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
/* $NetBSD: notify.h,v 1.1.1.1 2004/05/17 23:43:25 christos Exp $ */
|
||||
|
||||
/*
|
||||
* 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
|
||||
* 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: notify.h,v 1.9.208.1 2004/03/06 10:21:25 marka Exp */
|
||||
|
||||
#ifndef NAMED_NOTIFY_H
|
||||
#define NAMED_NOTIFY_H 1
|
||||
|
||||
#include <named/types.h>
|
||||
#include <named/client.h>
|
||||
|
||||
/***
|
||||
*** Module Info
|
||||
***/
|
||||
|
||||
/*
|
||||
* RFC 1996
|
||||
* A Mechanism for Prompt Notification of Zone Changes (DNS NOTIFY)
|
||||
*/
|
||||
|
||||
/***
|
||||
*** Functions.
|
||||
***/
|
||||
|
||||
void
|
||||
ns_notify_start(ns_client_t *client);
|
||||
|
||||
/*
|
||||
* Examines the incoming message to determine apporiate zone.
|
||||
* Returns FORMERR if there is not exactly one question.
|
||||
* Returns REFUSED if we do not serve the listed zone.
|
||||
* Pass the message to the zone module for processing
|
||||
* and returns the return status.
|
||||
*
|
||||
* Requires
|
||||
* client to be valid.
|
||||
*/
|
||||
|
||||
#endif /* NAMED_NOTIFY_H */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user