Compare commits

..

418 Commits

Author SHA1 Message Date
Mark Andrews
f37299d68f cleanup comment.
cleanup grammar so that it is bison friendly.
2003-09-01 06:01:12 +00:00
Mark Andrews
2b2270e234 1499. [bug] isc_random need to be seeded better if arc4random()
is not used.

1480.   [bug]           Provide replay protection for rndc commands.
2003-08-29 07:08:33 +00:00
Mark Andrews
591207b37e 1347. [bug] Incorporate OpenSSL fixes for CERT Advisory CA-2002-23
http://www.cert.org/advisories/CA-2002-23.html
2002-07-31 07:20:36 +00:00
Mark Andrews
f778677432 pullup:
fix large DH key generation, hopefully for the last time.
2001-12-19 01:11:13 +00:00
Mark Andrews
983caa6873 regen 2001-12-05 02:33:03 +00:00
Mark Andrews
763a2a478a pullup:
1156.   [port]          The configure test for strsep() incorrectly
                        succeeded on certain patched versions of
                        AIX 4.3.3. [RT #2190]
2001-12-05 02:31:56 +00:00
Mark Andrews
1f7ff09bc3 pullup:
1136.   [bug]           CNAME records synthesized from DNAMEs did not
                        have a TTL of zero as required by RFC2672
                        [RT #2129]
2001-11-27 00:51:09 +00:00
Mark Andrews
2032a3c5c8 pullup:
1134.   [bug]           Multithreaded servers could deadlock in ferror()
                        when reloading zone files. [RT #1951, #1998]
2001-11-22 04:09:52 +00:00
Mark Andrews
99aa38c234 restore buf. 2001-11-15 02:52:23 +00:00
Mark Andrews
8c402ee97f pullup:
Removed all code within #ifdef DNS_OPT_NEWCODES*.
It was the last thing being sanitized out of releases; removing
it makes it possible to eliminate the sanitation process.
2001-11-15 01:30:50 +00:00
Mark Andrews
d4417eb662 pullup:
Partial fix for RT #2053.  The potential for deadlock still exists,
but it is much less likely to occur because we now only take the ADB lock when
the
external reference count reaches zero, not every time it is decremented.
Althought this does not actually fix the bug, it at least lets us make
progress on testing fixes for other bugs affecting shutdown of multithreaded
servers.
2001-11-15 00:37:57 +00:00
Mark Andrews
f30e1ea68c pullup:
1118.   [bug]           On multithreaded servers, a race condition
                        could cause an assertion failure in resolver.c
                        during resolver shutdown. [RT #2029]
2001-11-12 22:37:56 +00:00
Mark Andrews
1b44092954 pullup:
1111.   [bug]           Multithreaded servers could deadlock processing
                        recursive queries due to a locking hieararchy
                        violation in adb.c. [RT #2017]
2001-11-12 22:30:30 +00:00
Mark Andrews
d841ca1f6f pullup:
1114.  [port]          Ignore more accept() errors. [RT #2021]

 934.  [port]          Deal with systems where accept() spuriously returns
                       ECONNRESET.
2001-11-10 15:26:59 +00:00
Mark Andrews
f5fce5d573 pullup:
1082.  [bug]           The -g option to named incorrectly caused logging
                       to be sent to syslog in addition to stderr.
                       [RT #1974]
2001-10-31 22:46:19 +00:00
Mark Andrews
845c6ab084 pullup:
1074.   [bug]           Running out of memory in dump_rdataset() could
                        cause an assertion failure. [RT #1946]
2001-10-30 01:56:13 +00:00
Mark Andrews
3c59fe6ed2 pullup:
running out of memory during ns_client_t construction could crash server
[RT #409]
2001-10-30 01:14:00 +00:00
Mark Andrews
5aadceae67 pullup:
some variables that should have been static weren't
2001-10-23 02:44:54 +00:00
Mark Andrews
cb4c2faee1 Adjust 2001-10-19 00:36:17 +00:00
Mark Andrews
b30e2a1c21 Don't include EXCLUDED when kitting. 2001-10-19 00:31:44 +00:00
Mark Andrews
0f0e3cbaa2 This file is used as the third file to check-pullups. 2001-10-19 00:30:32 +00:00
Mark Andrews
89b15ae453 remove blank line 2001-10-18 00:39:56 +00:00
Mark Andrews
a060b4096d 1057. [bug] Reloading the server after adding a "file" clause
to a zone statement could cause the server to
                        crash due to a typo in change 1016.
2001-10-18 00:38:38 +00:00
Mark Andrews
d7a33c75ee pullup:
1052.  [bug]           Journals were not being created in binary mode
                       resulting in "journal format not recognized" error
                       under Windows NT/2000.  [RT #1889]
2001-10-15 05:01:03 +00:00
Mark Andrews
ba44610aa2 pullup:
1051.   [bug]           Do not ignore a network interface completely just
                        because it has a noncontiguous netmask.  Instead,
                        omit it from the localnets ACL and issue a warning.
                        [RT #1891]
2001-10-13 04:00:12 +00:00
Mark Andrews
39bdc01d46 pullup:
1047.   [bug]           When a request was refused due to being signed with
                        a TSIG key derived from an unsigned TKEY negotiation,
                        the response could have an rcode of SUCCESS rather
                        than REFUSED. [RT #1886]
2001-10-12 01:08:20 +00:00
Mark Andrews
c059a548dd pullup:
1041.   [bug]           Dig/host/nslookup could catch an assertion failure
                        on SIGINT due to an uninitialized variable. [RT #1867]
2001-10-11 01:38:49 +00:00
Mark Andrews
6d11231b4b pullup:
1040.   [bug]           Multiple listen-on-v6 options with different ports
                        were not accepted. [RT #1875]
2001-10-11 01:23:40 +00:00
Andreas Gustafsson
ef9cc2e0dc 1027. [bug] RRs having the reserved type 0 should be rejected.
[RT #1471]
2001-10-03 23:29:14 +00:00
Mark Andrews
56b51443de Disallow creation of TYPE0 records from wire data 2001-10-03 02:11:12 +00:00
Mark Andrews
5a317d95e5 1019. [bug] The value of the lame-ttl option was limited to 18000
seconds, not 1800 seconds as documented. [RT #1803]
2001-09-28 05:29:13 +00:00
Mark Andrews
e31d3580f4 1016. [bug] Slave zones with no backup file were re-transferred
on every server reload.
2001-09-26 03:42:41 +00:00
Andreas Gustafsson
d63c0f0c44 pullup:
1000.   [bug]           BIND 8 compatibility: accept "HESIOD" as a alias
                        for class "HS".  [RT #1759]
2001-09-21 20:48:06 +00:00
Brian Wellington
feca45e0ec pullup:
1006.   [bug]           If a KEY RR was found missing during DNSSEC validation,
			an assertion failure could subsequently be triggered
			in the resolver. [RT #1763]
2001-09-19 21:52:14 +00:00
Mark Andrews
c1dd87a357 pullup:
1005.   [bug]           Don't copy nonzero RCODEs from request to response.
                        [RT #1765]
2001-09-19 02:46:55 +00:00
Mark Andrews
04397badb6 pullup:
1004.   [port]          Deal with recvfrom() returning EHOSTDOWN. [RT #1770]
2001-09-19 02:45:39 +00:00
Mark Andrews
6970aaed8c pullup:
1004.  [port]          Deal with recvfrom() returning EHOSTDOWN. [RT #1770]
2001-09-19 02:36:34 +00:00
Andreas Gustafsson
ef80060faf pull up part of 997.:
ISC_R_SUCCESS could be returned on failure
2001-09-15 00:39:46 +00:00
Andreas Gustafsson
c218da228b pullup:
A message could be leaked when a segment of an incoming zone transfer
failed to verify.
2001-09-12 20:46:54 +00:00
Andreas Gustafsson
b9b8f7669a pullup:
987.   [bug]           "dig -help" didn't show "+[no]stats".

 986.   [bug]           "dig +noall" failed to clear stats and command
                        printing.
2001-09-11 01:39:28 +00:00
Andreas Gustafsson
baf0357369 pullup:
compare: a REQUIRE() was comparing a variable against itself not agaist the
other arguement as it should have been.
2001-09-11 01:09:36 +00:00
Andreas Gustafsson
827721ba1b pullup:
957.   [bug]           sys/select.h inclusion was broken on older platforms.
                        [RT #1607]
2001-09-07 18:53:03 +00:00
Mark Andrews
229d1708df 980. [bug] Incoming zone transfers restarting after an error
could trigger an assertion failure. [RT #1692]
2001-09-06 00:20:49 +00:00
Andreas Gustafsson
e11fb6da2a pullup:
978.   [bug]           dns_db_attachversion() had an invalid REQUIRE()
                        condition.
2001-09-04 23:10:36 +00:00
Andreas Gustafsson
99570764b9 pullup: string formats 2001-08-31 18:49:48 +00:00
Andreas Gustafsson
68c0d124e5 fix locking hierarchy violation [RT #1672] (9.1 branch only) 2001-08-29 01:17:14 +00:00
Andreas Gustafsson
b52b01718e pullup:
#define PATH_MAX if it's not already defined (such as on HURD) [RT #1543]
(also SCO Open Server 5 [RT #1647])
2001-08-27 18:35:44 +00:00
Andreas Gustafsson
08f8c68b8d success reported on AIX 5L 2001-08-10 16:19:00 +00:00
Mark Andrews
4606b30107 INSIST used 9.2 style reference counting. 2001-07-24 02:57:34 +00:00
Andreas Gustafsson
85738508ed 940. [bug] Double zone locking failure on error path. [RT #1510] 2001-07-19 17:11:33 +00:00
Andreas Gustafsson
48d2801bcc pullup:
937.   [bug]           A race when shutting down a zone could trigger a
                        INSIST() failure. [RT #1034]
2001-07-18 18:07:04 +00:00
Mark Andrews
994647a2d2 938. [port] aix 4.3.2 namespace clash on "struct token". 2001-07-17 07:36:03 +00:00
Mark Andrews
839ec054c8 929. [bug] RUNTIME_CHECK() used inappropriately in named.conf
parser.
2001-07-11 13:31:01 +00:00
Andreas Gustafsson
5c2db56e9c pullup:
926.   [bug]           The resolver could deadlock with the ADB when
                        shutting down (multithreaded builds only).
                        [RT #1324]
2001-07-11 01:23:56 +00:00
Andreas Gustafsson
eb230e6d00 pullup:
924.   [port]          Extend support for pre-RFC2133 IPv6 implementation.
                        [RT #987]
2001-07-09 22:44:12 +00:00
Andreas Gustafsson
80911bb67f successful build reported on Red Hat Linux 7.1 2001-07-05 17:41:15 +00:00
Andreas Gustafsson
61816289c7 the -> a 2001-07-03 18:34:11 +00:00
Andreas Gustafsson
d5b6f4a580 put 919. back 2001-07-03 18:32:54 +00:00
Andreas Gustafsson
fbedd7b9e9 added --- 9.1.3 released --- marker; temporarily removed 919. until 9.1.3 is tagged 2001-07-03 17:46:41 +00:00
Andreas Gustafsson
af98948d28 fixed two more cases where rndc could dump core on unexpected EOF in rndc.conf 2001-07-03 01:56:12 +00:00
Andreas Gustafsson
992dbb6434 edited for 9.1.3 2001-07-02 21:33:10 +00:00
Brian Wellington
3ff18c36a1 919. [bug] rndc would segfault when rndc.conf was missing the
closing brace. [RT #1461]
2001-07-02 17:55:55 +00:00
Andreas Gustafsson
8c989f6dd7 note that umask is not set by the BIND 9 named [RT #1093] 2001-06-28 23:28:42 +00:00
Andreas Gustafsson
6c7e43a7da support building from a tar.gz file, not just from CVS 2001-06-28 01:34:20 +00:00
Andreas Gustafsson
e64a3da280 eliminated compiler warning 2001-06-28 00:44:45 +00:00
Andreas Gustafsson
fe581a6d2d updated for 9.1.3rc3 2001-06-27 22:56:18 +00:00
Andreas Gustafsson
b57f903e58 regenerated 2001-06-27 17:47:20 +00:00
Andreas Gustafsson
46484167fe clarified that the transfer-format option is used on the master, not the slave 2001-06-27 17:46:32 +00:00
David Lawrence
6ee2fdcc82 include isc/ipv6.h before ensuring the ipv6 init macros are defined 2001-06-26 21:55:52 +00:00
Andreas Gustafsson
6a5e7231e8 note that additional-from-cache and additional-from-auth
should only be used with 'recursion no;'
2001-06-26 01:58:26 +00:00
Andreas Gustafsson
82ea2420a1 repeated word 2001-06-25 23:51:23 +00:00
Andreas Gustafsson
fda7eb4967 pullup:
910.   [port]          Some pre-RFC2133 IPv6 implementations do not define
                        IN6ADDR_ANY_INIT. [RT #1416]
2001-06-25 22:17:02 +00:00
Mark Andrews
ee1f8a575d 911. [bug] Fail gracefully with multiple hint zones. [RT #1433] 2001-06-25 08:34:46 +00:00
Mark Andrews
dd929b8619 the length of the NULL record RDATA can be zero;
do not assert the contrary
2001-06-20 23:16:38 +00:00
Andreas Gustafsson
34c10cbe89 classify 860. as [interop], not [func] 2001-06-18 22:40:37 +00:00
Andreas Gustafsson
b6954e61c3 added --- 9.1.3rc2 released --- marker 2001-06-18 22:39:12 +00:00
Andreas Gustafsson
9db5bbf499 updated for 9.1.3rc2 2001-06-18 22:23:45 +00:00
Andreas Gustafsson
90f1f51a4e tabified 2001-06-18 22:23:27 +00:00
Andreas Gustafsson
aa6773e6ad pullup:
When doing best-effort parsing (in dig, for example) on a message with multiple
questions where an unrecoverable error is seen after 2 or more questions have
been parsed, memory would be leaked from msg->namepool, and would trigger an
ENSURE() in dns_message_destroy().
2001-06-15 17:02:18 +00:00
Andreas Gustafsson
c6b89af4d6 pullup:
904.   [bug]           The server would leak memory if attempting to use
                        an expired TSIG key. [RT #1406]
2001-06-15 16:52:42 +00:00
Brian Wellington
5d0f47dc9b pullup:
902.	[bug]		The -d option was ignored if both -t and -g were also
			specified.
2001-06-15 01:41:11 +00:00
Brian Wellington
119d6af33f pullup:
declare launch_next_query() before calling it
2001-06-15 01:37:30 +00:00
Andreas Gustafsson
cbdb30f5ad pullup:
903.    [bug]           dig should not crash when receiving a tcp packet
                        of length 0.
2001-06-14 22:03:38 +00:00
Andreas Gustafsson
bccb65cca3 pullup:
712.   [bug]           Sending a large signed update message caused an
                        assertion failure. [RT #718]

- Resetting a message should clear the TSIG/SIG(0) sections
- Rerendering a message if the first try returned USETCP should not call
  dns_message_settsigkey() again.
2001-06-14 14:36:05 +00:00
Andreas Gustafsson
80d1d675f3 pullup:
Signing with a large key didn't work since the static output buffer was too
small; use a dynamic buffer instead.  Also, comment a section
2001-06-14 13:56:40 +00:00
Andreas Gustafsson
786ca5121b pullup:
703.   [port]          sys/select.h is needed on older platforms. [RT #695]
2001-06-14 13:37:47 +00:00
David Lawrence
acb9a3c446 901. [cleanup] The man pages no longer have empty lines outside of
literal blocks.
update_copyrights has been fixed to cope with the lack of empty lines
around the cvs id tag's line in each man source.
2001-06-14 06:21:06 +00:00
David Lawrence
40a963b8f1 901. [cleanup] The man pages no longer have empty lines outside of
literal blocks.
update_copyrights has been fixed to cope with the lack of empty lines
around the cvs id tag's line in each man source.
2001-06-14 06:14:46 +00:00
Brian Wellington
0a572d7525 pullup:
898.   [bug]           "dig" failed to set a nonzero exit status
                         on UDP query timeout. [RT #1323]
2001-06-11 18:25:41 +00:00
Andreas Gustafsson
e26fdc705c pullup:
set the permissions on a symmetric keyfile before anything is written to it,
rather than after it is closed
2001-06-11 16:58:39 +00:00
Andreas Gustafsson
8080373447 uninitialized pointer could potentially (but not likely)
be passed to free_adbfind(); if it happened, it would look like RT #1393
(caught by bwelling)
2001-06-11 04:24:47 +00:00
Andreas Gustafsson
3a2f01559d regenerated 2001-06-09 01:35:24 +00:00
Andreas Gustafsson
a8426e6e68 pullup:
704.   [port]          RLIMIT_NOFILE in to available on all platforms.
                        [RT #695]
2001-06-09 00:58:11 +00:00
Andreas Gustafsson
732cd0061c pullup:
705.   [port]          Work out resource limit type for use where rlim_t is
                       not available. [RT #695]
2001-06-09 00:53:22 +00:00
Brian Wellington
d3c52f670a pullup:
894.   [bug]           When using the DNSSEC tools, a message intended to warn
			when the keyboard was being used because of the lack
			of a suitable random device was not being printed.
2001-06-08 23:27:29 +00:00
Andreas Gustafsson
011d895d68 892. [bug] The server could attempt to refresh a zone that
was being loaded, causing an assertion failure.
                        [RT #1335]
(was fixed on mainline in zone.c 1.300)
2001-06-08 21:46:11 +00:00
Andreas Gustafsson
64c07684c6 pullup:
888.   [bug]           Don't die when using TKEY to delete a nonexistent
                        TSIG key. [RT #1392]
2001-06-08 19:44:06 +00:00
Brian Wellington
bc4eca28b1 891. [bug] Return an error when a SIG(0) signed response to
an unsigned query is seen.  This should actually
			do the verification, but it's not currently
			possible. [RT #1391]
2001-06-08 19:38:59 +00:00
Andreas Gustafsson
322b2930b8 pullup:
852.   [bug]           Handle responses from servers which do not
                        now about IXFR.
2001-06-07 19:02:00 +00:00
Andreas Gustafsson
7bfbf9c278 pullup:
add sys/types.h for FreeBSD 2.1.
2001-06-06 22:16:03 +00:00
Andreas Gustafsson
b2532f9b3f pullup:
838.   [port]          UnixWare 7.1.1 is now suported by
                        bin/tests/system/ifconfig.sh.
2001-06-06 21:52:00 +00:00
Brian Wellington
3dd35c54a2 pullup:
860.   [func]          Drop cross class glue in zone transfers.
2001-06-06 00:11:57 +00:00
Brian Wellington
366134a7c3 850. [bug] dns_rbt_findnode() would not find nodes that were
split on a bitstring label somewhere other than in
			the last label of the node. [RT #1351]
2001-06-02 01:09:03 +00:00
Brian Wellington
92946101b7 move variable initialization 2001-05-29 23:07:33 +00:00
Brian Wellington
c4e9256361 uninitialized variable 2001-05-29 22:54:19 +00:00
Brian Wellington
3337d9a75f Remove seemingly random "i++" - this was the only difference between
the mainline and release branches.
2001-05-29 22:51:07 +00:00
Brian Wellington
ae341deb81 uninitialized variable 2001-05-29 22:44:23 +00:00
Brian Wellington
7d174ccc84 the array of error messages was incomplete. 2001-05-29 22:40:16 +00:00
Brian Wellington
a42f9811d9 potential null pointer dereference 2001-05-29 22:35:37 +00:00
Brian Wellington
54d4ccddaa fix possible null pointer deference - 9.1 only 2001-05-29 22:24:25 +00:00
Andreas Gustafsson
be0b0b6330 bumped 2001-05-24 00:19:23 +00:00
Andreas Gustafsson
25aad710d0 added --- 9.1.3rc1 released --- line 2001-05-23 16:16:02 +00:00
Andreas Gustafsson
dd700a7c67 pullup:
824.   [bug]           Correct line numbers reported by dns_master_load().
                        [RT #1263].
2001-05-23 16:14:24 +00:00
Andreas Gustafsson
075e2b4186 typo 2001-05-22 02:23:28 +00:00
Andreas Gustafsson
1ee69da383 expanded on 806. 2001-05-22 02:22:30 +00:00
Brian Wellington
d40a516458 pullup:
isc_print_vsnprintf() could throw an assertion failure when
given a %lld format, causing a deadlock when logging the assertion if invoked
from the logging system.  Since the %qd format does not have the bug, this only
affects platforms where the native quad format is %lld and that lack a native
vsnprintf().  The only known such platform is SunOS 5.5.1. [RT #1312]
2001-05-21 21:31:39 +00:00
Andreas Gustafsson
61e6c6b9ac pullup:
734.   [bug]           An attempt to re-lock the zone lock could occur if
                        the server was shutdown during a zone tranfer.
                        [RT #830]
2001-05-21 17:50:00 +00:00
Andreas Gustafsson
3d8e4446ef consistent spacing 2001-05-19 01:40:03 +00:00
Andreas Gustafsson
e34d8cbf12 pulled up recent documentation changes 2001-05-19 01:34:24 +00:00
Andreas Gustafsson
2a8f629efb pullup:
documented current behavior of --prefix, --sysconfdir,
and --localstatedir
2001-05-19 00:43:52 +00:00
Andreas Gustafsson
704af2aa53 regenerated 2001-05-18 23:10:16 +00:00
Andreas Gustafsson
290c4be6b2 831. [bug] The configure script tried to determine
endianness before making its final decision on
                        which C compiler to use, causing Solaris/x86
                        systems with gcc to be incorrectly identified
                        as big-endian. [RT #1315]
(already fixed on the mainline as part of a larger configure.in reorganization)
2001-05-18 23:10:05 +00:00
Andreas Gustafsson
2fa2fd1ffd updated for BIND 9.1.3rc1 2001-05-18 21:42:12 +00:00
Andreas Gustafsson
2098d02861 pullup:
771.   [cleanup]       TSIG errors related to unsynchronized clocks
                         are logged better. [RT #919]
2001-05-18 21:28:43 +00:00
Andreas Gustafsson
ac885ff502 pullup:
add sys/types.h for FreeBSD 2.1
2001-05-18 16:35:57 +00:00
Brian Wellington
240ef60a1c pullup:
client->peeraddr_valid could be set even if the peer address was not valid;
socket errors were logged as requests; when a client shut down due to a
fatal I/O error, it failed to log a message to that effect
2001-05-15 05:15:20 +00:00
Andreas Gustafsson
3932fbd926 pullup:
806.   [bug]           DNS_R_SEENINCLUDE was failing to propagate back up
                        the calling stack to the zone maintence level.
2001-05-14 23:50:49 +00:00
Mark Andrews
918b02d1d9 pullup:
827.   [bug]           When an IXFR protocol error occurs, the slave
                        should retry with AXFR.

 826.   [bug]           Some IXFR protocol errors were not detected.
2001-05-14 03:22:08 +00:00
Andreas Gustafsson
89136242cd 825. is RT #1264, not #1263 2001-05-10 21:57:00 +00:00
Andreas Gustafsson
32e53c3e68 pullup:
825.   [bug]           zone.c:ns_query() detached from the wrong zone
                        reference.  [RT #1263]
2001-05-10 21:52:01 +00:00
Andreas Gustafsson
b1f4d618bb pullup:
669.   [bug]           dnssec-keygen now makes the public key file
                        non-world-readable for symmetric keys. [RT #403]
2001-05-10 21:14:38 +00:00
Andreas Gustafsson
b32fc0771e 669. [bug] dnssec-keygen now makes the public key file
non-world-readable for symmetric keys. [RT #403]
2001-05-10 21:12:36 +00:00
Andreas Gustafsson
9f254ce91e regenerated 2001-05-09 02:44:03 +00:00
Andreas Gustafsson
734375e4ce document the special ISC_LOG_DEBUGONLY property of
the default_debug channel
2001-05-09 02:41:13 +00:00
Andreas Gustafsson
d03db233dd missing semicolon in logging example 2001-05-09 02:08:52 +00:00
Andreas Gustafsson
ab83ba67c6 added note about firewalls dropping fragments [RT #1245] 2001-05-08 21:46:24 +00:00
Andreas Gustafsson
b98767de54 pullup:
822.   [bug]           Sending nxrrset prerequisites would crash nsupdate.
                        [RT #1248]
2001-05-08 17:54:37 +00:00
Mark Andrews
4ec1e29fa8 make messages conssistant between release and mainline. tabify 2001-05-06 01:16:44 +00:00
Andreas Gustafsson
a094732128 edited for 9.1.2 2001-05-04 21:59:21 +00:00
Andreas Gustafsson
5ddc458b2d oops, typo in previous pullup 2001-05-02 22:27:08 +00:00
Andreas Gustafsson
0a4ffecc32 on release branch, use cchan->name, not channelname 2001-05-02 19:34:10 +00:00
Andreas Gustafsson
e5ecffa57b pullup:
Allocate the initial buffer for rdata based on the length of the string, to
avoid reallocations and annoying messages.
2001-05-02 19:27:39 +00:00
Andreas Gustafsson
ccfce03a9b DNSSEC users should note that DNSSEC validation involving
algorithms other than RSA will not interoperate between
        9.1.2rc1 and older versions of BIND 9, because the older
        versions use an incorrect formula for calculating key tags
        of non-RSA keys.
2001-05-02 19:05:58 +00:00
Andreas Gustafsson
0304779306 --- 9.1.2rc1 released --- 2001-05-02 18:05:32 +00:00
Andreas Gustafsson
641b1fcd37 pullup:
document adb.c 1.176:
 820.   [bug]           Name server address lookups failed to follow
                        A6 chains into the glue of local authoritative
                        zones.
2001-05-02 18:01:00 +00:00
Andreas Gustafsson
a7f4fba4d0 819. [bug] In certain cases, the resolver's attempts to
restart an address lookup at the root could cause
                        the fetch to deadlock (with itself) instead of
                        restarting. [RT #1225]
2001-05-02 17:52:14 +00:00
Andreas Gustafsson
d2946a0f0f pullup: make rwlock_test compile without threads 2001-05-02 17:46:07 +00:00
Andreas Gustafsson
dca0585400 tabified 2001-05-02 17:25:28 +00:00
Andreas Gustafsson
a739c65c09 updated for 9.1.2rc1 2001-05-02 17:20:01 +00:00
Andreas Gustafsson
a2623dfb53 pullup (inspected by halley):
when following A6 chains, glue was inadvertantly ignored
2001-05-01 23:38:54 +00:00
Andreas Gustafsson
6631b237b6 pullup (inspected by halley)
818.   [bug]           Certain pathological responses to ANY queries could
                        cause an assertion failure. [RT #1218]
2001-05-01 20:33:12 +00:00
Andreas Gustafsson
ff624c8918 pullup:
816.   [bug]           Report potential problems with log file accessibility
                        at configuration time, since such problems can't
                        reliably be reported at the time they actually occur.
2001-04-30 16:39:59 +00:00
Andreas Gustafsson
7bfe48388b pullup:
815.	[bug]		If a log file was specified with a path separator
			character (i.e. "/") in its name and the directory
			did not exist, the log file's name was treated as
			though it were the directory name. [RT #1189]
2001-04-28 01:16:26 +00:00
Andreas Gustafsson
4c40c6496d 814. [bug] Socket objects left over from accept() failures
were incorrectly destroyed, causing corruption
                        of socket manager data structures.

 813.   [bug]           File descriptors exceeding FD_SETSIZE were handled
                        badly. [RT #1192]
2001-04-27 21:59:33 +00:00
Andreas Gustafsson
c890025d90 812. [bug] dig sometimes printed incomplete IXFR responses
due to an uninitialized variable. [RT #1188]
2001-04-26 18:30:44 +00:00
Andreas Gustafsson
081804a1a5 pullup:
uninitialized variables [RT #1188]
2001-04-26 18:20:47 +00:00
Andreas Gustafsson
87fbc7faae documented the obsolete ixfr-tmp-file option 2001-04-26 18:19:38 +00:00
Andreas Gustafsson
d68f28b059 added section about zone transfer protocol interoperability issues 2001-04-25 17:35:20 +00:00
Andreas Gustafsson
a634f7a58f cfg_set_iplist() would have dereferenced a null pointer
if it had ever been called with newval == NULL
2001-04-23 22:58:35 +00:00
Brian Wellington
dfd59b8835 pullup:
811.   [bug]           Parentheses were not quoted in zone dumps. [RT #1194]
2001-04-19 18:56:08 +00:00
Andreas Gustafsson
fae5f0fc05 If a client requests a UDP buffer of less than 512, ignore it. [RT #1197] 2001-04-19 18:54:51 +00:00
Andreas Gustafsson
1147c24375 pullup:
Return ISC_R_NOSPACE if the buffer isn't large enough to hold the DNS header.
2001-04-19 18:54:26 +00:00
Andreas Gustafsson
203111581d pullup:
810.   [bug]           The signer name in SIG records was not properly
                        downcased when signing/verifying records. [RT #1186]
2001-04-17 17:37:20 +00:00
Andreas Gustafsson
b3cd2acff1 added FAQ entry about 'unexpected end of input' notifying 8.2.3 slaves 2001-04-17 17:12:32 +00:00
Andreas Gustafsson
d8df1bd48a pullup:
801.   [bug]           nsupdate should treat lines beginning with ';' as
                        comments. [RT #1139]
2001-04-12 17:36:55 +00:00
Andreas Gustafsson
a8ef5c511f pullup:
807.   [bug]           When setting up TCP connections for incoming zone
                        transfers, the transfer-source port was not
                        ignored like it should be.
2001-04-11 19:21:32 +00:00
Andreas Gustafsson
40aaf52813 pullup:
When creating the dispatch manager, pass in the entropy manager.  Otherwise
query ids are completely predictable.
2001-04-11 19:05:39 +00:00
Andreas Gustafsson
af65c754d5 pullup:
The bug fix in socket.c 1.189 was less than ideal: if a socket
got wedged in a state where accept() always returns EBADF, the server would loop calling
internal_accept() repeatedly.  Implemented an alternative fix where a hard
error in accept() causes an event with a nonzero result code to be sent, and
the new socket object to be freed
(pullup reviewed by bwelling)
2001-04-11 17:34:47 +00:00
Andreas Gustafsson
8c3b329e7b pullup:
802.   [bug]           DNSSEC key tags were computed incorrectly in almost
                        all cases. [RT #1146]
2001-04-10 01:10:26 +00:00
Andreas Gustafsson
1d229976a5 pullup:
804.   [bug]           Attempting to obtain entropy could fail in some
                        situations.  This would be most common on systems
2001-04-10 00:24:47 +00:00
Andreas Gustafsson
20c203eba3 pullup:
799.   [bug]           The ADB didn't find AAAA glue in a zone unless A6
                        glue was also present.
2001-04-10 00:20:57 +00:00
Andreas Gustafsson
6d69091473 pullup:
800.   [bug]           dnssec-signzone produced incorrect statistics for
                        large zones.  [RT #1133]
2001-04-09 20:50:37 +00:00
Andreas Gustafsson
d2a39ea09b doc/misc/migration-4to9 was not shipped with 9.1 [RT #1154] 2001-04-09 20:49:41 +00:00
Andreas Gustafsson
069f527455 pullup:
There were no curly braces around address_match_list and key_list in the
controls statement grammar.
2001-04-09 20:42:55 +00:00
cvs2git
60b1ebc747 This commit was manufactured by cvs2git to create branch 'v9_1'. 2001-04-04 02:02:59 +00:00
Andreas Gustafsson
eae0ee9c72 pullup:
rndc only takes one command.  make the documentation say this.
2001-03-29 18:24:20 +00:00
Andreas Gustafsson
1821f8eecc pullup:
don't print -v and -z options in the usage statement, since they don't exist.
2001-03-29 18:22:09 +00:00
Andreas Gustafsson
486f92981d updated for 9.1.1 (again...) 2001-03-28 19:08:09 +00:00
Brian Wellington
9448a0642e call omapi_result_register 2001-03-27 02:06:28 +00:00
Brian Wellington
b0d37697d1 #include <stdlib.h>
(already fixed on mainline)
2001-03-27 01:37:06 +00:00
Andreas Gustafsson
3e50d328f0 there will be a 9.1.1rc7 after all 2001-03-27 00:22:51 +00:00
Andreas Gustafsson
21d158b173 rephrased 971. 2001-03-27 00:22:09 +00:00
Brian Wellington
347d535a7b 791. [bug] The command channel now works over IPv6. 2001-03-27 00:14:54 +00:00
Brian Wellington
66f9e4be28 pullup:
790.	[bug]		Wildcards created using dynamic update or IXFR
			could fail to match. [RT #1111]
2001-03-27 00:12:30 +00:00
Andreas Gustafsson
1c53b2d2e1 updated for 9.1.1 2001-03-26 19:15:39 +00:00
Andreas Gustafsson
a7ce849641 pullup:
786.   [bug]           When DNSSEC signing/verifying data, owner names were
                        not properly downcased.
2001-03-26 19:13:15 +00:00
Andreas Gustafsson
d9faa0ca37 pullup:
787.   [bug]           The DNSSEC tools failed to downcase domain
                        names when mapping them into file names.
2001-03-26 19:11:56 +00:00
Andreas Gustafsson
18c9034480 pullup: note that parallel makes don't work 2001-03-22 00:06:47 +00:00
Brian Wellington
4c7dd6689a parser_complain mixed up errors and warnings.
(only on release branch)
2001-03-21 18:34:31 +00:00
Andreas Gustafsson
3620ac4c39 updated for 9.1.1rc6 2001-03-21 18:15:34 +00:00
Andreas Gustafsson
8f84fa97d8 pullup:
784.   [bug]           nsupdate and other programs would not quit properly
                        if some signals were blocked by the caller. [RT #1081]
2001-03-21 00:26:27 +00:00
Brian Wellington
aa7dc6feaa pullup:
785.   [bug]           A race condition in the resolver could cause
                        an assertion failure. [RT #673, #872, #1048]
2001-03-20 23:49:36 +00:00
Andreas Gustafsson
e2baf4120a pullup:
783.   [bug]           Following CNAMEs could cause an assertion failure
                        when either using an sdb database or under very
                        rare conditions.
2001-03-20 18:50:39 +00:00
Andreas Gustafsson
2dab3c4c5d pullup:
780.   [bug]           Error handling code dealing with out of memory or
                        other rare errors could lead to assertion failures
                        when calling functions on unitialized names. [RT #1065]
2001-03-20 18:47:48 +00:00
Andreas Gustafsson
db2e5e0866 pullup:
init the name in dns_message_gettempname().  This means it'll be done twice
in many cases, but it means dns_message_puttempname() can safely be called
on the name in all cases.
2001-03-20 18:46:35 +00:00
Andreas Gustafsson
c74556ae7e regenerated 2001-03-19 20:27:11 +00:00
Andreas Gustafsson
52d8b27d7b clarify sortlist & rrset-order docs [RT #1052] 2001-03-19 20:26:20 +00:00
Andreas Gustafsson
78df653faf note changed default of transfer-format option 2001-03-19 18:07:45 +00:00
Brian Wellington
04a099bcd4 missing space in AAAA output [RT #1051] 2001-03-16 22:14:00 +00:00
Brian Wellington
06fc2cdcb5 Mark transfer-format as having a new default. 2001-03-16 18:19:44 +00:00
Brian Wellington
756d5f41a2 spelling 2001-03-14 18:08:50 +00:00
Brian Wellington
a9cdc783f2 removed extraneous %s (already fixed on mainline) 2001-03-14 18:06:02 +00:00
Andreas Gustafsson
26c86e2ddb include 686. in 9.1.1rc5 2001-03-14 06:43:49 +00:00
Brian Wellington
76ce1f8d30 exit(1), not exit(-1) 2001-03-14 06:32:15 +00:00
Brian Wellington
d9bf8dc2fd 686. [bug] dig and nslookup can now be properly aborted during
blocking operations. [RT #568]
2001-03-14 01:27:00 +00:00
Brian Wellington
10819730d2 pullup:
use isc_app_block instead of an ugly hack.
missing cancel_all in nslookup.
2001-03-14 01:25:38 +00:00
Brian Wellington
ff0d212c53 pullup:
If the app is blocked and a shutdown signal arrives, just exit().
2001-03-14 01:24:53 +00:00
Andreas Gustafsson
d0721a10da there will be a 9.1.1rc5 after all 2001-03-13 23:52:11 +00:00
Andreas Gustafsson
ba67a0af9d 778. [bug] When starting cache cleaning, cleaning_timer_action()
returned without first pausing the iterator, which
                        could cause deadlock. [RT #998]
(already fixed on mainline)
2001-03-13 23:43:03 +00:00
Brian Wellington
861271f74d 777. [bug] An empty forwarders list in a zone would not
override global forwarders. [RT #995]
2001-03-13 02:40:22 +00:00
Andreas Gustafsson
5211b1929b updated for 9.1.1 2001-03-13 02:18:42 +00:00
Andreas Gustafsson
9e6b08f9a2 rephrased 775. 2001-03-13 02:13:15 +00:00
Brian Wellington
b3e8482fe7 fix grammar & spelling. 2001-03-11 18:39:53 +00:00
Andreas Gustafsson
c05580663d made error messages about bad netmasks consistent 2001-03-08 18:39:50 +00:00
Brian Wellington
5cdead9bcf 775. [bug] acls with invalid netmasks caused the parser to
abort with an assertion failure. [RT #996]
(not applicable to the mainline)
2001-03-08 18:24:54 +00:00
Andreas Gustafsson
36f572b12c allow-update does not make sense in slave zones;
allow-update and allow-update-forwarding don't make sense in stub
zones
2001-03-07 23:50:34 +00:00
Brian Wellington
90bb4070d9 pullup:
772.   [bug]           Owner names could be incorrectly omitted from cache
                        dumps in the presence of negative caching entries.
                        [RT #991]
2001-03-07 23:33:18 +00:00
Andreas Gustafsson
d9fc1a290c regenerated 2001-03-07 18:51:57 +00:00
Andreas Gustafsson
8bdf7d9292 document the 'dnssec', 'dispatch', and 'lame-servers' log categories 2001-03-07 18:51:32 +00:00
Andreas Gustafsson
c3f028ec2d xref 767. -> [RT #961] 2001-03-06 02:11:24 +00:00
Brian Wellington
b1184abac8 767. [bug] The configuration parser handled invalid ports badly. 2001-03-06 02:05:34 +00:00
Andreas Gustafsson
75ac422722 added --- 9.1.1rc4 released --- line 2001-03-06 01:39:57 +00:00
Andreas Gustafsson
739dc58202 put 9.1.1rc4 changes in numerical order 2001-03-06 01:38:37 +00:00
Brian Wellington
0357746e35 pullup:
766.   [bug]           A few cases in query_find() could leak fname.
                        This would trigger the mpctx->allocated == 0
                        assertion when the server exited.
                        [RT #739, #776, #798, #812, #818, #821, #845,
                        #892, #935, #966]
2001-03-06 01:28:42 +00:00
Brian Wellington
6002113744 allow-update-forwarding for slave zones should be Yes 2001-03-05 23:45:26 +00:00
Andreas Gustafsson
7dc759f261 edited for 9.1.1rc4 2001-03-05 20:27:45 +00:00
Andreas Gustafsson
d25e6d4964 bumped to 9.1.1rc4 2001-03-05 20:26:02 +00:00
Brian Wellington
a7cd60788a more typos 2001-03-05 19:35:52 +00:00
Brian Wellington
3a61d865bd typos (not applicable to the mainline) 2001-03-05 18:28:00 +00:00
Andreas Gustafsson
bb643675f5 pullup: comment out gssapi stuff, since it doesn't work. 2001-03-05 18:27:08 +00:00
Brian Wellington
b2ee5367b4 a cvs pullup was somehow corrupted. 2001-03-04 23:03:22 +00:00
Brian Wellington
8f883a38d4 pullup:
709.   [bug]           ANY or SIG queries for data with a TTL of 0
                        would return SERVFAIL. [RT #620]
(this should make the name leak much less common)
2001-03-03 09:33:12 +00:00
Brian Wellington
c12c71271f missing space 2001-03-01 22:40:44 +00:00
Brian Wellington
a1f7a2f2c1 pullup:
756.   [bug]           dns_zone_load() could "return" success when no master
                        file was configured.

 755.   [bug]           Fix incorrectly formatted log messages in zone.c.
2001-03-01 20:58:19 +00:00
Brian Wellington
76351ca356 pullup: spelling [RT #936] 2001-03-01 17:48:32 +00:00
Brian Wellington
0e908b5ad1 pullup:
759.   [bug]           The resolver didn't turn off "avoid fetches" mode
                        when restarting, possibly causing resolution
                        to fail when it should not.  This bug only affected
                        platforms which support both IPv4 and IPv6. [RT #927]

 758.   [bug]           The "avoid fetches" code did not treat negative
                        cache entries correctly, causing fetches that would
                        be useful to be avoided.  This bug only affected
                        platforms which support both IPv4 and IPv6. [RT #927]
2001-02-28 21:20:32 +00:00
Andreas Gustafsson
06ebba2789 provide slightly less information on 754. 2001-02-26 19:13:10 +00:00
Andreas Gustafsson
aa709c2c11 added TSIG clock skew FAQ entry [RT #919] 2001-02-25 06:48:01 +00:00
Andreas Gustafsson
e7ad41ac0f pullup:
753.   [bug]           dig, host, and nslookup would fail to contact a
                        remote server if getaddrinfo() returned an IPv6
                        address on a system that doesn't support IPv6.
                        [RT #917]
2001-02-25 01:31:03 +00:00
Andreas Gustafsson
3a011d89ad include 754. in 9.1.1rc3 2001-02-25 01:17:54 +00:00
Brian Wellington
615b76151b pullup:
754.   [bug]           Certain failure returns from sendto() could
                        cause the server to retry the transmission
                        indefinitely. [RT #902]
2001-02-25 00:33:43 +00:00
Andreas Gustafsson
7fce9cf550 pullup:
750.   [bug]           A query should not match a DNAME whose trust level
                        is pending.  [RT #916]

 749.   [bug]           When a query matched a DNAME in a secure zone, the
                        server did not return the signature of the DNAME.
                        [RT #915]
2001-02-23 18:42:59 +00:00
Andreas Gustafsson
7ed00a5a11 pullup:
msg->tsigkey was not checked for NULL before deferencing [RT #913]
2001-02-23 18:27:59 +00:00
Andreas Gustafsson
d2fe53ddf9 previous pullup was missing a set of braces 2001-02-23 02:27:25 +00:00
Andreas Gustafsson
94a034153c added --- 9.1.1rc3 released --- marker 2001-02-23 01:25:21 +00:00
Brian Wellington
29e75c14f5 change 747 should reference [RT #865] 2001-02-23 00:20:50 +00:00
Brian Wellington
7fda3ccc64 pullup:
client_create() could return ISC_R_SUCCESS when it failed
2001-02-22 23:57:55 +00:00
Andreas Gustafsson
ca8357da60 pulled up AIX bison FAQ 2001-02-22 20:23:49 +00:00
Andreas Gustafsson
b24e1f6ce1 pullup:
747.   [bug]           The code to determine whether an IXFR was possible
                        did not properly check for a database that could
                        not have a journal. [RT #908]
2001-02-22 19:33:14 +00:00
Andreas Gustafsson
f6fddb4c17 updated for 9.1.1rc3 2001-02-22 19:18:25 +00:00
Andreas Gustafsson
82ac60757a pullup: cache-file option name was misspelled 2001-02-22 17:30:28 +00:00
Andreas Gustafsson
a048fee6fb cross reference section on IPv6 Support in BIND 9
to IPv6 address format appendix
2001-02-22 00:50:10 +00:00
Andreas Gustafsson
17086fb722 pullup:
648.   [port]          Add support for pre-RFC2133 IPv6 implementations.
2001-02-21 00:16:10 +00:00
Brian Wellington
1c8301f980 pullup:
The IN class was not explicitly specified in the DNAME examples, which is
not consistent with other examples. [RT #717]
2001-02-20 23:53:07 +00:00
Andreas Gustafsson
250783f9ba pullup:
746.   [bug]           The sdb didn't clone rdatasets properly, causing
                        a crash when the server followed delegations. [RT #905]
2001-02-20 23:50:28 +00:00
Andreas Gustafsson
319c394095 $ORIGIN examples needed some more dots 2001-02-20 23:10:01 +00:00
Andreas Gustafsson
8936ed3afd rephrase 2001-02-20 22:03:15 +00:00
Andreas Gustafsson
8682785a17 no need to specifically ask people to mail bind9-bugs about mempool leaks 2001-02-20 22:02:02 +00:00
Andreas Gustafsson
5b5656f743 pullup:
744. [bug]
When returning DNS_R_CNAME or DNS_R_DNAME as the result of an ANY or SIG
query, the resolver failed to setup the return event's rdatasets, causing an
assertion failure in the query code.  [RT #881]

The fix includes the addition of the DNS_NAMEATTR_CHAINING attribute,
and the removal of the DNS_NAMEATTR_CNAME and DNS_NAMEATTR_DNAME attributes,
because they were not used anywhere in the current source.
2001-02-20 21:56:25 +00:00
Andreas Gustafsson
5df110682c pullup:
Mention that on a threaded Linux build, the amount of memory is not the
sum of that of each "process".
2001-02-19 06:06:21 +00:00
Brian Wellington
8534feb179 pullup:
if dns_message_gettempname() failed, we would try to call
dns_message_putemprdataset() on an uninitialized pointer
2001-02-17 02:27:42 +00:00
Andreas Gustafsson
4adc493cb6 pullup:
fix the potential buffer overflow in printgreeting() [RT #863]
2001-02-17 01:19:54 +00:00
Andreas Gustafsson
d0dc44cac0 pullup:
fix a potential (but highly unlikely) memory leak.
2001-02-17 00:56:29 +00:00
Brian Wellington
7c81388679 the fcntl() problem with /dev/random still exists on FreeBSD 4.2 if running as
non-root.
2001-02-17 00:47:28 +00:00
Andreas Gustafsson
316ea6e318 xref 743. -> RT #861 2001-02-16 21:43:12 +00:00
Andreas Gustafsson
39fab32598 743. [bug] Receiving a large number of certain malformed
answers could cause named to stop responding.
2001-02-16 21:39:00 +00:00
Brian Wellington
50673f3cc7 742. [bug] dig +domain did not work. [RT #850]
(fixed differently on the mainline)
2001-02-15 23:39:41 +00:00
Andreas Gustafsson
9f2a581731 pullup: missing space between words in error message 2001-02-15 19:39:09 +00:00
Andreas Gustafsson
9684ec2e8a pullup:
Q: I installed BIND 9 and restarted named, but it's still BIND 8.  Why?
2001-02-14 23:02:42 +00:00
Andreas Gustafsson
d56efce69e pullup:
737.   [port]          stdtime.c failed to compile on certain platforms.
2001-02-14 23:01:07 +00:00
Andreas Gustafsson
84e6ea2713 pullup:
Give more information when isc_mempool_destroy() dies with an assertion
failure, in the hope that we'll be able to fix the bug one day.
2001-02-13 20:43:44 +00:00
Andreas Gustafsson
15a0f84845 pullup:
738.   [bug]           If a non-threadsafe sdb driver supported AXFR and
                        received an AXFR request, it would deadlock or die
                        with an assertion failure.
2001-02-13 20:41:05 +00:00
Andreas Gustafsson
cf8b548fb7 cross reference 733. to RT #821 2001-02-13 17:25:05 +00:00
Andreas Gustafsson
a3d0d44b14 install refcount.h 2001-02-12 23:11:27 +00:00
Andreas Gustafsson
dfcc6d0ae8 --- 9.1.1rc2 released --- 2001-02-12 22:12:29 +00:00
Andreas Gustafsson
ddf1be3ff0 regenerated HTML 2001-02-12 22:11:02 +00:00
Andreas Gustafsson
5939589262 RFC 1035 specifies that the current origin should be restored after
an <command>$INCLUDE</command>, but it is silent on whether the current
domain name should also be restored.  BIND 9 restores both of them.
This could be construed as a deviation from RFC 1035, a feature, or both.
[RT #874]
2001-02-12 22:07:12 +00:00
Andreas Gustafsson
b7094f374a edited for 9.1.1rc2 2001-02-12 21:56:19 +00:00
Andreas Gustafsson
1aac646480 9.1.1rc2 2001-02-12 21:53:34 +00:00
Andreas Gustafsson
dc14e9192d clarify 708. 2001-02-12 21:46:46 +00:00
Andreas Gustafsson
158eb6d7ab bump major library version number since change 733. changed
the size of the public structure dns_acl_t
2001-02-12 17:44:16 +00:00
Andreas Gustafsson
19f9698617 Do not use a parallel "make". 2001-02-09 18:35:19 +00:00
Andreas Gustafsson
75778f05fc reference to RT #743 should be #733 2001-02-09 17:33:43 +00:00
Brian Wellington
8ea2c27256 pullup:
733.   [bug]           Reference counts of dns_acl_t objects need to be
                        locked but were not. [RT #801]
2001-02-09 01:01:55 +00:00
Andreas Gustafsson
76b29b90c5 refcount.h 2001-02-09 00:28:15 +00:00
Andreas Gustafsson
2d4608f817 pullup: added missing copyright message; ISC_REFERENCE_H -> ISC_REFCOUNT_H 2001-02-09 00:27:50 +00:00
Andreas Gustafsson
45b14c489d pullup:
#include <isc/mutex.h>
2001-02-09 00:22:37 +00:00
Andreas Gustafsson
5930d8ab30 pullup:
708.  [bug]           When building with --with-openssl, the openssl headers
                      included should not be used. [RT #702]
2001-02-08 17:18:45 +00:00
Andreas Gustafsson
31b349d025 pullup:
729.  [port]          pthread_setconcurrency() needs to be called on Solaris.
2001-02-07 22:36:20 +00:00
Brian Wellington
470a973e50 pullup:
727.	[port]		Work around OS bug where accept() succeeds but
			fails to fill in the peer address of the accepted
			connection, by treating it as an error rather than
			an assertion failure. [RT #809]
2001-02-07 20:21:46 +00:00
Andreas Gustafsson
566167f935 added --- 9.1.1rc1 released --- line 2001-02-07 19:52:17 +00:00
Andreas Gustafsson
f88d50dc84 regenerated 2001-02-07 19:26:34 +00:00
Andreas Gustafsson
08fb898c6f pullup:
692.   [bug]           Deal with systems that have getaddrinfo() but not
                        gai_strerror(). [RT #679]
2001-02-07 19:26:22 +00:00
Andreas Gustafsson
da7f1a0520 transfer-source entries mentioned ip_addr but not port;
notify-source was missing
2001-02-07 19:13:14 +00:00
Andreas Gustafsson
376b4b944d bumped to 9.1.1rc1 2001-02-07 18:59:09 +00:00
Andreas Gustafsson
9002d70655 pullup:
do_next_response() was unlinking an event from the wrong list
(apparently this code was never actually executed)
2001-02-07 18:50:37 +00:00
Andreas Gustafsson
1a3518cca3 pullup:
Only check to make sure that the full number of bytes were sent if the
send operation succeeded.  I'm still not convinced that send_done() works
correctly, but making other changes that look correct causes assertion failures.
2001-02-07 02:41:47 +00:00
Andreas Gustafsson
3e4ebe51ad pullup:
The ISC__BUFFER_INIT macro had a typo.
2001-02-07 02:32:16 +00:00
Andreas Gustafsson
3fec0be47f pullup:
INSIST that accept() returns a socket of the correct protocol family.  Also
assign the "pf" field in the new socket.
2001-02-06 18:10:28 +00:00
Andreas Gustafsson
93095c4d53 resource limits are implemented 2001-02-06 16:51:34 +00:00
Andreas Gustafsson
b86ea45de3 When memsetting the entropy pool to 0, the count should be the size in bytes,
not words.
2001-02-05 23:31:05 +00:00
Andreas Gustafsson
ef6958e0a5 updated for 9.1.1rc1 2001-02-05 21:46:02 +00:00
Andreas Gustafsson
b590f9eff8 pullup:
The flags field of the request structures were not initialized (thanks, purify)
2001-02-05 21:19:35 +00:00
Andreas Gustafsson
107d933e97 grammar 2001-02-05 20:37:03 +00:00
Andreas Gustafsson
e45ea32b07 build success reported on HP-UX 10.20 [RT #788] 2001-02-02 17:54:04 +00:00
Andreas Gustafsson
23a78da970 pullup:
723.   [bug]           Referrals whose NS RRs had a 0 TTL caused the resolver
                        to return DNS_R_SERVFAIL. [RT #783]
2001-02-02 01:32:25 +00:00
Andreas Gustafsson
dd010363a5 sortlist is implemented 2001-02-01 21:55:42 +00:00
Brian Wellington
6089276fdd spelling 2001-02-01 17:59:56 +00:00
Mark Andrews
3e91b30dea pullup:
720.   [bug]           Server could enter infinite loop in
                        dispatch.c:do_cancel(). [RT #743]
2001-02-01 00:43:49 +00:00
Andreas Gustafsson
62d883a72f xref 691. to RT #734 2001-01-31 18:58:39 +00:00
Andreas Gustafsson
e10e40b9c9 xref 719. to RT #763 2001-01-31 18:22:49 +00:00
Andreas Gustafsson
e7ad36a62d pullup:
716.  [bug]           The first line of a $INCLUDE master file was lost if
                       a origin was specified. [RT #744]
 Adjust comment.
2001-01-31 18:06:29 +00:00
Andreas Gustafsson
74c207a5ab pullup:
719.   [bug]           Rapid reloads could trigger an assertion failure.
                        [RT #743]
2001-01-31 18:04:45 +00:00
Andreas Gustafsson
cc1bf03eb5 pullup:
715.   [bug]           Resolving some A6 chains could cause an assertion
                        failure in adb.c. [RT #738]
2001-01-30 22:26:09 +00:00
Andreas Gustafsson
11320638f6 pullup:
Certain TKEY processing failure modes could
reference an uninitialized variable, causing the
server to crash. [RT #750]
2001-01-30 22:12:22 +00:00
Andreas Gustafsson
299f44d3b2 added note about new reserved words in named.conf [RT #753, #731] 2001-01-30 21:39:44 +00:00
cvs2git
44e2022878 This commit was manufactured by cvs2git to create branch 'v9_1'. 2001-01-30 02:50:53 +00:00
Andreas Gustafsson
abea1e6db8 pullup: chroot() happens before reading named.conf [RT #737] 2001-01-30 01:06:48 +00:00
Andreas Gustafsson
876ab5140e pullup: NetBSD-current -> NetBSD 1.5 [RT #716]; other updates to the list
of supported operating systems
2001-01-26 18:56:14 +00:00
Andreas Gustafsson
f4ad59d79c pullup:
711.   [bug]           The libisc and liblwres implementations of
                        inet_ntop contained an off by one error.
2001-01-25 20:13:38 +00:00
Brian Wellington
d1880ec922 spelling [RT #705] 2001-01-24 17:33:19 +00:00
David Lawrence
8179cd022d updated diffs 2001-01-24 05:43:55 +00:00
David Lawrence
3b786c01f5 new mdnkit release from jpnic 2001-01-24 01:05:30 +00:00
Brian Wellington
a09ff28a99 pullup:
706.   [bug]           Zones with an explicit "allow-update { none; };"
                        were considered dynamic and therefore not reloaded
                        on SIGHUP or "rndc reload".
2001-01-24 00:17:26 +00:00
Andreas Gustafsson
b6e1646ae9 pullup: multiple zone_test fixes 2001-01-24 00:05:24 +00:00
Andreas Gustafsson
33c7e6ef6e pullup:
documented procedure for manually changing dynamic zones using "rndc stop"
2001-01-23 23:55:05 +00:00
Andreas Gustafsson
6b52e24008 pullup: rdataset -> sigrdataset 2001-01-23 02:05:11 +00:00
Andreas Gustafsson
6369575861 pullup: freerrset() wasn't. 2001-01-23 01:56:48 +00:00
Andreas Gustafsson
8ecad4ee2e pullup:
698.   [bug]           Aborting nsupdate with ^C would lead to several
                        race conditions.
2001-01-22 23:15:09 +00:00
Andreas Gustafsson
8cee20f743 pullup:
zero length keys from the config file were not being logged as too short to be
secure.
2001-01-22 20:42:29 +00:00
Brian Wellington
64251bf2ed pullup:
Fixed 39 cases where either named or rndc would crash when
given empty string values in rndc.conf or on the command line
2001-01-22 20:12:36 +00:00
Brian Wellington
27a94b364e pullup:
699.   [bug]           The lexer mishandled empty quoted strings. [RT #694]
2001-01-22 20:04:10 +00:00
Andreas Gustafsson
1162114456 pullup:
700.   [bug]           $GENERATE range check was wrong. [RT #688]
2001-01-22 18:24:41 +00:00
Andreas Gustafsson
2fcb761366 pullup:
make dns_name_fromtext fail when passed an empty string, not assert.
2001-01-22 18:23:12 +00:00
Andreas Gustafsson
03d5137280 pullup:
694.   [bug]           $GENERATE did not produce the last entry.
                        [RT #682, #683]
2001-01-19 21:21:13 +00:00
Andreas Gustafsson
210c2d020f pullup: Update FreeBSD fcntl() warning 2001-01-19 18:46:16 +00:00
Andreas Gustafsson
41ce653860 pullup:
693.   [bug]           An empty lwres statement in named.conf caused
                        the server to crash while loading.
2001-01-19 02:37:51 +00:00
Brian Wellington
a87239f9de pullup:
691.   [bug]           Configuring per-view forwarders caused an assertion
                        failure. [RT #675]
2001-01-18 21:46:25 +00:00
Andreas Gustafsson
1153367782 typo 2001-01-18 02:17:06 +00:00
Andreas Gustafsson
4a31eb33ca pullup of latest FAQs 2001-01-18 02:16:50 +00:00
Andreas Gustafsson
dec7e52a8b regenerated HTML 2001-01-17 20:48:40 +00:00
Andreas Gustafsson
fb4d841853 685. [bug] nslookup should use the search list/domain options
from resolv.conf by default. [RT #405, #630]
2001-01-17 19:37:37 +00:00
Andreas Gustafsson
50a61b62b3 updated for 9.1.0 2001-01-17 19:11:33 +00:00
Andreas Gustafsson
4f1dc76ae1 added --- 9.1.0 released --- line 2001-01-17 18:57:39 +00:00
Andreas Gustafsson
570750713e bumped to 9.1.0 2001-01-17 18:57:08 +00:00
Andreas Gustafsson
268c38992c pullup:
687.   [bug]           Only say we have IPv6, with sufficent functionality,
                        if it has actually been tested.  [RT #586]
2001-01-17 17:30:50 +00:00
Brian Wellington
02fe70191c pullup:
the rrset-order example had a typo.
2001-01-17 02:45:14 +00:00
Andreas Gustafsson
767919f75d pullup:
652.   [bug]           zone_saveunique() did not report the new name.
                        [RT #668]
2001-01-17 00:19:50 +00:00
Andreas Gustafsson
52469521f0 pullup:
652.   [bug]           zone_saveunique() did not report the new name.
2001-01-17 00:19:01 +00:00
Brian Wellington
4904a3a12d pullup:
race condition [RT #670]
2001-01-16 23:25:16 +00:00
Andreas Gustafsson
10ca4ff351 typo 2001-01-16 23:00:01 +00:00
Andreas Gustafsson
43eb82666d pullup:
650.   [bug]           SIG(0) records were being generated and verified
                        incorrectly. [RT #606]
2001-01-16 22:38:42 +00:00
Brian Wellington
eaedbce579 pullup:
removed redundant error check [RT #669]
2001-01-16 22:30:55 +00:00
Andreas Gustafsson
06d37959ab regenerated HTML 2001-01-16 21:14:00 +00:00
Andreas Gustafsson
311c8d03fa expanded treatment of stub zones 2001-01-16 21:13:55 +00:00
Andreas Gustafsson
188cc74edf note that stub zones are only partially supported 2001-01-16 20:45:42 +00:00
Andreas Gustafsson
9fc9a94a2f added section 6. No Information Leakage between Zones 2001-01-16 20:36:06 +00:00
Andreas Gustafsson
02f19fbd8e pullup:
682.   [bug]           nslookup displayed SOA records incorrectly. [RT #665]
2001-01-16 18:20:11 +00:00
Andreas Gustafsson
04ca63661a pullup:
684.   [bug]           Memory leak with view forwarders. [RT #656]
2001-01-16 18:12:08 +00:00
Andreas Gustafsson
966d673d66 pullup:
683.   [bug]           File descriptor leak in isc_lex_openfile().
2001-01-16 17:49:53 +00:00
Andreas Gustafsson
3f1b1020d9 pullup:
680.   [bug]           dns_rdata_fromstruct() mis-handles options bigger
                        than 255 octets.
2001-01-16 17:45:27 +00:00
Andreas Gustafsson
4f6b82d5aa pullup:
681.   [bug]           $GENERATE specifying output format was broken. [RT#653]
2001-01-16 17:43:55 +00:00
Brian Wellington
dea7c1ecd4 pullup:
#675 was a bug, not a func.
2001-01-13 01:57:10 +00:00
Andreas Gustafsson
5a57443c63 added "--- 9.1.0rc1 released ---" line 2001-01-13 00:12:24 +00:00
Andreas Gustafsson
c7632b2f48 updated for 9.1.0rc1 2001-01-13 00:09:37 +00:00
Brian Wellington
f17554deb0 pullup:
head is not in the default path on irix, but sed is
2001-01-13 00:05:55 +00:00
Andreas Gustafsson
7ae8d0386f pullup:
677.   [bug]           dnssec-signzone would occasionally use the wrong ttl
                        for database operations and fail. [RT #643]
2001-01-12 23:44:02 +00:00
Brian Wellington
562f662a03 more duplicate $Id lines 2001-01-12 20:39:12 +00:00
Brian Wellington
62d7143b97 remove duplicate $Id line 2001-01-12 20:33:17 +00:00
Brian Wellington
0bff1e596a pullup:
678.   [bug]           "tranfer-format one-answer;" could trigger an assertion
                        failure. [RT #646]
2001-01-12 20:31:14 +00:00
Brian Wellington
2d70d20dc4 pullup:
Removed unused struct member
2001-01-12 20:29:23 +00:00
Andreas Gustafsson
eff5a7ccfd pullup:
679.   [bug]           $INCLUDE could leak memory and file descriptors on
                        reload. [RT #639]
2001-01-12 20:19:00 +00:00
Andreas Gustafsson
ec72e372b8 pullup: Removed kludge for different error spaces in dns_dbtable_create(). 2001-01-12 01:04:59 +00:00
Andreas Gustafsson
9328be2f94 bumped to 9.1.0rc1 2001-01-11 21:39:54 +00:00
Brian Wellington
d2f60654d7 pullup:
if the adb had ever returned addresses of a family
other than AF_INET or AF_INET6, there would have been a memory leak
2001-01-11 20:59:57 +00:00
Brian Wellington
bd67af7e3d pullup:
yet another potential memory leak
2001-01-11 20:58:35 +00:00
Andreas Gustafsson
09ed371c7c pullup:
Fixed an uninitialized variable, removed a dead line of code, and changed
several response processing functions to not require keyrings.
2001-01-11 20:34:10 +00:00
Brian Wellington
e10f6d07f6 pullup:
676.   [bug]           Log messages about lame servers to category
                        'lame-servers' rather than 'resolver', so as not
                        to be gratuitously incompatible with BIND 8.
2001-01-11 20:06:59 +00:00
Brian Wellington
b79bf0872a pullup:
make_nonblock() errors were reported twice, and one of the instances
used the wrong errno value [RT #640]
2001-01-11 20:01:39 +00:00
Andreas Gustafsson
56b970d184 pullup:
zone_idetach() should be static.
2001-01-11 18:38:58 +00:00
Andreas Gustafsson
0804543b37 pullup:
675.   [func]          TKEY queries could cause the server to leak
                        memory.
2001-01-11 18:32:58 +00:00
Andreas Gustafsson
36dee741fb pullup:
The changes to reduce allocations in the memory code exposed the sheer
brokenness of this program.
2001-01-11 18:31:10 +00:00
Andreas Gustafsson
907b305fd0 pullup:
The usage should print named-checkzone, not zone_test.
2001-01-11 18:30:28 +00:00
Andreas Gustafsson
3ae6834c9a pullup:
isc_buffer_region -> isc_buffer_usedregion
2001-01-11 18:28:13 +00:00
Andreas Gustafsson
13b5f3d464 pullup:
The asserts in fromstruct were too strong - it's possible to have a non-NULL
key and keylen == 0 if the pointer is to a 0 byte allocation.
2001-01-11 18:24:56 +00:00
Andreas Gustafsson
4a3d1a99d7 pullup:
670.   [bug]           The lwres replacements for getaddrinfo and
                        getipnodebyname didn't properly check for the
                        existence of the sockaddr sa_len field.
2001-01-10 21:50:09 +00:00
Andreas Gustafsson
65ae6ac390 pullup 2001-01-10 18:21:43 +00:00
Brian Wellington
56ceb9db8e update copyrights on the release branch. 2001-01-09 22:53:46 +00:00
Andreas Gustafsson
831acf3232 pullup:
667.   [bug]           On Linux, running named with the -u option and a
                        non-world-readable configuration file didn't work.
                        [RT #626]
2001-01-09 19:38:00 +00:00
Brian Wellington
49da32935f pullup:
672.   [bug]           The wrong time was in the "time signed" field when
                        replying with BADTIME error.
2001-01-09 19:36:20 +00:00
Andreas Gustafsson
f03aa2d025 pullup:
clarified "subdomain" description for update-policy statement.
2001-01-09 19:05:56 +00:00
Brian Wellington
0918a266f0 pullup:
654.   [bug]           Origin was being forgotten in TCP retries in dig.
                        [RT #574]

 653.   [bug]           +defname option in dig was reversed in sense.
                        [RT #549]
(patches slighly modified)
2001-01-08 23:43:01 +00:00
Brian Wellington
48b7b8fb19 664. [bug] The t_tasks and t_timers module tests are now skipped
when building without threads, since they require
                        threads.
2001-01-08 21:01:08 +00:00
Andreas Gustafsson
bce7c42fd2 pullup:
666.   [bug]           If a request sent by dig is longer than 512 bytes,
                        use TCP.
2001-01-08 20:59:55 +00:00
Andreas Gustafsson
938a977a42 tabified 2001-01-08 19:36:11 +00:00
Andreas Gustafsson
262564cb76 added --- 9.1.0b3 released --- line 2001-01-08 19:34:34 +00:00
Brian Wellington
f682d506e4 pullup:
661. fix failed to destroy transfer object after sending response
2001-01-08 19:30:37 +00:00
Andreas Gustafsson
289b5961b3 in 661., note additional RT entries likely to be fixed by
this change, and provide less clues to DOS crackers
2001-01-08 19:08:27 +00:00
Brian Wellington
f6938dad17 pullup:
661.   [bug]           UDP IXFR requests with EDNS options caused
                        an assertion failure (mpctx->allocated == 0).
                        [RT #623]
2001-01-06 03:09:54 +00:00
Andreas Gustafsson
9a60f89086 updated for 9.1.0b3 2001-01-06 01:37:21 +00:00
Andreas Gustafsson
169c2f4094 bumped to 9.1.0b3 2001-01-06 01:35:29 +00:00
Andreas Gustafsson
e149301460 pullup:
659.   [performance]   Rewrite the name compression code to be much faster.
2001-01-06 01:33:34 +00:00
Andreas Gustafsson
f13db7a635 658. is in 9.1, too 2001-01-06 00:15:53 +00:00
Andreas Gustafsson
3aba6023de pullup:
Remove DNS_COMPRESS_GLOBAL, since the only type of global compression
is GLOBAL14
2001-01-06 00:11:23 +00:00
Andreas Gustafsson
dbe83aa9d7 regenerated HTML 2001-01-06 00:10:51 +00:00
Andreas Gustafsson
55115bffc3 pullup:
651.   [func]          The AD bit in responses now has the meaning
                        specified in <draft-ietf-dnsext-ad-is-secure>.
2001-01-05 23:50:16 +00:00
Andreas Gustafsson
f2383e8327 pullup:
657.   [bug]           When a listen-on statement in an lwres block does not
                        specifiy a port, use 921, not 53.  Also update the
                        listen-on documentation. [RT #616]
2001-01-05 23:44:56 +00:00
Brian Wellington
ed9e25e312 pullup:
647.   [bug]           Resolver queries sent after following multiple
                        referrals had excessively long retransmission
                        timeouts due to incorrectly counting the referrals
                        as "restarts".
2001-01-05 22:18:28 +00:00
Andreas Gustafsson
db55ad5320 pullup:
It was possible to join to an already running fctx
after it had "cloned" its events, but before it sent
them.  In this case, the event of the newly joined
fetch would not contain the answer, and would
trigger the INSIST() in fctx_sendevents().
[RT #597, #605, #607]
2001-01-05 22:06:19 +00:00
Andreas Gustafsson
19902e415f pullup:
647.   [bug]           Resolver queries sent after following multiple
                        referrals had excessively long retransmission
                        timeouts due to incorrectly counting the referrals
                        as "restarts".
2001-01-05 22:05:27 +00:00
Andreas Gustafsson
b761459e7b pullup: wrong result code tested 2001-01-03 23:34:54 +00:00
Andreas Gustafsson
3d28abda8b pullup:
642.   [bug]           #622 needed more work.
2001-01-03 20:45:40 +00:00
Andreas Gustafsson
e82fe0b699 pullup:
646.   [bug]           The UnixWare ISC_PLATFORM_FIXIN6INADDR fix in isc/net.h
                        didn't _cleanly_ fix the problem it was trying to fix.
2001-01-03 20:37:58 +00:00
Andreas Gustafsson
743ab113b4 pullup:
645. [port] BSD/OS 3.0 needs pthread_init(). [RT #603]
2001-01-03 20:26:47 +00:00
Andreas Gustafsson
1ce3c31379 pullup:
642.   [bug]           Break the exit_check() race in the zone module.
                        [RT #598]
+ fix lock heirachy in zone_shutdown()
2000-12-29 19:16:36 +00:00
Andreas Gustafsson
0073346086 pullup:
641.   [bug]            caused a uninitialized link to be used.
                        [RT #595]
2000-12-28 18:46:46 +00:00
Andreas Gustafsson
6491263704 pullup: reorder the pthread_create tests 2000-12-28 17:44:56 +00:00
cvs2git
65bfedf5a0 This commit was manufactured by cvs2git to create branch 'v9_1'. 2000-12-28 01:42:01 +00:00
2365 changed files with 139173 additions and 293951 deletions

1009
CHANGES

File diff suppressed because it is too large Load Diff

View File

@@ -12,18 +12,3 @@ 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.
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.

View File

@@ -0,0 +1,18 @@
1061. [bug] If periodic cache cleaning happened to start
while cleaning due to reaching the configured
maximum cache size was in progress, the server
could catch an assertion failure. [RT #1912]
1054. [bug] winnt: cfg_categories and cfg_modules need to be
visible outside of the libisccfg DLL.
1050. [bug] Log messages reporting malformed IP addresses in
address lists such as that of the forwarders option
failed to include the correct error code, file
name, and line number. [RT #1890]
1048. [bug] Servers built with -DISC_MEM_USE_INTERNAL_MALLOC=1
didn't work.
1046. [bug] The help message for the --with-openssl configure
option was inaccurate. [RT #1880]

172
FAQ
View File

@@ -4,7 +4,7 @@
Frequently Asked Questions about BIND 9
Q: Why doesn't -u work on Linux 2.2.x when I build with --enable-threads?
Q: Why doesn't -u work on Linux 2.2.x?
A: Linux threads do not fully implement the Posix threads (pthreads) standard.
In particular, setuid() operates only on the current thread, not the full
@@ -13,25 +13,24 @@ 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.
In the 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.
Configuring BIND9 with the --disable-threads option 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"?
Q: Why does named log the error message "no TTL specified" and refuse
to load my zone file?
A: Your zone file is illegal according to RFC1035. It must either
have a line like
A: Your zone file must either have a line like
$TTL 86400
@@ -40,6 +39,9 @@ like the "84600" in this example:
example.com. 86400 IN SOA ns hostmaster ( 1 3600 1800 1814400 3600 )
BIND 8 incorrectly accepted files that had neither.
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
@@ -65,13 +67,11 @@ 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?
Q: How do I produce a usable core file 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.
A: Apply the kernel patch found in bind9/linux/coredump-patch and rebuild
the kernel. This patch causes multithreaded programs to dump the correct
thread.
Q: How do I restrict people from looking up the server version?
@@ -116,6 +116,18 @@ 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 install on AIX and compilation is failing with
errors like
"confparser.c", line 8244.1: 1506-343 (S) Redeclaration of
token_to_keyword differs from previous declaration on line 348 of
"confparser.c".
A: You probably have a buggy version of GNU bison installed on your
system. Remove bison it from your path, remove the config.cache file,
and rerun configure so that it picks up the AIX yacc instead.
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?
@@ -139,129 +151,3 @@ end of input". What's wrong?
A: This error message is caused by a known bug in BIND 8.2.3 and will
be fixed in 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?
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 transfered 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 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 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 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 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.
Q: When I try to use rndc, I get the error message "network
unreachable" or "connection refused", even though I know named is
running.
A: You probably have "default-server localhost" in /etc/rndc.conf,
your /etc/hosts or DNS maps "localhost" to both the IPv4 loopback
address 127.0.0.1 and the IPv6 loopback address ::1, and you do not
have IPv6 fully operational. Change the "default-server localhost" to
"default-server 127.0.0.1" to make sure rdnc does not try to contact
the name server using IPv6.

View File

@@ -13,7 +13,7 @@
# 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 2001/07/13 01:38:49 gson Exp $
# $Id: Makefile.in,v 1.36.2.1 2001/01/09 22:31:05 bwelling Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -21,7 +21,7 @@ top_srcdir = @top_srcdir@
@BIND9_VERSION@
SUBDIRS = make lib bin doc @LIBBIND@
SUBDIRS = make lib bin doc
TARGETS =
@BIND9_MAKE_RULES@
@@ -31,16 +31,11 @@ distclean::
rm -f libtool isc-config.sh
rm -f util/conf.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}
${INSTALL_PROGRAM} isc-config.sh ${DESTDIR}${bindir}
tags:
rm -f TAGS

138
README
View File

@@ -1,3 +1,4 @@
BIND 9
BIND version 9 is a major rewrite of nearly all aspects of the
@@ -41,69 +42,63 @@ BIND 9
U.S. Defense Information Systems Agency
USENIX Association
Stichting NLnet - NLnet Foundation
Nominum, Inc.
BIND 9.2.0
BIND 9.2.0 introduces a number of new features over 9.1,
including:
BIND 9.1.3
- The size of the cache can now be limited using the
"max-cache-size" option.
BIND 9.1.3 is a maintenance release, containing fixes for
a number of bugs in 9.1.2 but no new features.
- The server can now automatically convert RFC1886-style
recursive lookup requests into RFC2874-style lookups,
when enabled using the new option "allow-v6-synthesis".
This allows stub resolvers that support AAAA records
but not A6 record chains or binary labels to perform
lookups in domains that make use of these IPv6 DNS
features.
Features introduced in 9.1.0 included:
- Performance has been improved.
- Many BIND 8 features previously unimplemented in BIND 9,
including domain-specific forwarding, the $GENERATE
master file directive, and the "blackhole", "dialup",
and "sortlist" options
- The man pages now use the more portable "man" macros
rather than the "mandoc" macros, and are installed
by "make install".
- Forwarding of dynamic update requests; this is enabled
by the "allow-update-forwarding" option
- The named.conf parser has been completely rewritten.
It now supports "include" directives in more
places such as inside "view" statememnts, and it no
longer has any reserved words.
- A new, simplified database interface and a number of
sample drivers based on it; see doc/misc/sdb for details
- The "rndc status" command is now implemented.
- Support for building single-threaded servers for
environments that do not supply POSIX threads
- rndc can now be configured automatically.
- New configuration options: "min-refresh-time",
"max-refresh-time", "min-retry-time", "max-retry-time",
"additional-from-auth", "additional-from-cache",
"notify explicit"
- A BIND 8 compatible stub resolver library is now
included in lib/bind.
- Faster lookups, particularly in large zones.
- OpenSSL has been removed from the distribution. This
means that to use DNSSEC, OpenSSL must be installed and
the --with-openssl option must be supplied to configure.
This does not apply to the use of TSIG, which does not
require OpenSSL.
BIND 9.1 also includes experimental implementations of a
number of DNS protocols extensions still under development
in the IETF. These include transparent processing of
unknown RR types and use of the EDNS "DNSSEC OK" bit to
explicitly enable DNSSEC processing in responses.
- The source distribution now builds on Windows NT/2000.
See win32utils/readme1.txt and win32utils/win32-build.txt
for details.
Cryptographic operations are now based on the OpenSSL
library instead of DNSsafe.
This distribution also includes a new lightweight stub
resolver library and associated resolver daemon that fully
support forward and reverse lookups of both IPv4 and IPv6
addresses. This library is considered experimental and
is not a complete replacement for the BIND 8 resolver library.
Applications that use the BIND 8 res_* functions to perform
DNS lookups or dynamic updates still need to be linked against
the BIND 8 libraries. For DNS lookups, they can also use the
new "getrrsetbyname()" API.
BIND 9.1 is primarily a name server software distribution.
In addition to the name server, it also includes a new
lightweight stub resolver library and associated resolver
daemon that fully support forward and reverse lookups of both
IPv4 and IPv6 addresses. This library is still considered
experimental and is not a complete replacement for the BIND 8
resolver library. Applications that use the BIND 8 res_*
functions to perform DNS lookups or dynamic updates still need
to be linked against the BIND 8 libraries. For DNS lookups,
they can also use the new "getrrsetbyname()" API.
BIND 9.2 is capable of acting as an authoritative server
BIND 9.1 is capable of acting as an authoritative server
for DNSSEC secured zones. This functionality is believed to
be stable and complete except for lacking support for wildcard
records in secure zones.
When acting as a caching server, BIND 9.2 can be configured
When acting as a caching server, BIND 9.1 can be configured
to perform DNSSEC secure resolution on behalf of its clients.
This part of the DNSSEC implementation is still considered
experimental. For detailed information about the state of the
@@ -119,6 +114,11 @@ BIND 9.2.0
IPv6, you must specify "listen-on-v6 { any; };"
in the named.conf options statement.
There are known problems with thread signal handling
under Solaris 2.6 and BSD/OS. We recommend disabling
threads with "configure --disable-threads" on these
platforms.
FreeBSD prior to 4.2 (and 4.2 if running as non-root)
and OpenBSD prior to 2.8 log messages like
"fcntl(8, F_SETFL, 4): Inappropriate ioctl for device".
@@ -130,7 +130,7 @@ BIND 9.2.0
A bug in the Windows 2000 DNS server can cause zone transfers
from a BIND 9 server to a W2K server to fail. For details,
see the "Zone Transfers" section in doc/misc/migration.
For a detailed list of user-visible changes from
previous releases, see the CHANGES file.
@@ -146,28 +146,22 @@ Building
COMPAQ Tru64 UNIX 4.0D
COMPAQ Tru64 UNIX 5 (with IPv6 EAK)
FreeBSD 3.4-STABLE, 3.5, 4.0, 4.1
HP-UX 11.x, x < 11
HP-UX 11
IRIX64 6.5
NetBSD 1.5
NetBSD 1.5 (with unproven-pthreads-0.17)
Red Hat Linux 6.0, 6.1, 6.2, 7.0
Solaris 2.6, 7, 8
Windows NT/W2K
HP-UX 11.11 is not yet supported due to its incompatible
SIOCGLIFCONF ioctl.
Additionally, we have unverified reports of success building
previous versions of BIND 9 from users of the following systems:
AIX 5L
SuSE Linux 7.0
Slackware Linux 7.x, 8.0
Red Hat Linux 7.1
OpenBSD 2.6, 2.8, 2.9
Slackware Linux 7.0 with 2.4.0-test6 kernel and glibc 2.1.3
Slackware Linux 7.0.1 with glibc 2.1.3
Red Hat Linux 7.1
OpenBSD 2.6, 2.8, -current
UnixWare 7.1.1
HP-UX 10.20
BSD/OS 4.2
OpenUNIX 8
To build, just
@@ -199,22 +193,8 @@ Building
To build shared libraries, specify "--with-libtool" on the
configure command line.
For the server to support DNSSEC, you need to build it
with crypto support. You must have OpenSSL 0.9.5a
or newer installed and specify "--with-openssl" on the
configure command line. If OpenSSL is installed under
a nonstandard prefix, you can tell configure where to
look for it using "--with-openssl=/prefix".
To build libbind (the BIND 8 resolver library), specify
"--enable-libbind" on the configure command line.
On some platforms, BIND 9 can be built with multithreading
support, allowing it to take advantage of multiple CPUs.
You can specify whether to build a multithreaded BIND 9
by specifying "--enable-threads" or "--disable-threads"
on the configure command line. The default is operating
system dependent.
To build without multithreading, specify "--disable-threads"
on the configure command line.
If your operating system has integrated support for IPv6, it
will be used automatically. If you have installed KAME IPv6
@@ -249,6 +229,10 @@ Building
on your system, and some require Perl; see bin/tests/system/README
for details.
Linux systems do not provide useful core dumps for multithreaded
programs unless the kernel patch in contrib/linux/coredump-patch
has been applied. We recommend all Linux users to install this
patch so that any server crashes can be properly diagnosed.
Documentation
@@ -257,17 +241,19 @@ Documentation
doc/arm directory.
Some of the programs in the BIND 9 distribution have man pages
in their directories. In particular, the command line
options of "named" are documented in /bin/named/named.8.
under the doc/man directory. In particular, the command line
options of "named" are documented in doc/man/bind/named.8.
There is now also a set of man pages for the lwres library.
The man pages are currently not installed automatically by
"make install".
If you are upgrading from BIND 8, please read the migration
notes in doc/misc/migration. If you are upgrading from
BIND 4, read doc/misc/migration-4to9.
Bug Reports and Mailing Lists
Bugs reports should be sent to
bind9-bugs@isc.org

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: acconfig.h,v 1.35.2.1 2001/10/22 23:28:07 gson Exp $ */
/* $Id: acconfig.h,v 1.31.2.2 2001/02/07 19:26:16 gson Exp $ */
/***
*** This file is not to be included by any public header files, because
@@ -23,9 +23,6 @@
***/
@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
@@ -47,9 +44,6 @@
/* define if sysconf() is available */
#undef HAVE_SYSCONF
/* define if sysctlbyname() is available */
#undef HAVE_SYSCTLBYNAME
/* define if catgets() is available */
#undef HAVE_CATGETS
@@ -87,8 +81,8 @@
/* define if flockfile() is available */
#undef HAVE_FLOCKFILE
/* define if getc_unlocked() is available */
#undef HAVE_GETCUNLOCKED
/* define if rlim_t is defined via sys/types.h or sys/resource.h */
#undef HAVE_RLIM_T
/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */
#undef SHUTUP_SPUTAUX
@@ -126,6 +120,3 @@ int sigwait(const unsigned int *set, int *sig);
/* define if pthread_attr_getstacksize() is available */
#undef HAVE_PTHREAD_ATTR_GETSTACKSIZE
/* define if you have strerror in the C library. */
#undef HAVE_STRERROR

View File

@@ -13,7 +13,7 @@
# 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 2001/01/09 21:39:05 bwelling Exp $
# $Id: Makefile.in,v 1.21.2.1 2001/01/09 22:31:11 bwelling Exp $
srcdir = @srcdir@
VPATH = @srcdir@

View File

@@ -13,27 +13,23 @@
# 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 2001/07/27 17:45:27 gson Exp $
# $Id: Makefile.in,v 1.5.2.1 2001/01/09 22:31:13 bwelling Exp $
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
@BIND9_VERSION@
@BIND9_INCLUDES@
CINCLUDES = ${DNS_INCLUDES} ${ISCCFG_INCLUDES} ${ISC_INCLUDES}
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES}
CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
CDEFINES =
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_OPENSSL_LIBS@ @DNS_GSSAPI_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCLIBS = ../../lib/isc/libisc.@A@
DNSDEPLIBS = ../../lib/dns/libdns.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
ISCDEPLIBS = ../../lib/isc/libisc.@A@
LIBS = @LIBS@
@@ -46,43 +42,22 @@ TARGETS = named-checkconf named-checkzone
# 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} ${CC} ${ALL_CFLAGS} -DVERSION=\"${VERSION}\" \
-c ${srcdir}/named-checkconf.c
named-checkzone.@O@: named-checkzone.c
${LIBTOOL} ${CC} ${ALL_CFLAGS} -DVERSION=\"${VERSION}\" \
-c ${srcdir}/named-checkzone.c
named-checkconf: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} ${ISCCFGDEPLIBS}
${LIBTOOL} ${PURIFY} ${CC} ${CFLAGS} -o $@ named-checkconf.@O@ \
check-tool.@O@ ${ISCCFGLIBS} ${ISCLIBS} ${LIBS}
named-checkconf: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
${LIBTOOL} ${CC} ${CFLAGS} -o $@ named-checkconf.@O@ check-tool.@O@ \
${DNSLIBS} ${ISCLIBS} ${LIBS}
named-checkzone: named-checkzone.@O@ check-tool.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
${LIBTOOL} ${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 named-checkzone installdirs
${LIBTOOL} ${INSTALL_PROGRAM} named-checkconf ${DESTDIR}${sbindir}
${LIBTOOL} ${INSTALL_PROGRAM} named-checkzone ${DESTDIR}${sbindir}
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8; done
${LIBTOOL} ${CC} ${CFLAGS} -o $@ named-checkzone.@O@ check-tool.@O@ \
${DNSLIBS} ${ISCLIBS} ${LIBS}
clean distclean::
rm -f ${TARGETS}
installdirs:
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}
install:: named-checkconf named-checkzone
${LIBTOOL} ${INSTALL_PROGRAM} named-checkconf ${DESTDIR}${sbindir}
${LIBTOOL} ${INSTALL_PROGRAM} named-checkzone ${DESTDIR}${sbindir}

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: check-tool.c,v 1.4 2001/03/03 23:11:33 bwelling Exp $ */
/* $Id: check-tool.c,v 1.2.2.1 2001/01/09 22:31:14 bwelling Exp $ */
#include <config.h>
@@ -27,6 +27,8 @@
#include <isc/log.h>
#include <isc/types.h>
#include <dns/log.h>
isc_result_t
setup_logging(isc_mem_t *mctx, isc_log_t **logp) {
isc_logdestination_t destination;
@@ -35,6 +37,8 @@ setup_logging(isc_mem_t *mctx, isc_log_t **logp) {
RUNTIME_CHECK(isc_log_create(mctx, &log, &logconfig) == ISC_R_SUCCESS);
isc_log_setcontext(log);
dns_log_init(log);
dns_log_setcontext(log);
destination.file.stream = stdout;
destination.file.name = NULL;

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: check-tool.h,v 1.2 2001/01/09 21:39:09 bwelling Exp $ */
/* $Id: check-tool.h,v 1.1.2.1 2001/01/09 22:31:15 bwelling Exp $ */
#ifndef CHECK_TOOL_H
#define CHECK_TOOL_H

View File

@@ -1,51 +0,0 @@
.\"
.\" 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 INTERNET SOFTWARE CONSORTIUM
.\" DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
.\" INTERNET SOFTWARE CONSORTIUM 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.
.\"
.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-t \fIdirectory\fB\fR ] \fBfilename\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
\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

View File

@@ -15,124 +15,73 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named-checkconf.c,v 1.12 2001/07/27 17:45:26 gson Exp $ */
/* $Id: named-checkconf.c,v 1.2.2.1 2001/01/09 22:31:16 bwelling 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/cfg.h>
#include <isccfg/check.h>
#include <dns/log.h>
#include <dns/namedconf.h>
#include "check-tool.h"
isc_log_t *logc = NULL;
static isc_result_t
zonecbk(dns_c_ctx_t *ctx, dns_c_zone_t *zone, dns_c_view_t *view, void *uap) {
static void
usage(void) {
fprintf(stderr, "usage: named-checkconf [-v] [-t directory] [named.conf]\n");
exit(1);
UNUSED(ctx);
UNUSED(uap);
UNUSED(zone);
UNUSED(view);
return (ISC_R_SUCCESS);
}
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",
directory, isc_result_totext(result));
return (result);
}
optscbk(dns_c_ctx_t *ctx, void *uap) {
UNUSED(ctx);
UNUSED(uap);
return (ISC_R_SUCCESS);
}
int
main(int argc, char **argv) {
int c;
cfg_parser_t *parser = NULL;
cfg_obj_t *config = NULL;
dns_c_ctx_t *configctx = NULL;
const char *conffile = NULL;
isc_mem_t *mctx = NULL;
isc_result_t result;
int exit_status = 0;
dns_c_cbks_t callbacks;
isc_log_t *log = NULL;
while ((c = isc_commandline_parse(argc, argv, "t:v")) != EOF) {
switch (c) {
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;
callbacks.zonecbk = zonecbk;
callbacks.optscbk = optscbk;
callbacks.zonecbkuap = NULL;
callbacks.optscbkuap = NULL;
case 'v':
printf(VERSION "\n");
exit(0);
default:
usage();
}
}
if (argv[isc_commandline_index] != NULL)
conffile = argv[isc_commandline_index];
if (argc > 1)
conffile = argv[1];
if (conffile == NULL || conffile[0] == '\0')
conffile = NAMED_CONFFILE;
conffile = "/etc/named.conf";
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
RUNTIME_CHECK(setup_logging(mctx, &logc) == ISC_R_SUCCESS);
RUNTIME_CHECK(setup_logging(mctx, &log) == ISC_R_SUCCESS);
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)
if (dns_c_parse_namedconf(conffile, mctx, &configctx, &callbacks) !=
ISC_R_SUCCESS) {
exit(1);
}
result = cfg_check_namedconf(config, logc, mctx);
if (result != ISC_R_SUCCESS)
exit_status = 1;
dns_c_ctx_delete(&configctx);
cfg_obj_destroy(parser, &config);
cfg_parser_destroy(&parser);
isc_log_destroy(&logc);
isc_log_destroy(&log);
isc_mem_destroy(&mctx);
return (exit_status);
return (0);
}

View File

@@ -1,125 +0,0 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!--
- 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 INTERNET SOFTWARE CONSORTIUM
- DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- INTERNET SOFTWARE CONSORTIUM 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 2001/06/29 01:04:56 gson 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>-t <replaceable class="parameter">directory</replaceable></option></arg>
<arg choice="req">filename</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>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:
-->

View File

@@ -1,193 +0,0 @@
<!--
- 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 INTERNET SOFTWARE CONSORTIUM
- DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- INTERNET SOFTWARE CONSORTIUM 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.
-->
<HTML
><HEAD
><TITLE
>named-checkconf</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
"></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
>&nbsp;--&nbsp;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"
>-t <TT
CLASS="REPLACEABLE"
><I
>directory</I
></TT
></TT
>] {filename}</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN22"
></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="AEN26"
></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
>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="AEN45"
></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="AEN49"
></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="AEN56"
></A
><H2
>AUTHOR</H2
><P
> Internet Software Consortium
</P
></DIV
></BODY
></HTML
>

View File

@@ -1,61 +0,0 @@
.\"
.\" 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 INTERNET SOFTWARE CONSORTIUM
.\" DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
.\" INTERNET SOFTWARE CONSORTIUM 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.
.\"
.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-q\fR ] [ \fB-v\fR ] [ \fB-c \fIclass\fB\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-c \fIclass\fB\fR
Specify the class of the zone. If not specified "IN" is assumed.
.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

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named-checkzone.c,v 1.13 2001/06/29 01:04:59 gson Exp $ */
/* $Id: named-checkzone.c,v 1.6.2.2 2001/01/11 18:30:28 gson Exp $ */
#include <config.h>
@@ -61,7 +61,7 @@ static const char *dbtype[] = { "rbt" };
static void
usage(void) {
fprintf(stderr,
"usage: named-checkzone [-dqv] [-c class] zonename filename \n");
"usage: named-checkzone [-dq] [-c class] zone [filename]\n");
exit(1);
}
@@ -105,7 +105,6 @@ setup(char *zonename, char *filename, char *classname) {
ERRRET(result, "dns_rdataclass_fromtext");
dns_zone_setclass(zone, rdclass);
dns_zone_setoption(zone, DNS_ZONEOPT_MANYERRORS, ISC_TRUE);
result = dns_zone_load(zone);
@@ -123,12 +122,14 @@ main(int argc, char **argv) {
int c;
char *origin = NULL;
char *filename = NULL;
char *classname;
isc_log_t *lctx = NULL;
isc_result_t result;
char classname_in[] = "IN";
char *classname = classname_in;
while ((c = isc_commandline_parse(argc, argv, "c:dqsv")) != EOF) {
classname = classname_in;
while ((c = isc_commandline_parse(argc, argv, "c:dqs")) != EOF) {
switch (c) {
case 'c':
classname = isc_commandline_argument;
@@ -139,27 +140,25 @@ main(int argc, char **argv) {
case 'q':
quiet++;
break;
case 'v':
printf(VERSION "\n");
exit(0);
default:
usage();
}
}
if (isc_commandline_index + 2 > argc)
if (argv[isc_commandline_index] == NULL)
usage();
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
if (!quiet) {
if (!quiet)
RUNTIME_CHECK(setup_logging(mctx, &lctx) == ISC_R_SUCCESS);
dns_log_init(lctx);
dns_log_setcontext(lctx);
}
origin = argv[isc_commandline_index++];
filename = argv[isc_commandline_index++];
result = setup(origin, filename, classname);
origin = argv[isc_commandline_index];
isc_commandline_index++;
if (argv[isc_commandline_index] != NULL)
filename = argv[isc_commandline_index];
else
filename = origin;
result = setup(origin, filename, (char *)classname);
if (!quiet && result == ISC_R_SUCCESS)
fprintf(stdout, "OK\n");
destroy();

View File

@@ -1,156 +0,0 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!--
- 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 INTERNET SOFTWARE CONSORTIUM
- DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- INTERNET SOFTWARE CONSORTIUM 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 2001/06/29 01:05:00 gson 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>-q</option></arg>
<arg><option>-v</option></arg>
<arg><option>-c <replaceable class="parameter">class</replaceable></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>-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>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:
-->

View File

@@ -1,224 +0,0 @@
<!--
- 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 INTERNET SOFTWARE CONSORTIUM
- DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- INTERNET SOFTWARE CONSORTIUM 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.
-->
<HTML
><HEAD
><TITLE
>named-checkzone</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
"></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
>&nbsp;--&nbsp;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"
>-q</TT
>] [<TT
CLASS="OPTION"
>-v</TT
>] [<TT
CLASS="OPTION"
>-c <TT
CLASS="REPLACEABLE"
><I
>class</I
></TT
></TT
>] {zonename} {filename}</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN27"
></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="AEN33"
></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
>-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
>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="AEN62"
></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="AEN66"
></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="AEN74"
></A
><H2
>AUTHOR</H2
><P
> Internet Software Consortium
</P
></DIV
></BODY
></HTML
>

View File

@@ -1,111 +0,0 @@
# 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/isccfg/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__STDC__" /FR /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# 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/isccfg/win32/Release/libisccfg.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/isccfg/include" /D "_DEBUG" /D "__STDC__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c
# SUBTRACT CPP /X /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
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/isccfg/win32/Debug/libisccfg.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

View File

@@ -1,29 +0,0 @@
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>
{{{
}}}
###############################################################################

View File

@@ -1,216 +0,0 @@
# 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
!IF "$(CFG)" == "namedcheckconf - Win32 Release"
OUTDIR=.\Release
INTDIR=.\Release
# Begin Custom Macros
OutDir=.\Release
# End Custom Macros
ALL : "..\..\..\Build\Release\named-checkconf.exe" "$(OUTDIR)\namedcheckconf.bsc"
CLEAN :
-@erase "$(INTDIR)\check-tool.obj"
-@erase "$(INTDIR)\check-tool.sbr"
-@erase "$(INTDIR)\named-checkconf.obj"
-@erase "$(INTDIR)\named-checkconf.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(OUTDIR)\namedcheckconf.bsc"
-@erase "..\..\..\Build\Release\named-checkconf.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/isccfg/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__STDC__" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\namedcheckconf.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\namedcheckconf.bsc"
BSC32_SBRS= \
"$(INTDIR)\check-tool.sbr" \
"$(INTDIR)\named-checkconf.sbr"
"$(OUTDIR)\namedcheckconf.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/isccfg/win32/Release/libisccfg.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\named-checkconf.pdb" /machine:I386 /out:"../../../Build/Release/named-checkconf.exe"
LINK32_OBJS= \
"$(INTDIR)\check-tool.obj" \
"$(INTDIR)\named-checkconf.obj"
"..\..\..\Build\Release\named-checkconf.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "namedcheckconf - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
ALL : "..\..\..\Build\Debug\named-checkconf.exe" "$(OUTDIR)\namedcheckconf.bsc"
CLEAN :
-@erase "$(INTDIR)\check-tool.obj"
-@erase "$(INTDIR)\check-tool.sbr"
-@erase "$(INTDIR)\named-checkconf.obj"
-@erase "$(INTDIR)\named-checkconf.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\named-checkconf.pdb"
-@erase "$(OUTDIR)\namedcheckconf.bsc"
-@erase "..\..\..\Build\Debug\named-checkconf.exe"
-@erase "..\..\..\Build\Debug\named-checkconf.ilk"
"$(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/isccfg/include" /D "_DEBUG" /D "__STDC__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\namedcheckconf.bsc"
BSC32_SBRS= \
"$(INTDIR)\check-tool.sbr" \
"$(INTDIR)\named-checkconf.sbr"
"$(OUTDIR)\namedcheckconf.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/isccfg/win32/Debug/libisccfg.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\named-checkconf.pdb" /debug /machine:I386 /out:"../../../Build/Debug/named-checkconf.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\check-tool.obj" \
"$(INTDIR)\named-checkconf.obj"
"..\..\..\Build\Debug\named-checkconf.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
!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)
!ENDIF

View File

@@ -1,111 +0,0 @@
# 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__" /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 /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

View File

@@ -1,29 +0,0 @@
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>
{{{
}}}
###############################################################################

View File

@@ -1,216 +0,0 @@
# 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
# Begin Custom Macros
OutDir=.\Release
# End Custom Macros
ALL : "..\..\..\Build\Release\named-checkzone.exe" "$(OUTDIR)\namedcheckzone.bsc"
CLEAN :
-@erase "$(INTDIR)\check-tool.obj"
-@erase "$(INTDIR)\check-tool.sbr"
-@erase "$(INTDIR)\named-checkzone.obj"
-@erase "$(INTDIR)\named-checkzone.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(OUTDIR)\namedcheckzone.bsc"
-@erase "..\..\..\Build\Release\named-checkzone.exe"
"$(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__" /FR"$(INTDIR)\\" /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= \
"$(INTDIR)\check-tool.sbr" \
"$(INTDIR)\named-checkzone.sbr"
"$(OUTDIR)\namedcheckzone.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\named-checkzone.pdb" /machine:I386 /out:"../../../Build/Release/named-checkzone.exe"
LINK32_OBJS= \
"$(INTDIR)\check-tool.obj" \
"$(INTDIR)\named-checkzone.obj"
"..\..\..\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
ALL : "..\..\..\Build\Debug\named-checkzone.exe" "$(OUTDIR)\namedcheckzone.bsc"
CLEAN :
-@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"
"..\..\..\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"
"$(INTDIR)\check-tool.obj" "$(INTDIR)\check-tool.sbr" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
SOURCE="..\named-checkzone.c"
"$(INTDIR)\named-checkzone.obj" "$(INTDIR)\named-checkzone.sbr" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF

View File

@@ -13,7 +13,7 @@
# 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 2001/06/08 17:18:06 gson Exp $
# $Id: Makefile.in,v 1.17.4.1 2001/01/09 22:31:19 bwelling Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -48,37 +48,24 @@ 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: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
${LIBTOOL} ${PURIFY} ${CC} ${CFLAGS} -o $@ dig.@O@ dighost.@O@ ${UOBJS} ${LIBS}
${LIBTOOL} ${CC} ${CFLAGS} -o $@ dig.@O@ dighost.@O@ ${UOBJS} ${LIBS}
host: host.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
${LIBTOOL} ${PURIFY} ${CC} ${CFLAGS} -o $@ host.@O@ dighost.@O@ ${UOBJS} ${LIBS}
${LIBTOOL} ${CC} ${CFLAGS} -o $@ host.@O@ dighost.@O@ ${UOBJS} ${LIBS}
nslookup: nslookup.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
${LIBTOOL} ${PURIFY} ${CC} ${CFLAGS} -o $@ nslookup.@O@ dighost.@O@ ${UOBJS} ${LIBS}
${LIBTOOL} ${CC} ${CFLAGS} -o $@ nslookup.@O@ dighost.@O@ ${UOBJS} ${LIBS}
doc man:: ${MANOBJS}
docclean manclean maintainer-clean::
rm -f ${MANOBJS}
clean distclean maintainer-clean::
clean distclean::
rm -f ${TARGETS}
installdirs:
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir}
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1
install:: dig host nslookup installdirs
${LIBTOOL} ${INSTALL_PROGRAM} dig ${DESTDIR}${bindir}
${LIBTOOL} ${INSTALL_PROGRAM} host ${DESTDIR}${bindir}
${LIBTOOL} ${INSTALL_PROGRAM} nslookup ${DESTDIR}${bindir}
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man1; done

View File

@@ -1,350 +0,0 @@
.\"
.\" 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 INTERNET SOFTWARE CONSORTIUM
.\" DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
.\" INTERNET SOFTWARE CONSORTIUM 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.
.\"
.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 ] [ \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).
.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.
.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-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 the IP6.ARPA domain and binary labels as defined in
RFC2874. To use the older RFC1886 method using the IP6.INT domain and
"nibble" labels, specify the \fB-n\fR (nibble) option.
.PP
To sign the DNS queries sent by \fBdig\fR 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 compatibilty 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]recursive\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=A\fR
Sets the number of times to retry UDP queries to server to
\fIT\fR instead of the default, 3. If
\fIT\fR is less than or equal to zero, the number of
retries is silently rounded up to 1.
.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.
.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
.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.

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dig.c,v 1.157.2.3 2001/11/15 01:24:10 marka Exp $ */
/* $Id: dig.c,v 1.131.2.6 2001/11/15 01:30:40 marka Exp $ */
#include <config.h>
#include <stdlib.h>
@@ -31,14 +31,12 @@
#include <dns/byaddr.h>
#include <dns/fixedname.h>
#include <dns/masterdump.h>
#include <dns/message.h>
#include <dns/name.h>
#include <dns/rdata.h>
#include <dns/rdataset.h>
#include <dns/rdatatype.h>
#include <dns/rdataclass.h>
#include <dns/result.h>
#include <dig/dig.h>
@@ -54,16 +52,19 @@ extern ISC_LIST(dig_searchlist_t) search_list;
}
extern isc_boolean_t have_ipv4, have_ipv6, specified_source,
extern isc_boolean_t have_ipv6, specified_source,
usesearch, qr;
extern in_port_t port;
extern unsigned int timeout;
extern isc_mem_t *mctx;
extern dns_messageid_t id;
extern char *rootspace[BUFSIZE];
extern isc_buffer_t rootbuf;
extern int sendcount;
extern int ndots;
extern int tries;
extern int lookup_counter;
extern char fixeddomain[MXNAME];
extern int exitcode;
extern isc_sockaddr_t bind_address;
extern char keynametext[MXNAME];
@@ -75,17 +76,18 @@ extern isc_taskmgr_t *taskmgr;
extern isc_task_t *global_task;
extern isc_boolean_t free_now;
dig_lookup_t *default_lookup = NULL;
extern isc_uint32_t rr_limit;
extern isc_boolean_t debugging, memdebugging;
static char *batchname = NULL;
static FILE *batchfp = NULL;
static char *argv0;
char *batchname = NULL;
FILE *batchfp = NULL;
char *argv0;
static char domainopt[DNS_NAME_MAXTEXT];
isc_boolean_t short_form = ISC_FALSE, printcmd = ISC_TRUE,
nibble = ISC_FALSE, plusquest = ISC_FALSE, pluscomm = ISC_FALSE;
static isc_boolean_t short_form = ISC_FALSE, printcmd = ISC_TRUE,
nibble = ISC_FALSE, plusquest = ISC_FALSE, pluscomm = ISC_FALSE,
multiline = ISC_FALSE;
isc_uint16_t bufsize = 0;
isc_boolean_t forcecomment = ISC_FALSE;
static const char *opcodetext[] = {
"QUERY",
@@ -129,25 +131,11 @@ static const char *rcodetext[] = {
extern char *progname;
static void
print_usage(FILE *fp) {
show_usage(void) {
fputs(
"Usage: dig [@global-server] [domain] [q-type] [q-class] {q-opt}\n"
" {global-d-opt} host [@local-server] {local-d-opt}\n"
" [ host [@local-server] {local-d-opt} [...]]\n", fp);
}
static void
usage() {
print_usage(stderr);
fputs("\nUse \"dig -h\" (or \"dig -h | more\") "
"for complete list of options\n", stderr);
exit(1);
}
static void
help(void) {
print_usage(stdout);
fputs(
" [ host [@local-server] {local-d-opt} [...]]\n"
"Where: domain are in the Domain Name System\n"
" q-class is one of (in,hs,ch,...) [default: in]\n"
" q-type is one of (a,any,mx,ns,soa,hinfo,axfr,txt,...) [default:a]\n"
@@ -168,7 +156,7 @@ help(void) {
" +domain=### (Set default domainname)\n"
" +bufsize=### (Set EDNS0 Max UDP packet size)\n"
" +[no]search (Set whether to use searchlist)\n"
" +[no]defname (Ditto)\n"
" +[no]defname (Set whether to use default domain)\n"
" +[no]recursive (Recursive mode)\n"
" +[no]ignore (Don't revert to TCP for TC responses.)"
"\n"
@@ -192,33 +180,32 @@ help(void) {
" +[no]nssearch (Search all authoritative nameservers)\n"
" +[no]identify (ID responders in short answers)\n"
" +[no]trace (Trace delegation down from root)\n"
" +rrlimit=### (Limit number of rr's in xfr)\n"
" +namelimit=### (Limit number of names in xfr)\n"
" +[no]dnssec (Request DNSSEC records)\n"
" +[no]multiline (Print records in an expanded format)\n"
" global d-opts and servers (before host name) affect all queries.\n"
" local d-opts and servers (after host name) affect only that lookup.\n",
stdout);
" local d-opts and servers (after host name) affect only that lookup.\n"
, stderr);
}
/*
* Callback from dighost.c to print the received message.
*/
void
received(int bytes, isc_sockaddr_t *from, dig_query_t *query) {
received(int bytes, int frmsize, char *frm, dig_query_t *query) {
isc_uint64_t diff;
isc_time_t now;
isc_result_t result;
time_t tnow;
char fromtext[ISC_SOCKADDR_FORMATSIZE];
isc_sockaddr_format(from, fromtext, sizeof(fromtext));
result = isc_time_now(&now);
check_result(result, "isc_time_now");
if (query->lookup->stats && !short_form) {
if (query->lookup->stats) {
diff = isc_time_microdiff(&now, &query->time_sent);
printf(";; Query time: %ld msec\n", (long int)diff/1000);
printf(";; SERVER: %s(%s)\n", fromtext, query->servname);
printf(";; SERVER: %.*s(%s)\n", frmsize, frm,
query->servname);
time(&tnow);
printf(";; WHEN: %s", ctime(&tnow));
if (query->lookup->doing_xfr) {
@@ -239,8 +226,8 @@ received(int bytes, isc_sockaddr_t *from, dig_query_t *query) {
puts("");
} else if (query->lookup->identify && !short_form) {
diff = isc_time_microdiff(&now, &query->time_sent);
printf(";; Received %u bytes from %s(%s) in %d ms\n\n",
bytes, fromtext, query->servname,
printf(";; Received %u bytes from %.*s(%s) in %d ms\n\n",
bytes, frmsize, frm, query->servname,
(int)diff/1000);
}
}
@@ -251,7 +238,8 @@ received(int bytes, isc_sockaddr_t *from, dig_query_t *query) {
* XXX print_trying
*/
void
trying(char *frm, dig_lookup_t *lookup) {
trying(int frmsize, char *frm, dig_lookup_t *lookup) {
UNUSED(frmsize);
UNUSED(frm);
UNUSED(lookup);
}
@@ -346,20 +334,14 @@ short_answer(dns_message_t *msg, dns_messagetextflag_t flags,
*/
isc_result_t
printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
isc_boolean_t did_flag = ISC_FALSE;
isc_result_t result;
dns_messagetextflag_t flags;
isc_buffer_t *buf = NULL;
unsigned int len = OUTPUTBUF;
const dns_master_style_t *style;
if (multiline)
style = &dns_master_style_default;
else
style = &dns_master_style_debug;
if (query->lookup->cmdline[0] != 0) {
if (!short_form)
fputs(query->lookup->cmdline, stdout);
fputs(query->lookup->cmdline, stdout);
query->lookup->cmdline[0]=0;
}
debug("printmessage(%s %s %s)", headers ? "headers" : "noheaders",
@@ -392,21 +374,34 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
"id: %u\n",
opcodetext[msg->opcode], rcodetext[msg->rcode],
msg->id);
printf(";; flags:");
if ((msg->flags & DNS_MESSAGEFLAG_QR) != 0)
printf(" qr");
if ((msg->flags & DNS_MESSAGEFLAG_AA) != 0)
printf(" aa");
if ((msg->flags & DNS_MESSAGEFLAG_TC) != 0)
printf(" tc");
if ((msg->flags & DNS_MESSAGEFLAG_RD) != 0)
printf(" rd");
if ((msg->flags & DNS_MESSAGEFLAG_RA) != 0)
printf(" ra");
if ((msg->flags & DNS_MESSAGEFLAG_AD) != 0)
printf(" ad");
if ((msg->flags & DNS_MESSAGEFLAG_CD) != 0)
printf(" cd");
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",
@@ -414,72 +409,79 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
msg->counts[DNS_SECTION_ANSWER],
msg->counts[DNS_SECTION_AUTHORITY],
msg->counts[DNS_SECTION_ADDITIONAL]);
}
}
repopulate_buffer:
if (query->lookup->comments && headers && !short_form)
{
result = dns_message_pseudosectiontotext(msg,
DNS_PSEUDOSECTION_OPT,
style, flags, buf);
if (result == ISC_R_NOSPACE) {
buftoosmall:
len += OUTPUTBUF;
isc_buffer_free(&buf);
result = isc_buffer_allocate(mctx, &buf, len);
if (result == ISC_R_SUCCESS)
goto repopulate_buffer;
else
return (result);
result = dns_message_pseudosectiontotext(msg,
DNS_PSEUDOSECTION_OPT,
flags, buf);
check_result(result,
"dns_message_pseudosectiontotext");
}
check_result(result,
"dns_message_pseudosectiontotext");
}
if (query->lookup->section_question && headers) {
if (!short_form) {
question_again:
result = dns_message_sectiontotext(msg,
DNS_SECTION_QUESTION,
style, flags, buf);
if (result == ISC_R_NOSPACE)
goto buftoosmall;
flags, buf);
if (result == ISC_R_NOSPACE) {
len += OUTPUTBUF;
isc_buffer_free(&buf);
result = isc_buffer_allocate(mctx, &buf, len);
if (result == ISC_R_SUCCESS)
goto question_again;
}
check_result(result, "dns_message_sectiontotext");
}
}
if (query->lookup->section_answer) {
if (!short_form) {
answer_again:
result = dns_message_sectiontotext(msg,
DNS_SECTION_ANSWER,
style, flags, buf);
if (result == ISC_R_NOSPACE)
goto buftoosmall;
flags, buf);
if (result == ISC_R_NOSPACE) {
len += OUTPUTBUF;
isc_buffer_free(&buf);
result = isc_buffer_allocate(mctx, &buf, len);
if (result == ISC_R_SUCCESS)
goto answer_again;
}
check_result(result, "dns_message_sectiontotext");
} else {
result = short_answer(msg, flags, buf, query);
if (result == ISC_R_NOSPACE)
goto buftoosmall;
check_result(result, "short_answer");
}
}
if (query->lookup->section_authority) {
if (!short_form) {
authority_again:
result = dns_message_sectiontotext(msg,
DNS_SECTION_AUTHORITY,
style, flags, buf);
if (result == ISC_R_NOSPACE)
goto buftoosmall;
flags, buf);
if (result == ISC_R_NOSPACE) {
len += OUTPUTBUF;
isc_buffer_free(&buf);
result = isc_buffer_allocate(mctx, &buf, len);
if (result == ISC_R_SUCCESS)
goto authority_again;
}
check_result(result, "dns_message_sectiontotext");
}
}
if (query->lookup->section_additional) {
if (!short_form) {
additional_again:
result = dns_message_sectiontotext(msg,
DNS_SECTION_ADDITIONAL,
style, flags, buf);
if (result == ISC_R_NOSPACE)
goto buftoosmall;
flags, buf);
if (result == ISC_R_NOSPACE) {
len += OUTPUTBUF;
isc_buffer_free(&buf);
result = isc_buffer_allocate(mctx, &buf, len);
if (result == ISC_R_SUCCESS)
goto additional_again;
}
check_result(result, "dns_message_sectiontotext");
/*
* Only print the signature on the first record.
@@ -488,17 +490,14 @@ buftoosmall:
result = dns_message_pseudosectiontotext(
msg,
DNS_PSEUDOSECTION_TSIG,
style, flags, buf);
if (result == ISC_R_NOSPACE)
goto buftoosmall;
flags, buf);
check_result(result,
"dns_message_pseudosectiontotext");
result = dns_message_pseudosectiontotext(
msg,
DNS_PSEUDOSECTION_SIG0,
style, flags, buf);
if (result == ISC_R_NOSPACE)
goto buftoosmall;
flags, buf);
check_result(result,
"dns_message_pseudosectiontotext");
}
@@ -588,7 +587,7 @@ reorder_args(int argc, char *argv[]) {
}
static isc_uint32_t
parse_uint(char *arg, const char *desc, isc_uint32_t max) {
parse_int(char *arg, const char *desc, isc_uint32_t max) {
char *endp;
isc_uint32_t tmp;
@@ -603,7 +602,7 @@ parse_uint(char *arg, const char *desc, isc_uint32_t max) {
/*
* We're not using isc_commandline_parse() here since the command line
* syntax of dig is quite a bit different from that which can be described
* by that routine.
* that routine.
* XXX doc options
*/
@@ -675,8 +674,10 @@ plus_option(char *option, isc_boolean_t is_batchfile,
goto need_value;
if (!state)
goto invalid_option;
lookup->udpsize = (isc_uint16_t) parse_uint(value,
"buffer size", COMMSIZE);
lookup->udpsize = parse_int(value, "buffer size",
COMMSIZE);
if (lookup->udpsize <= 0)
lookup->udpsize = 0;
if (lookup->udpsize > COMMSIZE)
lookup->udpsize = COMMSIZE;
break;
@@ -704,7 +705,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
case 'd':
switch (cmd[1]) {
case 'e': /* defname */
usesearch = state;
lookup->defname = state;
break;
case 'n': /* dnssec */
lookup->dnssec = state;
@@ -714,8 +715,9 @@ plus_option(char *option, isc_boolean_t is_batchfile,
goto need_value;
if (!state)
goto invalid_option;
strncpy(domainopt, value, sizeof(domainopt));
domainopt[sizeof(domainopt)-1] = '\0';
strncpy(fixeddomain, value, sizeof(fixeddomain));
fixeddomain[sizeof(fixeddomain)-1]=0;
usesearch = state;
break;
default:
goto invalid_option;
@@ -734,9 +736,6 @@ plus_option(char *option, isc_boolean_t is_batchfile,
lookup->ignore = ISC_TRUE;
}
break;
case 'm': /* multiline */
multiline = state;
break;
case 'n':
switch (cmd[1]) {
case 'd': /* ndots */
@@ -744,7 +743,9 @@ plus_option(char *option, isc_boolean_t is_batchfile,
goto need_value;
if (!state)
goto invalid_option;
ndots = parse_uint(value, "ndots", MAXNDOTS);
ndots = parse_int(value, "ndots", MAXNDOTS);
if (ndots < 0)
ndots = 0;
break;
case 's': /* nssearch */
lookup->ns_search_only = state;
@@ -757,7 +758,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
lookup->section_additional = ISC_FALSE;
lookup->section_authority = ISC_FALSE;
lookup->section_question = ISC_FALSE;
lookup->rdtype = dns_rdatatype_ns;
lookup->rdtype = dns_rdatatype_soa;
lookup->rdtypeset = ISC_TRUE;
short_form = ISC_TRUE;
}
@@ -780,8 +781,21 @@ plus_option(char *option, isc_boolean_t is_batchfile,
goto invalid_option;
}
break;
case 'r': /* recurse */
lookup->recurse = state;
case 'r':
switch (cmd[1]) {
case 'e': /* recurse */
lookup->recurse = state;
break;
case 'r': /* rrlimit */
if (value == NULL)
goto need_value;
if (!state)
goto invalid_option;
rr_limit = parse_int(value, "rrlimit", MAXRRLIMIT);
break;
default:
goto invalid_option;
}
break;
case 's':
switch (cmd[1]) {
@@ -793,7 +807,6 @@ plus_option(char *option, isc_boolean_t is_batchfile,
if (state) {
printcmd = ISC_FALSE;
lookup->section_additional = ISC_FALSE;
lookup->section_answer = ISC_TRUE;
lookup->section_authority = ISC_FALSE;
lookup->section_question = ISC_FALSE;
lookup->comments = ISC_FALSE;
@@ -818,8 +831,8 @@ plus_option(char *option, isc_boolean_t is_batchfile,
goto need_value;
if (!state)
goto invalid_option;
timeout = parse_uint(value, "timeout", MAXTIMEOUT);
if (timeout == 0)
timeout = parse_int(value, "timeout", MAXTIMEOUT);
if (timeout <= 0)
timeout = 1;
break;
case 'r':
@@ -842,9 +855,9 @@ plus_option(char *option, isc_boolean_t is_batchfile,
goto need_value;
if (!state)
goto invalid_option;
lookup->retries = parse_uint(value, "retries",
lookup->retries = parse_int(value, "retries",
MAXTRIES);
if (lookup->retries == 0)
if (lookup->retries <= 0)
lookup->retries = 1;
break;
default:
@@ -864,7 +877,8 @@ plus_option(char *option, isc_boolean_t is_batchfile,
need_value:
fprintf(stderr, "Invalid option: +%s\n",
option);
usage();
show_usage();
exit(1);
}
return;
}
@@ -874,9 +888,7 @@ plus_option(char *option, isc_boolean_t is_batchfile,
*/
static isc_boolean_t
dash_option(char *option, char *next, dig_lookup_t **lookup,
isc_boolean_t *open_type_class,
isc_boolean_t *firstarg,
int argc, char **argv)
isc_boolean_t *open_type_class)
{
char cmd, *value, *ptr;
isc_result_t result;
@@ -885,14 +897,13 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
dns_rdatatype_t rdtype;
dns_rdataclass_t rdclass;
char textname[MXNAME];
struct in_addr in4;
struct in6_addr in6;
cmd = option[0];
if (strlen(option) > 1) {
value_from_next = ISC_FALSE;
value = &option[1];
} else {
}
else {
value_from_next = ISC_TRUE;
value = next;
}
@@ -901,7 +912,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
debugging = ISC_TRUE;
return (ISC_FALSE);
case 'h':
help();
show_usage();
exit(0);
break;
case 'm': /* memdebug */
@@ -915,17 +926,14 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
goto invalid_option;
switch (cmd) {
case 'b':
if (have_ipv6 && inet_pton(AF_INET6, value, &in6) == 1)
isc_sockaddr_fromin6(&bind_address, &in6, 0);
else if (have_ipv4 && inet_pton(AF_INET, value, &in4) == 1)
isc_sockaddr_fromin(&bind_address, &in4, 0);
else
fatal("invalid address %s", value);
get_address(value, 0, &bind_address);
specified_source = ISC_TRUE;
return (value_from_next);
case 'c':
if ((*lookup)->rdclassset) {
fprintf(stderr, ";; Warning, extra class option\n");
fprintf(stderr, ";; Warning, ignoring multiple "
"class options\n");
return (value_from_next);
}
*open_type_class = ISC_FALSE;
tr.base = value;
@@ -935,7 +943,8 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
if (result == ISC_R_SUCCESS) {
(*lookup)->rdclass = rdclass;
(*lookup)->rdclassset = ISC_TRUE;
} else
}
else
fprintf(stderr, ";; Warning, ignoring "
"invalid class %s\n",
value);
@@ -948,45 +957,35 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
keyfile[sizeof(keyfile)-1]=0;
return (value_from_next);
case 'p':
port = (in_port_t) parse_uint(value, "port number", MAXPORT);
port = parse_int(value, "port number", MAXPORT);
return (value_from_next);
case 't':
if ((*lookup)->rdtypeset) {
fprintf(stderr, ";; Warning, ignoring multiple "
"type options\n");
return (value_from_next);
}
*open_type_class = ISC_FALSE;
if (strncasecmp(value, "ixfr=", 5) == 0) {
rdtype = dns_rdatatype_ixfr;
result = ISC_R_SUCCESS;
} else {
tr.base = value;
tr.length = strlen(value);
result = dns_rdatatype_fromtext(&rdtype,
(isc_textregion_t *)&tr);
if (result == ISC_R_SUCCESS &&
rdtype == dns_rdatatype_ixfr)
{
result = DNS_R_UNKNOWN;
}
(*lookup)->rdtype = dns_rdatatype_ixfr;
(*lookup)->rdtypeset = ISC_TRUE;
(*lookup)->ixfr_serial =
parse_int(&value[5], "serial number",
MAXSERIAL);
(*lookup)->section_question = plusquest;
(*lookup)->comments = pluscomm;
return (value_from_next);
}
tr.base = value;
tr.length = strlen(value);
result = dns_rdatatype_fromtext(&rdtype,
(isc_textregion_t *)&tr);
if (result == ISC_R_SUCCESS) {
if ((*lookup)->rdtypeset) {
fprintf(stderr, ";; Warning, "
"extra type option\n");
}
if (rdtype == dns_rdatatype_ixfr) {
(*lookup)->rdtype = dns_rdatatype_ixfr;
(*lookup)->rdtypeset = ISC_TRUE;
(*lookup)->ixfr_serial =
parse_uint(&value[5], "serial number",
MAXSERIAL);
(*lookup)->rdtype = rdtype;
(*lookup)->rdtypeset = ISC_TRUE;
if (rdtype == dns_rdatatype_axfr) {
(*lookup)->section_question = plusquest;
(*lookup)->comments = pluscomm;
} else {
(*lookup)->rdtype = rdtype;
(*lookup)->rdtypeset = ISC_TRUE;
if (rdtype == dns_rdatatype_axfr) {
(*lookup)->section_question = plusquest;
(*lookup)->comments = pluscomm;
}
(*lookup)->ixfr_serial = ISC_FALSE;
}
} else
fprintf(stderr, ";; Warning, ignoring "
@@ -996,13 +995,16 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
case 'y':
ptr = next_token(&value,":");
if (ptr == NULL) {
usage();
show_usage();
exit(1);
}
strncpy(keynametext, ptr, sizeof(keynametext));
keynametext[sizeof(keynametext)-1]=0;
ptr = next_token(&value, "");
if (ptr == NULL)
usage();
if (ptr == NULL) {
show_usage();
exit(1);
}
strncpy(keysecret, ptr, sizeof(keysecret));
keysecret[sizeof(keysecret)-1]=0;
return (value_from_next);
@@ -1015,16 +1017,11 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
(*lookup)->trace_root = ISC_TF((*lookup)->trace ||
(*lookup)->ns_search_only);
(*lookup)->nibble = nibble;
if (!(*lookup)->rdtypeset)
(*lookup)->rdtype = dns_rdatatype_ptr;
if (!(*lookup)->rdclassset)
(*lookup)->rdclass = dns_rdataclass_in;
(*lookup)->rdtype = dns_rdatatype_ptr;
(*lookup)->rdtypeset = ISC_TRUE;
(*lookup)->rdclass = dns_rdataclass_in;
(*lookup)->rdclassset = ISC_TRUE;
(*lookup)->new_search = ISC_TRUE;
if (*lookup && *firstarg)
{
printgreeting(argc, argv, *lookup);
*firstarg = ISC_FALSE;
}
ISC_LIST_APPEND(lookup_list, *lookup, link);
} else {
fprintf(stderr, "Invalid IP address %s\n", value);
@@ -1034,7 +1031,8 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
invalid_option:
default:
fprintf(stderr, "Invalid option: -%s\n", option);
usage();
show_usage();
exit(1);
}
return (ISC_FALSE);
}
@@ -1156,15 +1154,13 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
} else if (rv[0][0] == '-') {
if (rc <= 1) {
if (dash_option(&rv[0][1], NULL,
&lookup, &open_type_class,
&firstarg, argc, argv)) {
&lookup, &open_type_class)) {
rc--;
rv++;
}
} else {
if (dash_option(&rv[0][1], rv[1],
&lookup, &open_type_class,
&firstarg, argc, argv)) {
&lookup, &open_type_class)) {
rc--;
rv++;
}
@@ -1174,49 +1170,36 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
* Anything which isn't an option
*/
if (open_type_class) {
tr.base = rv[0];
tr.length = strlen(rv[0]);
if (strncmp(rv[0], "ixfr=", 5) == 0) {
rdtype = dns_rdatatype_ixfr;
result = ISC_R_SUCCESS;
} else {
tr.base = rv[0];
tr.length = strlen(rv[0]);
result = dns_rdatatype_fromtext(&rdtype,
(isc_textregion_t *)&tr);
if (result == ISC_R_SUCCESS &&
rdtype == dns_rdatatype_ixfr)
{
result = DNS_R_UNKNOWN;
fprintf(stderr, ";; Warning, "
"ixfr requires a "
"serial number\n");
continue;
}
lookup->rdtype = dns_rdatatype_ixfr;
lookup->rdtypeset = ISC_TRUE;
lookup->ixfr_serial =
parse_int(&rv[0][5],
"serial number",
MAXSERIAL);
lookup->section_question = plusquest;
lookup->comments = pluscomm;
continue;
}
if (result == ISC_R_SUCCESS)
{
result = dns_rdatatype_fromtext(&rdtype,
(isc_textregion_t *)&tr);
if ((result == ISC_R_SUCCESS) &&
(rdtype != dns_rdatatype_ixfr)) {
if (lookup->rdtypeset) {
fprintf(stderr, ";; Warning, "
"extra type option\n");
"ignoring multiple "
"type options\n");
continue;
}
if (rdtype == dns_rdatatype_ixfr) {
lookup->rdtype = dns_rdatatype_ixfr;
lookup->rdtypeset = ISC_TRUE;
lookup->ixfr_serial =
parse_uint(&rv[0][5],
"serial number",
MAXSERIAL);
lookup->section_question = plusquest;
if (rdtype == dns_rdatatype_axfr) {
lookup->section_question =
plusquest;
lookup->comments = pluscomm;
} else {
lookup->rdtype = rdtype;
lookup->rdtypeset = ISC_TRUE;
if (rdtype == dns_rdatatype_axfr) {
lookup->section_question =
plusquest;
lookup->comments = pluscomm;
}
lookup->ixfr_serial = ISC_FALSE;
}
lookup->rdtype = rdtype;
lookup->rdtypeset = ISC_TRUE;
continue;
}
result = dns_rdataclass_fromtext(&rdclass,
@@ -1224,7 +1207,9 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
if (result == ISC_R_SUCCESS) {
if (lookup->rdclassset) {
fprintf(stderr, ";; Warning, "
"extra class option\n");
"ignoring multiple "
"class options\n");
continue;
}
lookup->rdclass = rdclass;
lookup->rdclassset = ISC_TRUE;
@@ -1299,10 +1284,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
strcpy(lookup->textname, ".");
lookup->rdtype = dns_rdatatype_ns;
lookup->rdtypeset = ISC_TRUE;
if (firstarg) {
printgreeting(argc, argv, lookup);
firstarg = ISC_FALSE;
}
printgreeting(argc, argv, lookup);
ISC_LIST_APPEND(lookup_list, lookup, link);
}
}
@@ -1374,10 +1356,6 @@ main(int argc, char **argv) {
setup_libs();
parse_args(ISC_FALSE, ISC_FALSE, argc, argv);
setup_system();
if (domainopt[0] != '\0') {
set_search_domain(domainopt);
usesearch = ISC_TRUE;
}
result = isc_app_onrun(mctx, global_task, onrun_callback, NULL);
check_result(result, "isc_app_onrun");
isc_app_run();
@@ -1387,7 +1365,8 @@ main(int argc, char **argv) {
s, default_lookup);
s2 = s;
s = ISC_LIST_NEXT(s, link);
ISC_LIST_DEQUEUE(default_lookup->my_server_list, s2, link);
ISC_LIST_DEQUEUE(default_lookup->my_server_list,
(dig_server_t *)s2, link);
isc_mem_free(mctx, s2);
}
isc_mem_free(mctx, default_lookup);
@@ -1401,3 +1380,4 @@ main(int argc, char **argv) {
isc_app_finish();
return (exitcode);
}

View File

@@ -1,533 +0,0 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!--
- 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 INTERNET SOFTWARE CONSORTIUM
- DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- INTERNET SOFTWARE CONSORTIUM 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.1 2001/11/08 00:15:23 gson 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 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>
</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 &mdash;
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.
</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>-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 the IP6.ARPA domain and binary labels as defined in
RFC2874. To use the older RFC1886 method using the IP6.INT domain and
"nibble" labels, specify the <option>-n</option> (nibble) option.
</para>
<para>
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 compatibilty 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]recursive</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=A</option></term>
<listitem><para>
Sets the number of times to retry UDP queries to server to
<parameter>T</parameter> instead of the default, 3. If
<parameter>T</parameter> is less than or equal to zero, the number of
retries is silently rounded up to 1.
</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>
</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>
</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>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,129 +0,0 @@
.\"
.\" 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 INTERNET SOFTWARE CONSORTIUM
.\" DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
.\" INTERNET SOFTWARE CONSORTIUM 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.
.\"
.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 ] \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. The argument is provided for
compatibility with older implemementations. This option is equivalent
to making a query of type AXFR.
.PP
The \fB-n\fR
option specifies that reverse lookups of IPv6 addresses should
use the IP6.INT domain and "nibble" labels as defined in RFC1886.
The default is to use IP6.ARPA and binary labels as defined in RFC2874.
.PP
The \fB-N\fR 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-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.
.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).

View File

@@ -15,12 +15,14 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: host.c,v 1.76 2001/08/27 21:31:29 gson Exp $ */
/* $Id: host.c,v 1.60.4.2 2001/03/14 18:08:50 bwelling Exp $ */
#include <config.h>
#include <stdlib.h>
#include <limits.h>
extern int h_errno;
#include <isc/app.h>
#include <isc/commandline.h>
#include <isc/netaddr.h>
@@ -43,16 +45,17 @@ extern ISC_LIST(dig_lookup_t) lookup_list;
extern ISC_LIST(dig_server_t) server_list;
extern ISC_LIST(dig_searchlist_t) search_list;
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 isc_boolean_t usesearch;
extern int lookup_counter;
extern char *progname;
extern isc_task_t *global_task;
static isc_boolean_t short_form = ISC_TRUE, listed_server = ISC_FALSE;
isc_boolean_t short_form = ISC_TRUE, listed_server = ISC_FALSE;
static const char *opcodetext[] = {
"QUERY",
@@ -227,64 +230,54 @@ dighost_shutdown(void) {
}
void
received(int bytes, isc_sockaddr_t *from, dig_query_t *query)
{
received(int bytes, int frmsize, char *frm, dig_query_t *query) {
isc_time_t now;
isc_result_t result;
int diff;
if (!short_form) {
char fromtext[ISC_SOCKADDR_FORMATSIZE];
isc_sockaddr_format(from, fromtext, sizeof(fromtext));
result = isc_time_now(&now);
check_result(result, "isc_time_now");
diff = (int) isc_time_microdiff(&now, &query->time_sent);
printf("Received %u bytes from %s in %d ms\n",
bytes, fromtext, diff/1000);
diff = isc_time_microdiff(&now, &query->time_sent);
printf("Received %u bytes from %.*s in %d ms\n",
bytes, frmsize, frm, diff/1000);
}
}
void
trying(char *frm, dig_lookup_t *lookup) {
trying(int frmsize, char *frm, dig_lookup_t *lookup) {
UNUSED(lookup);
if (!short_form)
printf("Trying \"%s\"\n", frm);
printf ("Trying \"%.*s\"\n", frmsize, 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_buffer_t *b = NULL, *b2 = NULL;
isc_region_t r, r2;
isc_result_t result;
unsigned int bufsize = BUFSIZ;
dns_name_format(name, namestr, sizeof(namestr));
retry:
result = isc_buffer_allocate(mctx, &b, bufsize);
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");
result = isc_buffer_allocate(mctx, &b2, BUFSIZE);
check_result(result, "isc_buffer_allocate");
result = dns_name_totext(name, ISC_FALSE, b);
check_result(result, "dns_name_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);
result = dns_rdata_totext(rdata, NULL, b2);
check_result(result, "dns_rdata_totext");
isc_buffer_usedregion(b2, &r2);
printf ( "%.*s %s %.*s", (int)r.length, (char *)r.base,
msg, (int)r2.length, (char *)r2.base);
if (query->lookup->identify) {
printf(" on server %s", query->servname);
printf (" on server %s", query->servname);
}
printf("\n");
printf ("\n");
isc_buffer_free(&b);
isc_buffer_free(&b2);
}
@@ -353,7 +346,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
while (loopresult == ISC_R_SUCCESS) {
dns_rdataset_current(rdataset, &rdata);
if (rdata.type <= 103)
rtt = rtypetext[rdata.type];
rtt=rtypetext[rdata.type];
else if (rdata.type == 249)
rtt = "key";
else if (rdata.type == 250)
@@ -418,25 +411,36 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
dns_rdataset_t *opt, *tsig = NULL;
dns_name_t *tsigname;
isc_result_t result = ISC_R_SUCCESS;
isc_buffer_t *b = NULL;
isc_region_t r;
UNUSED(headers);
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);
result = isc_buffer_allocate(mctx, &b, MXNAME);
check_result(result, "isc_buffer_allocate");
result = isc_sockaddr_totext(&query->sockaddr, b);
check_result(result, "isc_sockaddr_totext");
printf("Address: %.*s\n",
(int)isc_buffer_usedlength(b),
(char*)isc_buffer_base(b));
isc_buffer_free(&b);
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,
result = isc_buffer_allocate(mctx, &b, MXNAME);
check_result(result, "isc_buffer_allocate");
result = dns_name_totext(query->lookup->name, ISC_FALSE,
b);
check_result(result, "dns_name_totext");
isc_buffer_usedregion(b, &r);
printf("Host %.*s not found: %d(%s)\n",
(int)r.length, (char *)r.base,
msg->rcode, rcodetext[msg->rcode]);
isc_buffer_free(&b);
return (ISC_R_SUCCESS);
}
if (!short_form) {
@@ -572,8 +576,8 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
(isc_textregion_t *)&tr);
if (result != ISC_R_SUCCESS)
fprintf(stderr,"Warning: invalid type: %s\n",
isc_commandline_argument);
fprintf (stderr,"Warning: invalid type: %s\n",
isc_commandline_argument);
else {
lookup->rdtype = rdtype;
lookup->rdtypeset = ISC_TRUE;
@@ -586,8 +590,8 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
(isc_textregion_t *)&tr);
if (result != ISC_R_SUCCESS)
fprintf(stderr,"Warning: invalid class: %s\n",
isc_commandline_argument);
fprintf (stderr,"Warning: invalid class: %s\n",
isc_commandline_argument);
else {
lookup->rdclass = rdclass;
lookup->rdclassset = ISC_TRUE;
@@ -623,13 +627,12 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
break;
case 'C':
debug("showing all SOAs");
lookup->rdtype = dns_rdatatype_ns;
lookup->rdtype = dns_rdatatype_soa;
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;
break;
case 'N':
debug("setting NDOTS to %s",

View File

@@ -1,202 +0,0 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!--
- 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 INTERNET SOFTWARE CONSORTIUM
- DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- INTERNET SOFTWARE CONSORTIUM 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 2001/06/08 17:18:13 gson 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 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>. The argument is provided for
compatibility with older implemementations. This option is equivalent
to making a query of type AXFR.
</para>
<para>
The <option>-n</option>
option specifies that reverse lookups of IPv6 addresses should
use the IP6.INT domain and "nibble" labels as defined in RFC1886.
The default is to use IP6.ARPA and binary labels as defined in RFC2874.
</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> &mdash; recursion
desired &mdash; 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>-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.
</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>

View File

@@ -1,440 +0,0 @@
<!--
- 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 INTERNET SOFTWARE CONSORTIUM
- DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- INTERNET SOFTWARE CONSORTIUM 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.
-->
<HTML
><HEAD
><TITLE
>host</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
"></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&nbsp;--&nbsp;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
>] {name} [server]</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN33"
></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
>. The argument is provided for
compatibility with older implemementations. This option is equivalent
to making a query of type AXFR.</P
><P
>The <TT
CLASS="OPTION"
>-n</TT
>
option specifies that reverse lookups of IPv6 addresses should
use the IP6.INT domain and "nibble" labels as defined in RFC1886.
The default is to use IP6.ARPA and binary labels as defined in RFC2874.</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
> &mdash; recursion
desired &mdash; 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"
>-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.</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="AEN105"
></A
><H2
>FILES</H2
><P
><TT
CLASS="FILENAME"
>/etc/resolv.conf</TT
></P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN109"
></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
>

View File

@@ -15,19 +15,16 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dig.h,v 1.71.2.3 2001/11/15 01:24:13 marka Exp $ */
/* $Id: dig.h,v 1.60.4.2 2001/11/15 01:30:44 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>
@@ -40,9 +37,7 @@
#define MXRD 32
#define BUFSIZE 512
#define COMMSIZE 0xffff
#ifndef RESOLV_CONF
#define RESOLV_CONF "/etc/resolv.conf"
#endif
#define RESOLVCONF "/etc/resolv.conf"
#define OUTPUTBUF 32767
#define MAXRRLIMIT 0xffffffff
#define MAXTIMEOUT 0xffff
@@ -87,17 +82,16 @@ struct dig_lookup {
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 */
ns_search_only,
identify,
ignore,
recurse,
aaonly,
adflag,
cdflag,
trace, /* dig +trace */
trace_root, /* initial query for either +trace or +nssearch */
trace,
trace_root,
defname,
tcp_mode,
nibble,
comments,
@@ -113,7 +107,6 @@ struct dig_lookup {
char textname[MXNAME]; /* Name we're going to be looking up */
char cmdline[MXNAME];
dns_rdatatype_t rdtype;
dns_rdatatype_t qrdtype;
dns_rdataclass_t rdclass;
isc_boolean_t rdtypeset;
isc_boolean_t rdclassset;
@@ -189,13 +182,13 @@ void
get_address(char *host, in_port_t port, isc_sockaddr_t *sockaddr);
isc_result_t
get_reverse(char *reverse, char *value, isc_boolean_t nibble);
get_reverse(char reverse[MXNAME], char *value, isc_boolean_t nibble);
void
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
fatal(const char *format, ...);
void
debug(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
debug(const char *format, ...);
void
check_result(isc_result_t result, const char *msg);
@@ -243,29 +236,17 @@ cancel_all(void);
void
destroy_libs(void);
void
set_search_domain(char *domain);
/*
* Routines to be defined in dig.c, host.c, and nslookup.c.
* Routines needed in dig.c and host.c.
*/
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".
*/
received(int bytes, int frmsize, char *frm, dig_query_t *query);
void
trying(char *frm, dig_lookup_t *lookup);
trying(int frmsize, char *frm, dig_lookup_t *lookup);
void
dighost_shutdown(void);

View File

@@ -15,12 +15,14 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: nslookup.c,v 1.90 2001/07/30 01:09:14 marka Exp $ */
/* $Id: nslookup.c,v 1.69.2.5 2001/03/16 22:14:00 bwelling Exp $ */
#include <config.h>
#include <stdlib.h>
extern int h_errno;
#include <isc/app.h>
#include <isc/buffer.h>
#include <isc/commandline.h>
@@ -37,7 +39,6 @@
#include <dns/rdata.h>
#include <dns/rdataclass.h>
#include <dns/rdataset.h>
#include <dns/rdatastruct.h>
#include <dns/rdatatype.h>
#include <dns/byaddr.h>
@@ -47,33 +48,40 @@ extern ISC_LIST(dig_lookup_t) lookup_list;
extern ISC_LIST(dig_server_t) server_list;
extern ISC_LIST(dig_searchlist_t) search_list;
extern isc_boolean_t have_ipv6, usesearch, qr, debugging;
extern isc_boolean_t have_ipv6,
usesearch, trace, qr, debugging;
extern in_port_t port;
extern unsigned int timeout;
extern isc_mem_t *mctx;
extern dns_messageid_t id;
extern char *rootspace[BUFSIZE];
extern isc_buffer_t rootbuf;
extern int sendcount;
extern int ndots;
extern int tries;
extern int lookup_counter;
extern char fixeddomain[MXNAME];
extern int exitcode;
extern isc_taskmgr_t *taskmgr;
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,
isc_boolean_t short_form = ISC_TRUE, printcmd = ISC_TRUE,
filter = ISC_FALSE, showallsoa = ISC_FALSE,
tcpmode = ISC_FALSE, deprecation_msg = ISC_TRUE;
isc_uint16_t bufsize = 0;
isc_boolean_t identify = ISC_FALSE,
trace = ISC_FALSE, ns_search_only = ISC_FALSE,
forcecomment = 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];
defname = ISC_TRUE, aaonly = ISC_FALSE;
isc_boolean_t busy = ISC_FALSE, in_use = ISC_FALSE;
char defclass[MXRD] = "IN";
char deftype[MXRD] = "A";
isc_event_t *global_event = NULL;
static const char *rcodetext[] = {
"NOERROR",
@@ -139,7 +147,6 @@ static const char *rtypetext[] = {
"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);
@@ -159,76 +166,32 @@ dighost_shutdown(void) {
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);
void
received(int bytes, int frmsize, char *frm, dig_query_t *query) {
UNUSED(bytes);
UNUSED(frmsize);
UNUSED(frm);
UNUSED(query);
}
static void
printa(dns_rdata_t *rdata) {
isc_result_t result;
char text[sizeof("255.255.255.255")];
isc_buffer_t b;
void
trying(int frmsize, char *frm, dig_lookup_t *lookup) {
UNUSED(frmsize);
UNUSED(frm);
UNUSED(lookup);
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));
}
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;
isc_buffer_t *b = NULL;
dns_name_t *name;
dns_rdataset_t *rdataset = NULL;
dns_rdata_t rdata = DNS_RDATA_INIT;
char namebuf[DNS_NAME_FORMATSIZE];
char *ptr;
char *input;
UNUSED(query);
UNUSED(headers);
@@ -240,6 +203,8 @@ printsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
return (ISC_R_SUCCESS);
else if (result != ISC_R_SUCCESS)
return (result);
result = isc_buffer_allocate(mctx, &b, MXNAME);
check_result(result, "isc_buffer_allocate");
for (;;) {
name = NULL;
dns_message_currentname(msg, section,
@@ -254,24 +219,105 @@ printsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
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);
isc_buffer_clear(b);
result = dns_name_totext(name,
ISC_TRUE,
b);
check_result(result,
"dns_name_totext");
printf("Name:\t%.*s\n",
(int)isc_buffer_usedlength(b),
(char*)isc_buffer_base(b));
isc_buffer_clear(b);
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));
break;
case dns_rdatatype_soa:
dns_name_format(name, namebuf,
sizeof(namebuf));
printf("%s\n", namebuf);
printsoa(&rdata);
isc_buffer_clear(b);
result = dns_name_totext(name,
ISC_TRUE,
b);
check_result(result,
"dns_name_totext");
printf("%.*s\n",
(int)isc_buffer_usedlength(b),
(char*)isc_buffer_base(b));
isc_buffer_clear(b);
result = dns_rdata_totext(&rdata,
NULL,
b);
check_result(result,
"dns_rdata_totext");
((char *)isc_buffer_used(b))[0]=0;
input = isc_buffer_base(b);
ptr = next_token(&input, " \t\r\n");
if (ptr == NULL)
break;
printf("\torigin = %s\n",
ptr);
ptr = next_token(&input, " \t\r\n");
if (ptr == NULL)
break;
printf("\tmail addr = %s\n",
ptr);
ptr = next_token(&input, " \t\r\n");
if (ptr == NULL)
break;
printf("\tserial = %s\n",
ptr);
ptr = next_token(&input, " \t\r\n");
if (ptr == NULL)
break;
printf("\trefresh = %s\n",
ptr);
ptr = next_token(&input, " \t\r\n");
if (ptr == NULL)
break;
printf("\tretry = %s\n",
ptr);
ptr = next_token(&input, " \t\r\n");
if (ptr == NULL)
break;
printf("\texpire = %s\n",
ptr);
ptr = next_token(&input, " \t\r\n");
if (ptr == NULL)
break;
printf("\tminimum = %s\n",
ptr);
break;
default:
def_short_section:
dns_name_format(name, namebuf,
sizeof(namebuf));
printf("%s\t", namebuf);
printrdata(&rdata);
break;
isc_buffer_clear(b);
result = dns_name_totext(name,
ISC_TRUE,
b);
check_result(result,
"dns_name_totext");
if (rdata.type <= 41)
printf("%.*s\t%s",
(int)isc_buffer_usedlength(b),
(char*)isc_buffer_base(b),
rtypetext[rdata.type]);
else
printf("%.*s\trdata_%d = ",
(int)isc_buffer_usedlength(b),
(char*)isc_buffer_base(b),
rdata.type);
isc_buffer_clear(b);
result = dns_rdata_totext(&rdata,
NULL, b);
check_result(result,
"dns_rdata_totext");
printf("%.*s\n",
(int)isc_buffer_usedlength(b),
(char*)isc_buffer_base(b));
}
dns_rdata_reset(&rdata);
loopresult = dns_rdataset_next(rdataset);
@@ -281,9 +327,11 @@ printsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
if (result == ISC_R_NOMORE)
break;
else if (result != ISC_R_SUCCESS) {
isc_buffer_free (&b);
return (result);
}
}
isc_buffer_free(&b);
return (ISC_R_SUCCESS);
}
@@ -291,10 +339,13 @@ 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;
isc_buffer_t *b = NULL;
dns_name_t *name;
dns_rdataset_t *rdataset = NULL;
dns_rdata_t rdata = DNS_RDATA_INIT;
char namebuf[DNS_NAME_FORMATSIZE];
char namestore[DNS_NAME_MAXTEXT + 1]; /* Leave room for the NULL */
char *ptr;
char *input;
UNUSED(query);
@@ -322,6 +373,8 @@ detailsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
return (ISC_R_SUCCESS);
else if (result != ISC_R_SUCCESS)
return (result);
result = isc_buffer_allocate(mctx, &b, MXNAME);
check_result(result, "isc_buffer_allocate");
for (;;) {
name = NULL;
dns_message_currentname(msg, section,
@@ -330,33 +383,92 @@ detailsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
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_name_format(name, namestore,
sizeof(namestore));
printf("\t%s, ", namestore);
dns_rdatatype_format(rdataset->type,
namebuf,
sizeof(namebuf));
printf("type = %s, ", namebuf);
namestore,
sizeof(namestore));
printf("type = %s, ", namestore);
dns_rdataclass_format(rdataset->rdclass,
namebuf,
sizeof(namebuf));
printf("class = %s\n", namebuf);
namestore,
sizeof(namestore));
printf("class = %s\n", namestore);
}
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);
isc_buffer_clear(b);
result = dns_name_totext(name,
ISC_TRUE,
b);
check_result(result,
"dns_name_totext");
printf(" -> %.*s\n",
(int)isc_buffer_usedlength(b),
(char*)isc_buffer_base(b));
switch (rdata.type) {
case dns_rdatatype_soa:
printsoa(&rdata);
isc_buffer_clear(b);
result = dns_rdata_totext(&rdata,
NULL,
b);
check_result(result,
"dns_rdata_totext");
((char *)isc_buffer_used(b))[0]=0;
input = isc_buffer_base(b);
ptr = next_token(&input, " \t\r\n");
if (ptr == NULL)
break;
printf("\torigin = %s\n",
ptr);
ptr = next_token(&input, " \t\r\n");
if (ptr == NULL)
break;
printf("\tmail addr = %s\n",
ptr);
ptr = next_token(&input, " \t\r\n");
if (ptr == NULL)
break;
printf("\tserial = %s\n",
ptr);
ptr = next_token(&input, " \t\r\n");
if (ptr == NULL)
break;
printf("\trefresh = %s\n",
ptr);
ptr = next_token(&input, " \t\r\n");
if (ptr == NULL)
break;
printf("\tretry = %s\n",
ptr);
ptr = next_token(&input, " \t\r\n");
if (ptr == NULL)
break;
printf("\texpire = %s\n",
ptr);
ptr = next_token(&input, " \t\r\n");
if (ptr == NULL)
break;
printf("\tminimum = %s\n",
ptr);
break;
default:
printf("\t");
printrdata(&rdata);
isc_buffer_clear(b);
if (rdata.type <= 41)
printf("\t%s",
rtypetext[rdata.type]);
else
printf("\trdata_%d = ",
rdata.type);
isc_buffer_clear(b);
result = dns_rdata_totext(&rdata,
NULL, b);
check_result(result,
"dns_rdata_totext");
printf("%.*s\n",
(int)isc_buffer_usedlength(b),
(char*)isc_buffer_base(b));
}
dns_rdata_reset(&rdata);
loopresult = dns_rdataset_next(rdataset);
@@ -366,41 +478,47 @@ detailsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
if (result == ISC_R_NOMORE)
break;
else if (result != ISC_R_SUCCESS) {
isc_buffer_free (&b);
return (result);
}
}
isc_buffer_free(&b);
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];
isc_buffer_t *b = NULL;
isc_region_t r;
isc_result_t result;
debug("printmessage()");
isc_sockaddr_format(&query->sockaddr, servtext, sizeof(servtext));
debug("continuing on with rcode != 0");
result = isc_buffer_allocate(mctx, &b, MXNAME);
check_result(result, "isc_buffer_allocate");
printf("Server:\t\t%s\n", query->servname);
printf("Address:\t%s\n", servtext);
result = isc_sockaddr_totext(&query->sockaddr, b);
check_result(result, "isc_sockaddr_totext");
printf("Address:\t%.*s\n", (int)isc_buffer_usedlength(b),
(char*)isc_buffer_base(b));
isc_buffer_free(&b);
puts("");
if (!short_form) {
isc_boolean_t headers = ISC_TRUE;
if (msg->rcode != 0) {
result = isc_buffer_allocate(mctx, &b, MXNAME);
check_result(result, "isc_buffer_allocate");
result = dns_name_totext(query->lookup->name, ISC_FALSE,
b);
check_result(result, "dns_name_totext");
isc_buffer_usedregion(b, &r);
printf("** server can't find %.*s: %s\n",
(int)r.length, (char*)r.base,
rcodetext[msg->rcode]);
isc_buffer_free(&b);
debug("returning with rcode == 0");
return (ISC_R_SUCCESS);
}
if (!short_form){
puts("------------");
/* detailheader(query, msg);*/
detailsection(query, msg, headers, DNS_SECTION_QUESTION);
@@ -410,16 +528,6 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
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]))
@@ -443,43 +551,47 @@ static void
show_settings(isc_boolean_t full, isc_boolean_t serv_only) {
dig_server_t *srv;
isc_sockaddr_t sockaddr;
isc_buffer_t *b = NULL;
isc_result_t result;
dig_searchlist_t *listent;
srv = ISC_LIST_HEAD(server_list);
while (srv != NULL) {
char sockstr[ISC_SOCKADDR_FORMATSIZE];
result = isc_buffer_allocate(mctx, &b, MXNAME);
check_result(result, "isc_buffer_allocate");
get_address(srv->servername, port, &sockaddr);
isc_sockaddr_format(&sockaddr, sockstr, sizeof(sockstr));
printf("Default server: %s\nAddress: %s\n",
srv->servername, sockstr);
result = isc_sockaddr_totext(&sockaddr, b);
check_result(result, "isc_sockaddr_totext");
printf("Default server: %s\nAddress: %.*s\n",
srv->servername, (int)isc_buffer_usedlength(b),
(char*)isc_buffer_base(b));
isc_buffer_free(&b);
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");
printf("\n\tSet options:\n");
printf("\t %s\t\t\t%s\t\t%s\n",
tcpmode?"vc":"novc", short_form?"nodebug":"debug",
debugging?"d2":"nod2");
printf("\t %s\t\t%s\t%s\n",
defname?"defname":"nodefname",
usesearch?"search ":"nosearch",
recurse?"recurse":"norecurse");
printf("\t timeout = %d\t\tretry = %d\tport = %d\n",
timeout, tries, port);
printf("\t querytype = %-8s\tclass = %s\n", deftype, defclass);
if (fixeddomain[0] != 0)
printf("\t domain = %s\n", fixeddomain);
else if (!ISC_LIST_EMPTY(search_list)) {
listent = ISC_LIST_HEAD(search_list);
printf("\t domain = %s\n", listent->origin);
} else
printf("\t domain =\n");
}
static isc_boolean_t
@@ -519,7 +631,7 @@ testclass(char *typetext) {
static void
safecpy(char *dest, char *src, int size) {
strncpy(dest, src, size);
dest[size-1] = 0;
dest[size-1]=0;
}
@@ -529,32 +641,30 @@ setoption(char *opt) {
show_settings(ISC_TRUE, ISC_FALSE);
} else if (strncasecmp(opt, "class=", 6) == 0) {
if (testclass(&opt[6]))
safecpy(defclass, &opt[6], sizeof(defclass));
safecpy(defclass, &opt[6], MXRD);
} else if (strncasecmp(opt, "cl=", 3) == 0) {
if (testclass(&opt[3]))
safecpy(defclass, &opt[3], sizeof(defclass));
safecpy(defclass, &opt[3], MXRD);
} else if (strncasecmp(opt, "type=", 5) == 0) {
if (testtype(&opt[5]))
safecpy(deftype, &opt[5], sizeof(deftype));
safecpy(deftype, &opt[5], MXRD);
} else if (strncasecmp(opt, "ty=", 3) == 0) {
if (testtype(&opt[3]))
safecpy(deftype, &opt[3], sizeof(deftype));
safecpy(deftype, &opt[3], MXRD);
} else if (strncasecmp(opt, "querytype=", 10) == 0) {
if (testtype(&opt[10]))
safecpy(deftype, &opt[10], sizeof(deftype));
safecpy(deftype, &opt[10], MXRD);
} else if (strncasecmp(opt, "query=", 6) == 0) {
if (testtype(&opt[6]))
safecpy(deftype, &opt[6], sizeof(deftype));
safecpy(deftype, &opt[6], MXRD);
} else if (strncasecmp(opt, "qu=", 3) == 0) {
if (testtype(&opt[3]))
safecpy(deftype, &opt[3], sizeof(deftype));
safecpy(deftype, &opt[3], MXRD);
} else if (strncasecmp(opt, "domain=", 7) == 0) {
safecpy(domainopt, &opt[7], sizeof(domainopt));
set_search_domain(domainopt);
safecpy(fixeddomain, &opt[7], MXNAME);
usesearch = ISC_TRUE;
} else if (strncasecmp(opt, "do=", 3) == 0) {
safecpy(domainopt, &opt[3], sizeof(domainopt));
set_search_domain(domainopt);
safecpy(fixeddomain, &opt[3], MXNAME);
usesearch = ISC_TRUE;
} else if (strncasecmp(opt, "port=", 5) == 0) {
port = atoi(&opt[5]);
@@ -573,9 +683,9 @@ setoption(char *opt) {
} else if (strncasecmp(opt, "ret=", 4) == 0) {
tries = atoi(&opt[4]);
} else if (strncasecmp(opt, "def", 3) == 0) {
usesearch = ISC_TRUE;
defname = ISC_TRUE;
} else if (strncasecmp(opt, "nodef", 5) == 0) {
usesearch = ISC_FALSE;
defname = ISC_FALSE;
} else if (strncasecmp(opt, "vc", 3) == 0) {
tcpmode = ISC_TRUE;
} else if (strncasecmp(opt, "novc", 5) == 0) {
@@ -635,14 +745,14 @@ addlookup(char *opt) {
}
lookup->rdclass = rdclass;
lookup->rdclassset = ISC_TRUE;
lookup->trace = ISC_FALSE;
lookup->trace_root = lookup->trace;
lookup->ns_search_only = ISC_FALSE;
lookup->trace = ISC_TF(trace || ns_search_only);
lookup->trace_root = trace;
lookup->ns_search_only = ns_search_only;
lookup->identify = identify;
lookup->recurse = recurse;
lookup->aaonly = aaonly;
lookup->retries = tries;
lookup->udpsize = 0;
lookup->udpsize = bufsize;
lookup->comments = comments;
lookup->tcp_mode = tcpmode;
lookup->stats = stats;
@@ -681,14 +791,14 @@ static void
setsrv(char *opt) {
dig_server_t *srv;
if (opt == NULL)
if (opt == NULL) {
return;
}
flush_server_list();
srv = isc_mem_allocate(mctx, sizeof(struct dig_server));
srv=isc_mem_allocate(mctx, sizeof(struct dig_server));
if (srv == NULL)
fatal("memory allocation failure");
safecpy(srv->servername, opt, sizeof(srv->servername));
fatal("Memory allocation failure.");
safecpy(srv->servername, opt, MXNAME-1);
ISC_LIST_INITANDAPPEND(server_list, srv, link);
}
@@ -700,7 +810,7 @@ get_next_command(void) {
buf = isc_mem_allocate(mctx, COMMSIZE);
if (buf == NULL)
fatal("memory allocation failure");
fatal("Memory allocation failure.");
fputs("> ", stderr);
isc_app_block();
ptr = fgets(buf, COMMSIZE, stdin);
@@ -852,8 +962,7 @@ main(int argc, char **argv) {
"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);

View File

@@ -1,107 +0,0 @@
# 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" /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 /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" /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 /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"
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@@ -1,29 +0,0 @@
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>
{{{
}}}
###############################################################################

View File

@@ -1,227 +0,0 @@
# 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
!IF "$(CFG)" == "dig - Win32 Release"
OUTDIR=.\Release
INTDIR=.\Release
ALL : "..\..\..\Build\Release\dig.exe"
CLEAN :
-@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=cl.exe
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" /D "WIN32" /D "__STDC__" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\dig.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\dig.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\dig.pdb" /machine:I386 /out:"../../../Build/Release/dig.exe"
LINK32_OBJS= \
"$(INTDIR)\dig.obj" \
"$(INTDIR)\dighost.obj"
"..\..\..\Build\Release\dig.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "dig - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
ALL : "..\..\..\Build\Debug\dig.exe" "$(OUTDIR)\dig.bsc"
CLEAN :
-@erase "$(INTDIR)\dig.obj"
-@erase "$(INTDIR)\dig.sbr"
-@erase "$(INTDIR)\dighost.obj"
-@erase "$(INTDIR)\dighost.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\dig.bsc"
-@erase "$(OUTDIR)\dig.pdb"
-@erase "..\..\..\Build\Debug\dig.exe"
-@erase "..\..\..\Build\Debug\dig.ilk"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
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" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\dig.bsc"
BSC32_SBRS= \
"$(INTDIR)\dig.sbr" \
"$(INTDIR)\dighost.sbr"
"$(OUTDIR)\dig.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\dig.pdb" /debug /machine:I386 /out:"../../../Build/Debug/dig.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\dig.obj" \
"$(INTDIR)\dighost.obj"
"..\..\..\Build\Debug\dig.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
!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
!ENDIF

View File

@@ -1,107 +0,0 @@
# 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" /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 /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" /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 /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

View File

@@ -1,29 +0,0 @@
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>
{{{
}}}
###############################################################################

View File

@@ -1,227 +0,0 @@
# 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
!IF "$(CFG)" == "host - Win32 Release"
OUTDIR=.\Release
INTDIR=.\Release
ALL : "..\..\..\Build\Release\host.exe"
CLEAN :
-@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=cl.exe
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" /D "WIN32" /D "__STDC__" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\host.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\host.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\host.pdb" /machine:I386 /out:"../../../Build/Release/host.exe"
LINK32_OBJS= \
"$(INTDIR)\dighost.obj" \
"$(INTDIR)\host.obj"
"..\..\..\Build\Release\host.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "host - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
ALL : "..\..\..\Build\Debug\host.exe" "$(OUTDIR)\host.bsc"
CLEAN :
-@erase "$(INTDIR)\dighost.obj"
-@erase "$(INTDIR)\dighost.sbr"
-@erase "$(INTDIR)\host.obj"
-@erase "$(INTDIR)\host.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\host.bsc"
-@erase "$(OUTDIR)\host.pdb"
-@erase "..\..\..\Build\Debug\host.exe"
-@erase "..\..\..\Build\Debug\host.ilk"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
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" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\host.bsc"
BSC32_SBRS= \
"$(INTDIR)\dighost.sbr" \
"$(INTDIR)\host.sbr"
"$(OUTDIR)\host.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\host.pdb" /debug /machine:I386 /out:"../../../Build/Debug/host.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\dighost.obj" \
"$(INTDIR)\host.obj"
"..\..\..\Build\Debug\host.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
!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
!ENDIF

View File

@@ -1,107 +0,0 @@
# 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" /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 /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" /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 /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

View File

@@ -1,29 +0,0 @@
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>
{{{
}}}
###############################################################################

View File

@@ -1,227 +0,0 @@
# 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
!IF "$(CFG)" == "nslookup - Win32 Release"
OUTDIR=.\Release
INTDIR=.\Release
ALL : "..\..\..\Build\Release\nslookup.exe"
CLEAN :
-@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=cl.exe
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" /D "WIN32" /D "__STDC__" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\nslookup.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\nslookup.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\nslookup.pdb" /machine:I386 /out:"../../../Build/Release/nslookup.exe"
LINK32_OBJS= \
"$(INTDIR)\dighost.obj" \
"$(INTDIR)\nslookup.obj"
"..\..\..\Build\Release\nslookup.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "nslookup - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
ALL : "..\..\..\Build\Debug\nslookup.exe" "$(OUTDIR)\nslookup.bsc"
CLEAN :
-@erase "$(INTDIR)\dighost.obj"
-@erase "$(INTDIR)\dighost.sbr"
-@erase "$(INTDIR)\nslookup.obj"
-@erase "$(INTDIR)\nslookup.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\nslookup.bsc"
-@erase "$(OUTDIR)\nslookup.pdb"
-@erase "..\..\..\Build\Debug\nslookup.exe"
-@erase "..\..\..\Build\Debug\nslookup.ilk"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP=cl.exe
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" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\nslookup.bsc"
BSC32_SBRS= \
"$(INTDIR)\dighost.sbr" \
"$(INTDIR)\nslookup.sbr"
"$(OUTDIR)\nslookup.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\nslookup.pdb" /debug /machine:I386 /out:"../../../Build/Debug/nslookup.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\dighost.obj" \
"$(INTDIR)\nslookup.obj"
"..\..\..\Build\Debug\nslookup.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
!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
!ENDIF

View File

@@ -13,7 +13,7 @@
# 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 2001/06/01 00:44:58 bwelling Exp $
# $Id: Makefile.in,v 1.13.2.1 2001/01/09 22:31:28 bwelling Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -50,48 +50,28 @@ SRCS = dnssec-keygen.c dnssec-makekeyset.c \
dnssec-signkey.c dnssec-signzone.c \
dnssectool.c
MANPAGES = dnssec-keygen.8 \
dnssec-makekeyset.8 \
dnssec-signkey.8 \
dnssec-signzone.8
HTMLPAGES = dnssec-keygen.html \
dnssec-makekeyset.html \
dnssec-signkey.html \
dnssec-signzone.html
MANOBJS = ${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@
dnssec-keygen: dnssec-keygen.@O@ ${OBJS} ${DEPLIBS}
${LIBTOOL} ${PURIFY} ${CC} ${CFLAGS} -o $@ dnssec-keygen.@O@ ${OBJS} ${LIBS}
${LIBTOOL} ${CC} ${CFLAGS} -o $@ dnssec-keygen.@O@ ${OBJS} ${LIBS}
dnssec-makekeyset: dnssec-makekeyset.@O@ ${OBJS} ${DEPLIBS}
${LIBTOOL} ${PURIFY} ${CC} ${CFLAGS} -o $@ dnssec-makekeyset.@O@ ${OBJS} ${LIBS}
${LIBTOOL} ${CC} ${CFLAGS} -o $@ dnssec-makekeyset.@O@ ${OBJS} ${LIBS}
dnssec-signkey: dnssec-signkey.@O@ ${OBJS} ${DEPLIBS}
${LIBTOOL} ${PURIFY} ${CC} ${CFLAGS} -o $@ dnssec-signkey.@O@ ${OBJS} ${LIBS}
${LIBTOOL} ${CC} ${CFLAGS} -o $@ dnssec-signkey.@O@ ${OBJS} ${LIBS}
dnssec-signzone.@O@: dnssec-signzone.c
${LIBTOOL} ${PURIFY} ${CC} ${ALL_CFLAGS} -DVERSION=\"${VERSION}\" -c $<
${LIBTOOL} ${CC} ${ALL_CFLAGS} -DVERSION=\"${VERSION}\" -c $<
dnssec-signzone: dnssec-signzone.@O@ ${OBJS} ${DEPLIBS}
${LIBTOOL} ${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} ${INSTALL_PROGRAM} $$t ${DESTDIR}${sbindir}; done
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8; done
${LIBTOOL} ${CC} ${CFLAGS} -o $@ dnssec-signzone.@O@ ${OBJS} ${LIBS}
clean distclean::
rm -f ${TARGETS}
installdirs:
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}
install:: ${TARGETS} installdirs
for t in ${TARGETS}; do ${LIBTOOL} ${INSTALL_PROGRAM} $$t ${DESTDIR}${sbindir}; done

View File

@@ -1,167 +0,0 @@
.\"
.\" 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 INTERNET SOFTWARE CONSORTIUM
.\" DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
.\" INTERNET SOFTWARE CONSORTIUM 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.
.\"
.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-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-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 2 (email) for
keys of type USER and 3 (DNSSEC) for all other key types.
Other possible values for this argument are listed in
RFC 2535 and its successors.
.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

View File

@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-keygen.c,v 1.48.2.1 2001/10/05 00:21:44 bwelling Exp $ */
/* $Id: dnssec-keygen.c,v 1.45.2.1 2001/01/09 22:31:29 bwelling Exp $ */
#include <config.h>
@@ -40,6 +40,7 @@
#include <dns/secalg.h>
#include <dst/dst.h>
#include <dst/result.h>
#include "dnssectool.h"
@@ -55,34 +56,31 @@ dsa_size_ok(int size) {
static void
usage(void) {
fprintf(stderr, "Usage:\n");
fprintf(stderr, " %s -a alg -b bits -n type [options] name\n\n",
program);
fprintf(stderr, "Required options:\n");
fprintf(stderr, " -a algorithm: RSA | RSAMD5 | DH | DSA | HMAC-MD5"
"\n");
fprintf(stderr, " -b key size, in bits:\n");
fprintf(stderr, " RSA:\t\t[512..%d]\n", MAX_RSA);
fprintf(stderr, " DH:\t\t[128..4096]\n");
fprintf(stderr, " DSA:\t\t[512..1024] and divisible by 64\n");
fprintf(stderr, " HMAC-MD5:\t[1..512]\n");
fprintf(stderr, " -n nametype: ZONE | HOST | ENTITY | USER\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 (RSA only)\n");
fprintf(stderr, " -g use specified generator (DH only)\n");
fprintf(stderr, " -t type: AUTHCONF | NOAUTHCONF | NOAUTH | NOCONF "
printf("Usage:\n");
printf(" %s -a alg -b bits -n type [options] name\n\n", program);
printf("Required options:\n");
printf(" -a algorithm: RSA | RSAMD5 | DH | DSA | HMAC-MD5\n");
printf(" -b key size, in bits:\n");
printf(" RSA:\t\t[512..%d]\n", MAX_RSA);
printf(" DH:\t\t[128..4096]\n");
printf(" DSA:\t\t[512..1024] and divisible by 64\n");
printf(" HMAC-MD5:\t[1..512]\n");
printf(" -n nametype: ZONE | HOST | ENTITY | USER\n");
printf(" name: owner of the key\n");
printf("Other options:\n");
printf(" -c class (default: IN)\n");
printf(" -e use large exponent (RSA only)\n");
printf(" -g use specified generator (DH only)\n");
printf(" -t type: AUTHCONF | NOAUTHCONF | NOAUTH | NOCONF "
"(default: AUTHCONF)\n");
fprintf(stderr, " -p protocol value "
printf(" -p protocol value "
"(default: 2 [email] for USER, 3 [dnssec] otherwise)\n");
fprintf(stderr, " -s strength value this key signs DNS records "
"with (default: 0)\n");
fprintf(stderr, " -r randomdev (a file containing random data)\n");
fprintf(stderr, " -v verbose level\n");
fprintf(stderr, "Output:\n");
fprintf(stderr, " K<name>+<alg>+<id>.key, "
"K<name>+<alg>+<id>.private\n");
printf(" -s strength value this key signs DNS records with "
"(default: 0)\n");
printf(" -r randomdev (a file containing random data)\n");
printf(" -v verbose level\n");
printf("Output:\n");
printf(" K<name>+<alg>+<id>.key, K<name>+<alg>+<id>.private\n");
exit (-1);
}
@@ -216,6 +214,8 @@ main(int argc, char **argv) {
if (ret != ISC_R_SUCCESS)
fatal("unknown algorithm %s", algname);
}
if (dst_algorithm_supported(alg) == ISC_FALSE)
fatal("unsupported algorithm %s", algname);
if (type != NULL) {
if (strcasecmp(type, "NOAUTH") == 0)
@@ -341,7 +341,7 @@ main(int argc, char **argv) {
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));
namestr, algstr, dst_result_totext(ret));
exit(-1);
}

View File

@@ -1,327 +0,0 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!--
- 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 INTERNET SOFTWARE CONSORTIUM
- DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- INTERNET SOFTWARE CONSORTIUM 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 2001/04/10 21:50:26 bwelling 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>-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>-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 2 (email) for
keys of type USER and 3 (DNSSEC) for all other key types.
Other possible values for this argument are listed in
RFC 2535 and its successors.
</para>
</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:
-->

View File

@@ -1,572 +0,0 @@
<!--
- 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 INTERNET SOFTWARE CONSORTIUM
- DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- INTERNET SOFTWARE CONSORTIUM 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.
-->
<HTML
><HEAD
><TITLE
>dnssec-keygen</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
"></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
>&nbsp;--&nbsp;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"
>-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="AEN48"
></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="AEN52"
></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
>-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 2 (email) for
keys of type USER and 3 (DNSSEC) for all other key types.
Other possible values for this argument are listed in
RFC 2535 and its successors.
</P
></DD
><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="AEN121"
></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="AEN148"
></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="AEN161"
></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="AEN177"
></A
><H2
>AUTHOR</H2
><P
> Internet Software Consortium
</P
></DIV
></BODY
></HTML
>

View File

@@ -1,112 +0,0 @@
.\"
.\" 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 INTERNET SOFTWARE CONSORTIUM
.\" DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
.\" INTERNET SOFTWARE CONSORTIUM 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.
.\"
.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 realtive 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

View File

@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-makekeyset.c,v 1.52.2.1 2001/10/05 00:21:45 bwelling Exp $ */
/* $Id: dnssec-makekeyset.c,v 1.45.4.2 2001/03/26 19:11:53 gson Exp $ */
#include <config.h>
@@ -99,32 +99,6 @@ usage(void) {
exit(0);
}
static isc_boolean_t
zonekey_on_list(dst_key_t *key) {
keynode_t *keynode;
for (keynode = ISC_LIST_HEAD(keylist);
keynode != NULL;
keynode = ISC_LIST_NEXT(keynode, link))
{
if (dst_key_compare(keynode->key, key))
return (ISC_TRUE);
}
return (ISC_FALSE);
}
static isc_boolean_t
rdata_on_list(dns_rdata_t *rdata, dns_rdatalist_t *list) {
dns_rdata_t *trdata;
for (trdata = ISC_LIST_HEAD(list->rdata);
trdata != NULL;
trdata = ISC_LIST_NEXT(trdata, link))
{
if (dns_rdata_compare(trdata, rdata) == 0)
return (ISC_TRUE);
}
return (ISC_FALSE);
}
int
main(int argc, char *argv[]) {
int i, ch;
@@ -214,8 +188,7 @@ main(int argc, char *argv[]) {
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));
fatal("could not initialize dst");
isc_stdtime_get(&now);
@@ -247,22 +220,26 @@ main(int argc, char *argv[]) {
for (i = 0; i < argc; i++) {
char namestr[DNS_NAME_FORMATSIZE];
dns_fixedname_t fname;
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));
fatal("error loading key from %s", argv[i]);
if (rdatalist.rdclass == 0)
rdatalist.rdclass = dst_key_class(key);
isc_buffer_init(&namebuf, namestr, sizeof namestr);
result = dns_name_tofilenametext(dst_key_name(key),
ISC_FALSE,
&namebuf);
check_result(result, "dns_name_tofilenametext");
dns_fixedname_init(&fname);
dns_name_downcase(dst_key_name(key),
dns_fixedname_name(&fname),
NULL);
result = dns_name_totext(dns_fixedname_name(&fname),
ISC_FALSE,
&namebuf);
check_result(result, "dns_name_totext");
isc_buffer_putuint8(&namebuf, 0);
if (savedname == NULL) {
@@ -295,26 +272,27 @@ main(int argc, char *argv[]) {
if (domain == NULL) {
dns_fixedname_init(&fdomain);
domain = dns_fixedname_name(&fdomain);
dns_name_copy(dst_key_name(key), domain, NULL);
isc_buffer_init(&b, namestr, strlen(namestr));
isc_buffer_add(&b, strlen(namestr));
result = dns_name_fromtext(domain, &b, dns_rootname,
ISC_FALSE, NULL);
if (result != ISC_R_SUCCESS)
fatal("%s is not a valid name: %s",
namestr, isc_result_totext(result));
}
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);
keynode = isc_mem_get(mctx, sizeof (keynode_t));
if (keynode == NULL)
fatal("out of memory");
keynode->key = zonekey;
ISC_LIST_INITANDAPPEND(keylist, keynode, link);
}
rdata = isc_mem_get(mctx, sizeof(dns_rdata_t));
if (rdata == NULL)
@@ -331,12 +309,7 @@ main(int argc, char *argv[]) {
isc_buffer_usedregion(&b, &r);
dns_rdata_fromregion(rdata, rdatalist.rdclass,
dns_rdatatype_key, &r);
if (!rdata_on_list(rdata, &rdatalist))
ISC_LIST_APPEND(rdatalist.rdata, rdata, link);
else {
isc_mem_put(mctx, data, BUFSIZE);
isc_mem_put(mctx, rdata, sizeof *rdata);
}
ISC_LIST_APPEND(rdatalist.rdata, rdata, link);
dst_key_free(&key);
}
@@ -395,7 +368,7 @@ main(int argc, char *argv[]) {
}
db = NULL;
result = dns_db_create(mctx, "rbt", dns_rootname, dns_dbtype_zone,
result = dns_db_create(mctx, "rbt", domain, dns_dbtype_zone,
rdataset.rdclass, 0, NULL, &db);
if (result != ISC_R_SUCCESS) {
char domainstr[DNS_NAME_FORMATSIZE];

View File

@@ -1,233 +0,0 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!--
- 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 INTERNET SOFTWARE CONSORTIUM
- DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- INTERNET SOFTWARE CONSORTIUM 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.1 2001/09/14 20:29:32 gson 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 realtive 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:
-->

View File

@@ -1,404 +0,0 @@
<!--
- 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 INTERNET SOFTWARE CONSORTIUM
- DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- INTERNET SOFTWARE CONSORTIUM 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.
-->
<HTML
><HEAD
><TITLE
>dnssec-makekeyset</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
"></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
>&nbsp;--&nbsp;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 realtive 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
>

View File

@@ -1,107 +0,0 @@
.\"
.\" 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 INTERNET SOFTWARE CONSORTIUM
.\" DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
.\" INTERNET SOFTWARE CONSORTIUM 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.
.\"
.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 realtive 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

View File

@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-signkey.c,v 1.50.2.1 2001/10/05 00:21:46 bwelling Exp $ */
/* $Id: dnssec-signkey.c,v 1.45.2.2 2001/03/26 19:11:55 gson Exp $ */
#include <config.h>
@@ -30,7 +30,6 @@
#include <isc/util.h>
#include <dns/db.h>
#include <dns/dbiterator.h>
#include <dns/dnssec.h>
#include <dns/fixedname.h>
#include <dns/log.h>
@@ -38,7 +37,6 @@
#include <dns/rdataclass.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
#include <dns/rdatasetiter.h>
#include <dns/rdatastruct.h>
#include <dns/result.h>
#include <dns/secalg.h>
@@ -163,8 +161,6 @@ main(int argc, char *argv[]) {
dns_db_t *db;
dns_dbnode_t *node;
dns_dbversion_t *version;
dns_dbiterator_t *dbiter;
dns_rdatasetiter_t *rdsiter;
dst_key_t *key = NULL;
dns_rdata_t *rdata;
dns_rdata_t sigrdata = DNS_RDATA_INIT;
@@ -173,6 +169,7 @@ main(int argc, char *argv[]) {
dns_rdata_sig_t sig;
isc_result_t result;
isc_buffer_t b;
isc_region_t r;
isc_textregion_t tr;
isc_log_t *log = NULL;
keynode_t *keynode;
@@ -247,8 +244,7 @@ main(int argc, char *argv[]) {
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));
fatal("could not initialize dst");
isc_stdtime_get(&now);
@@ -261,46 +257,19 @@ main(int argc, char *argv[]) {
if (strlen(argv[0]) < 8 || 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);
isc_buffer_init(&b, argv[0] + strlen("keyset-"),
strlen(argv[0]) - strlen("keyset-"));
isc_buffer_add(&b, strlen(argv[0]) - strlen("keyset-"));
result = dns_name_fromtext(domain, &b, dns_rootname, ISC_TRUE, NULL);
if (result != ISC_R_SUCCESS)
fatal("failed to find data in keyset file");
fatal("'%s' does not contain a valid domain name", argv[0]);
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);
result = dns_name_totext(domain, ISC_FALSE, &b);
check_result(result, "dns_name_totext()");
isc_buffer_usedregion(&b, &r);
tdomain[r.length] = 0;
output = isc_mem_allocate(mctx,
strlen("signedkey-") + strlen(tdomain) + 1);
@@ -309,9 +278,28 @@ main(int argc, char *argv[]) {
strcpy(output, "signedkey-");
strcat(output, tdomain);
db = NULL;
result = dns_db_create(mctx, "rbt", domain, 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));
version = NULL;
dns_db_newversion(db, &version);
node = NULL;
result = dns_db_findnode(db, domain, ISC_FALSE, &node);
if (result != ISC_R_SUCCESS) {
char domainstr[DNS_NAME_FORMATSIZE];
dns_name_format(domain, domainstr, sizeof domainstr);
fatal("failed to find database node '%s': %s",
domainstr, isc_result_totext(result));
}
dns_rdataset_init(&rdataset);
dns_rdataset_init(&sigrdataset);
result = dns_db_findrdataset(db, node, version, dns_rdatatype_key, 0,
@@ -382,9 +370,7 @@ main(int argc, char *argv[]) {
for (i = 0; i < argc; i++) {
key = NULL;
result = dst_key_fromnamedfile(argv[i],
DST_TYPE_PUBLIC |
DST_TYPE_PRIVATE,
result = dst_key_fromnamedfile(argv[i], DST_TYPE_PRIVATE,
mctx, &key);
if (result != ISC_R_SUCCESS)
fatal("failed to read key %s from disk: %s",

View File

@@ -1,237 +0,0 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!--
- 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 INTERNET SOFTWARE CONSORTIUM
- DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- INTERNET SOFTWARE CONSORTIUM 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 2001/04/10 21:50:34 bwelling 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 realtive 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:
-->

View File

@@ -1,404 +0,0 @@
<!--
- 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 INTERNET SOFTWARE CONSORTIUM
- DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- INTERNET SOFTWARE CONSORTIUM 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.
-->
<HTML
><HEAD
><TITLE
>dnssec-signkey</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
"></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
>&nbsp;--&nbsp;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 realtive 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
>

View File

@@ -1,154 +0,0 @@
.\"
.\" 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 INTERNET SOFTWARE CONSORTIUM
.\" DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
.\" INTERNET SOFTWARE CONSORTIUM 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.
.\"
.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-s \fIstart-time\fB\fR ] [ \fB-e \fIend-time\fB\fR ] [ \fB-f \fIoutput-file\fB\fR ] [ \fB-h\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-t\fR ] [ \fB-v \fIlevel\fB\fR ] \fBzonefile\fR [ \fBkey\fR\fI...\fR ]
.SH "DESCRIPTION"
.PP
\fBdnssec-signzone\fR signs a zone. It generates NXT
and SIG records and produces a signed version of the zone. If there
is a \fIsignedkey\fR file from the zone's parent,
the parent's signatures will be incorporated into the generated
signed zone file. The security status of delegations from the 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-d \fIdirectory\fB\fR
Look for \fIsignedkey\fR files in
\fBdirectory\fR as the directory
.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 realtive 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 SIG 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 SIG 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
\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

View File

@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-signzone.c,v 1.139.2.1 2001/10/05 00:21:48 bwelling Exp $ */
/* $Id: dnssec-signzone.c,v 1.126.2.4 2001/04/09 20:50:37 gson Exp $ */
#include <config.h>
@@ -28,7 +28,6 @@
#include <isc/commandline.h>
#include <isc/entropy.h>
#include <isc/event.h>
#include <isc/file.h>
#include <isc/mem.h>
#include <isc/mutex.h>
#include <isc/os.h>
@@ -43,6 +42,7 @@
#include <dns/diff.h>
#include <dns/dnssec.h>
#include <dns/fixedname.h>
#include <dns/journal.h>
#include <dns/keyvalues.h>
#include <dns/log.h>
#include <dns/master.h>
@@ -99,8 +99,7 @@ static isc_mem_t *mctx = NULL;
static isc_entropy_t *ectx = NULL;
static dns_ttl_t zonettl;
static FILE *fp;
static char *tempfile = NULL;
static const dns_master_style_t *masterstyle;
static const dns_master_style_t *masterstyle = &dns_master_style_explicitttl;
static unsigned int nsigned = 0, nretained = 0, ndropped = 0;
static unsigned int nverified = 0, nverifyfailed = 0;
static const char *directory;
@@ -117,7 +116,6 @@ static unsigned int ntasks = 0;
static isc_boolean_t shuttingdown = ISC_FALSE, finished = ISC_FALSE;
static unsigned int assigned = 0, completed = 0;
static isc_boolean_t nokeys = ISC_FALSE;
static isc_boolean_t removefile = ISC_FALSE;
#define INCSTAT(counter) \
if (printstats) { \
@@ -223,8 +221,7 @@ keythatsigned(dns_rdata_sig_t *sig) {
return (NULL);
result = dst_key_fromfile(&sig->signer, sig->keyid, sig->algorithm,
DST_TYPE_PUBLIC | DST_TYPE_PRIVATE,
NULL, mctx, &privkey);
DST_TYPE_PRIVATE, NULL, mctx, &privkey);
if (result == ISC_R_SUCCESS) {
dst_key_free(&pubkey);
key = newkeystruct(privkey, ISC_FALSE);
@@ -491,8 +488,7 @@ hasnullkey(dns_rdataset_t *rdataset) {
result = dns_dnssec_keyfromrdata(dns_rootname,
&rdata, mctx, &key);
if (result != ISC_R_SUCCESS)
fatal("could not convert KEY into internal format: %s",
isc_result_totext(result));
fatal("could not convert KEY into internal format");
if (dst_key_isnullkey(key))
found = ISC_TRUE;
dst_key_free(&key);
@@ -509,6 +505,7 @@ static void
opendb(const char *prefix, dns_name_t *name, dns_rdataclass_t rdclass,
dns_db_t **dbp)
{
dns_fixedname_t fname;
char filename[256];
isc_buffer_t b;
isc_result_t result;
@@ -520,8 +517,10 @@ opendb(const char *prefix, dns_name_t *name, dns_rdataclass_t rdclass,
isc_buffer_putstr(&b, "/");
}
isc_buffer_putstr(&b, prefix);
result = dns_name_tofilenametext(name, ISC_FALSE, &b);
check_result(result, "dns_name_tofilenametext()");
dns_fixedname_init(&fname);
(void)dns_name_downcase(name, dns_fixedname_name(&fname), NULL);
result = dns_name_totext(dns_fixedname_name(&fname), ISC_FALSE, &b);
check_result(result, "dns_name_totext()");
if (isc_buffer_availablelength(&b) == 0) {
char namestr[DNS_NAME_FORMATSIZE];
dns_name_format(name, namestr, sizeof namestr);
@@ -529,7 +528,7 @@ opendb(const char *prefix, dns_name_t *name, dns_rdataclass_t rdclass,
}
isc_buffer_putuint8(&b, 0);
result = dns_db_create(mctx, "rbt", dns_rootname, dns_dbtype_zone,
result = dns_db_create(mctx, "rbt", name, dns_dbtype_zone,
rdclass, 0, NULL, dbp);
check_result(result, "dns_db_create()");
@@ -1339,7 +1338,7 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) {
check_result(result, "dns_db_create()");
result = dns_db_load(*db, file);
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
if (result != ISC_R_SUCCESS)
fatal("failed loading zone from '%s': %s",
file, isc_result_totext(result));
}
@@ -1490,12 +1489,6 @@ usage(void) {
exit(0);
}
static void
removetempfile(void) {
if (removefile)
isc_file_remove(tempfile);
}
int
main(int argc, char *argv[]) {
int i, ch;
@@ -1510,11 +1503,11 @@ main(int argc, char *argv[]) {
isc_boolean_t pseudorandom = ISC_FALSE;
unsigned int eflags;
isc_boolean_t free_output = ISC_FALSE;
int tempfilelen;
dns_rdataclass_t rdclass;
isc_textregion_t r;
isc_task_t **tasks = NULL;
masterstyle = &dns_master_style_explicitttl;
check_result(isc_app_start(), "isc_app_start");
@@ -1681,12 +1674,10 @@ main(int argc, char *argv[]) {
dst_key_t *newkey = NULL;
result = dst_key_fromnamedfile(argv[i],
DST_TYPE_PUBLIC |
DST_TYPE_PRIVATE,
mctx, &newkey);
if (result != ISC_R_SUCCESS)
fatal("cannot load key %s: %s", argv[i],
isc_result_totext(result));
fatal("cannot load key %s", argv[i]);
key = ISC_LIST_HEAD(keylist);
while (key != NULL) {
@@ -1725,22 +1716,11 @@ main(int argc, char *argv[]) {
result = dns_db_newversion(gdb, &gversion);
check_result(result, "dns_db_newversion()");
tempfilelen = strlen(output) + 20;
tempfile = isc_mem_get(mctx, tempfilelen);
if (tempfile == NULL)
fatal("out of memory");
result = isc_file_mktemplate(output, tempfile, tempfilelen);
check_result(result, "isc_file_mktemplate");
fp = NULL;
result = isc_file_openunique(tempfile, &fp);
result = isc_stdio_open(output, "w", &fp);
if (result != ISC_R_SUCCESS)
fatal("failed to open temporary output file: %s",
fatal("failed to open output file %s: %s", output,
isc_result_totext(result));
removefile = ISC_TRUE;
setfatalcallback(&removetempfile);
print_time(fp);
print_version(fp);
@@ -1786,12 +1766,6 @@ main(int argc, char *argv[]) {
result = isc_stdio_close(fp);
check_result(result, "isc_stdio_close");
removefile = ISC_FALSE;
result = isc_file_rename(tempfile, output);
if (result != ISC_R_SUCCESS)
fatal("failed to rename temp file to %s: %s\n",
output, isc_result_totext(result));
DESTROYLOCK(&namelock);
if (printstats)
@@ -1810,8 +1784,6 @@ main(int argc, char *argv[]) {
isc_mem_put(mctx, key, sizeof(signer_key_t));
}
isc_mem_put(mctx, tempfile, tempfilelen);
if (free_output)
isc_mem_free(mctx, output);

View File

@@ -1,325 +0,0 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!--
- 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 INTERNET SOFTWARE CONSORTIUM
- DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- INTERNET SOFTWARE CONSORTIUM 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 2001/04/10 21:50:37 bwelling 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>-s <replaceable class="parameter">start-time</replaceable></option></arg>
<arg><option>-e <replaceable class="parameter">end-time</replaceable></option></arg>
<arg><option>-f <replaceable class="parameter">output-file</replaceable></option></arg>
<arg><option>-h</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>-t</option></arg>
<arg><option>-v <replaceable class="parameter">level</replaceable></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 NXT
and SIG records and produces a signed version of the zone. If there
is a <filename>signedkey</filename> file from the zone's parent,
the parent's signatures will be incorporated into the generated
signed zone file. The security status of delegations from the 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>-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>-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 realtive 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 SIG 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 SIG 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>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:
-->

View File

@@ -1,553 +0,0 @@
<!--
- 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 INTERNET SOFTWARE CONSORTIUM
- DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
- INTERNET SOFTWARE CONSORTIUM 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.
-->
<HTML
><HEAD
><TITLE
>dnssec-signzone</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
"></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
>&nbsp;--&nbsp;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"
>-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"
>-f <TT
CLASS="REPLACEABLE"
><I
>output-file</I
></TT
></TT
>] [<TT
CLASS="OPTION"
>-h</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"
>-t</TT
>] [<TT
CLASS="OPTION"
>-v <TT
CLASS="REPLACEABLE"
><I
>level</I
></TT
></TT
>] {zonefile} [key...]</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN56"
></A
><H2
>DESCRIPTION</H2
><P
> <B
CLASS="COMMAND"
>dnssec-signzone</B
> signs a zone. It generates NXT
and SIG 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 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="AEN62"
></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
>-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
>-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 realtive 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 SIG 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 SIG 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
>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="AEN154"
></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="AEN168"
></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="AEN179"
></A
><H2
>AUTHOR</H2
><P
> Internet Software Consortium
</P
></DIV
></BODY
></HTML
>

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssectool.c,v 1.31.2.1 2001/09/06 00:14:15 gson Exp $ */
/* $Id: dnssectool.c,v 1.26.2.2 2001/06/08 23:27:29 bwelling Exp $ */
#include <config.h>
@@ -23,6 +23,7 @@
#include <isc/buffer.h>
#include <isc/entropy.h>
#include <isc/keyboard.h>
#include <isc/string.h>
#include <isc/time.h>
#include <isc/util.h>
@@ -42,7 +43,8 @@ extern int verbose;
extern const char *program;
static isc_entropysource_t *source = NULL;
static fatalcallback_t *fatalcallback = NULL;
static isc_keyboard_t kbd;
static isc_boolean_t wantkeyboard = ISC_FALSE;
void
fatal(const char *format, ...) {
@@ -53,16 +55,9 @@ fatal(const char *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) {
@@ -125,7 +120,7 @@ key_format(const dst_key_t *key, char *cp, unsigned int size) {
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);
alg_format(dst_key_alg(key), algstr, sizeof algstr);
snprintf(cp, size, "%s/%s/%d", namestr, algstr, dst_key_id(key));
}
@@ -198,30 +193,107 @@ cleanup_logging(isc_log_t **logp) {
logp = NULL;
}
static isc_result_t
kbdstart(isc_entropysource_t *source, void *arg, isc_boolean_t blocking) {
isc_keyboard_t *kbd = (isc_keyboard_t *)arg;
static isc_boolean_t first = ISC_TRUE;
UNUSED(source);
if (!blocking)
return (ISC_R_NOENTROPY);
if (first) {
if (!wantkeyboard) {
fprintf(stderr, "You must use the keyboard to create "
"entropy, since your system is lacking\n");
fprintf(stderr, "/dev/random (or equivalent)\n\n");
}
first = ISC_FALSE;
}
fprintf(stderr, "start typing:\n");
return (isc_keyboard_open(kbd));
}
static void
kbdstop(isc_entropysource_t *source, void *arg) {
isc_keyboard_t *kbd = (isc_keyboard_t *)arg;
UNUSED(source);
if (!isc_keyboard_canceled(kbd))
fprintf(stderr, "stop typing.\r\n");
(void)isc_keyboard_close(kbd, 3);
}
static isc_result_t
kbdget(isc_entropysource_t *source, void *arg, isc_boolean_t blocking) {
isc_keyboard_t *kbd = (isc_keyboard_t *)arg;
isc_result_t result;
isc_time_t t;
isc_uint32_t sample;
isc_uint32_t extra;
unsigned char c;
if (!blocking)
return (ISC_R_NOTBLOCKING);
result = isc_keyboard_getchar(kbd, &c);
if (result != ISC_R_SUCCESS)
return (result);
result = isc_time_now(&t);
if (result != ISC_R_SUCCESS)
return (result);
sample = isc_time_nanoseconds(&t);
extra = c;
result = isc_entropy_addcallbacksample(source, sample, extra);
if (result != ISC_R_SUCCESS) {
fprintf(stderr, "\r\n");
return (result);
}
fprintf(stderr, ".");
fflush(stderr);
return (result);
}
void
setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx) {
isc_result_t result;
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");
result = isc_entropy_create(mctx, ectx);
if (result != ISC_R_SUCCESS)
fatal("could not create entropy object");
#ifdef PATH_RANDOMDEV
if (randomfile == NULL) {
result = isc_entropy_createfilesource(*ectx, PATH_RANDOMDEV);
if (result == ISC_R_SUCCESS)
return;
}
#endif
if (randomfile != NULL && strcmp(randomfile, "keyboard") == 0) {
usekeyboard = ISC_ENTROPY_KEYBOARDYES;
if (randomfile != NULL && strcasecmp(randomfile, "keyboard") == 0) {
wantkeyboard = ISC_TRUE;
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 (randomfile != NULL) {
result = isc_entropy_createfilesource(*ectx, randomfile);
if (result != ISC_R_SUCCESS)
fatal("could not open randomdev %s: %s", randomfile,
isc_result_totext(result));
} else {
result = isc_entropy_createcallbacksource(*ectx, kbdstart,
kbdget, kbdstop,
&kbd, &source);
if (result != ISC_R_SUCCESS)
fatal("failed to open keyboard: %s\n",
isc_result_totext(result));
}
}
void

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssectool.h,v 1.15 2001/08/08 22:54:16 gson Exp $ */
/* $Id: dnssectool.h,v 1.12.4.1 2001/01/09 22:31:36 bwelling Exp $ */
#ifndef DNSSECTOOL_H
#define DNSSECTOOL_H 1
@@ -25,19 +25,14 @@
#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);
vbprintf(int level, const char *fmt, ...);
void
type_format(const dns_rdatatype_t type, char *cp, unsigned int size);

View File

@@ -1,107 +0,0 @@
# 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

View File

@@ -1,29 +0,0 @@
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>
{{{
}}}
###############################################################################

View File

@@ -1,227 +0,0 @@
# 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

View File

@@ -1,107 +0,0 @@
# 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

View File

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

View File

@@ -1,227 +0,0 @@
# 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

View File

@@ -1,103 +0,0 @@
# 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

View File

@@ -1,29 +0,0 @@
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>
{{{
}}}
###############################################################################

View File

@@ -1,107 +0,0 @@
# 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

View File

@@ -1,29 +0,0 @@
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>
{{{
}}}
###############################################################################

View File

@@ -1,227 +0,0 @@
# 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

View File

@@ -1,107 +0,0 @@
# 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

View File

@@ -1,29 +0,0 @@
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>
{{{
}}}
###############################################################################

View File

@@ -1,227 +0,0 @@
# 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

View File

@@ -1,5 +1,5 @@
Makefile
timestamp
.libs
*.la
*.lo
lwresd

View File

@@ -1,4 +1,4 @@
# Copyright (C) 2001 Internet Software Consortium.
# Copyright (C) 2000, 2001 Internet Software Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -13,7 +13,7 @@
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
# $Id: Makefile.in,v 1.3 2001/02/02 01:01:22 sjacob Exp $
# $Id: Makefile.in,v 1.13.4.1 2001/01/09 22:31:38 bwelling Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -23,38 +23,35 @@ top_srcdir = @top_srcdir@
@BIND9_INCLUDES@
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES}
CINCLUDES = ${LWRES_INCLUDES} ${DNS_INCLUDES} ${ISC_INCLUDES}
CDEFINES =
CWARNINGS =
DNSLIBS = ../../../../lib/dns/libdns.@A@ @DNS_OPENSSL_LIBS@ @DNS_GSSAPI_LIBS@
ISCLIBS = ../../../../lib/isc/libisc.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_OPENSSL_LIBS@ @DNS_GSSAPI_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@
LWRESLIBS = ../../lib/lwres/liblwres.@A@
DNSDEPLIBS = ../../../../lib/dns/libdns.@A@
ISCDEPLIBS = ../../../../lib/isc/libisc.@A@
DNSDEPLIBS = ../../lib/dns/libdns.@A@
ISCDEPLIBS = ../../lib/isc/libisc.@A@
LWRESDEPLIBS = ../../lib/lwres/liblwres.@A@
DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS}
DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS} ${LWRESDEPLIBS}
LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@
LIBS = ${DNSLIBS} ${ISCLIBS} ${LWRESLIBS} @LIBS@
TARGETS = keycreate keydelete
TARGETS = lwresd
CREATEOBJS = keycreate.@O@
DELETEOBJS = keydelete.@O@
OBJS = main.@O@ client.@O@ err_pkt.@O@ \
process_gabn.@O@ process_gnba.@O@ process_noop.@O@
SRCS = keycreate.c keydelete.c
SRCS = main.c client.c err_pkt.c \
process_gabn.c process_gnba.c process_noop.c
@BIND9_MAKE_RULES@
all: keycreate keydelete
keycreate: ${CREATEOBJS} ${DEPLIBS}
${LIBTOOL} ${PURIFY} ${CC} ${CFLAGS} -o $@ ${CREATEOBJS} ${LIBS}
keydelete: ${DELETEOBJS} ${DEPLIBS}
${LIBTOOL} ${PURIFY} ${CC} ${CFLAGS} -o $@ ${DELETEOBJS} ${LIBS}
lwresd: ${OBJS} ${UOBJS} ${DEPLIBS}
${LIBTOOL} ${CC} ${CFLAGS} -o $@ ${OBJS} ${UOBJS} ${LIBS}
clean distclean::
rm -f ${TARGETS}

387
bin/lwresd/client.c Normal file
View File

@@ -0,0 +1,387 @@
/*
* 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 INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM 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.c,v 1.30.4.1 2001/01/09 22:31:39 bwelling Exp $ */
#include <config.h>
#include <isc/socket.h>
#include <isc/string.h>
#include <isc/task.h>
#include <isc/util.h>
#include <dns/view.h>
#include <dns/log.h>
#include "client.h"
void
DP(int level, const char *format, ...) {
va_list args;
va_start(args, format);
isc_log_vwrite(dns_lctx,
DNS_LOGCATEGORY_DATABASE, DNS_LOGMODULE_ADB,
ISC_LOG_DEBUG(level), format, args);
va_end(args);
}
void
hexdump(char *msg, void *base, size_t len) {
unsigned char *p;
unsigned int cnt;
char buffer[180];
char *n;
p = base;
cnt = 0;
n = buffer;
*n = 0;
printf("*** %s (%u bytes @ %p)\n", msg, len, base);
while (cnt < len) {
if (cnt % 16 == 0) {
n = buffer;
n += sprintf(buffer, "%p: ", p);
} else if (cnt % 8 == 0) {
*n++ = ' ';
*n++ = '|';
*n = 0;
}
n += sprintf(n, " %02x", *p++);
cnt++;
if (cnt % 16 == 0) {
DP(80, buffer);
n = buffer;
*n = 0;
}
}
if (n != buffer) {
DP(80, buffer);
n = buffer;
*n = 0;
}
}
static void
clientmgr_can_die(clientmgr_t *cm) {
if ((cm->flags & CLIENTMGR_FLAG_SHUTTINGDOWN) == 0)
return;
if (ISC_LIST_HEAD(cm->running) != NULL)
return;
lwres_context_destroy(&cm->lwctx);
dns_view_detach(&cm->view);
isc_task_detach(&cm->task);
}
static void
process_request(client_t *client) {
lwres_buffer_t b;
isc_result_t result;
lwres_buffer_init(&b, client->buffer, client->recvlength);
lwres_buffer_add(&b, client->recvlength);
result = lwres_lwpacket_parseheader(&b, &client->pkt);
if (result != ISC_R_SUCCESS) {
DP(50, "invalid packet header received");
goto restart;
}
DP(50, "opcode %08x", client->pkt.opcode);
switch (client->pkt.opcode) {
case LWRES_OPCODE_GETADDRSBYNAME:
process_gabn(client, &b);
return;
case LWRES_OPCODE_GETNAMEBYADDR:
process_gnba(client, &b);
return;
case LWRES_OPCODE_NOOP:
process_noop(client, &b);
return;
default:
DP(50, "unknown opcode %08x", client->pkt.opcode);
goto restart;
}
/*
* Drop the packet.
*/
restart:
DP(50, "restarting client %p...", client);
client_state_idle(client);
}
void
client_recv(isc_task_t *task, isc_event_t *ev) {
client_t *client = ev->ev_arg;
clientmgr_t *cm = client->clientmgr;
isc_socketevent_t *dev = (isc_socketevent_t *)ev;
INSIST(dev->region.base == client->buffer);
INSIST(CLIENT_ISRECV(client));
CLIENT_SETRECVDONE(client);
INSIST((cm->flags & CLIENTMGR_FLAG_RECVPENDING) != 0);
cm->flags &= ~CLIENTMGR_FLAG_RECVPENDING;
DP(50, "event received: task %p, length %u, result %u (%s)",
task, dev->n, dev->result, isc_result_totext(dev->result));
if (dev->result != ISC_R_SUCCESS) {
isc_event_free(&ev);
dev = NULL;
/*
* Go idle.
*/
client_state_idle(client);
return;
}
/*
* XXXMLG If we wanted to run on ipv6 as well, we'd need the pktinfo
* bits. Right now we don't, so don't remember them.
*/
client->recvlength = dev->n;
client->address = dev->address;
isc_event_free(&ev);
dev = NULL;
client_start_recv(cm);
process_request(client);
}
/*
* This function will start a new recv() on a socket for this client manager.
*/
isc_result_t
client_start_recv(clientmgr_t *cm) {
client_t *client;
isc_result_t result;
isc_region_t r;
if ((cm->flags & CLIENTMGR_FLAG_SHUTTINGDOWN) != 0)
return (ISC_R_SUCCESS);
/*
* If a recv is already running, don't bother.
*/
if ((cm->flags & CLIENTMGR_FLAG_RECVPENDING) != 0)
return (ISC_R_SUCCESS);
/*
* If we have no idle slots, just return success.
*/
client = ISC_LIST_HEAD(cm->idle);
if (client == NULL)
return (ISC_R_SUCCESS);
INSIST(CLIENT_ISIDLE(client));
/*
* Issue the recv. If it fails, return that it did.
*/
r.base = client->buffer;
r.length = LWRES_RECVLENGTH;
result = isc_socket_recv(cm->sock, &r, 0, cm->task, client_recv,
client);
if (result != ISC_R_SUCCESS)
return (result);
/*
* Set the flag to say we've issued a recv() call.
*/
cm->flags |= CLIENTMGR_FLAG_RECVPENDING;
/*
* Remove the client from the idle list, and put it on the running
* list.
*/
CLIENT_SETRECV(client);
ISC_LIST_UNLINK(cm->idle, client, link);
ISC_LIST_APPEND(cm->running, client, link);
return (ISC_R_SUCCESS);
}
void
client_shutdown(isc_task_t *task, isc_event_t *ev) {
clientmgr_t *cm = ev->ev_arg;
REQUIRE(task == cm->task);
REQUIRE(ev->ev_type == LWRD_SHUTDOWN);
REQUIRE((cm->flags & CLIENTMGR_FLAG_SHUTTINGDOWN) == 0);
DP(50, "got shutdown event, task %p", task);
/*
* Cancel any pending I/O.
*/
if ((cm->flags & CLIENTMGR_FLAG_RECVPENDING) != 0)
isc_socket_cancel(cm->sock, task, ISC_SOCKCANCEL_ALL);
/*
* Run through the running client list and kill off any finds
* in progress.
*/
/* XXXMLG */
cm->flags |= CLIENTMGR_FLAG_SHUTTINGDOWN;
}
/*
* Do all the crap needed to move a client from the run queue to the idle
* queue.
*/
void
client_state_idle(client_t *client) {
clientmgr_t *cm;
cm = client->clientmgr;
INSIST(client->sendbuf == NULL);
INSIST(client->sendlength == 0);
INSIST(client->arg == NULL);
INSIST(client->v4find == NULL);
INSIST(client->v6find == NULL);
ISC_LIST_UNLINK(cm->running, client, link);
ISC_LIST_PREPEND(cm->idle, client, link);
CLIENT_SETIDLE(client);
clientmgr_can_die(cm);
client_start_recv(cm);
}
void
client_send(isc_task_t *task, isc_event_t *ev) {
client_t *client = ev->ev_arg;
clientmgr_t *cm = client->clientmgr;
isc_socketevent_t *dev = (isc_socketevent_t *)ev;
UNUSED(task);
UNUSED(dev);
INSIST(CLIENT_ISSEND(client));
INSIST(client->sendbuf == dev->region.base);
DP(50, "task %p for client %p got send-done event", task, client);
if (client->sendbuf != client->buffer)
lwres_context_freemem(cm->lwctx, client->sendbuf,
client->sendlength);
client->sendbuf = NULL;
client->sendlength = 0;
client_state_idle(client);
isc_event_free(&ev);
}
void
client_initialize(client_t *client, clientmgr_t *cmgr) {
client->clientmgr = cmgr;
ISC_LINK_INIT(client, link);
CLIENT_SETIDLE(client);
client->arg = NULL;
client->recvlength = 0;
client->sendbuf = NULL;
client->sendlength = 0;
client->find = NULL;
client->v4find = NULL;
client->v6find = NULL;
client->find_wanted = 0;
client->options = 0;
client->byaddr = NULL;
client->addrinfo = NULL;
ISC_LIST_APPEND(cmgr->idle, client, link);
}
void
client_init_aliases(client_t *client) {
int i;
for (i = 0 ; i < LWRES_MAX_ALIASES ; i++) {
client->aliases[i] = NULL;
client->aliaslen[i] = 0;
}
for (i = 0 ; i < LWRES_MAX_ADDRS ; i++) {
client->addrs[i].family = 0;
client->addrs[i].length = 0;
memset(client->addrs[i].address, 0, LWRES_ADDR_MAXLEN);
LWRES_LINK_INIT(&client->addrs[i], link);
}
}
void
client_init_gabn(client_t *client) {
/*
* Initialize the real name and alias arrays in the reply we're
* going to build up.
*/
client_init_aliases(client);
client->gabn.naliases = 0;
client->gabn.naddrs = 0;
client->gabn.realname = NULL;
client->gabn.aliases = client->aliases;
client->gabn.realnamelen = 0;
client->gabn.aliaslen = client->aliaslen;
LWRES_LIST_INIT(client->gabn.addrs);
client->gabn.base = NULL;
client->gabn.baselen = 0;
/*
* Set up the internal buffer to point to the receive region.
*/
isc_buffer_init(&client->recv_buffer, client->buffer,
LWRES_RECVLENGTH);
}
void
client_init_gnba(client_t *client) {
/*
* Initialize the real name and alias arrays in the reply we're
* going to build up.
*/
client_init_aliases(client);
client->gnba.naliases = 0;
client->gnba.realname = NULL;
client->gnba.aliases = client->aliases;
client->gnba.realnamelen = 0;
client->gnba.aliaslen = client->aliaslen;
client->gnba.base = NULL;
client->gnba.baselen = 0;
isc_buffer_init(&client->recv_buffer, client->buffer,
LWRES_RECVLENGTH);
}

194
bin/lwresd/client.h Normal file
View File

@@ -0,0 +1,194 @@
/*
* 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 INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM 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.18.4.1 2001/01/09 22:31:40 bwelling Exp $ */
#ifndef LWD_CLIENT_H
#define LWD_CLIENT_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>
#define LWRD_EVENTCLASS ISC_EVENTCLASS(4242)
#define LWRD_SHUTDOWN (LWRD_EVENTCLASS + 0x0001)
typedef struct client_s client_t;
typedef struct clientmgr_s clientmgr_t;
struct client_s {
isc_sockaddr_t address; /* where to reply */
clientmgr_t *clientmgr; /* our parent */
ISC_LINK(client_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 target_name;
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;
dns_adbaddrinfo_t *addrinfo;
/*
* 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 CLIENT_STATE_IDLE 1
#define CLIENT_STATE_RECV 2
#define CLIENT_STATE_RECVDONE 3
#define CLIENT_STATE_FINDWAIT 4
#define CLIENT_STATE_SEND 5
#define CLIENT_STATE_SENDDONE 6
#define CLIENT_ISIDLE(c) ((c)->state == CLIENT_STATE_IDLE)
#define CLIENT_ISRECV(c) ((c)->state == CLIENT_STATE_RECV)
#define CLIENT_ISRECVDONE(c) ((c)->state == CLIENT_STATE_RECVDONE)
#define CLIENT_ISFINDWAIT(c) ((c)->state == CLIENT_STATE_FINDWAIT)
#define CLIENT_ISSEND(c) ((c)->state == CLIENT_STATE_SEND)
/*
* Overall magic test that means we're not idle.
*/
#define CLIENT_ISRUNNING(c) (!CLIENT_ISIDLE(c))
#define CLIENT_SETIDLE(c) ((c)->state = CLIENT_STATE_IDLE)
#define CLIENT_SETRECV(c) ((c)->state = CLIENT_STATE_RECV)
#define CLIENT_SETRECVDONE(c) ((c)->state = CLIENT_STATE_RECVDONE)
#define CLIENT_SETFINDWAIT(c) ((c)->state = CLIENT_STATE_FINDWAIT)
#define CLIENT_SETSEND(c) ((c)->state = CLIENT_STATE_SEND)
#define CLIENT_SETSENDDONE(c) ((c)->state = CLIENT_STATE_SENDDONE)
struct clientmgr_s {
isc_mem_t *mctx;
isc_task_t *task; /* owning task */
isc_socket_t *sock; /* socket to use */
dns_view_t *view;
unsigned int flags;
isc_event_t sdev; /* shutdown event */
lwres_context_t *lwctx; /* lightweight proto context */
ISC_LIST(client_t) idle; /* idle client slots */
ISC_LIST(client_t) running; /* running clients */
};
#define CLIENTMGR_FLAG_RECVPENDING 0x00000001
#define CLIENTMGR_FLAG_SHUTTINGDOWN 0x00000002
void client_initialize(client_t *, clientmgr_t *);
isc_result_t client_start_recv(clientmgr_t *);
void client_state_idle(client_t *);
void client_recv(isc_task_t *, isc_event_t *);
void client_shutdown(isc_task_t *, isc_event_t *);
void client_send(isc_task_t *, isc_event_t *);
/*
* Processing functions of various types.
*/
void process_gabn(client_t *, lwres_buffer_t *);
void process_gnba(client_t *, lwres_buffer_t *);
void process_noop(client_t *, lwres_buffer_t *);
void error_pkt_send(client_t *, isc_uint32_t);
void client_init_aliases(client_t *);
void client_init_gabn(client_t *);
void client_init_gnba(client_t *);
void DP(int level, const char *format, ...);
void hexdump(char *msg, void *base, size_t len);
#endif /* LWD_CLIENT_H */

81
bin/lwresd/err_pkt.c Normal file
View File

@@ -0,0 +1,81 @@
/*
* 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 INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM 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: err_pkt.c,v 1.7.4.1 2001/01/09 22:31:41 bwelling Exp $ */
#include <config.h>
#include <isc/socket.h>
#include <isc/util.h>
#include "client.h"
/*
* Generate an error packet for the client, schedule a send, and put us in
* the SEND state.
*
* The client->pkt structure will be modified to form an error return.
* The receiver needs to verify that it is in fact an error, and do the
* right thing with it. The opcode will be unchanged. The result needs
* to be set before calling this function.
*
* The only change this code makes is to set the receive buffer size to the
* size we use, set the reply bit, and recompute any security information.
*/
void
error_pkt_send(client_t *client, isc_uint32_t _result) {
isc_result_t result;
int lwres;
isc_region_t r;
lwres_buffer_t b;
clientmgr_t *cm;
cm = client->clientmgr;
REQUIRE(CLIENT_ISRUNNING(client));
/*
* Since we are only sending the packet header, we can safely toss
* the receive buffer. This means we won't need to allocate space
* for sending an error reply. This is a Good Thing.
*/
client->pkt.length = LWRES_LWPACKET_LENGTH;
client->pkt.pktflags |= LWRES_LWPACKETFLAG_RESPONSE;
client->pkt.recvlength = LWRES_RECVLENGTH;
client->pkt.authtype = 0; /* XXXMLG */
client->pkt.authlength = 0;
client->pkt.result = _result;
lwres_buffer_init(&b, client->buffer, LWRES_RECVLENGTH);
lwres = lwres_lwpacket_renderheader(&b, &client->pkt);
if (lwres != LWRES_R_SUCCESS) {
client_state_idle(client);
return;
}
r.base = client->buffer;
r.length = b.used;
client->sendbuf = client->buffer;
result = isc_socket_sendto(cm->sock, &r, cm->task, client_send, client,
&client->address, NULL);
if (result != ISC_R_SUCCESS) {
client_state_idle(client);
return;
}
CLIENT_SETSEND(client);
}

509
bin/lwresd/main.c Normal file
View File

@@ -0,0 +1,509 @@
/*
* 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 INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM 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.c,v 1.45.4.1 2001/01/09 22:31:42 bwelling Exp $ */
/*
* Main program for the Lightweight Resolver Daemon.
*
* To paraphrase the old saying about X11, "It's not a lightweight deamon
* for resolvers, it's a deamon for lightweight resolvers".
*/
#include <config.h>
#include <stdlib.h>
#include <isc/app.h>
#include <isc/mem.h>
#include <isc/string.h>
#include <isc/task.h>
#include <isc/timer.h>
#include <isc/util.h>
#include <dns/cache.h>
#include <dns/db.h>
#include <dns/dispatch.h>
#include <dns/log.h>
#include <dns/resolver.h>
#include <dns/result.h>
#include <dns/rootns.h>
#include <dns/view.h>
#include "client.h"
/*
* The goal number of clients we can handle will be NTASKS * NRECVS.
*/
#define NTASKS 20 /* tasks to create to handle lwres queries */
#define NRECVS 5 /* max clients per task */
#define NTHREADS 1 /* # threads to create in thread manager */
/*
* Array of client managers. Each of these will have a task associated
* with it.
*/
clientmgr_t *cmgr;
unsigned int ntasks; /* number of tasks actually created */
dns_view_t *view;
isc_taskmgr_t *taskmgr;
isc_socketmgr_t *sockmgr;
isc_timermgr_t *timermgr;
dns_dispatchmgr_t *dispatchmgr;
isc_sockaddrlist_t forwarders;
static isc_logmodule_t logmodules[] = {
{ "main", 0 },
{ NULL, 0 }
};
#define LWRES_LOGMODULE_MAIN (&logmodules[0])
static isc_logcategory_t logcategories[] = {
{ "network", 0 },
{ NULL, 0 }
};
#define LWRES_LOGCATEGORY_NETWORK (&logcategories[0])
static isc_result_t
create_view(isc_mem_t *mctx) {
dns_cache_t *cache;
isc_result_t result;
dns_db_t *rootdb;
unsigned int attrs;
dns_dispatch_t *disp4 = NULL;
dns_dispatch_t *disp6 = NULL;
view = NULL;
cache = NULL;
/*
* View.
*/
result = dns_view_create(mctx, dns_rdataclass_in, "_default", &view);
if (result != ISC_R_SUCCESS)
goto out;
/*
* Cache.
*/
result = dns_cache_create(mctx, taskmgr, timermgr, dns_rdataclass_in,
"rbt", 0, NULL, &cache);
if (result != ISC_R_SUCCESS)
goto out;
dns_view_setcache(view, cache);
dns_cache_detach(&cache);
/*
* Resolver.
*
* XXXMLG hardwired number of tasks.
*/
if (isc_net_probeipv4() == ISC_R_SUCCESS) {
isc_sockaddr_t any4;
isc_sockaddr_any(&any4);
attrs = DNS_DISPATCHATTR_IPV4 | DNS_DISPATCHATTR_UDP;
result = dns_dispatch_getudp(dispatchmgr, sockmgr,
taskmgr, &any4, 512, 6, 1024,
17, 19, attrs, attrs, &disp4);
if (result != ISC_R_SUCCESS)
goto out;
}
if (isc_net_probeipv6() == ISC_R_SUCCESS) {
isc_sockaddr_t any6;
isc_sockaddr_any6(&any6);
attrs = DNS_DISPATCHATTR_IPV6 | DNS_DISPATCHATTR_UDP;
result = dns_dispatch_getudp(dispatchmgr, sockmgr,
taskmgr, &any6, 512, 6, 1024,
17, 19, attrs, attrs, &disp6);
if (result != ISC_R_SUCCESS)
goto out;
}
result = dns_view_createresolver(view, taskmgr, 16, sockmgr,
timermgr, 0, dispatchmgr,
disp4, disp6);
if (disp4 != NULL)
dns_dispatch_detach(&disp4);
if (disp6 != NULL)
dns_dispatch_detach(&disp6);
if (result != ISC_R_SUCCESS)
goto out;
rootdb = NULL;
result = dns_rootns_create(mctx, dns_rdataclass_in, NULL, &rootdb);
if (result != ISC_R_SUCCESS)
goto out;
dns_view_sethints(view, rootdb);
dns_db_detach(&rootdb);
/*
* If we have forwarders, set them here.
*/
if (ISC_LIST_HEAD(forwarders) != NULL) {
isc_sockaddr_t *sa;
dns_resolver_setforwarders(view->resolver, &forwarders);
dns_resolver_setfwdpolicy(view->resolver, dns_fwdpolicy_only);
sa = ISC_LIST_HEAD(forwarders);
while (sa != NULL) {
ISC_LIST_UNLINK(forwarders, sa, link);
isc_mem_put(mctx, sa, sizeof (*sa));
sa = ISC_LIST_HEAD(forwarders);
}
}
dns_view_freeze(view);
return (ISC_R_SUCCESS);
out:
if (view != NULL)
dns_view_detach(&view);
return (result);
}
/*
* Wrappers around our memory management stuff, for the lwres functions.
*/
static void *
mem_alloc(void *arg, size_t size) {
return (isc_mem_get(arg, size));
}
static void
mem_free(void *arg, void *mem, size_t size) {
isc_mem_put(arg, mem, size);
}
static void
parse_resolv_conf(isc_mem_t *mem) {
lwres_context_t *lwctx;
lwres_conf_t *lwc;
int lwresult;
struct in_addr ina;
struct in6_addr ina6;
isc_sockaddr_t *sa;
int i;
lwctx = NULL;
lwresult = lwres_context_create(&lwctx, mem, mem_alloc, mem_free,
LWRES_CONTEXT_SERVERMODE);
if (lwresult != LWRES_R_SUCCESS)
return;
lwresult = lwres_conf_parse(lwctx, "/etc/resolv.conf");
if (lwresult != LWRES_R_SUCCESS)
goto out;
#if 1
lwres_conf_print(lwctx, stderr);
#endif
lwc = lwres_conf_get(lwctx);
INSIST(lwc != NULL);
/*
* Run through the list of nameservers, and set them to be our
* forwarders.
*/
for (i = 0 ; i < lwc->nsnext ; i++) {
switch (lwc->nameservers[i].family) {
case AF_INET:
sa = isc_mem_get(mem, sizeof *sa);
INSIST(sa != NULL);
memcpy(&ina.s_addr, lwc->nameservers[i].address, 4);
isc_sockaddr_fromin(sa, &ina, 53);
ISC_LIST_APPEND(forwarders, sa, link);
sa = NULL;
break;
case AF_INET6:
sa = isc_mem_get(mem, sizeof *sa);
INSIST(sa != NULL);
memcpy(&ina6.s6_addr, lwc->nameservers[i].address, 16);
isc_sockaddr_fromin6(sa, &ina6, 53);
ISC_LIST_APPEND(forwarders, sa, link);
sa = NULL;
break;
default:
break;
}
}
out:
lwres_conf_clear(lwctx);
lwres_context_destroy(&lwctx);
}
int
main(int argc, char **argv) {
isc_mem_t *mem;
isc_socket_t *sock;
isc_sockaddr_t localhost;
struct in_addr lh_addr;
isc_result_t result;
unsigned int i, j;
client_t *client;
isc_logdestination_t destination;
isc_log_t *lctx;
isc_logconfig_t *lcfg;
UNUSED(argc);
UNUSED(argv);
dns_result_register();
result = isc_app_start();
INSIST(result == ISC_R_SUCCESS);
mem = NULL;
result = isc_mem_create(0, 0, &mem);
INSIST(result == ISC_R_SUCCESS);
/*
* Set up logging.
*/
lctx = NULL;
result = isc_log_create(mem, &lctx, &lcfg);
INSIST(result == ISC_R_SUCCESS);
isc_log_registermodules(lctx, logmodules);
isc_log_registercategories(lctx, logcategories);
isc_log_setcontext(lctx);
dns_log_init(lctx);
dns_log_setcontext(lctx);
destination.file.stream = stderr;
destination.file.name = NULL;
destination.file.versions = ISC_LOG_ROLLNEVER;
destination.file.maximum_size = 0;
result = isc_log_createchannel(lcfg, "_default",
ISC_LOG_TOFILEDESC,
ISC_LOG_DYNAMIC,
&destination, ISC_LOG_PRINTTIME);
INSIST(result == ISC_R_SUCCESS);
result = isc_log_usechannel(lcfg, "_default", NULL, NULL);
INSIST(result == ISC_R_SUCCESS);
/*
* Set the initial debug level.
*/
isc_log_setdebuglevel(lctx, 99);
/*
* Create a task manager.
*/
taskmgr = NULL;
result = isc_taskmgr_create(mem, NTHREADS, 0, &taskmgr);
INSIST(result == ISC_R_SUCCESS);
/*
* Create a socket manager.
*/
sockmgr = NULL;
result = isc_socketmgr_create(mem, &sockmgr);
INSIST(result == ISC_R_SUCCESS);
/*
* Create a timer manager.
*/
timermgr = NULL;
result = isc_timermgr_create(mem, &timermgr);
INSIST(result == ISC_R_SUCCESS);
/*
* Create a dispatch manager.
*/
dispatchmgr = NULL;
result = dns_dispatchmgr_create(mem, NULL, &dispatchmgr);
INSIST(result == ISC_R_SUCCESS);
/*
* Read resolv.conf to get our forwarders.
*/
ISC_LIST_INIT(forwarders);
parse_resolv_conf(mem);
/*
* Initialize the DNS bits. Start by loading our built-in
* root hints.
*/
result = create_view(mem);
INSIST(result == ISC_R_SUCCESS);
/*
* We'll need a socket. It will be a UDP socket, and bound to
* 127.0.0.1 port LWRES_UDP_PORT.
*/
sock = NULL;
result = isc_socket_create(sockmgr, AF_INET, isc_sockettype_udp,
&sock);
INSIST(result == ISC_R_SUCCESS);
lh_addr.s_addr = htonl(INADDR_LOOPBACK);
isc_sockaddr_fromin(&localhost, &lh_addr, LWRES_UDP_PORT);
result = isc_socket_bind(sock, &localhost);
if (result != ISC_R_SUCCESS) {
isc_log_write(lctx, LWRES_LOGCATEGORY_NETWORK,
LWRES_LOGMODULE_MAIN, ISC_LOG_ERROR,
"binding lwres protocol socket to port %d: %s",
LWRES_UDP_PORT,
isc_result_totext(result));
exit(1);
}
INSIST(result == ISC_R_SUCCESS);
cmgr = isc_mem_get(mem, sizeof(clientmgr_t) * NTASKS);
INSIST(cmgr != NULL);
/*
* Create one task for each client manager.
*/
for (i = 0 ; i < NTASKS ; i++) {
cmgr[i].task = NULL;
cmgr[i].sock = sock;
cmgr[i].view = NULL;
cmgr[i].flags = 0;
result = isc_task_create(taskmgr, 0, &cmgr[i].task);
if (result != ISC_R_SUCCESS)
break;
ISC_EVENT_INIT(&cmgr[i].sdev, sizeof(isc_event_t),
ISC_EVENTATTR_NOPURGE,
0, LWRD_SHUTDOWN,
client_shutdown, &cmgr[i], cmgr[i].task,
NULL, NULL);
ISC_LIST_INIT(cmgr[i].idle);
ISC_LIST_INIT(cmgr[i].running);
isc_task_setname(cmgr[i].task, "lwresd client", &cmgr[i]);
cmgr[i].mctx = mem;
cmgr[i].lwctx = NULL;
result = lwres_context_create(&cmgr[i].lwctx, mem,
mem_alloc, mem_free,
LWRES_CONTEXT_SERVERMODE);
if (result != ISC_R_SUCCESS) {
isc_task_detach(&cmgr[i].task);
break;
}
dns_view_attach(view, &cmgr[i].view);
}
INSIST(i > 0);
ntasks = i; /* remember how many we managed to create */
/*
* Now, run through each client manager and populate it with
* client structures. Do this by creating one receive for each
* task, in a loop, so each task has a chance of getting at least
* one client structure.
*/
for (i = 0 ; i < NRECVS ; i++) {
client = isc_mem_get(mem, sizeof(client_t) * ntasks);
if (client == NULL)
break;
for (j = 0 ; j < ntasks ; j++)
client_initialize(&client[j], &cmgr[j]);
}
INSIST(i > 0);
/*
* Issue one read request for each task we have.
*/
for (j = 0 ; j < ntasks ; j++) {
result = client_start_recv(&cmgr[j]);
INSIST(result == ISC_R_SUCCESS);
}
/*
* Wait for ^c or kill.
*/
isc_app_run();
/*
* Send a shutdown event to every task.
*/
for (j = 0 ; j < ntasks ; j++) {
isc_event_t *ev;
ev = &cmgr[j].sdev;
isc_task_send(cmgr[j].task, &ev);
}
/*
* Kill off the view.
*/
dns_view_detach(&view);
/*
* Wait for the tasks to all die.
*/
isc_taskmgr_destroy(&taskmgr);
/*
* Wait for everything to die off by waiting for the sockets
* to be detached.
*/
isc_socket_detach(&sock);
isc_socketmgr_destroy(&sockmgr);
isc_timermgr_destroy(&timermgr);
/*
* Free up memory allocated. This is somewhat magical. We allocated
* the client_t's in blocks, but the first task always has the
* first pointer. Just loop here, freeing them.
*/
client = ISC_LIST_HEAD(cmgr[0].idle);
while (client != NULL) {
ISC_LIST_UNLINK(cmgr[0].idle, client, link);
isc_mem_put(mem, client, sizeof(client_t) * ntasks);
client = ISC_LIST_HEAD(cmgr[0].idle);
}
INSIST(ISC_LIST_EMPTY(cmgr[0].running));
/*
* Now, kill off the client manager structures.
*/
isc_mem_put(mem, cmgr, sizeof(clientmgr_t) * NTASKS);
cmgr = NULL;
dns_dispatchmgr_destroy(&dispatchmgr);
isc_log_destroy(&lctx);
/*
* Kill the memory system.
*/
isc_mem_destroy(&mem);
isc_app_finish();
return (0);
}

526
bin/lwresd/process_gabn.c Normal file
View File

@@ -0,0 +1,526 @@
/*
* 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 INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM 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: process_gabn.c,v 1.31.4.1 2001/01/09 22:31:44 bwelling Exp $ */
#include <config.h>
#include <isc/socket.h>
#include <isc/string.h> /* Required for HP/UX (and others?) */
#include <isc/util.h>
#include <dns/adb.h>
#include <dns/events.h>
#include <dns/result.h>
#include "client.h"
#define NEED_V4(c) ((((c)->find_wanted & LWRES_ADDRTYPE_V4) != 0) \
&& ((c)->v4find == NULL))
#define NEED_V6(c) ((((c)->find_wanted & LWRES_ADDRTYPE_V6) != 0) \
&& ((c)->v6find == NULL))
static void start_find(client_t *);
/*
* Destroy any finds. This can be used to "start over from scratch" and
* should only be called when events are _not_ being generated by the finds.
*/
static void
cleanup_gabn(client_t *client) {
dns_adbfind_t *v4;
DP(50, "cleaning up client %p", client);
v4 = client->v4find;
if (client->v4find != NULL)
dns_adb_destroyfind(&client->v4find);
if (client->v6find != NULL) {
if (client->v6find == v4)
client->v6find = NULL;
else
dns_adb_destroyfind(&client->v6find);
}
}
static void
setup_addresses(client_t *client, dns_adbfind_t *find, unsigned int at) {
dns_adbaddrinfo_t *ai;
lwres_addr_t *addr;
int af;
const struct sockaddr *sa;
const struct sockaddr_in *sin;
const struct sockaddr_in6 *sin6;
if (at == DNS_ADBFIND_INET)
af = AF_INET;
else
af = AF_INET6;
ai = ISC_LIST_HEAD(find->list);
while (ai != NULL && client->gabn.naddrs < LWRES_MAX_ADDRS) {
sa = &ai->sockaddr.type.sa;
if (sa->sa_family != af)
goto next;
addr = &client->addrs[client->gabn.naddrs];
switch (sa->sa_family) {
case AF_INET:
sin = &ai->sockaddr.type.sin;
addr->family = LWRES_ADDRTYPE_V4;
memcpy(addr->address, &sin->sin_addr, 4);
addr->length = 4;
break;
case AF_INET6:
sin6 = &ai->sockaddr.type.sin6;
addr->family = LWRES_ADDRTYPE_V6;
memcpy(addr->address, &sin6->sin6_addr, 16);
addr->length = 16;
break;
default:
goto next;
}
DP(50, "adding address %p, family %d, length %d",
addr->address, addr->family, addr->length);
client->gabn.naddrs++;
REQUIRE(!LWRES_LINK_LINKED(addr, link));
LWRES_LIST_APPEND(client->gabn.addrs, addr, link);
next:
ai = ISC_LIST_NEXT(ai, publink);
}
}
static void
generate_reply(client_t *client) {
isc_result_t result;
int lwres;
isc_region_t r;
lwres_buffer_t lwb;
clientmgr_t *cm;
cm = client->clientmgr;
lwb.base = NULL;
DP(50, "generating gabn reply for client %p", client);
/*
* We must make certain the client->find is not still active.
* If it is either the v4 or v6 answer, just set it to NULL and
* let the cleanup code destroy it. Otherwise, destroy it now.
*/
if (client->find == client->v4find || client->find == client->v6find)
client->find = NULL;
else
if (client->find != NULL)
dns_adb_destroyfind(&client->find);
/*
* perhaps there are some here?
*/
if (NEED_V6(client) && client->v4find != NULL)
client->v6find = client->v4find;
/*
* Run through the finds we have and wire them up to the gabn
* structure.
*/
LWRES_LIST_INIT(client->gabn.addrs);
if (client->v4find != NULL)
setup_addresses(client, client->v4find, DNS_ADBFIND_INET);
if (client->v6find != NULL)
setup_addresses(client, client->v6find, DNS_ADBFIND_INET6);
/*
* Render the packet.
*/
client->pkt.recvlength = LWRES_RECVLENGTH;
client->pkt.authtype = 0; /* XXXMLG */
client->pkt.authlength = 0;
/*
* If there are no addresses and no aliases, return failure.
*/
if (client->gabn.naddrs == 0 && client->gabn.naliases == 0)
client->pkt.result = LWRES_R_NOTFOUND;
else
client->pkt.result = LWRES_R_SUCCESS;
lwres = lwres_gabnresponse_render(cm->lwctx, &client->gabn,
&client->pkt, &lwb);
if (lwres != LWRES_R_SUCCESS)
goto out;
r.base = lwb.base;
r.length = lwb.used;
client->sendbuf = r.base;
client->sendlength = r.length;
result = isc_socket_sendto(cm->sock, &r, cm->task, client_send, client,
&client->address, NULL);
if (result != ISC_R_SUCCESS)
goto out;
CLIENT_SETSEND(client);
/*
* All done!
*/
cleanup_gabn(client);
return;
out:
cleanup_gabn(client);
if (lwb.base != NULL)
lwres_context_freemem(client->clientmgr->lwctx,
lwb.base, lwb.length);
error_pkt_send(client, LWRES_R_FAILURE);
}
/*
* Take the current real name, move it to an alias slot (if any are
* open) then put this new name in as the real name for the target.
*
* Return success if it can be rendered, otherwise failure. Note that
* not having enough alias slots open is NOT a failure.
*/
static isc_result_t
add_alias(client_t *client) {
isc_buffer_t b;
isc_result_t result;
isc_uint16_t naliases;
b = client->recv_buffer;
/*
* Render the new name to the buffer.
*/
result = dns_name_totext(dns_fixedname_name(&client->target_name),
ISC_TRUE, &client->recv_buffer);
if (result != ISC_R_SUCCESS)
return (result);
/*
* Are there any open slots?
*/
naliases = client->gabn.naliases;
if (naliases < LWRES_MAX_ALIASES) {
client->gabn.aliases[naliases] = client->gabn.realname;
client->gabn.aliaslen[naliases] = client->gabn.realnamelen;
client->gabn.naliases++;
}
/*
* Save this name away as the current real name.
*/
client->gabn.realname = (char *)(b.base) + b.used;
client->gabn.realnamelen = client->recv_buffer.used - b.used;
return (ISC_R_SUCCESS);
}
static isc_result_t
store_realname(client_t *client) {
isc_buffer_t b;
isc_result_t result;
b = client->recv_buffer;
/*
* Render the new name to the buffer.
*/
result = dns_name_totext(dns_fixedname_name(&client->target_name),
ISC_TRUE, &client->recv_buffer);
if (result != ISC_R_SUCCESS)
return (result);
/*
* Save this name away as the current real name.
*/
client->gabn.realname = (char *) b.base + b.used;
client->gabn.realnamelen = client->recv_buffer.used - b.used;
return (ISC_R_SUCCESS);
}
static void
process_gabn_finddone(isc_task_t *task, isc_event_t *ev) {
client_t *client = ev->ev_arg;
isc_eventtype_t evtype;
isc_boolean_t claimed;
DP(50, "find done for task %p, client %p", task, client);
evtype = ev->ev_type;
isc_event_free(&ev);
/*
* No more info to be had? If so, we have all the good stuff
* right now, so we can render things.
*/
claimed = ISC_FALSE;
if (evtype == DNS_EVENT_ADBNOMOREADDRESSES) {
if (NEED_V4(client)) {
client->v4find = client->find;
claimed = ISC_TRUE;
}
if (NEED_V6(client)) {
client->v6find = client->find;
claimed = ISC_TRUE;
}
if (client->find != NULL) {
if (claimed)
client->find = NULL;
else
dns_adb_destroyfind(&client->find);
}
generate_reply(client);
return;
}
/*
* We probably don't need this find anymore. We're either going to
* reissue it, or an error occurred. Either way, we're done with
* it.
*/
if ((client->find != client->v4find)
&& (client->find != client->v6find)) {
dns_adb_destroyfind(&client->find);
} else {
client->find = NULL;
}
/*
* We have some new information we can gather. Run off and fetch
* it.
*/
if (evtype == DNS_EVENT_ADBMOREADDRESSES) {
start_find(client);
return;
}
/*
* An error or other strangeness happened. Drop this query.
*/
cleanup_gabn(client);
error_pkt_send(client, LWRES_R_FAILURE);
}
static void
start_find(client_t *client) {
unsigned int options;
isc_result_t result;
isc_boolean_t claimed;
DP(50, "starting find for client %p", client);
/*
* Issue a find for the name contained in the request. We won't
* set the bit that says "anything is good enough" -- we want it
* all.
*/
options = 0;
options |= DNS_ADBFIND_WANTEVENT;
options |= DNS_ADBFIND_RETURNLAME;
/*
* Set the bits up here to mark that we want this address family
* and that we do not currently have a find pending. We will
* set that bit again below if it turns out we will get an event.
*/
if (NEED_V4(client))
options |= DNS_ADBFIND_INET;
if (NEED_V6(client))
options |= DNS_ADBFIND_INET6;
find_again:
INSIST(client->find == NULL);
result = dns_adb_createfind(client->clientmgr->view->adb,
client->clientmgr->task,
process_gabn_finddone, client,
dns_fixedname_name(&client->target_name),
dns_rootname, options, 0,
dns_fixedname_name(&client->target_name),
client->clientmgr->view->dstport,
&client->find);
/*
* Did we get an alias? If so, save it and re-issue the query.
*/
if (result == DNS_R_ALIAS) {
DP(50, "found alias, restarting query");
dns_adb_destroyfind(&client->find);
cleanup_gabn(client);
result = add_alias(client);
if (result != ISC_R_SUCCESS) {
DP(50, "out of buffer space adding alias");
error_pkt_send(client, LWRES_R_FAILURE);
return;
}
goto find_again;
}
DP(50, "find returned %d (%s)", result, isc_result_totext(result));
/*
* Did we get an error?
*/
if (result != ISC_R_SUCCESS) {
if (client->find != NULL)
dns_adb_destroyfind(&client->find);
cleanup_gabn(client);
error_pkt_send(client, LWRES_R_FAILURE);
return;
}
claimed = ISC_FALSE;
/*
* Did we get our answer to V4 addresses?
*/
if (NEED_V4(client)
&& ((client->find->query_pending & DNS_ADBFIND_INET) == 0)) {
DP(50, "client %p ipv4 satisfied by find %p", client,
client->find);
claimed = ISC_TRUE;
client->v4find = client->find;
}
/*
* Did we get our answer to V6 addresses?
*/
if (NEED_V6(client)
&& ((client->find->query_pending & DNS_ADBFIND_INET6) == 0)) {
DP(50, "client %p ipv6 satisfied by find %p", client,
client->find);
claimed = ISC_TRUE;
client->v6find = client->find;
}
/*
* If we're going to get an event, set our internal pending flag
* and return. When we get an event back we'll do the right
* thing, basically by calling this function again, perhaps with a
* new target name.
*
* If we have both v4 and v6, and we are still getting an event,
* we have a programming error, so die hard.
*/
if ((client->find->options & DNS_ADBFIND_WANTEVENT) != 0) {
DP(50, "event will be sent");
INSIST(client->v4find == NULL || client->v6find == NULL);
return;
}
DP(50, "no event will be sent");
if (claimed)
client->find = NULL;
else
dns_adb_destroyfind(&client->find);
/*
* We seem to have everything we asked for, or at least we are
* able to respond with things we've learned.
*/
generate_reply(client);
}
/*
* When we are called, we can be assured that:
*
* client->sockaddr contains the address we need to reply to,
*
* client->pkt contains the packet header data,
*
* the packet "checks out" overall -- any MD5 hashes or crypto
* bits have been verified,
*
* "b" points to the remaining data after the packet header
* was parsed off.
*
* We are in a the RECVDONE state.
*
* From this state we will enter the SEND state if we happen to have
* everything we need or we need to return an error packet, or to the
* FINDWAIT state if we need to look things up.
*/
void
process_gabn(client_t *client, lwres_buffer_t *b) {
isc_result_t result;
lwres_gabnrequest_t *req;
isc_buffer_t namebuf;
REQUIRE(CLIENT_ISRECVDONE(client));
req = NULL;
result = lwres_gabnrequest_parse(client->clientmgr->lwctx,
b, &client->pkt, &req);
if (result != LWRES_R_SUCCESS)
goto out;
isc_buffer_init(&namebuf, req->name, req->namelen);
isc_buffer_add(&namebuf, req->namelen);
dns_fixedname_init(&client->target_name);
result = dns_name_fromtext(dns_fixedname_name(&client->target_name),
&namebuf, dns_rootname, ISC_FALSE, NULL);
if (result != ISC_R_SUCCESS)
goto out;
client->find_wanted = req->addrtypes;
DP(50, "client %p looking for addrtypes %08x",
client, client->find_wanted);
/*
* We no longer need to keep this around.
*/
lwres_gabnrequest_free(client->clientmgr->lwctx, &req);
/*
* Initialize the real name and alias arrays in the reply we're
* going to build up.
*/
client_init_gabn(client);
result = store_realname(client);
if (result != ISC_R_SUCCESS)
goto out;
/*
* Start the find.
*/
start_find(client);
return;
/*
* We're screwed. Return an error packet to our caller.
*/
out:
if (req != NULL)
lwres_gabnrequest_free(client->clientmgr->lwctx, &req);
error_pkt_send(client, LWRES_R_FAILURE);
}

264
bin/lwresd/process_gnba.c Normal file
View File

@@ -0,0 +1,264 @@
/*
* 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 INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM 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: process_gnba.c,v 1.26.4.1 2001/01/09 22:31:46 bwelling Exp $ */
#include <config.h>
#include <isc/socket.h>
#include <isc/string.h> /* Required for HP/UX (and others?) */
#include <isc/util.h>
#include <dns/adb.h>
#include <dns/byaddr.h>
#include <dns/result.h>
#include "client.h"
static void start_byaddr(client_t *);
static void
byaddr_done(isc_task_t *task, isc_event_t *event) {
client_t *client;
clientmgr_t *cm;
dns_byaddrevent_t *bevent;
int lwres;
lwres_buffer_t lwb;
dns_name_t *name;
isc_result_t result;
isc_region_t r;
isc_buffer_t b;
lwres_gnbaresponse_t *gnba;
isc_uint16_t naliases;
isc_stdtime_t now;
UNUSED(task);
lwb.base = NULL;
client = event->ev_arg;
cm = client->clientmgr;
INSIST(client->byaddr == (dns_byaddr_t *)event->ev_sender);
bevent = (dns_byaddrevent_t *)event;
gnba = &client->gnba;
DP(50, "byaddr event result = %s",
isc_result_totext(bevent->result));
result = bevent->result;
if (result != ISC_R_SUCCESS) {
dns_byaddr_destroy(&client->byaddr);
isc_event_free(&event);
bevent = NULL;
/*
* Were we trying bitstring or nibble mode? If bitstring,
* and we got FORMERROR or SERVFAIL, set the flag to
* avoid bitstring lables for 10 minutes. If we got any
* other error (NXDOMAIN, etc) just try again without
* bitstrings, and let our cache handle the negative answer
* for bitstrings.
*/
if ((client->options & DNS_BYADDROPT_IPV6NIBBLE) != 0) {
dns_adb_freeaddrinfo(cm->view->adb, &client->addrinfo);
error_pkt_send(client, LWRES_R_FAILURE);
return;
}
isc_stdtime_get(&now);
if (result == DNS_R_FORMERR ||
result == DNS_R_SERVFAIL ||
result == ISC_R_FAILURE)
dns_adb_setavoidbitstring(cm->view->adb,
client->addrinfo, now + 600);
/*
* Fall back to nibble reverse if the default of bitstrings
* fails.
*/
client->options |= DNS_BYADDROPT_IPV6NIBBLE;
start_byaddr(client);
return;
}
name = ISC_LIST_HEAD(bevent->names);
while (name != NULL) {
b = client->recv_buffer;
result = dns_name_totext(name, ISC_TRUE, &client->recv_buffer);
if (result != ISC_R_SUCCESS)
goto out;
DP(50, "found name '%.*s'",
client->recv_buffer.used - b.used,
(char *)(b.base) + b.used);
if (gnba->realname == NULL) {
gnba->realname = (char *)(b.base) + b.used;
gnba->realnamelen = client->recv_buffer.used - b.used;
} else {
naliases = gnba->naliases;
if (naliases >= LWRES_MAX_ALIASES)
break;
gnba->aliases[naliases] = (char *)(b.base) + b.used;
gnba->aliaslen[naliases] =
client->recv_buffer.used - b.used;
gnba->naliases++;
}
name = ISC_LIST_NEXT(name, link);
}
dns_byaddr_destroy(&client->byaddr);
dns_adb_freeaddrinfo(cm->view->adb, &client->addrinfo);
isc_event_free(&event);
/*
* Render the packet.
*/
client->pkt.recvlength = LWRES_RECVLENGTH;
client->pkt.authtype = 0; /* XXXMLG */
client->pkt.authlength = 0;
client->pkt.result = LWRES_R_SUCCESS;
lwres = lwres_gnbaresponse_render(cm->lwctx,
gnba, &client->pkt, &lwb);
if (lwres != LWRES_R_SUCCESS)
goto out;
r.base = lwb.base;
r.length = lwb.used;
client->sendbuf = r.base;
client->sendlength = r.length;
result = isc_socket_sendto(cm->sock, &r,
cm->task, client_send,
client, &client->address, NULL);
if (result != ISC_R_SUCCESS)
goto out;
CLIENT_SETSEND(client);
return;
out:
if (client->byaddr != NULL)
dns_byaddr_destroy(&client->byaddr);
if (client->addrinfo != NULL)
dns_adb_freeaddrinfo(cm->view->adb, &client->addrinfo);
if (lwb.base != NULL)
lwres_context_freemem(cm->lwctx,
lwb.base, lwb.length);
isc_event_free(&event);
}
static void
start_byaddr(client_t *client) {
isc_result_t result;
clientmgr_t *cm;
cm = client->clientmgr;
INSIST(client->byaddr == NULL);
result = dns_byaddr_create(cm->mctx, &client->na, cm->view,
client->options, cm->task, byaddr_done,
client, &client->byaddr);
if (result != ISC_R_SUCCESS) {
dns_adb_freeaddrinfo(cm->view->adb, &client->addrinfo);
error_pkt_send(client, LWRES_R_FAILURE);
return;
}
}
void
process_gnba(client_t *client, lwres_buffer_t *b) {
lwres_gnbarequest_t *req;
isc_result_t result;
isc_sockaddr_t sa;
clientmgr_t *cm;
REQUIRE(CLIENT_ISRECVDONE(client));
INSIST(client->byaddr == NULL);
cm = client->clientmgr;
req = NULL;
result = lwres_gnbarequest_parse(cm->lwctx,
b, &client->pkt, &req);
if (result != LWRES_R_SUCCESS)
goto out;
if (req->addr.address == NULL)
goto out;
client->options = 0;
if (req->addr.family == LWRES_ADDRTYPE_V4) {
client->na.family = AF_INET;
if (req->addr.length != 4)
goto out;
memcpy(&client->na.type.in, req->addr.address, 4);
} else if (req->addr.family == LWRES_ADDRTYPE_V6) {
client->na.family = AF_INET6;
if (req->addr.length != 16)
goto out;
memcpy(&client->na.type.in6, req->addr.address, 16);
} else {
goto out;
}
isc_sockaddr_fromnetaddr(&sa, &client->na, 53);
DP(50, "client %p looking for addrtype %08x",
client, req->addr.family);
/*
* We no longer need to keep this around.
*/
lwres_gnbarequest_free(cm->lwctx, &req);
/*
* Initialize the real name and alias arrays in the reply we're
* going to build up.
*/
client_init_gnba(client);
client->options = 0;
/*
* See if we should skip the byaddr bit.
*/
INSIST(client->addrinfo == NULL);
result = dns_adb_findaddrinfo(cm->view->adb, &sa,
&client->addrinfo, 0);
if (result != ISC_R_SUCCESS)
goto out;
if (client->addrinfo->avoid_bitstring > 0)
client->options |= DNS_BYADDROPT_IPV6NIBBLE;
/*
* Start the find.
*/
start_byaddr(client);
return;
/*
* We're screwed. Return an error packet to our caller.
*/
out:
if (req != NULL)
lwres_gnbarequest_free(cm->lwctx, &req);
error_pkt_send(client, LWRES_R_FAILURE);
}

87
bin/lwresd/process_noop.c Normal file
View File

@@ -0,0 +1,87 @@
/*
* 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 INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM 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: process_noop.c,v 1.9.4.1 2001/01/09 22:31:47 bwelling Exp $ */
#include <config.h>
#include <isc/socket.h>
#include <isc/util.h>
#include "client.h"
void
process_noop(client_t *client, lwres_buffer_t *b) {
lwres_nooprequest_t *req;
lwres_noopresponse_t resp;
isc_result_t result;
lwres_result_t lwres;
isc_region_t r;
lwres_buffer_t lwb;
REQUIRE(CLIENT_ISRECVDONE(client));
INSIST(client->byaddr == NULL);
req = NULL;
result = lwres_nooprequest_parse(client->clientmgr->lwctx,
b, &client->pkt, &req);
if (result != LWRES_R_SUCCESS)
goto out;
client->pkt.recvlength = LWRES_RECVLENGTH;
client->pkt.authtype = 0; /* XXXMLG */
client->pkt.authlength = 0;
client->pkt.result = LWRES_R_SUCCESS;
resp.datalength = req->datalength;
resp.data = req->data;
lwres = lwres_noopresponse_render(client->clientmgr->lwctx, &resp,
&client->pkt, &lwb);
if (lwres != LWRES_R_SUCCESS)
goto out;
r.base = lwb.base;
r.length = lwb.used;
client->sendbuf = r.base;
client->sendlength = r.length;
result = isc_socket_sendto(client->clientmgr->sock, &r,
client->clientmgr->task, client_send,
client, &client->address, NULL);
if (result != ISC_R_SUCCESS)
goto out;
/*
* We can now destroy request.
*/
lwres_nooprequest_free(client->clientmgr->lwctx, &req);
CLIENT_SETSEND(client);
return;
out:
if (req != NULL)
lwres_nooprequest_free(client->clientmgr->lwctx, &req);
if (lwb.base != NULL)
lwres_context_freemem(client->clientmgr->lwctx,
lwb.base, lwb.length);
error_pkt_send(client, LWRES_R_FAILURE);
}

View File

@@ -13,7 +13,7 @@
# 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 2001/06/01 00:45:00 bwelling Exp $
# $Id: Makefile.in,v 1.63.4.1 2001/01/09 22:31:48 bwelling Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -32,38 +32,34 @@ DBDRIVER_INCLUDES =
DBDRIVER_LIBS =
CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include \
${LWRES_INCLUDES} ${DNS_INCLUDES} \
${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} ${ISC_INCLUDES} \
${DBDRIVER_INCLUDES}
${LWRES_INCLUDES} ${DNS_INCLUDES} ${ISC_INCLUDES} \
${OMAPI_INCLUDES} ${DBDRIVER_INCLUDES}
CDEFINES =
CWARNINGS =
OMAPILIBS = ../../lib/omapi/libomapi.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_OPENSSL_LIBS@ @DNS_GSSAPI_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
ISCLIBS = ../../lib/isc/libisc.@A@
LWRESLIBS = ../../lib/lwres/liblwres.@A@
OMAPIDEPLIBS = ../../lib/omapi/libomapi.@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@
DEPLIBS = ${LWRESDEPLIBS} ${DNSDEPLIBS} \
${ISCCFGDEPLIBS} ${ISCCCDEPLIBS} ${ISCDEPLIBS}
DEPLIBS = ${LWRESDEPLIBS} ${OMAPIDEPLIBS} ${DNSDEPLIBS} ${ISCDEPLIBS}
LIBS = ${LWRESLIBS} ${DNSLIBS} \
${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} ${DBDRIVER_LIBS} @LIBS@
LIBS = ${LWRESLIBS} ${OMAPILIBS} ${DNSLIBS} ${ISCLIBS} \
${DBDRIVER_LIBS} @LIBS@
SUBDIRS = unix
TARGETS = named lwresd
OBJS = aclconf.@O@ client.@O@ config.@O@ control.@O@ controlconf.@O@ interfacemgr.@O@ \
listenlist.@O@ log.@O@ logconf.@O@ main.@O@ notify.@O@ \
query.@O@ server.@O@ sortlist.@O@ \
OBJS = aclconf.@O@ client.@O@ interfacemgr.@O@ listenlist.@O@ \
log.@O@ logconf.@O@ main.@O@ notify.@O@ omapi.@O@ \
omapiconf.@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@ \
@@ -72,21 +68,15 @@ OBJS = aclconf.@O@ client.@O@ config.@O@ control.@O@ controlconf.@O@ interfacem
UOBJS = unix/os.@O@
SRCS = aclconf.c client.c config.c control.c controlconf.c interfacemgr.c \
listenlist.c log.c logconf.c main.c notify.c \
query.c server.c sortlist.c \
SRCS = aclconf.c client.c interfacemgr.c listenlist.c \
log.c logconf.c main.c notify.c omapi.c \
omapiconf.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
@@ -94,31 +84,19 @@ main.@O@: main.c
-DNS_LOCALSTATEDIR=\"${localstatedir}\" \
-DNS_SYSCONFDIR=\"${sysconfdir}\" -c ${srcdir}/main.c
config.@O@: config.c
${LIBTOOL} ${CC} ${ALL_CFLAGS} -DVERSION=\"${VERSION}\" \
-DNS_LOCALSTATEDIR=\"${localstatedir}\" \
-c ${srcdir}/config.c
named: ${OBJS} ${UOBJS} ${DEPLIBS}
${LIBTOOL} ${PURIFY} ${CC} ${CFLAGS} -o $@ ${OBJS} ${UOBJS} ${LIBS}
${LIBTOOL} ${CC} ${CFLAGS} -o $@ ${OBJS} ${UOBJS} ${LIBS}
lwresd: named
rm -f lwresd
@LN@ named lwresd
doc man:: ${MANOBJS}
docclean manclean maintainer-clean::
rm -f ${MANOBJS}
clean distclean maintainer-clean::
clean distclean::
rm -f ${TARGETS}
installdirs:
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
install:: named lwresd installdirs
${LIBTOOL} ${INSTALL_PROGRAM} named ${DESTDIR}${sbindir}
(cd ${DESTDIR}${sbindir}; rm -f lwresd; @LN@ named lwresd)
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8; done

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: aclconf.c,v 1.27 2001/04/12 21:02:46 tale Exp $ */
/* $Id: aclconf.c,v 1.24.4.1 2001/01/09 22:31:49 bwelling Exp $ */
#include <config.h>
@@ -46,59 +46,34 @@ ns_aclconfctx_destroy(ns_aclconfctx_t *ctx) {
}
}
/*
* 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,
convert_named_acl(char *aclname, dns_c_ctx_t *cctx,
ns_aclconfctx_t *ctx, isc_mem_t *mctx,
dns_acl_t **target)
{
isc_result_t result;
cfg_obj_t *cacl = NULL;
dns_c_acl_t *cacl;
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) {
if (strcmp(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);
result = dns_c_acltable_getacl(cctx->acls, aclname, &cacl);
if (result != ISC_R_SUCCESS) {
cfg_obj_log(nameobj, dns_lctx, ISC_LOG_WARNING,
"undefined ACL '%s'", aclname);
isc_log_write(dns_lctx, DNS_LOGCATEGORY_SECURITY,
DNS_LOGMODULE_ACL, ISC_LOG_WARNING,
"undefined ACL '%s'", aclname);
return (result);
}
result = ns_acl_fromconfig(cacl, cctx, ctx, mctx, &dacl);
result = ns_acl_fromconfig(cacl->ipml, cctx, ctx, mctx, &dacl);
if (result != ISC_R_SUCCESS)
return (result);
dacl->name = isc_mem_strdup(dacl->mctx, aclname);
@@ -110,12 +85,11 @@ convert_named_acl(cfg_obj_t *nameobj, cfg_obj_t *cctx,
}
static isc_result_t
convert_keyname(cfg_obj_t *keyobj, isc_mem_t *mctx, dns_name_t *dnsname) {
convert_keyname(char *txtname, 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);
@@ -124,33 +98,34 @@ convert_keyname(cfg_obj_t *keyobj, isc_mem_t *mctx, dns_name_t *dnsname) {
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);
isc_log_write(dns_lctx, DNS_LOGCATEGORY_SECURITY,
DNS_LOGMODULE_ACL, 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)
ns_acl_fromconfig(dns_c_ipmatchlist_t *caml,
dns_c_ctx_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;
dns_c_ipmatchelement_t *ce;
REQUIRE(target != NULL && *target == NULL);
count = 0;
for (elt = cfg_list_first(caml);
elt != NULL;
elt = cfg_list_next(elt))
for (ce = ISC_LIST_HEAD(caml->elements);
ce != NULL;
ce = ISC_LIST_NEXT(ce, next))
count++;
result = dns_acl_create(mctx, count, &dacl);
@@ -158,63 +133,59 @@ ns_acl_fromconfig(cfg_obj_t *caml,
return (result);
de = dacl->elements;
for (elt = cfg_list_first(caml);
elt != NULL;
elt = cfg_list_next(elt))
for (ce = ISC_LIST_HEAD(caml->elements);
ce != NULL;
ce = ISC_LIST_NEXT(ce, next))
{
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->negative = dns_c_ipmatchelement_isneg(ce);
switch (ce->type) {
case dns_c_ipmatch_pattern:
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 */
isc_netaddr_fromsockaddr(&de->u.ip_prefix.address,
&ce->u.direct.address);
/* XXX "mask" is a misnomer */
de->u.ip_prefix.prefixlen = ce->u.direct.mask;
break;
case dns_c_ipmatch_key:
de->type = dns_aclelementtype_keyname;
dns_name_init(&de->u.keyname, NULL);
result = convert_keyname(ce, mctx, &de->u.keyname);
result = convert_keyname(ce->u.key, mctx,
&de->u.keyname);
if (result != ISC_R_SUCCESS)
goto cleanup;
} else if (cfg_obj_islist(ce)) {
/* Nested ACL */
break;
case dns_c_ipmatch_indirect:
de->type = dns_aclelementtype_nestedacl;
result = ns_acl_fromconfig(ce, cctx, ctx, mctx,
result = ns_acl_fromconfig(ce->u.indirect.list,
cctx, ctx, mctx,
&de->u.nestedacl);
if (result != ISC_R_SUCCESS)
goto cleanup;
break;
case dns_c_ipmatch_localhost:
de->type = dns_aclelementtype_localhost;
break;
case dns_c_ipmatch_any:
de->type = dns_aclelementtype_any;
break;
case dns_c_ipmatch_localnets:
de->type = dns_aclelementtype_localnets;
break;
case dns_c_ipmatch_acl:
de->type = dns_aclelementtype_nestedacl;
result = convert_named_acl(ce->u.aclname,
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");
break;
default:
isc_log_write(dns_lctx, DNS_LOGCATEGORY_SECURITY,
DNS_LOGMODULE_ACL, ISC_LOG_WARNING,
"address match list contains "
"unsupported element type");
result = ISC_R_FAILURE;
goto cleanup;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,458 +0,0 @@
/*
* 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 INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM 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.1 2001/09/21 20:30:32 gson 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/cfg.h>
#include <dns/fixedname.h>
#include <dns/name.h>
#include <dns/rdataclass.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\
coresize default;\n\
datasize default;\n\
deallocate-on-exit true;\n\
# directory <none>\n\
dump-file \"named_dump.db\";\n\
fake-iquery no;\n\
files default;\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\
"
#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\
stacksize default;\n\
statistics-file \"named.stats\";\n\
statistics-interval 60;\n\
tcp-clients 100;\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\
version \""VERSION"\";\n\
\n\
/* view */\n\
allow-notify {none;};\n\
allow-update-forwarding {none;};\n\
allow-recursion {any;};\n\
allow-v6-synthesis {none;};\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 ignore;\n\
check-names slave ignore;\n\
check-names response ignore;\n\
\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\
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\
sig-validity-interval 30; /* days */\n\
zone-statistics false;\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);
}
}
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);
}
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 (strcmp(str, "master") == 0)
ztype = dns_zone_master;
else if (strcmp(str, "slave") == 0)
ztype = dns_zone_slave;
else if (strcmp(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);
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;
}
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 count, i = 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;
INSIST(addrsp != NULL && *addrsp == 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 {
result = ns_config_getport(config, &port);
if (result != ISC_R_SUCCESS)
return (result);
}
result = ISC_R_NOMEMORY;
addrs = isc_mem_get(mctx, count * sizeof(isc_sockaddr_t));
if (addrs == NULL)
goto cleanup;
keys = isc_mem_get(mctx, count * sizeof(dns_name_t *));
if (keys == NULL)
goto cleanup;
for (element = cfg_list_first(addrlist);
element != NULL;
element = cfg_list_next(element), i++)
{
cfg_obj_t *addr;
cfg_obj_t *key;
char *keystr;
isc_buffer_t b;
INSIST(i < count);
addr = cfg_tuple_get(cfg_listelt_value(element), "sockaddr");
key = cfg_tuple_get(cfg_listelt_value(element), "key");
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))
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;
}
INSIST(i == count);
*addrsp = addrs;
*keysp = keys;
*countp = count;
return (ISC_R_SUCCESS);
cleanup:
if (addrs != NULL)
isc_mem_put(mctx, addrs, count * sizeof(isc_sockaddr_t));
if (keys != NULL) {
unsigned int j;
for (j = 0 ; j <= i; j++) {
if (keys[j] == NULL)
continue;
if (dns_name_dynamic(keys[j]))
dns_name_free(keys[j], mctx);
isc_mem_put(mctx, keys[j], sizeof(dns_name_t));
}
isc_mem_put(mctx, keys, count * sizeof(dns_name_t *));
}
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;
if (ns_g_port != 0) {
*portp = ns_g_port;
return (ISC_R_SUCCESS);
}
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);
}

View File

@@ -1,122 +0,0 @@
/*
* 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 INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM 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 2001/05/31 01:21:06 bwelling Exp $ */
#include <config.h>
#include <string.h>
#include <isc/app.h>
#include <isc/event.h>
#include <isc/mem.h>
#include <isc/util.h>
#include <isccc/alist.h>
#include <isccc/cc.h>
#include <isccc/result.h>
#include <named/control.h>
#include <named/log.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);
} 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);
} else if (command_compare(command, NS_COMMAND_HALT)) {
ns_server_flushonshutdown(ns_g_server, ISC_FALSE);
isc_app_shutdown();
result = ISC_R_SUCCESS;
} else if (command_compare(command, NS_COMMAND_STOP)) {
ns_server_flushonshutdown(ns_g_server, ISC_TRUE);
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);
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_STATUS)) {
result = ns_server_status(ns_g_server, text);
} else {
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_CONTROL, ISC_LOG_WARNING,
"unknown control channel command '%s'",
command);
result = ISC_R_NOTIMPLEMENTED;
}
return (result);
}

File diff suppressed because it is too large Load Diff

View File

@@ -15,15 +15,14 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: aclconf.h,v 1.12 2001/03/04 21:21:31 bwelling Exp $ */
/* $Id: aclconf.h,v 1.10.4.1 2001/01/09 22:32:22 bwelling Exp $ */
#ifndef NS_ACLCONF_H
#define NS_ACLCONF_H 1
#include <isc/lang.h>
#include <isccfg/cfg.h>
#include <dns/confctx.h>
#include <dns/types.h>
typedef struct ns_aclconfctx {
@@ -49,8 +48,8 @@ ns_aclconfctx_destroy(ns_aclconfctx_t *ctx);
*/
isc_result_t
ns_acl_fromconfig(cfg_obj_t *caml,
cfg_obj_t *cctx,
ns_acl_fromconfig(dns_c_ipmatchlist_t *caml,
dns_c_ctx_t *cctx,
ns_aclconfctx_t *ctx,
isc_mem_t *mctx,
dns_acl_t **target);

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: client.h,v 1.60.2.2 2001/11/15 02:51:46 marka Exp $ */
/* $Id: client.h,v 1.48.4.2 2001/11/15 01:30:48 marka Exp $ */
#ifndef NAMED_CLIENT_H
#define NAMED_CLIENT_H 1
@@ -64,7 +64,6 @@
***/
#include <isc/buffer.h>
#include <isc/magic.h>
#include <isc/stdtime.h>
#include <isc/quota.h>
@@ -87,28 +86,26 @@ struct ns_client {
ns_clientmgr_t * manager;
int state;
int newstate;
isc_boolean_t disconnect;
int naccepts;
int nreads;
int nsends;
int nrecvs;
int nctls;
int references;
unsigned int attributes;
isc_task_t * task;
dns_view_t * view;
dns_view_t * lockview;
dns_dispatch_t * dispatch;
isc_socket_t * udpsocket;
dns_dispentry_t * dispentry;
dns_dispatchevent_t * dispevent;
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;
unsigned char * sendbuf;
dns_rdataset_t * opt;
isc_uint16_t udpsize;
isc_uint16_t extflags;
@@ -128,17 +125,6 @@ struct ns_client {
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.
@@ -146,7 +132,7 @@ struct ns_client {
client_list_t *list;
};
#define NS_CLIENT_MAGIC ISC_MAGIC('N','S','C','c')
#define NS_CLIENT_MAGIC 0x4E534363U /* NSCc */
#define NS_CLIENT_VALID(c) ISC_MAGIC_VALID(c, NS_CLIENT_MAGIC)
#define NS_CLIENTATTR_TCP 0x01
@@ -218,12 +204,6 @@ ns_client_replace(ns_client_t *client);
* 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);
@@ -255,14 +235,17 @@ ns_client_getsockaddr(ns_client_t *client);
*/
isc_result_t
ns_client_checkaclsilent(ns_client_t *client,dns_acl_t *acl,
isc_boolean_t default_allow);
ns_client_checkacl(ns_client_t *client,
const char *opname, dns_acl_t *acl,
isc_boolean_t default_allow,
int log_level);
/*
* 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.
* Log the outcome of the check if deemed appropriate.
* Log messages will refer to the request as an 'opname' request.
*
* Notes:
* This is appropriate for checking allow-update,
@@ -273,6 +256,7 @@ ns_client_checkaclsilent(ns_client_t *client,dns_acl_t *acl,
*
* Requires:
* 'client' points to a valid client.
* 'opname' points to a null-terminated string.
* 'acl' points to a valid ACL, or is NULL.
*
* Returns:
@@ -281,30 +265,9 @@ ns_client_checkaclsilent(ns_client_t *client,dns_acl_t *acl,
* 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_aclmsg(const char *msg, dns_name_t *name, dns_rdataclass_t rdclass,
char *buf, size_t len);
const char *fmt, ...);
#endif /* NAMED_CLIENT_H */

View File

@@ -1,68 +0,0 @@
/*
* 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 INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM 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 2001/08/09 17:21:06 gson 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);
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);
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 */

View File

@@ -1,81 +0,0 @@
/*
* 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 INTERNET SOFTWARE CONSORTIUM
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
* INTERNET SOFTWARE CONSORTIUM 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 2001/05/08 04:09:40 bwelling 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_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_STATUS "status"
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 */

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: globals.h,v 1.59 2001/08/08 20:37:31 gson Exp $ */
/* $Id: globals.h,v 1.51.2.1 2001/01/09 22:32:25 bwelling Exp $ */
#ifndef NAMED_GLOBALS_H
#define NAMED_GLOBALS_H 1
@@ -24,10 +24,10 @@
#include <isc/log.h>
#include <isc/net.h>
#include <isccfg/cfg.h>
#include <dns/zone.h>
#include <omapi/types.h>
#include <named/types.h>
#undef EXTERN
@@ -52,7 +52,7 @@ EXTERN isc_entropy_t * ns_g_entropy INIT(NULL);
*/
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 omapi_object_t * ns_g_omapimgr 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);
@@ -72,12 +72,8 @@ 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"
@@ -104,7 +100,7 @@ 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");
"/run/lwresd.pid");
EXTERN const char * ns_g_username INIT(NULL);
#undef EXTERN

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: interfacemgr.h,v 1.23 2001/08/28 03:58:00 marka Exp $ */
/* $Id: interfacemgr.h,v 1.21.4.1 2001/01/09 22:32:26 bwelling Exp $ */
#ifndef NAMED_INTERFACEMGR_H
#define NAMED_INTERFACEMGR_H 1
@@ -62,7 +62,7 @@
*** Types
***/
#define IFACE_MAGIC ISC_MAGIC('I',':','-',')')
#define IFACE_MAGIC 0x493A2D29U /* I:-). */
#define NS_INTERFACE_VALID(t) ISC_MAGIC_VALID(t, IFACE_MAGIC)
struct ns_interface {

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