Compare commits

...

608 Commits

Author SHA1 Message Date
cvs2git
3adb30769d This commit was manufactured by cvs2git to create branch
'v9_2_2_delegation_only'.
2003-02-21 05:16:00 +00:00
Mark Andrews
9f7fe71599 gcc -O0 works 2003-02-21 05:15:59 +00:00
Mark Andrews
f2a0fbbe37 gcc generates bad code 2003-02-21 04:43:32 +00:00
Mark Andrews
d9b6a420c1 1428. [port] hpux: temporary work around of hpux 11.11 interface
scanning.
2003-02-19 04:32:41 +00:00
Mark Andrews
12d9d376e1 silence compiler 2003-02-18 07:28:41 +00:00
Mark Andrews
7feb62b017 regen 2003-02-18 06:47:56 +00:00
Mark Andrews
7569cc93fb pullup:
1425.   [port]          linux/libbind: define __USE_MISC when testing *_r()
                        function prototypes in netdb.h.  [RT #4921]
2003-02-18 06:45:34 +00:00
Mark Andrews
948fe3eebb pullup:
1395.   [port]          OpenSSL 0.9.7 defines CRYPTO_LOCK_ENGINE but doesn't
                        have a working implementation.  [RT #4079]
2003-02-18 06:24:45 +00:00
Mark Andrews
6013d245b0 silence compiler warnings. 2003-02-18 06:02:47 +00:00
Mark Andrews
8f3b2d2be1 update 2003-02-18 04:25:26 +00:00
Mark Andrews
0048316365 regen 2003-02-18 04:16:23 +00:00
Mark Andrews
3ac10b1208 update 2003-02-18 03:59:48 +00:00
Mark Andrews
04b009def0 update 2003-02-18 03:43:06 +00:00
Mark Andrews
ba2dd65278 pullup:
1381.   [bug]           named failed to correctly process answers that
                        contained DNAME records where the resulting CNAME
                        resulted in a negative answer.
2003-02-18 03:32:01 +00:00
Mark Andrews
2c61102ec3 silence warnings. 2003-02-18 03:27:58 +00:00
Mark Andrews
9e4ba1632e type was uninitalised. 2003-02-18 03:20:58 +00:00
Mark Andrews
9b4ea70358 update_copyrights 2003-02-17 07:05:12 +00:00
Mark Andrews
833b91c108 merge_copyrights 2003-02-17 07:00:16 +00:00
Mark Andrews
c373461960 spelling / missing final newlines 2003-02-17 06:55:07 +00:00
Mark Andrews
ac3822472e update for 9.2.2 2003-02-17 06:26:28 +00:00
Mark Andrews
3b5b0fb66e update for 9.2.2 release 2003-02-17 06:24:11 +00:00
Mark Andrews
88e8986182 regen 2003-02-17 06:15:18 +00:00
Mark Andrews
47ef0ffe02 ensure that html files have closing newline 2003-02-17 06:03:24 +00:00
Mark Andrews
b53b292810 dnssec and lwresd are missing from SUBDIRS as RFC 2535 support is disabled 2003-02-17 06:00:54 +00:00
Mark Andrews
90f179c919 spelling 2003-02-17 05:49:13 +00:00
Mark Andrews
5acdf0314c pullup:
1427.   [bug]           Race condition in adb with threaded build.
2003-02-17 05:32:17 +00:00
Mark Andrews
e1d5260761 delete blank line 2003-02-17 01:36:36 +00:00
Mark Andrews
1a76506aee 1382. [bug] make install failed with --enable-libbind. [RT #3656] 2003-02-17 01:35:20 +00:00
Mark Andrews
1d6fba9055 spelling 2003-02-17 01:29:34 +00:00
Mark Andrews
43272e05ef 1426. [cleanup] Disable RFC2535 style DNSSEC. This is incompatible
with the forth coming DS style DNSSEC.
2003-02-17 01:15:44 +00:00
cvs2git
34d43b2ce5 This commit was manufactured by cvs2git to create branch 'v9_2_2base'. 2002-08-08 21:29:09 +00:00
Mark Andrews
ba853e4f14 use lwres_inet_ntop instead of inet_ntop 2002-08-08 21:29:07 +00:00
Mark Andrews
8acbf11b48 backout last change as we have fixed the caller 2002-08-08 21:27:47 +00:00
Danny Mayer
b983e4618c Change openSSL references to use 0.9.6e instead of 0.9.6b 2002-08-08 19:16:39 +00:00
Danny Mayer
2a868edaf8 Wrong argument given to fclose 2002-08-08 19:15:19 +00:00
Danny Mayer
3358dfc691 Add macros for the inet_* unctions to use the lwres functions 2002-08-08 19:13:36 +00:00
Mark Andrews
1f58d4917d Solaris 9 needs hack_shutup_pthreadonceinit 2002-08-08 09:11:19 +00:00
Mark Andrews
2cca217a44 update 2002-08-08 07:02:48 +00:00
Mark Andrews
7a9dc9bfb0 1356. [security] Support patches OpenSSL libraries.
http://www.cert.org/advisories/CA-2002-23.html
2002-08-08 06:45:45 +00:00
Mark Andrews
886cd55aa7 1356. [security] Support patches OpenSSL libraries.
http://www.cert.org/advisories/CA-2002-23.html
2002-08-08 06:39:32 +00:00
Mark Andrews
0456b84736 1357. [bug] --enable-libbind would fail when not built in the
source tree for certain OS's.
2002-08-08 06:31:24 +00:00
Mark Andrews
b3007386ec reviewed: jinmei
1355.   [bug]           It was possible to trigger a INSIST when debugging
                        large dynamic updates. [RT #3390]
2002-08-08 04:54:30 +00:00
Mark Andrews
884c019c2e update for 9.2.2rc1 2002-08-07 05:48:33 +00:00
Mark Andrews
bfea32015e update_copyrights 2002-08-06 06:09:07 +00:00
Mark Andrews
4993d5c500 merge_copyrights 2002-08-06 06:08:53 +00:00
Mark Andrews
5b5fe6e4d0 regen 2002-08-06 05:54:05 +00:00
Mark Andrews
fc05cc8c17 9.2.2rc1 2002-08-06 05:47:07 +00:00
Mark Andrews
e063de4c1a update for 9.2.2rc0 2002-08-06 05:40:47 +00:00
Mark Andrews
3f0fa07407 update 2002-08-06 04:34:54 +00:00
Mark Andrews
63643948a3 add 9.2.2 release marker 2002-08-06 04:24:39 +00:00
Mark Andrews
d2bd37b22e reviewed: marka
1354.   [bug]           nsupdate was extremely wasteful of memory.
2002-08-06 04:23:20 +00:00
Mark Andrews
bef1bfc2fa 1351. [bug] lwres_getipnodebyname() returned the wrong name
when given a IPv4 literal, af=AF_INET6 and AI_MAPPED
                        was set.
2002-08-06 04:18:44 +00:00
Mark Andrews
73d6af8f6a add "tuning" 2002-08-06 02:47:45 +00:00
Mark Andrews
e2cb5eecb0 reviewed: gson
1352.   [bug]           dig, host, nslookup when falling back to TCP use the
                        current search entry (if any). [RT #3374]
2002-08-06 02:40:11 +00:00
Mark Andrews
4b0dcf3782 1355. [tuning] Reduce the number of events / quantum for zone tasks. 2002-08-06 02:24:15 +00:00
Mark Andrews
f1a43a3018 1330. [bug] When processing events (non-threaded) only allow
the task one chance to use to use its quantum.
2002-08-06 02:20:39 +00:00
Mark Andrews
891c424e56 update_copyrights 2002-08-05 06:57:16 +00:00
Mark Andrews
ba01e9117b merge_copyrights 2002-08-05 06:53:54 +00:00
Mark Andrews
4ba765b5d0 merge_copyrights 2002-08-05 06:52:16 +00:00
Mark Andrews
42e37225d4 ignore util/newcopyrights 2002-08-05 06:46:24 +00:00
Mark Andrews
b9e380b39d regen 2002-08-05 06:13:37 +00:00
Mark Andrews
1bc4e9229e 1354. [doc] lwres man pages had illegal nroff. 2002-08-05 05:04:34 +00:00
Mark Andrews
7c357cde37 undo 2002-08-05 05:00:49 +00:00
Mark Andrews
047210c74e 1353. [contrib] sdb/ldap to version 0.9. 2002-08-05 04:45:21 +00:00
Mark Andrews
4016d47cf3 only one copy of the copyright 2002-08-05 04:04:47 +00:00
Mark Andrews
b812238e13 update to 9.2.2 2002-08-05 04:02:44 +00:00
Mark Andrews
931daf7a9d add "man" target 2002-08-03 04:33:22 +00:00
Mark Andrews
b0fbeb1884 1335. [bug] When performing a nonexistence proof, the validator
should discard parent NXTs from higher in the DNS.
2002-08-02 05:39:56 +00:00
Mark Andrews
a914318b06 1334. [bug] When signing/verifying rdatasets, duplicate rdatas
need to be suppressed.
2002-08-02 05:08:49 +00:00
Mark Andrews
47ce2c2150 1340. [bug] Delay and spread out the startup refresh load. 2002-08-02 04:28:03 +00:00
Mark Andrews
5b116f12fa 1325. [bug] If the tcpquota was exhausted it was possible to
to trigger a INSIST() failure.
2002-08-02 04:17:21 +00:00
Mark Andrews
0fb2d00628 renumber 2002-08-02 03:37:06 +00:00
Mark Andrews
61adda8648 missed renumber 2002-08-02 03:35:19 +00:00
Mark Andrews
f72fde8b0b update for 9.2.2 2002-08-02 03:28:57 +00:00
Mark Andrews
77fc134355 spelling 2002-08-02 03:19:36 +00:00
Mark Andrews
4d16509a5a 1097. [func] libbind: RES_PRF_TRUNC for dig. 2002-08-02 03:16:25 +00:00
Mark Andrews
c9dd10607a 1342. [port] darwin: ifconfig.sh now supports darwin. 2002-08-02 03:05:39 +00:00
Mark Andrews
636be34d1e 1089. [func] libbind: inet_{cidr,net}_{pton,ntop}() now have IPv6
support.
2002-08-02 02:17:21 +00:00
Mark Andrews
8d4036ef7b reviewed: marka
1350.   [bug]           dns_name_fromtext() failed to handle too many labels
                        gracefully.
2002-08-02 00:33:05 +00:00
Mark Andrews
e29fdeea22 1349. [security] Mimimum OpenSSL version now 0.9.6e (was 0.9.5a).
http://www.cert.org/advisories/CA-2002-23.html
2002-08-01 07:20:58 +00:00
Danny Mayer
c7dc80c4d9 Fix for Win32 High CPU Load 2002-07-31 05:18:51 +00:00
Danny Mayer
ae5b8edf7d Fix the timeout to really use microseconds and not milliseconds that were mistakenly used for the timeval structure. 2002-07-31 03:10:58 +00:00
Mark Andrews
cd85142f73 1345. [port] Use a explicit -Wformat with gcc. Not all versions
include it in -Wall.
2002-07-31 02:27:48 +00:00
Mark Andrews
9bdaf58bbc pullup
1345.   [port]          Use a explicit -Wformat with gcc.  Not all versions
                        include it in -Wall.
2002-07-31 02:26:10 +00:00
Mark Andrews
dcf1f13abe 8.2.4 has been released 2002-07-30 23:42:59 +00:00
Mark Andrews
2d67b06198 still missing changes 2002-07-23 02:07:07 +00:00
Mark Andrews
07bf4fd7b6 change # were out of order 2002-07-23 01:41:08 +00:00
Mark Andrews
0b2aba2cd2 reviewed: marka/bwelling
1247.   [bug]           The validator would incorrectly mark data as insecure
                        when seeing a bogus signature before a correct
                        signature.
2002-07-15 03:02:56 +00:00
Mark Andrews
0d4c51dfd6 reviewed: marka
1246.   [bug]           DNAME/CNAME signatures were not being cached when
                        validation was not being performed. [RT #3284]
2002-07-15 02:28:07 +00:00
Mark Andrews
a009918e2f reviewed: bwelling
1314.   [func]          libbind: no longer attempts bit string labels for
                        IPv6 reverse resolution.  Try IP6.ARPA then IP6.INT
                        for nibble style resolution.
2002-07-14 04:31:45 +00:00
Mark Andrews
2099644f0d reviewed: bwelling
1096.   [func]          libbind: "DNSSEC OK" (DO) support.
2002-07-14 04:26:59 +00:00
Mark Andrews
a2537d9b00 reviewed: bwelling
1095.   [func]          libbind: resolver option: no-tld-query.  disables
                        trying unqualified as a tld.  no_tld_query is also
                        supported for FreeBSD compatability.
2002-07-14 02:27:10 +00:00
Mark Andrews
0f2442d926 sync with mainline 2002-07-12 03:13:24 +00:00
Mark Andrews
e41340e97a make distclean should remove "make/rules", "make/includes" and "make/mkdep" 2002-07-12 01:45:59 +00:00
Mark Andrews
730dfb9b6a Makefile 2002-07-12 01:31:55 +00:00
Mark Andrews
c1a634d46b remove dead code 2002-07-12 01:23:16 +00:00
Mark Andrews
d600a66f52 white space 2002-07-12 01:20:15 +00:00
Mark Andrews
e2f5e9a858 reviewed: halley
1339.   [func]          libbind: log attempts to exploit #1338.
2002-07-12 01:10:23 +00:00
Mark Andrews
29a9388fc1 regen 2002-07-12 00:54:39 +00:00
Mark Andrews
96afc32570 silence warning 2002-07-12 00:51:41 +00:00
Mark Andrews
84805b3216 reviewed: bwelling
gettimeofday.h is no longer require (prototype in port_after.h).
2002-07-12 00:49:52 +00:00
Mark Andrews
65bbe3a2cb pullup:
There are four "i":s in "initialize"
2002-07-12 00:17:28 +00:00
Mark Andrews
2dbeb26f3d reviewed: bwelling
1094.   [func]          libbind: add support gcc's format string checking.
2002-07-11 23:32:35 +00:00
Mark Andrews
41df3594b4 libtool 2002-07-11 06:02:37 +00:00
Mark Andrews
b839c5abec 1338. [bug] libbind: Remote buffer overrun. 2002-07-11 05:55:05 +00:00
Mark Andrews
e368e45536 reviewed: bwelling
1242.   [bug]           named-checkzone failed if a journal existed. [RT #2657]
2002-07-11 05:44:11 +00:00
Mark Andrews
ee5bf99761 reviewed: bwelling
1337.   [port]          libbind: TrueUNIX 5.1 does not like __align as a
                        element name.
2002-07-11 04:15:20 +00:00
Mark Andrews
04a4e2f5c0 reviewed: bwelling
pullup: ns_r_badvers extended error code
2002-07-11 04:10:34 +00:00
Mark Andrews
c3cdf325b5 reviewed: bwelling
1336.   [bug]           libbind: gethostans() could get out of sync parsing
                        the response if there was a very long CNAME chain.
2002-07-11 04:08:06 +00:00
Mark Andrews
c6ce103cf8 reviewed: bwelling
1334.   [port]          Handle ECONNRESET from sendmsg() [unix].
2002-07-11 04:04:26 +00:00
Mark Andrews
d322581e16 reviewed: bwelling
1331.   [bug]           lwres_getrrsetbyname leaked memory.  [RT #3159]
2002-07-11 04:01:17 +00:00
Mark Andrews
9d352ffc42 reviewed: bwelling
1327.   [bug]           nsupdate: allow white space base64 key data.
2002-07-11 03:51:27 +00:00
Mark Andrews
380a309889 reviewed: bwelling
1318.   [bug]           The CINCLUDES macro in lib/dns/sec/dst/Makefile
                        could be left with a trailing "\" after configure
                        has been run.
2002-07-11 03:47:17 +00:00
Mark Andrews
a968e6b0b1 reviewed: bwelling
1317.   [port]          linux: make handling EINVAL from socket() no longer
                        conditional on #ifdef LINUX.
2002-07-11 03:43:19 +00:00
Mark Andrews
b33cab0cdc reviewed: bwelling
1316.   [bug]           isc_log_closefilelogs() needed to lock the log
                        context.
2002-07-11 03:39:06 +00:00
Mark Andrews
90656e32ea reviewed: bwelling
1315.   [bug]           isc_log_setdebuglevel() needed to lock the log
                        context.
2002-07-11 02:32:35 +00:00
Mark Andrews
b6c59ece79 regen for:
1309.   [port]          See if -ldl is required for OpenSSL? [RT #2672]
2002-07-11 02:20:46 +00:00
Mark Andrews
db704bac25 1309. [port] See if -ldl is required for OpenSSL? [RT #2672] 2002-07-11 02:19:12 +00:00
Mark Andrews
0034db60ba reviewed: marka
check whether linking with OpenSSL works at all before checking
whether the version is compatible
2002-07-11 02:11:30 +00:00
Mark Andrews
3e99d38a74 reviewed: bwelling
1308.   [bug]           Adjusted REQUIRE's in lib/dns/name.c to better
                        reflect written requirements.
2002-07-11 01:29:00 +00:00
Mark Andrews
456813d719 reviewed: bwelling
1307.   [bug]           REQUIRE that DNS_DBADD_MERGE only be set when adding
                        a rdataset to a zone db in the rbtdb implementation of
                        addrdataset.
2002-07-10 07:03:04 +00:00
Mark Andrews
35f725a8b6 reviewed: bwelling
1306.   [bug]           dns_name_downcase() enforce requirement that
                        target != NULL or name->buffer != NULL.
2002-07-10 06:48:29 +00:00
Mark Andrews
c4610cb161 reviewed: bwelling
1304.  [bug]           The RTT estimate on unused servers was not aged.
                       [RT #2569]
2002-07-10 06:43:01 +00:00
Mark Andrews
ecb325ac83 reviewed: bwelling
1302.   [port]          libbind: hpux 11.11 interface scaning.
2002-07-10 06:36:26 +00:00
Mark Andrews
c3fad928e8 reviewed: bwelling
1300.   [bug]           libbind: escape '(' and ')' when coverting to
                        presentation form.
2002-07-10 06:32:48 +00:00
Mark Andrews
2ea0604c6f reviewed: bwelling
1299.   [port]          Darwin uses (unsigned long) for size_t. [RT #2590]
2002-07-10 06:10:45 +00:00
Mark Andrews
05151ddebe reviewed: bwelling
1294.   [bug]           Memory leak in lwres_gnbarequest_parse().
2002-07-10 06:05:07 +00:00
Mark Andrews
8b46b247f8 reviewed: bwelling
1293.  [port]          libbind: solaris: 64 bit binary compatability.
2002-07-10 06:01:52 +00:00
Mark Andrews
da09780435 reviewed: bwelling
1290.  [bug]           Check that system inet_pton() and inet_ntop() support
                       AF_INET6.
2002-07-10 05:57:46 +00:00
Mark Andrews
a2564ceb47 reviewed: bwelling
1286.   [bug]           ISC_LINK_INIT, ISC_LINK_UNLINK, ISC_LIST_DEQUEUE,
                        __ISC_LINK_UNLINKUNSAFE and __ISC_LIST_DEQUEUEUNSAFE
                        are not C++ compatible, use *_TYPE versions instead.
2002-07-10 05:30:01 +00:00
Mark Andrews
b42b4dba28 reviewed: bwelling
1285.   [bug]           libbind: LINK_INIT and UNLINK were not compatible with
                        C++, use LINK_INIT_TYPE and UNLINK_TYPE instead.
2002-07-10 05:22:34 +00:00
Mark Andrews
22f851eb69 reviewed: bwelling
1281.   [func]          libbind: ns_sign2() and ns_sign_tcp() now provide
                        support for compressed TSIG owner names.
2002-07-10 05:19:27 +00:00
Mark Andrews
ecf4ee42f5 reviewed: bwelling
1280.   [func]          libbind: res_update can now update IPv6 servers,
                        new function res_findzonecut2().
2002-07-10 05:15:24 +00:00
Mark Andrews
ca4723bccb 1279. [bug] libbind: get_salen() IPv6 support was broken for OSs
w/o sa_len.
2002-07-10 05:10:35 +00:00
Mark Andrews
fbf3c04dbf reviewed: bwelling
1278.   [bug]           libbind: res_nametotype() and res_nametoclass() were
                        broken.
2002-07-10 04:56:20 +00:00
Mark Andrews
611a2d5f0b reviewed: bwelling
add ECONNREFUSED
2002-07-10 04:49:58 +00:00
Mark Andrews
cac1899bda reviewed: bwelling
1272.   [bug]           Dig, host and nslookup were not checking the address
                        the answer was coming from against the address it was
                        sent to. [RT# 2692]
2002-07-10 04:44:50 +00:00
Mark Andrews
385535aed8 reviewed: bwelling
1209.   [bug]           Dig, host, nslookup were not checking the message ids
                        on the responses. [RT #2454]
2002-07-10 04:37:55 +00:00
Mark Andrews
3e4d38c0b1 reviewed: bwelling
1277.   [bug]           Failure to write pid-file should not be fatal on
                        reload. [RT #2861]
2002-07-10 04:27:30 +00:00
Mark Andrews
4cc0046a61 bind9-workers -> bind-workers 2002-07-10 02:01:37 +00:00
Mark Andrews
ed1ef06526 reviewed: bwelling
fd_set on ultrix is in <sys/types.h>
2002-07-10 01:05:51 +00:00
Mark Andrews
00d14aa383 reviewed: bwelling
1268. [bug]           DESTDIR was not being propogated between makes.
2002-07-10 00:35:46 +00:00
Mark Andrews
dd6234eb00 reviewed: bwelling
1245.  [bug]           Treat ENOBUFS, ENOMEM and ENFILE as soft errors for
                       accept().
2002-07-10 00:24:46 +00:00
Mark Andrews
f324e3cfdf reviewed: bwelling
1241.   [bug]           Drop received UDP messsages with a zero source port
                        as these are invariably forged. [RT #2621]
2002-07-10 00:04:57 +00:00
Mark Andrews
7d73f463e2 reviewed: bwelling
1341.   [port]          linux: Slackware 4.0 needs <asm/unistd.h>.
2002-07-09 01:42:05 +00:00
Mark Andrews
b1a7576009 1340. [doc] query-source-v6 was missing from options section.
[RT #3218]
2002-07-02 14:01:45 +00:00
Mark Andrews
70fc53059f 1326. [bug] Badly encoded LOC record when the size, horizontal
precision or vertical precision was 0.1m.
2002-07-02 13:53:41 +00:00
Mark Andrews
84a74fe703 1296. [bug] libbind: const pointer conficts in res_debug.c. 2002-07-02 10:15:42 +00:00
Mark Andrews
b9698bfd48 1325. [bug] Document that internal zones are included in the
rndc status results.
2002-07-02 10:12:30 +00:00
Mark Andrews
676a907102 1295. [port] libbind: hpux: treat all hpux systems as BIG_ENDIAN. 2002-07-02 05:00:17 +00:00
Mark Andrews
93168b5719 1292. [contrib] Berkeley DB 4.0 sdb implementation from
Nuno Miguel Rodrigues <nmr@co.sapo.pt>.
2002-07-02 04:46:01 +00:00
Mark Andrews
7c6f0c2cf9 dup 2002-07-02 04:19:42 +00:00
Mark Andrews
fd8f9ed031 /dev/random is broken on OS X 10.1.4 2002-07-02 04:18:38 +00:00
Mark Andrews
2213d80e03 1276. [contrib] 'queryperf' now has EDNS (-e) + DNSSEC DO (-D) support. 2002-07-02 04:17:18 +00:00
Mark Andrews
b6cb507ae8 reviewed: marka
1275.   [bug]           When verifying that an NXT proves nonexistence, check
                        the rcode of the message and only do the matching NXT
                        check.  That is, for NXDOMAIN responses, check that
                        the name is in the range between the NXT owner and
                        next name, and for NOERROR NODATA responses, check
                        that the type is not present in the NXT bitmap.
2002-07-02 04:02:23 +00:00
Mark Andrews
b833082a39 reviewed: marka
1273.   [bug]           The dnssec system test failed to remove the correct
                        files.
2002-07-02 03:43:38 +00:00
Mark Andrews
c073347825 reviewed: bwelling
1335.   [bug]           Options should apply to the internal _bind view.
2002-07-02 02:46:43 +00:00
Mark Andrews
b6231164de reviewed: bwelling
1330.   [bug]           'rndc stop' failed to cause zones to be flushed
                        sometimes. [RT #3157]
2002-07-02 02:43:34 +00:00
cvs2git
86a55923e2 This commit was manufactured by cvs2git to create branch 'v9_2'. 2002-07-01 23:45:48 +00:00
Mark Andrews
d9fb0422ae remove change 1284 2002-06-13 07:32:54 +00:00
Mark Andrews
eeacf1ef3e remove braces from match-recursive-only definition. 2002-05-17 02:13:56 +00:00
Mark Andrews
680f795a0f 1291. [bug] "recursion available: {denied,approved}" was too
confusing.
2002-05-16 04:06:56 +00:00
Mark Andrews
51ba5754ca pullup:
1289.   [port]          Openserver: ifconfig.sh support.
2002-05-13 04:37:38 +00:00
Mark Andrews
a6540ffa21 pullup:
1288.   [port]          Openserver: the value FD_SETSIZE depends on whether
                        <sys/param.h> is included or not.  Be consistant.
2002-05-10 06:54:40 +00:00
Mark Andrews
ec5f67b8cf 1284. [bug] Memory leak if dns_db_beginload() failed. 2002-05-08 07:23:25 +00:00
Mark Andrews
0b9f0f114a 1283. [bug] Reference after free error if dns_dispatchmgr_create()
failed.
2002-05-08 06:38:14 +00:00
Mark Andrews
b9b40d5fb7 1282. [bug] ns_server_destroy() failed to set *serverp to NULL. 2002-05-08 06:06:33 +00:00
Mark Andrews
aea5bf41cf add address to query-source 2002-05-04 21:49:13 +00:00
Mark Andrews
477d0d1ff9 enumerate syslog facilities. 2002-05-02 23:31:44 +00:00
Mark Andrews
d59f7e6f41 /dev/random is broken on OS X 10.1.4 2002-05-02 00:12:06 +00:00
Mark Andrews
2a3e8ec458 9.2.2rc0 2002-05-01 23:47:49 +00:00
Mark Andrews
8bae85ee9b 9.2.1 2002-04-23 06:28:35 +00:00
Mark Andrews
2d18f59f88 pullup:
CHANGES, FAQ and COPYRIGHT are part of a binary release
2002-04-23 06:09:23 +00:00
Mark Andrews
b45ba90e7f update for 9.2.1 2002-04-23 05:15:01 +00:00
Mark Andrews
c1e52e6097 update for 9.2.1 2002-04-23 03:38:55 +00:00
Mark Andrews
eeb2e36c5a update_copyrights 2002-04-23 02:28:55 +00:00
Mark Andrews
7b51a5ed05 regen 2002-04-23 02:13:48 +00:00
Mark Andrews
dee7d91a52 reviewed by: bwelling@nominum.com
1269.   [bug]           Missing masters clause was not handled gracefully.
                        [RT #2703]
2002-04-23 02:00:03 +00:00
Mark Andrews
09fb82a40d Reviewed by: gson@nominum.com
1244.   [bug]           Receiving a TCP message from a blackhole address would
                        prevent further messages being received over that
                        interface.
2002-04-23 01:53:53 +00:00
Mark Andrews
3855970d74 min-refresh-time et al are not per server but reather globally and not for
master zones.
2002-04-22 04:14:25 +00:00
Mark Andrews
03d58c6ef9 pullup:
allow transfers from all hosts -> allow transfers to all hosts [RT #2723]
2002-04-22 03:43:25 +00:00
Mark Andrews
a233df373c 1271. [port] win32: a make file contained absolute version specific
references.
2002-04-19 01:14:26 +00:00
Mark Andrews
ced2a93ebc 1178. [bug] Follow and cache (if appropriate) A6 and other
data chains to completion in the additional section.
2002-04-19 01:11:19 +00:00
Mark Andrews
410b02f399 use relative paths 2002-04-10 03:53:06 +00:00
Mark Andrews
4e67211f74 9.2.1 2002-03-29 03:01:13 +00:00
Mark Andrews
5849e544f6 move 9.2.1rc2 release marker 2002-03-29 01:47:05 +00:00
Mark Andrews
42823e32ea pullup:
INSIST that there are no outstanding tasks when the task manager is
about to be destroyed (non-threaded).  This will also produce more
useful core dumps if triggered.
2002-03-29 01:41:01 +00:00
Mark Andrews
253c278b39 pullup:
1240.   [bug]           It was possible to leak zone references by
                        specifying an incorrect zone to rndc.
2002-03-29 01:35:24 +00:00
Mark Andrews
769c637e95 pullup:
1238.   [bug]           It is possible to lockup the server when shutting down
                        if notifies are being processed. [RT #2591]
2002-03-29 00:20:07 +00:00
Mark Andrews
af54b372dc pullup:
1239.   [bug]           Under certain circumstances named could continue to
                        use a name after it had been freed triggering
                        INSIST() failures.  [RT #2614]
2002-03-28 05:10:09 +00:00
Mark Andrews
ee95e5b2d3 pullup:
Change 1236 was incorrect.  [RT #2611]
2002-03-27 23:52:33 +00:00
Mark Andrews
c1e109166b 9.2.1rc2 release marker 2002-03-26 06:11:36 +00:00
Mark Andrews
e88346ed0f regen for 9.2.1_rc2 2002-03-26 04:54:08 +00:00
Mark Andrews
57a877555a update for 9.2.1rc2 2002-03-26 03:39:30 +00:00
Mark Andrews
b2f3e5c308 update_copyrights 2002-03-26 00:55:15 +00:00
Mark Andrews
cd27f76d7b merge_copyrights 2002-03-26 00:50:25 +00:00
Mark Andrews
8c7d74701d pullup:
lock mctx for DELETE_TRACE call in isc__mempool_put()
2002-03-20 22:51:43 +00:00
Mark Andrews
d1a95dea1f pullup:
1237.   [bug]           nslookup: "set q=type" failed.
2002-03-20 22:45:11 +00:00
Mark Andrews
1cf32ab2b3 pullup:
1236.   [bug]           dns_rdata{class,type}_fromtext() didn't handle non
                        NULL terminated text regions. [RT #2588]
2002-03-20 22:41:58 +00:00
Mark Andrews
7f855bbeee update 2002-03-20 22:40:54 +00:00
Mark Andrews
f8656a8bd6 missed this 2002-03-20 22:20:59 +00:00
Mark Andrews
93304856f9 add missing result codes 2002-03-20 21:29:47 +00:00
Mark Andrews
e5a402d95e pullup:
1232.   [bug]           unix/errno2result() didn't handle EADDRNOTAVAIL.
2002-03-20 20:59:39 +00:00
Mark Andrews
034804a048 pullup:
1231.   [port]          HPUX 11.11 recvmsg() can return spurious EADDRNOTAVAIL.
2002-03-20 20:56:44 +00:00
Mark Andrews
9789fdd98b pullup:
1230.   [bug]           isccc_cc_isreply() and isccc_cc_isack() were broken.
2002-03-20 20:53:06 +00:00
Mark Andrews
1466c8252a pullup:
1228.   [bug]           'make install' did not depend on 'make all'. [RT #2559]
2002-03-20 20:48:16 +00:00
Mark Andrews
e4166c0e05 pullup:
1227.   [bug]           dns_lex_getmastertoken() now returns ISC_R_BADNUMBER
                        if a number was expected and some other token was
                        found. [RT#2532]
2002-03-20 20:44:18 +00:00
Mark Andrews
356880d58e pullup:
1222.   [bug]           Specifying 'port *' did not always result in a system
                        selected (non-reserved) port being used. [RT #2537]
2002-03-20 20:39:51 +00:00
Mark Andrews
27cd2ff244 pullup:
1221.   [bug]           Zone types 'master', 'slave' and 'stub' were not being
                        compared case insensitively. [RT #2542]
2002-03-20 20:32:41 +00:00
Mark Andrews
4da8460d04 pullup:
1218.   [bug]           Named incorrectly returned SERVFAIL rather than
                        NOTAUTH when there was a TSIG BADTIME error. [RT #2519]
2002-03-20 20:27:21 +00:00
Mark Andrews
ba8a105802 pullup:
1216.   [bug]           Multiple server clauses for the same server were not
                        reported.  [RT #2514]
2002-03-20 20:21:15 +00:00
Mark Andrews
4dedf7a82e pullup:
1215.   [port]          solaris: add support to ifconfig.sh for x86 2.5.1
2002-03-20 19:59:50 +00:00
Mark Andrews
a295792f8d pullup:
1214.   [bug]           Win32: isc_file_renameunique() could leave zero length
                        files behind.
2002-03-20 19:50:54 +00:00
Mark Andrews
ede71ed60b pullup:
1212.   [port]          libbind: 64k answer buffers were causing stack space
                        to be exceeded for certian OS.  Use heap space instead.
2002-03-20 19:44:40 +00:00
Mark Andrews
9e7dfa38b4 pullup:
1211.   [bug]           dns_name_fromtext() incorrectly handled certain
                        valid octal bitlabels. [RT #2483]
2002-03-20 19:38:49 +00:00
Mark Andrews
18a3d3ea3d pullup:
1210.   [bug]           libbind: getnameinfo() failed to lookup IPv4 mapped /
                        compatible addresses. [RT #2461]
2002-03-20 19:31:14 +00:00
Mark Andrews
fdae17c884 pullup:
1229.   [bug]           named would crash if it received a TSIG signed
                        query as part of an AXFR response. [RT #2570]
2002-03-20 19:24:37 +00:00
Mark Andrews
d5d160a7bd silence compiler 2002-03-20 19:20:29 +00:00
Mark Andrews
433695cce3 pullup:
1208.   [bug]           dns_master_load*() failed to log a error message if
                        an error was detected when parsing the ownername of
                        a record.  [RT #2448]
2002-03-20 19:15:13 +00:00
Mark Andrews
24bc7544b2 update 2002-03-20 18:57:07 +00:00
Mark Andrews
59f871bf92 9.2.1rc2 2002-03-15 05:14:11 +00:00
Mark Andrews
0924f3b522 silence compiler 2002-03-12 03:55:57 +00:00
Brian Wellington
cbfefc37a3 improve #1206 2002-03-11 23:53:07 +00:00
Mark Andrews
dc57e5e0ca pullup:
<isc/print.h> for snprintf
2002-02-28 05:17:49 +00:00
Mark Andrews
1962186055 pullup 2002-02-27 07:20:25 +00:00
Mark Andrews
450ffb2f77 #1206 is part of 9.2.1rc1 2002-02-27 00:44:58 +00:00
Bob Halley
e7164f3fcd pull up 1206 for Mark 2002-02-26 23:24:18 +00:00
Bob Halley
991343d9a3 #1204 failed to set sin_len (pull up for Mark) 2002-02-26 23:13:33 +00:00
Mark Andrews
4daf63c4b0 copyright dates 2002-02-20 02:17:28 +00:00
Mark Andrews
538bc08bee update for latest set of pullups 2002-02-20 01:49:55 +00:00
Andreas Gustafsson
258eca377d pullup:
1207.   [bug]           libbind: getaddrinfo() could call freeaddrinfo() with
                        an invalid pointer.
2002-02-20 01:06:19 +00:00
Andreas Gustafsson
6bc9a03601 pullup:
1205.   [bug]           OPT, TSIG and TKEY cannot be used to set the "class"
                        of the message. [RT #2449]
2002-02-20 00:47:40 +00:00
Andreas Gustafsson
ba9a670151 pullup:
1204.   [bug]           libbind: res_nupdate() failed to update the name
                        servers addresses before sending the update.
2002-02-20 00:47:03 +00:00
Andreas Gustafsson
9cdcf06d3b pullup:
1204.   [bug]           libbind: res_nupdate() failed to update the name
                        servers addresses before sending the update.
CHANGES
2002-02-20 00:43:46 +00:00
Andreas Gustafsson
fd7505872d pullup:
1201.   [bug]           Require that if 'callbacks' is passed to
                        dns_rdata_fromtext(), callbacks->error and
                        callbacks->warn are initalised.
2002-02-20 00:39:27 +00:00
Andreas Gustafsson
44b8e407b5 pullup:
1200.   [bug]           Log 'errno' that we are unable to convert to
                        isc_result_t. [RT #2404]
2002-02-19 22:44:51 +00:00
Andreas Gustafsson
191fdb73be pullup:
1198.   [bug]           OPT printing style was not consistant with the way the
                        header fields are printed.  The DO bit was not reported
                        if set.  Report if any of the MBZ bits are set.
2002-02-19 22:39:25 +00:00
Andreas Gustafsson
1f40299d87 pullup:
1197.   [bug]           Attempts to define the same acl multiple times were not
                        detected.
2002-02-19 22:30:05 +00:00
Andreas Gustafsson
a07532875f pullup:
1193.   [bug]           Best effort parsing didn't handle packet truncation.
2002-02-19 22:13:00 +00:00
Mark Andrews
7fbafdc2d7 update 2002-02-19 05:27:39 +00:00
Mark Andrews
c3103a0b2d update 2002-02-19 04:45:34 +00:00
Mark Andrews
b700c2c3d2 libisccfg now requires libdns 2002-02-19 04:43:32 +00:00
Mark Andrews
e6012d7b37 pullup:
Fixes for error handling that were missing in previous commit.
2002-02-19 00:40:09 +00:00
Mark Andrews
751109bdd5 pullup:
memory leak
2002-02-13 04:02:36 +00:00
Mark Andrews
5d1e521490 pullup:
Allocate and free key used to check for duplicate zones.
2002-02-12 13:30:33 +00:00
Mark Andrews
e1748302ad cfg_test needs to link against libdns (shared lib) 2002-02-12 12:02:06 +00:00
Mark Andrews
13db7f40a5 libdns required for shared library build. 2002-02-12 06:49:36 +00:00
Mark Andrews
eb176d660e update 2002-02-12 06:38:36 +00:00
Mark Andrews
f2048c5dff update_copyrights 2002-02-12 06:05:52 +00:00
Mark Andrews
1d4285b6a3 merge_copyrights 2002-02-12 06:05:31 +00:00
Mark Andrews
74fd9ace3f merge_copyrights 2002-02-12 05:56:10 +00:00
Mark Andrews
e52fde1b98 pullup:
distclean should remove HTML.index HTML.manifest
2002-02-12 05:51:27 +00:00
Mark Andrews
63102c64ae pullup:
distclean should remove r1.htm
2002-02-12 05:49:37 +00:00
Mark Andrews
0d2fb0ac27 add libdns to named-checkconf. 2002-02-12 04:31:19 +00:00
Mark Andrews
184f677780 Order subdirectory processing 2002-02-12 04:07:36 +00:00
Mark Andrews
b5d00f6ea2 mark 9.2.1rc1 release point 2002-02-12 03:47:25 +00:00
Mark Andrews
7b373263b7 leftover from previous version 2002-02-12 00:20:07 +00:00
Andreas Gustafsson
773f604c52 1194. [bug] Not all duplicate zone definitions were being detected
at the named.conf checking stage. [RT #2431]
2002-02-11 21:50:17 +00:00
Andreas Gustafsson
65ae185312 pullup:
1195.   [bug]           Attempts to redefine builtin acls should be caught.
                        [RT #2403]
2002-02-11 21:42:10 +00:00
Andreas Gustafsson
60c0e2944d English 2002-02-11 20:16:20 +00:00
Mark Andrews
6f9dfd7330 pullup:
reference FAQ
2002-02-11 05:17:22 +00:00
Mark Andrews
1f179c6edd update for 9.2.1rc1 2002-02-08 13:25:16 +00:00
Mark Andrews
ee9dbfb7cd pullup:
1196.   [contrib]       update mdnkit to 2.2.3.
2002-02-08 12:16:32 +00:00
cvs2git
a51c70decc This commit was manufactured by cvs2git to create branch 'v9_2'. 2002-02-08 05:42:25 +00:00
Mark Andrews
73d7583d98 update copyrights 2002-02-08 03:57:47 +00:00
Mark Andrews
50b0a27f48 remove dead wood 2002-02-08 03:39:43 +00:00
Mark Andrews
97cee754a9 merge_copyrights 2002-02-08 03:32:42 +00:00
Mark Andrews
8db1db6295 pullup: Secure Zone Transfers note 2002-02-07 03:50:14 +00:00
Mark Andrews
323de351b3 update for 9.2.1rc1 2002-01-25 04:21:19 +00:00
Mark Andrews
6b345bc209 update for 9.2.1rc1 2002-01-25 04:12:35 +00:00
Mark Andrews
d3fafb3213 update for 9.2.1 2002-01-25 04:06:02 +00:00
Mark Andrews
c363d0fed8 9.2.1rc1 2002-01-25 03:04:22 +00:00
Mark Andrews
f5e4a39e62 pullup: (by tagging)
1167.   [contrib]       nslint-2.1a3 (from author).O
2002-01-25 01:31:33 +00:00
Mark Andrews
e227c896a2 #1025, #1034, #1035, #1037, #1079 and #1080 2002-01-25 01:12:36 +00:00
Mark Andrews
0f0e3ffdc1 1007. [port] config.guess, config.sub from autoconf-2.52.
1008.   [port]          libtool.m4, ltmain.sh from libtool-1.4.2.

1009.   [port]          OpenUNIX 8 support. [RT #1728]
2002-01-25 01:02:12 +00:00
Mark Andrews
b8c4c3aade 1105. [port] OpenUNIX 8 enable threads by default. [RT #1970]
[Functional change]
2002-01-25 00:57:56 +00:00
Mark Andrews
c2f1d683c9 1073. [bug] The ADB cache cleaning should also be space driven.
[RT #1915, #1938]
                        [ New function dns_adb_setadbsize() ]
2002-01-25 00:49:31 +00:00
Mark Andrews
fa85f47357 pullup:
1108.   [bug]           On Win32, rndc was hanging when named was not running
                        due to failure to select for exceptional conditions
                        in select(). [RT #1870]

win32 fixes for:
1081.   [bug]           Multicast queries were incorrectly identified
                        based on the source address, not the destination
                        address.

1066.   [bug]           Provide a thread safe wrapper for strerror().
                        [RT #1689]  (socket.c only)

General cleanup from mainline.
2002-01-25 00:24:58 +00:00
Mark Andrews
8a044e464b pullup:
1081.   [bug]           Multicast queries were incorrectly identified
                        based on the source address, not the destination
                        address.
(from JINMEI Tatuya)
2002-01-24 23:22:25 +00:00
Mark Andrews
5295debde0 1110. [bug] dig should only accept valid abbreviations of +options.
[RT #2003]
                        [Potentially breaks scripts.  Leave to 9.3.0.]
2002-01-24 23:15:51 +00:00
Mark Andrews
3e69f0cd72 pullup:
1072.   [bug]           The TCP client quota could be exceeded when
                        recursion occurred. [RT #1937]
2002-01-24 23:09:15 +00:00
Mark Andrews
c592760e76 pullup:
1071.   [bug]           Sockets listening for TCP DNS connections
                        specified an excessive listen backlog. [RT #1937]
2002-01-24 22:59:07 +00:00
Mark Andrews
f64f89606f pullup:
nsupdate should not take octal and hex TTLs
2002-01-24 21:59:51 +00:00
Andreas Gustafsson
3f25cb17e3 pullup:
1070.  [bug]           Copy DNSSEC OK (DO) to response as specified by
                       draft-ietf-dnsext-dnssec-okbit-03.txt.
2002-01-24 19:00:27 +00:00
Andreas Gustafsson
e2352fb8cd pullup:
995.   [bug]           dig, host, nslookup: using a raw IPv6 address as a
                        target address should be fatal on a IPv4 only system.
2002-01-24 18:42:29 +00:00
Andreas Gustafsson
21b4f15c60 pullup:
1109.   [bug]           nsupdate accepted illegal ttl values.
2002-01-24 18:32:25 +00:00
Mark Andrews
417cddb8c1 1024. [port] Compilation failed on HP-UX 11.11 due to
incompatible use of the SIOCGLIFCONF macro
                        name. [RT #1831]
                        [needs more work]
2002-01-24 06:32:30 +00:00
Mark Andrews
f27e47b5ff pullup:
1014.   [bug]           Some queries would cause statistics counters to
                        increment more than once or not at all. [RT #1321]
2002-01-24 04:22:58 +00:00
Mark Andrews
2a091ec932 pullup:
988.   [bug]           'additional-from-auth no;' did not work reliably
                        in the case of queries answered from the cache.
                        [RT #1436]
2002-01-24 03:49:04 +00:00
Mark Andrews
9445e10377 1012. [bug] The -p option to named did not behave as documented. 2002-01-24 03:06:25 +00:00
Andreas Gustafsson
f6bd49ffd0 consistent spacing 2002-01-23 18:02:49 +00:00
Andreas Gustafsson
fff1dbdf55 pullup:
1166.   [bug]           "Not Implemented" should be reported as NOTIMP,
                        not NOTIMPL. [RT #2281]
2002-01-23 17:57:51 +00:00
Andreas Gustafsson
69e7554caa pullup:
1170.   [bug]           Don't attempt to print the token when a I/O error
                        occurs when parsing named.conf.  [RT #2275]
2002-01-23 17:54:06 +00:00
Brian Wellington
99df95697c pullup:
1191.   [bug]           A dynamic update removing the last non-apex name in
                        a secure zone would fail. [RT #2399]
2002-01-23 08:17:55 +00:00
Mark Andrews
d778d61208 1168. [bug] Empty also-notify clauses were not handled. [RT #2309] 2002-01-23 05:14:35 +00:00
Mark Andrews
d0bb045c79 1150. [bug] named incorrectly accepted TTL values
containing plus or minus signs, such as
                        1d+1h-1s.
                        [ Uses new function isc_parse_uint32() ]

1151.   [bug]           nslookup failed to check that the arguments to
                        the port, timeout, and retry options were
                        valid integers and in range. [RT #2099]
                        [ Uses new function isc_parse_uint32() ]
2002-01-23 04:23:45 +00:00
Mark Andrews
3fa36cb79d not NOTIMPL -> NOTIMP change 2002-01-23 04:04:22 +00:00
Mark Andrews
ab92fa0aca pullup: style 2002-01-23 03:49:20 +00:00
Mark Andrews
3a7c194000 1187. [bug] named was incorrectly returning DNSSEC records
in negative responses when the DO bit was not set.
                        [ Requires API change (new arguement) to
                        dns_rdataset_towire(), dns_rdataset_towirepartial()
                        and dns_rdataset_towirepartial() ]
2002-01-23 03:33:48 +00:00
Mark Andrews
8a4f85e204 pullup:
1188.   [bug]           Dynamic updates of a signed zone would fail if
                        some of the zone private keys were unavailable.
2002-01-23 03:19:03 +00:00
Mark Andrews
622a5774e6 pullup:
1189.   [bug]           On some systems, malloc(0) returns NULL, which
                        could cause the caller to report an out of memory
                        error. [RT #2398]
2002-01-23 03:09:31 +00:00
Mark Andrews
feed58ca64 pullup:
add format checking
2002-01-23 03:02:28 +00:00
Mark Andrews
eab966fdb3 pullu: typo in comment 2002-01-23 02:55:10 +00:00
Mark Andrews
5eeb5ddc67 1159. [bug] MD and MF are not permitted to be loaded by RFC1123
[ Could cause zones that loaded in 9.2.0 to fail
                        to load.  Leave such breakages to 9.3.0. ]
2002-01-23 02:47:08 +00:00
Andreas Gustafsson
4c7c397275 1183. [bug] Handle ENOSR error when writing to the internal
control pipe. [RT #2395]
2002-01-23 02:35:56 +00:00
Andreas Gustafsson
05b8c412f8 pullup:
pullup from BIND 8:
1185.   [bug]           libbind: don't assume statp->_u._ext.ext is valid
                        unless RES_INIT is set when calling res_*init().

1184.   [bug]           libbind: call res_ndestroy() if RES_INIT is set
                        when res_*init() is called.
2002-01-23 02:34:14 +00:00
Andreas Gustafsson
413463f215 pullup:
wrong test to see if snprintf had a too small buffer.
2002-01-23 02:11:32 +00:00
Andreas Gustafsson
bc1268ea83 pullup:
leave isc_lex_destroy() to close any open streams.
2002-01-23 02:08:57 +00:00
Andreas Gustafsson
d8f67a1d88 pullup:
Fix RT #2309 differently, allowing rather than rejecting empty
 also-notify clauses
2002-01-23 02:05:42 +00:00
Andreas Gustafsson
b7f8bca629 regenerated 2002-01-23 01:55:38 +00:00
Andreas Gustafsson
8bb8f9c6c8 pullup:
initalise warning
initalise token
only print known token types.
2002-01-23 01:53:28 +00:00
Andreas Gustafsson
e6450a5811 regenerated 2002-01-23 01:50:23 +00:00
Andreas Gustafsson
d8b140ce00 pullup:
1172.   [doc]           Add CERT, GPOS, KX, NAPTR, NSAP, PX and TXT to
                        table of RR types in ARM.
2002-01-23 01:41:17 +00:00
Andreas Gustafsson
e47a6956a1 pullup:
1173.   [bug]           Potential memory leaks in isc_log_create() and
                        isc_log_settag(). [RT #2336]
2002-01-23 01:31:15 +00:00
Andreas Gustafsson
7366e9c47d pullup:
1174.   [bug]           Win32: add WSAECONNRESET to the expected errors
                        from connect(). [RT #2308]
2002-01-23 01:07:54 +00:00
Mark Andrews
a818127616 pullup: cut-and-paste-o:s 2002-01-23 00:11:14 +00:00
Mark Andrews
6e574a8b30 prepare for 9.2.1 2002-01-22 23:39:20 +00:00
Andreas Gustafsson
a7859ded82 1175. [bug] named-checkzone failed to call dns_result_register()
at startup which could result in runtime
                        exceptions when printing "out of memory" errors.
                        [RT #2335]
(The named-checkconf.c change was not pulled up; it is not applicable
to the 9.2 branch because the 9.2 named-checkconf.c does not link
with libdns)
2002-01-22 23:34:56 +00:00
Andreas Gustafsson
d7224e6672 pullup:
reference after free in error path.
2002-01-22 23:17:44 +00:00
Mark Andrews
2adafac25f Not applicable to 9.2 2002-01-22 23:15:59 +00:00
Andreas Gustafsson
057fc2ec3f pullup:
1165.   [bug]           We were rejecting notify-source{-v6} in zone clauses.
2002-01-22 23:14:45 +00:00
Andreas Gustafsson
80670d2633 pullup:
1164.   [bug]           Empty masters clauses in slave / stub zones were not
                        handled gracefully.  [RT #2262]
2002-01-22 22:51:05 +00:00
Mark Andrews
16a160ea8a pullup:
http://www.isc.org/ml-archives/
2002-01-22 06:50:48 +00:00
Mark Andrews
f132d4023a pullup:
Q: I have Freebsd 4.4 and "rndc-confgen -a" just sits there.
2002-01-22 06:43:58 +00:00
Mark Andrews
a50304c317 pullup:
1176.   [doc]           Document that allow-v6-synthesis is only performed
                        for clients that are supplied recursive service.
                        [RT #2260]
2002-01-22 06:16:25 +00:00
Mark Andrews
8ac220d5cc pullup:
1186.   [bug]           isc_hex_tobuffer(,,length = 0) failed to unget the
                        EOL token when reading to end of line.
2002-01-22 06:08:47 +00:00
Mark Andrews
3bc24a3a90 pullup:
Q: I get error messages like "multiple RRs of singleton type" and
"CNAME and other data" when transfering a zone.  What does this mean?
2002-01-22 05:21:51 +00:00
Mark Andrews
5ef63950cf pullup:
Q: Why is named listening on UDP port other than 53?
2002-01-22 05:16:11 +00:00
Mark Andrews
4f0ddc4fc1 pullup:
Mac OS X 10.1
2002-01-22 05:14:31 +00:00
Mark Andrews
f5ea135066 pullup:
Mention the need to run "make distclean" prior to re-configuring.
2002-01-22 05:11:17 +00:00
Mark Andrews
bedd38297c note that the command channel can be disabled using controls { }; 2002-01-22 05:09:40 +00:00
Mark Andrews
2bffec87ac pullup:
Out of date comment.
2002-01-22 05:00:30 +00:00
Mark Andrews
f9409b10fd pullup:
1152.   [bug]           libbind: read buffer overflows.
2002-01-22 04:15:45 +00:00
Mark Andrews
f10e90ebb4 1182. [bug] The server could throw an assertion failure when
constructing a negative response packet.
2002-01-21 22:27:03 +00:00
Mark Andrews
73442acbe7 rndc-keygen -> rndc-confgen [RT #2362] 2002-01-16 03:47:23 +00:00
Mark Andrews
4099c201ff whitespace cleanup 2001-12-19 01:29:35 +00:00
Mark Andrews
6cb12c44a3 pullup:
fix large DH key generation, hopefully for the last time.
2001-12-19 01:09:58 +00:00
Andreas Gustafsson
b31471255d pullup: correct Latin plural 2001-12-14 18:30:09 +00:00
Mark Andrews
7caf656a15 pullup:
1162.   [bug]           The allow-notify option was not accepted in slave
                        zone statements.
2001-12-13 06:50:59 +00:00
Mark Andrews
5fc932977a pullup:
check that allow-notify is only specified for slave zones
2001-12-13 06:47:48 +00:00
Brian Wellington
fefd6c28ab 1161. [bug] named-checkzone looped on unbalanced brackets.
[RT #2248]
2001-12-13 06:17:34 +00:00
Mark Andrews
6124a262fa pullup:
1160.   [bug]           Generating Diffie-Hellman keys longer than 1024
                        bits could fail. [RT #2241]
2001-12-12 17:05:20 +00:00
Mark Andrews
21b1491aa2 pullup:
1154.  [bug]           Don't attempt to obtain the netmask of a interface
                       if there is no address configured.  [RT #2176]
2001-12-12 00:16:47 +00:00
Mark Andrews
f3cee71ee5 regen 2001-12-05 02:30:08 +00:00
Mark Andrews
d25f6fac98 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:28:37 +00:00
Andreas Gustafsson
700847b76c spelling 2001-11-30 01:10:09 +00:00
Andreas Gustafsson
b90dc3fc6a regenerated 2001-11-29 22:56:39 +00:00
Andreas Gustafsson
6b53351ce2 pullup: clarified the meaning of * in an inet controls clause [RT #2073] 2001-11-29 22:55:52 +00:00
Andreas Gustafsson
4463c6f19e reference RT #2164 2001-11-29 18:34:23 +00:00
Andreas Gustafsson
fa85eab969 belated pullup:
125.   [bug]           rndc: -k option was missing from usage message.
                        [RT #2057]
2001-11-28 23:37:50 +00:00
Andreas Gustafsson
3a8943b2d2 regenerated 2001-11-28 23:35:49 +00:00
Andreas Gustafsson
790f33c772 belated pullup:
1124.   [doc]           dig: +[no]dnssec, +[no]besteffort and +[no]fail
                        now documented. [RT #2052]
2001-11-28 23:35:02 +00:00
Andreas Gustafsson
c9114f35c0 belated pullup:
1123.   [bug]           dig +[no]fail did not match description. [RT #2052]
2001-11-28 23:29:13 +00:00
Andreas Gustafsson
6c8ae8b9ef pullup:
1144.   [bug]           rndc-confgen would crash if both the -a and -t
                        options were specified. [RT #2159]
2001-11-28 21:51:51 +00:00
Mark Andrews
9dfa8979a7 The dig help message did not documents the -b, -k, and +noqr options,
and some options were less than logically grouped [RT #2151]
2001-11-28 04:35:14 +00:00
Mark Andrews
d486854a4a order 2001-11-28 02:52:25 +00:00
Mark Andrews
c14c7e14cd pullup:
1140.   [bug]           rndc-confgen did not accept IPv6 addresses as arguments
                        to the -s option. [RT #2138]
2001-11-28 01:58:18 +00:00
Andreas Gustafsson
ed37e8811a end sentence in period 2001-11-28 01:37:44 +00:00
Andreas Gustafsson
eacbf2cc01 pullup:
shutup bogus ambiguous else compiler warning.
2001-11-27 23:21:56 +00:00
Andreas Gustafsson
e8c4b14cde pullup:
1142.   [bug]           dnssec-signzone would fail to delete temporary files
                        in some failure cases. [RT #2144]
2001-11-27 22:41:49 +00:00
Andreas Gustafsson
72ad976640 pullup:
1141.   [bug]           When named rejected a control message, it would
                        leak a file descriptor and memory.  It would also
                        fail to respond, causing rndc to hang. [RT #2139]
2001-11-27 22:38:14 +00:00
Andreas Gustafsson
189dcca2c9 success on Debian GNU/Linux 2.2 and 3.0 reported by Bdale Garbee <bdale@gag.com> 2001-11-27 20:23:33 +00:00
Andreas Gustafsson
e15532f8c6 regenerated 2001-11-27 18:58:03 +00:00
Andreas Gustafsson
462b062d7f pullup: command example was missing TTL (reported in private email by Bdale Garbee <bdale@gag.com>) 2001-11-27 18:57:40 +00:00
Mark Andrews
0797eebc66 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:43:06 +00:00
Andreas Gustafsson
8f4ecd4a9e updated for 9.2.0 (final) 2001-11-25 01:38:13 +00:00
Mark Andrews
402313b3db pullup:
1134.   [bug]           Multithreaded servers could deadlock in ferror()
                        when reloading zone files. [RT #1951, #1998]
2001-11-22 01:23:19 +00:00
Andreas Gustafsson
887c9d05c2 pullup:
1133.   [bug]           IN6_IS_ADDR_LOOPBACK was not portably defined on
                        platforms without IN6_IS_ADDR_LOOPBACK. [RT #2106]
2001-11-22 00:22:02 +00:00
Andreas Gustafsson
8733f0d86c include 1121. - 1131. in 9.2.0rc10; retag 2001-11-16 21:52:55 +00:00
Brian Wellington
25fd0feeea 1121. [bug] The server could attempt to access a NULL zone
table if shut down while resolving.
			[RT #1587, #2054]
2001-11-16 21:47:27 +00:00
Brian Wellington
04999a9c03 pullup:
1131.   [bug]           The match-destinations view option did not work with
                        IPv6 destinations. [RT #2073, #2074]
2001-11-16 21:21:42 +00:00
Andreas Gustafsson
1e1f1edb7d pullup:
130.   [bug]           Log messages reporting an out-of-range serial number
                        did not include the out-of-range number but the
                        following token. [RT #2076]
2001-11-16 19:00:37 +00:00
Mark Andrews
fefab489c7 pullup:
1129.   [bug]           Multithreaded servers could crash under heavy
                        resolution load due to a race condition. [RT #2018]
2001-11-16 11:04:38 +00:00
Mark Andrews
913e3def6d pullup:
extra text after #else
2001-11-15 06:21:38 +00:00
Mark Andrews
5b477dd3b9 1126. [bug] The server could access a freed event if shut
down while a client start event was pending
                        delivery. [RT #2061]
2001-11-15 02:51:46 +00:00
Mark Andrews
309979a136 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:24:21 +00:00
Mark Andrews
fc67f3e0e3 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:35:17 +00:00
Andreas Gustafsson
abbc8ed09b added FAQ about rndc attempting to use IPv6 2001-11-14 17:59:10 +00:00
Andreas Gustafsson
0258aea36c added --- 9.2.0rc10 released --- marker 2001-11-13 19:51:11 +00:00
Andreas Gustafsson
2ce3018081 consistent spacing; tabify 2001-11-13 19:07:03 +00:00
Andreas Gustafsson
b8b17a7732 regenerated 2001-11-13 19:04:20 +00:00
Andreas Gustafsson
ac81ee4d14 updated for 9.2.0rc10 2001-11-13 19:00:51 +00:00
Andreas Gustafsson
63d380e078 pullup:
1116.   [bug]           Setting transfers in a server clause, transfers-in,
                        or transfers-per-ns to a value greater than
                        2147483647 disabled transfers.  [RT #2002]
(Technically, this is an API change, but since it only changes the signedness of some
function parameters, it is still binary compatible in practice and I'll let it slip
by without bumping the major library version number)
2001-11-13 18:57:14 +00:00
Andreas Gustafsson
46879265d7 pullup:
1120.   [bug]           Errors in options were not fatal. [RT #2002]
2001-11-13 18:36:04 +00:00
Mark Andrews
29d7ef1bca cleanup allow-update-forwarding. 2001-11-13 02:52:10 +00:00
Andreas Gustafsson
80c7cf7e5d pullup:
1113.   [bug]           The allow-update-forwarding option was ignored
                        when specified in a view. [RT #2014]
2001-11-13 01:15:33 +00:00
Mark Andrews
be7d7a6638 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:05 +00:00
Mark Andrews
d0b2beb93d 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:28:30 +00:00
Mark Andrews
6358746e6f regen 2001-11-10 15:15:33 +00:00
Mark Andrews
4a2df0557c pullup:
1117.   [port]          The configure check for in6addr_loopback incorrectly
                        succeeded on AIX 4.3 when compiling with -O2
                        because the test code was optimized away.
                        [RT #2016]
2001-11-10 15:14:01 +00:00
Mark Andrews
014f9142bc pullup:
1114.   [port]          Ignore more accept() errors. [RT #2021]
2001-11-10 03:03:44 +00:00
Andreas Gustafsson
d76ac5ddfd pullup:
install soa.h
2001-11-09 23:17:17 +00:00
Andreas Gustafsson
b5c8773673 pullup:
theoretically potential file descriptor leak.
2001-11-09 20:21:41 +00:00
Andreas Gustafsson
3700c88538 regenerated 2001-11-08 00:15:41 +00:00
Andreas Gustafsson
8b672d6342 pullup:
note that the +[no]cmd option cannot be overridden on a per-query
> basis [RT #2004]
2001-11-08 00:15:23 +00:00
Andreas Gustafsson
15491d8b1f regenerated 2001-11-07 19:08:32 +00:00
Andreas Gustafsson
c529637d60 typo 2001-11-07 19:07:29 +00:00
Andreas Gustafsson
d35b058b31 include 1106. and 1107. in rc9 2001-11-07 01:02:14 +00:00
Andreas Gustafsson
364da4eb0f note that HP-UX 11.11 is not yet supported due to its incompatible SIOCGLIFCONF ioctl 2001-11-06 22:30:24 +00:00
Brian Wellington
26c8b645f8 pullup:
1107.   [bug]           nsupdate could catch an assertion failure if an
			invalid domain name was given as the argument to
			the "zone" command.
2001-11-06 21:50:35 +00:00
Andreas Gustafsson
d8c1b06854 pullup:
memory leaks on errors
2001-11-06 20:44:26 +00:00
Andreas Gustafsson
98c08f4dbe pullup:
1106.   [bug]           After seeing an out of range TTL, nsupdate would
                        treat all TTLs as out of range. [RT #2001]
2001-11-06 20:42:01 +00:00
Andreas Gustafsson
fb17fdbd0e pullup:
cvs rdiff -r1.89 -r1.90 bind9/lib/dns/sec/dst/dst_api.c
2001-11-06 19:24:08 +00:00
Andreas Gustafsson
19c189b7a3 miscellaneous corrections 2001-11-06 01:57:19 +00:00
Andreas Gustafsson
2cd386a02f typo 2001-11-06 01:40:06 +00:00
Andreas Gustafsson
d8389bdac5 "a number of bugs", not "a couple of bugs" 2001-11-05 23:48:46 +00:00
Andreas Gustafsson
abe885e016 regenerated 2001-11-05 23:47:05 +00:00
Andreas Gustafsson
d3d785705a split dns example comments confused master and slave;
text about 'mandatory to implement' algorithms made no sense
2001-11-05 23:46:21 +00:00
Andreas Gustafsson
ad923a3d6f regenerated 2001-11-05 23:25:11 +00:00
Mark Andrews
035ef37ffa pullup:
grammar summary output for named maps was missing the name field
2001-11-05 23:22:21 +00:00
Andreas Gustafsson
f38324fe6c typos 2001-11-05 22:56:49 +00:00
Andreas Gustafsson
67308c2197 regenerated 2001-11-05 22:54:41 +00:00
Andreas Gustafsson
93ca4b367d spelling 2001-11-05 22:50:03 +00:00
Andreas Gustafsson
bcf3845c01 include 1103-1104 in rc9 2001-11-05 22:00:48 +00:00
Brian Wellington
a0e8772150 pullup:
don't try to insert the nonexistent file lib/bind/COPYRIGHT into configure
2001-11-05 21:42:51 +00:00
Andreas Gustafsson
e81b4c677b regenerated 2001-11-05 21:28:35 +00:00
Brian Wellington
9476a30889 pullup:
1104.   [bug]           Invalid arguments to the transfer-format option
                        could cause an assertion failure. [RT #1995]
(+ don't say "'foo' unexpected near 'foo'" - once is enough)
2001-11-05 20:21:54 +00:00
Andreas Gustafsson
639fef047e pulled up latest FAQ list from mainline 2001-11-05 18:01:16 +00:00
Mark Andrews
ec5ff01338 1103. [port] OpenUNIX 8 support (ifconfig.sh). [RT #1970] 2001-11-05 04:29:35 +00:00
Andreas Gustafsson
c5f432d9c2 pullup:
typo in debug message [RT #1989]
2001-11-04 19:21:50 +00:00
Andreas Gustafsson
8dda8ff186 pullup:
1087.   [bug]           libbind: struct __res_state to large on 64 bit arch.
(including later fix known as change 1284 in BIND 8)
2001-11-03 00:21:34 +00:00
Andreas Gustafsson
adcfb59d04 regenerated 2001-11-02 22:54:18 +00:00
Andreas Gustafsson
75c43836c1 removed empty line as an excuse for making
another commit so that I can note that the commit message
of the previous commit should have been:
pullup:
silence compiler the same way
2001-11-02 22:31:14 +00:00
Andreas Gustafsson
7752f1112e pullup:
CHANGES lib/bind/dst/dst_api.c lib/bind/dst/support.c
trebuchet ~/9.2 $ cvs commit -mpullup:
2001-11-02 22:26:21 +00:00
Andreas Gustafsson
148fd45777 pullup:
1100.   [bug]           libbind: DNSSEC key ids were computed incorrectly.
2001-11-02 22:25:29 +00:00
Andreas Gustafsson
c7443ec439 pullup:
1099.   [cleanup]       libbind: defining REPORT_ERRORS in lib/bind/dst caused
                        compile time errors.
2001-11-02 21:38:18 +00:00
Andreas Gustafsson
2f65d19e93 pullup:
1098.   [bug]           libbind: HMAC-MD5 key files are now mode 0600.
2001-11-02 21:35:30 +00:00
Andreas Gustafsson
6cb735c864 pullup:
spelling and order
2001-11-02 21:32:52 +00:00
Andreas Gustafsson
ad7a535899 pullup:
1093.   [doc]           libbind: miscellaneous nroff fixes.
2001-11-02 21:06:16 +00:00
Andreas Gustafsson
84189fe5ad pullup:
1092.   [bug]           libbind: get*by*() failed to check if res_init() had
                        been called.
2001-11-02 20:55:24 +00:00
Andreas Gustafsson
b15ba3f20d pullup:
1091.   [bug]           libbind: misplaced va_end().
2001-11-02 20:45:32 +00:00
Andreas Gustafsson
a3a89d7c36 pullup:
1090.   [bug]           libbind: dns_ho.c:add_hostent() was not returning
                        the amount of memory consumed resulting in garbage
                        address being returned.  Alignment calculations were
                        wasting space.  We wern't suppressing duplicate
                        addresses.
2001-11-02 20:35:28 +00:00
Andreas Gustafsson
6c87ddb75d pullup:
1088.   [port]          libbind: MPE/iX C.70 (incomplete)
2001-11-02 20:12:58 +00:00
Andreas Gustafsson
aa224791dd pullup:
1086.   [port]          libbind: sunos: old sprintf.
2001-11-02 17:56:07 +00:00
Andreas Gustafsson
73865279b1 regenerated 2001-11-02 17:46:16 +00:00
Andreas Gustafsson
cad0e68589 pullup:
1085.   [port]          libbind: solaris: sys_nerr and sys_errlist do not
                        exist when compiling in 64 bit mode.
2001-11-02 17:45:31 +00:00
Andreas Gustafsson
513fe0ca30 regenerated 2001-11-02 02:20:35 +00:00
Andreas Gustafsson
a7757e30aa pullup:
1102.   [doc]           Note that query logging is enabled by directing the
                        queries category to a channel.
2001-11-02 02:16:48 +00:00
Andreas Gustafsson
540f27d8bc pullup:
1101.   [bug]           Array bounds read error in lwres_gai_strerror.
2001-11-02 01:32:53 +00:00
Mark Andrews
4e07f65d62 regen 2001-11-02 00:21:34 +00:00
Mark Andrews
c78ef9f491 pullup:
Deal with AIX defining in6addr_any but not in6addr_loopback
in libc, even though both are declared in <netinet/in.h>.  This caused
named to fail to link on AIX after change 1083, which introduced
the first actual use of in6addr_loopback.
2001-11-02 00:20:12 +00:00
Andreas Gustafsson
50d93bb5f8 pullup:
1084.   [cleanup]       libbind: gai_strerror() rewritten.
2001-11-01 19:00:47 +00:00
Mark Andrews
e301648774 pullup:
In several places, dighost.c called cancel_lookup() and then called
requeue_lookup() on the canceled lookup.  Because cancel_lookup()
resets the retry count of the lookup to zero, the requeued lookups
would not be retried at all (for example, in the case of UDP NS
queries executed when doing "dig +search") or, in the case of TCP
queries, retried indefinitely since the unsigned retry count of zero
was subsequently decremented, causing it to wrap around to the largest
unsigned integer value.
2001-10-31 23:04:26 +00:00
Mark Andrews
1260bf0573 pullup:
1083.   [bug]           The default control channel listened on the
                        wildcard adress, not the loopback as documented.
                        [RT #1975]
2001-10-31 23:00:44 +00:00
Mark Andrews
bdbaee5cfc 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:44:15 +00:00
Andreas Gustafsson
8ced0871d2 regenerated 2001-10-30 20:30:56 +00:00
Andreas Gustafsson
6032e43f38 mark the memstatistics-file option as unimplemented (on 9.2
branch only, since it is implemented on the mainline) [RT #1972]
2001-10-30 20:30:33 +00:00
Andreas Gustafsson
219a694aca success reported for OpenUNIX 8 2001-10-30 18:22:21 +00:00
Andreas Gustafsson
3c76e82a76 pullup:
1078.  [bug]           We failed to correct bad tv_usec values in one case.
                       [RT #1966]
2001-10-30 17:57:52 +00:00
Andreas Gustafsson
6a1e7c8565 updated for 9.2.0rc9 2001-10-30 02:14:10 +00:00
Mark Andrews
5e8d4ff0bf pullup:
1074.   [bug]           Running out of memory in dump_rdataset() could
                        cause an assertion failure. [RT #1946]
2001-10-30 01:57:16 +00:00
Mark Andrews
e169fd331c pullup:
AXFRs were misidentified as AXFR-style IXFRs in log messages
2001-10-30 01:28:29 +00:00
Mark Andrews
58fbc62a4a pullup:
running out of memory during ns_client_t construction could crash server
[RT #409]
2001-10-30 01:12:34 +00:00
Andreas Gustafsson
a504607ef1 pullup:
1076.   [bug]           A badly defined global key could trigger an assertion
                        on load/reload if views were used. [RT #1947]
2001-10-29 20:18:48 +00:00
Mark Andrews
74ceb7b203 1075. [bug] Out-of-range network prefix lengths were not
reported. [RT #1954]
2001-10-28 22:48:33 +00:00
Andreas Gustafsson
449733f214 note that the localhost and localnets ACLs do not currently support IPv6 2001-10-24 23:00:51 +00:00
Andreas Gustafsson
94f960b541 added --- 9.2.0rc8 released --- marker 2001-10-23 17:21:27 +00:00
Andreas Gustafsson
381f821556 updated for 9.2.0rc8 2001-10-23 17:06:33 +00:00
Mark Andrews
3a0f5543c9 pullup:
some variables that should have been static weren't
2001-10-23 02:42:00 +00:00
Mark Andrews
8153dde6c8 pullup:
eliminated race condition in water() [RT #1932]
2001-10-23 01:31:08 +00:00
Andreas Gustafsson
fa52840ac8 pullup: silence compiler warning 2001-10-22 23:52:19 +00:00
Andreas Gustafsson
85939fa773 regenerated 2001-10-22 23:36:00 +00:00
Andreas Gustafsson
5a78ccdf1f pullup:
1068.   [bug]           errno could be overwritten by catgets(). [RT #1921]
1066.   [bug]           Provide a thread safe wrapper for strerror().
                        [RT #1689]
(Also some changes to configure.in, config.h.in, and acconfig.h that were
necessary to allow config.h.in to be correctly regenerated with the
HAVE_STRERROR definition needed by 1066.)
2001-10-22 23:28:26 +00:00
Andreas Gustafsson
7209c50da4 pullup:
1064.   [bug]           Do not shut down active network interfaces if we
                        are unable to scan the interface list. [RT #1921]
2001-10-22 17:42:05 +00:00
Andreas Gustafsson
0ae6a5f852 pullup:
1063.   [bug]           libbind: "make install" was failing on IRIX.
(lib/bind/port/irix/include/paths.h was pulled up by tagging)
2001-10-22 17:00:49 +00:00
Brian Wellington
e94a2fdd30 pullup:
1062.	[bug]		If the control channel listener socket was shut
			down before server exit, the listener object could
			be freed twice. [RT #1916]
2001-10-19 22:29:08 +00:00
Mark Andrews
2ef5add037 remove EXCLUDED when kitting. 2001-10-19 01:23:23 +00:00
Mark Andrews
bada421314 Initial file (empty). 2001-10-19 01:22:27 +00:00
Mark Andrews
c65bd9be83 pullup:
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]
2001-10-19 00:22:26 +00:00
Mark Andrews
7a89c23c2d 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:35:20 +00:00
Andreas Gustafsson
6ca3f52bee pullup:
1056.   [bug]           Rndc could catch an assertion failure on SIGINT due
                        to an uninitialized variable. [RT #1908]
2001-10-17 18:26:01 +00:00
Andreas Gustafsson
c535e67633 include 1054. in 9.2.0rc7 2001-10-16 18:54:41 +00:00
Andreas Gustafsson
05cd9da1d8 consistently refer to Windows NT / 2000 systems as Win32 2001-10-16 18:54:07 +00:00
Mark Andrews
ec95dac291 pullup:
1054.   [bug]           winnt: cfg_categories and cfg_modules need to be
                        visible outside of the libisccfg DLL.
2001-10-16 05:58:29 +00:00
Andreas Gustafsson
3b3d01b318 added --- 9.2.0rc7 released --- marker 2001-10-15 23:09:16 +00:00
Brian Wellington
0e71bf20df pullup:
1053.   [bug]           Dig did not increase its timeout when receiving
                        AXFRs unless the +time option was used. [RT #1904]
2001-10-15 23:06:07 +00:00
Andreas Gustafsson
106423c056 regenerated 2001-10-15 21:58:57 +00:00
Andreas Gustafsson
6812f56fa2 pullup:
mention [filename] in the help.
2001-10-15 20:25:57 +00:00
Andreas Gustafsson
f3c187e0c7 pullup: check-zone -> named-checkzone (from Jinmei) 2001-10-15 18:21:25 +00:00
Andreas Gustafsson
fe6a60a7c3 consistent spacing 2001-10-15 17:10:14 +00:00
Mark Andrews
a1a06d7854 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 04:57:51 +00:00
Mark Andrews
7ce9f2dbe8 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 03:56:44 +00:00
Mark Andrews
267d8eb613 pullup:
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]
2001-10-13 03:52:13 +00:00
Andreas Gustafsson
e31320a1d0 updated for 9.2.0rc7 2001-10-12 23:34:24 +00:00
Andreas Gustafsson
5cb1e19b03 pullup:
don't assume perl is in the path
2001-10-12 20:12:07 +00:00
Andreas Gustafsson
23b81eeddd pullup:
the tkey test would randomly fail due to key IDs with a leading
zero being interpreted as octal numbers
2001-10-12 20:11:43 +00:00
Andreas Gustafsson
31da643c6a pullup:
1033.   [bug]           Always respond to requests with an unsupported opcode
                        with NOTIMP, even if we don't have a matching view
                        or cannot determine the class.
2001-10-12 19:14:47 +00:00
Andreas Gustafsson
dd0319d149 1047. [bug] named was incorrectly refusing all requests signed
with a TSIG key derived from an unsigned TKEY
                        negotiation with a NOERROR response. [RT #1886]
2001-10-12 18:20:14 +00:00
Andreas Gustafsson
315eafec07 pullup:
1039.   [bug]           Negative responses with CNAMEs in the answer section
                        were cached incorrectly. [RT #1862]
2001-10-12 17:49:41 +00:00
Mark Andrews
a4fbe403e4 pullup:
1048.   [bug]           Servers built with -DISC_MEM_USE_INTERNAL_MALLOC=1
                        didn't work.
2001-10-12 01:17:37 +00:00
Mark Andrews
a3ed377607 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:05:51 +00:00
Andreas Gustafsson
29ca9003a5 use "oldconfig", not "_placeholder" as the name of the
obsolete DNS_LOGCATEGORY_CONFIG logging category, to lessen confusion in
case someone links a 9.2.0-pre-rc7 binary against an rc7 or newer shared
library
2001-10-11 23:07:00 +00:00
Andreas Gustafsson
85532057dc regenerated 2001-10-11 17:45:49 +00:00
Andreas Gustafsson
86457878fd pullup:
1046.   [bug]           The help message for the --with-openssl configure
                        option was inaccurate. [RT #1880]
2001-10-11 17:45:35 +00:00
Andreas Gustafsson
7779b6cbf6 pullup:
1045.   [bug]           It was possible to skip saving glue for a nameserver
                        for a stub zone.
2001-10-11 17:20:40 +00:00
Andreas Gustafsson
ac5c31df78 1044. [bug] Specifying allow-transfer, notify-source, or
notify-source-v6 in a stub zone was not treated
                        as an error.
2001-10-11 17:19:40 +00:00
Andreas Gustafsson
e370391b5e pullup:
1044.   [bug]           Specifying allow-transfer, notify-source, or
                        notify-source-v6 in a stub zone was not treated
                        as an error.
2001-10-11 17:12:42 +00:00
Mark Andrews
329fd2fe75 pullup:
1043.   [bug]           Specifying a transfer-source or transfer-source-v6
                        option in the zone statement for a master zone was
                        not treated as an error. [RT #1876]
2001-10-11 03:31:04 +00:00
Mark Andrews
8002894e6e pullup:
1042.   [bug]           The "config" logging category did not work properly.
                        [RT #1873]
2001-10-11 02:03:23 +00:00
Mark Andrews
890db7ab7d 1041. [bug] Dig/host/nslookup could catch an assertion failure
on SIGINT due to an uninitialized variable. [RT #1867]
2001-10-11 01:35:37 +00:00
Mark Andrews
9e3fe84689 pullup:
1040.   [bug]           Multiple listen-on-v6 options with different ports
                        were not accepted. [RT #1875]
2001-10-11 01:20:31 +00:00
Andreas Gustafsson
f6bcdffe6d Q: Why don't my zones reload when I do an "rndc reload" or SIGHUP? 2001-10-10 23:25:55 +00:00
Andreas Gustafsson
55ab8cebff qualify 1038. 2001-10-09 23:08:30 +00:00
Andreas Gustafsson
ae62248c8a pullup:
1038.   [bug]           TKEY queries with an owner name other than the root
                        could cause an assertion failure. [RT #1866, #1869]
2001-10-09 23:06:57 +00:00
Andreas Gustafsson
96bc10707a pullup:
on plaforms with no gettimeofday(), use struct _TIMEZONE instead of
struct timezone
2001-10-09 00:51:07 +00:00
Andreas Gustafsson
c7302ffd98 pullup:
1031.   [bug]           libbind.a: isc__gettimeofday() infinite recursion.
                        [RT #1858]
2001-10-08 18:10:57 +00:00
Andreas Gustafsson
1d19dc5411 added --- 9.2.0rc6 released --- marker 2001-10-05 23:04:04 +00:00
Brian Wellington
818d9fec02 pullup:
Improve error messages printed by dnssec tools when compiled
without crypto support (patch from Olafur)
2001-10-05 00:21:48 +00:00
Brian Wellington
41ea62ace5 pullup:
1030.   [bug]           On systems with no resolv.conf file, nsupdate
			exited with an error rather than defaulting
			to using the loopback address. [RT #1836]
2001-10-05 00:17:08 +00:00
Andreas Gustafsson
a325a8cbed pullup:
make prototype of get_reverse() match the code
2001-10-04 22:21:45 +00:00
Andreas Gustafsson
e17d517a93 pullup:
1028.   [bug]           On Win32, dig/host/nslookup looked for resolv.conf
                        in the wrong directory. [RT #1833]
2001-10-04 22:05:30 +00:00
Andreas Gustafsson
f5b3693207 pullup:
1029.   [bug]           Some named.conf errors did not cause the loading
                        of the configuration file to return a failure
                        status even though they were logged. [RT #1847]
2001-10-04 21:32:29 +00:00
Andreas Gustafsson
2616068121 1026. [port] Recognize OpenUNIX 8 in config.guess. [RT #1830]
(9.2 branch only, fixed by upgrading config.guess on mainline)
(commit on the right branch this time)
2001-10-04 20:59:03 +00:00
Andreas Gustafsson
4e9291c48b pullup:
the wrong result code was checked [RT #1847]
2001-10-04 19:43:06 +00:00
Andreas Gustafsson
07aa5a2c61 updated for 9.2.0rc6 2001-10-03 23:24:01 +00:00
Andreas Gustafsson
1550dcfff2 1027. [bug] RRs having the reserved type 0 should be rejected.
[RT #1471]
2001-10-03 22:49:00 +00:00
Andreas Gustafsson
b8e65dbc1e 1026. [port] Recognize OpenUNIX 8 in config.guess. [RT #1830]
(9.2 branch only, fixed by upgrading config.guess on mainline)
2001-10-03 22:48:38 +00:00
Andreas Gustafsson
a1d2958b24 pullup:
1022.   [bug]           Don't report empty root hints as "extra data".
                        [RT #1802]
2001-10-03 22:31:19 +00:00
Andreas Gustafsson
de32eba8a8 unverified report of success on OpenBSD 2.9 2001-10-03 17:27:01 +00:00
Mark Andrews
8f534756ca Disallow creation of TYPE0 records from wire data 2001-10-03 02:07:34 +00:00
Mark Andrews
2d4f039432 Disallow creation of TYPE0 records from master files, since the server
reserves type 0 for internal purposes related to negative caching
2001-10-03 02:05:25 +00:00
Andreas Gustafsson
23438327a1 added BSD/OS 4.2 to list of unverified reports of success (from Jim) 2001-10-01 23:21:47 +00:00
Andreas Gustafsson
064fadaa40 pullup:
added bind9->win2k zone transfer failure FAQ
2001-10-01 22:00:50 +00:00
Andreas Gustafsson
1ebadd777b pullup:
1021.   [bug]           On Win32, log message timestamps were one month
                        later than they should have been, and the server
                        would exhibit unspecified behavior in December.
2001-10-01 01:42:38 +00:00
Andreas Gustafsson
febc2e8db5 added --- 9.2.0rc5 released --- marker 2001-09-29 18:26:41 +00:00
Andreas Gustafsson
90787e192c and and 2001-09-29 17:43:42 +00:00
Andreas Gustafsson
4f3d12c632 clarified 1002. 2001-09-29 17:36:23 +00:00
Andreas Gustafsson
4748473739 the word "argument" was misspelled in several places 2001-09-29 00:15:05 +00:00
Brian Wellington
d65168b7a7 pullup:
1020.	[bug]		IXFR log messages did not distinguish between
			true IXFRs, AXFR-style IXFRs, and and mere
			version polls. [RT #1811]
2001-09-28 22:07:12 +00:00
Andreas Gustafsson
7c91a38c54 updated for 9.2.0rc5 2001-09-28 21:42:15 +00:00
Brian Wellington
4b09cca4b9 pullup:
1018.   [bug]           The default log channel was not always initialized
                        correctly. [RT #1813]
2001-09-28 18:35:02 +00:00
Mark Andrews
a4e8b19b83 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:35:47 +00:00
Andreas Gustafsson
041153229d pullup:
1017.   [bug]           When specifying TSIG keys to dig and nsupdate using
                        the -k option, they must be HMAC-MD5 keys.  [RT #1810]
2001-09-27 23:30:49 +00:00
Andreas Gustafsson
c3312fd9d0 pullup:
dns_tsigkey_createfromkey wasn't checking that the key algorithm matched the
key name.
2001-09-27 23:17:10 +00:00
Andreas Gustafsson
538bbefb23 pullup:
clarified the connection between DNSSEC, crypto support,
and OpenSSL [RT #1805]
2001-09-27 01:13:35 +00:00
Mark Andrews
3f4c95eb98 SunOS 5.6 portability 2001-09-27 00:44:26 +00:00
Mark Andrews
d30fcb907b 1016. [bug] Slave zones with no backup file were re-transferred
on every server reload.
2001-09-26 03:43:00 +00:00
Mark Andrews
d924384f72 1015. [bug] Log channels that had a "versions" option but no
"size" option failed to create numbered log
                       files. [RT #1783]
2001-09-26 02:52:09 +00:00
Andreas Gustafsson
4632c084a6 missing comma in last pullup [RT #1780] 2001-09-21 23:18:45 +00:00
Andreas Gustafsson
43022c8c8f added --- 9.2.0rc4 released --- marker 2001-09-21 22:17:50 +00:00
Andreas Gustafsson
1d89523b69 pullup:
1000.   [bug]           BIND 8 compatibility: accept "HESIOD" as a alias
                        for class "HS".  [RT #1759]
2001-09-21 20:46:35 +00:00
Andreas Gustafsson
4fdcaf0cc7 redo pullup:
1013.   [bug]           It was possible to cancel a query twice when marking
                        a server as bogus or by having a blackhole acl.
                        [RT #1776]
2001-09-21 20:40:06 +00:00
Andreas Gustafsson
7e470ba93b oops, previous commit included other stuff in addition to the
intended pullup; reverting it
2001-09-21 20:37:09 +00:00
Andreas Gustafsson
a9617effd0 pullup:
1002.   [bug]           Log unknown class including file and line.  [RT #1759]
2001-09-21 20:30:32 +00:00
Andreas Gustafsson
1716d085b1 updated for 9.2.0rc4 2001-09-21 20:27:46 +00:00
Andreas Gustafsson
f0f9aa979b pullup:
1013.   [bug]           It was possible to cancel a query twice when marking
                        a server as bogus or by having a blackhole acl.
                        [RT #1776]
2001-09-21 18:50:46 +00:00
Andreas Gustafsson
0617eaff38 pulled up 2001-09-21 17:49:58 +00:00
Mark Andrews
9cdfffc7ce pullup:
controls->shuttingdown should not be set on server reload.
2001-09-21 03:31:17 +00:00
Mark Andrews
b21236d838 redo #1010 2001-09-21 00:28:58 +00:00
Mark Andrews
7a74126eb8 undo 2001-09-21 00:28:05 +00:00
Mark Andrews
9f89b34f4d pullup:
1010.   [bug]           The server could attempt to execute a command channel
                        command after initiating server shutdown, causing
                        an assertion failure. [RT #1766]
2001-09-20 23:01:44 +00:00
Andreas Gustafsson
66ed65d1b7 regenerated 2001-09-19 22:18:24 +00:00
Andreas Gustafsson
dea6647faa pullup: document the global provide-ixfr and request-ixfr options [RT #1772] 2001-09-19 22:16:57 +00:00
Brian Wellington
a25169ea43 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:51:42 +00:00
Mark Andrews
99a0822e3c pullup:
1005.   [bug]           Don't copy nonzero RCODEs from request to response.
                        [RT #1765]
2001-09-19 02:44:00 +00:00
Mark Andrews
5e8c385e64 pullup:
1004.  [port]          Deal with recvfrom() returning EHOSTDOWN. [RT #1770]
2001-09-19 02:37:21 +00:00
Andreas Gustafsson
0375d5da0c pullup:
'dig +short' should explicitly enable printing the answer section.
Otherwise, 'dig +noall +short' prints nothing.
2001-09-18 01:04:05 +00:00
Andreas Gustafsson
94c8b1aa0f pullup:
doio_recv was not catching a ECONNRESET error. Fixed this and added code to catch other possible errors. Miscellaneous errno handling cleanup [RT #1745]
2001-09-17 22:28:57 +00:00
Andreas Gustafsson
2fddd0b746 use ifconfig.sh up, not ifconfig.sh start, to be
consistent with the ifconfig.sh usage message [RT #1758]
2001-09-17 21:43:09 +00:00
Andreas Gustafsson
b40cb80704 pulled up Brian's latest FAQ fixes 2001-09-17 20:41:34 +00:00
Andreas Gustafsson
62f58f434c note that ifconfig.sh must be run as root 2001-09-17 20:34:28 +00:00
Andreas Gustafsson
b2eeaf6500 pull up part of 997.:
ISC_R_SUCCESS could be returned on failure
2001-09-15 00:37:18 +00:00
Andreas Gustafsson
8be3f42f6b it's contrib/linux/coredump-patch, not bind9/linux/coredump-patch 2001-09-14 21:23:29 +00:00
Andreas Gustafsson
63fe5ccb87 regenerated 2001-09-14 20:29:50 +00:00
Andreas Gustafsson
be2d2c1599 pullup:
replaced 'List the keys included in the keyset file' by
'The list of keys to be included in the keyset file', as
suggested by <Jason.Fountain@compaq.com>
2001-09-14 20:29:32 +00:00
Andreas Gustafsson
f8baa72034 updated for 9.2.0rc3 2001-09-12 21:11:27 +00:00
Andreas Gustafsson
5de2109e1c pullup:
A message could be leaked when a segment of an incoming zone transfer
failed to verify.
2001-09-12 20:44:04 +00:00
Andreas Gustafsson
67adc92106 pullup:
fix a memory leak on a tsig error condition.
2001-09-12 00:15:11 +00:00
Andreas Gustafsson
625aae0fba this should have a CHANGES entry since several people reported it:
990.   [bug]           The rndc-confgen man page was not installed.
2001-09-11 23:40:32 +00:00
Andreas Gustafsson
1015c4cdea pullup:
989.   [bug]           Report filename if $INCLUDE fails for file related
                        errors. [RT #1736]
2001-09-11 23:32:55 +00:00
Andreas Gustafsson
c54833a8e9 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:37:48 +00:00
Andreas Gustafsson
976dd45973 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:07 +00:00
Andreas Gustafsson
783cf0d73d 984. [bug] Multithreading should be enabled by default on
Solaris 2.7 and newer, but it wasn't.
2001-09-10 19:44:50 +00:00
Andreas Gustafsson
928d42e559 regenerated 2001-09-10 18:59:41 +00:00
Andreas Gustafsson
deb2c2ffab pullup:
It's *solaris2.x* not *solaris-2.x*
2001-09-10 18:59:31 +00:00
Andreas Gustafsson
0363b921c9 pullup:
install rndc-confgen.8
2001-09-07 16:46:11 +00:00
Mark Andrews
ae35d154ce pullup:
host-statistics is not implemented,
maintain-ixfr-base is obsolete [RT #1717]
2001-09-06 23:06:43 +00:00
Andreas Gustafsson
d5dbfd6f17 tabified 2001-09-06 17:04:04 +00:00
Andreas Gustafsson
ad8c0c65aa 980. will be in 9.2.0rc2 2001-09-06 17:03:46 +00:00
Mark Andrews
42b48b7156 pullup:
Added Warning Note regarding resolv.conf file
2001-09-06 05:31:02 +00:00
Mark Andrews
c9c55707eb pullup:
Added macro to suppress warning dependencies message
2001-09-06 05:29:01 +00:00
Mark Andrews
2958e100b5 check return value of strftime() 2001-09-06 00:34:06 +00:00
Mark Andrews
aa6e560fbd 980. [bug] Incoming zone transfers restarting after an error
could trigger an assertion failure. [RT #1692]
2001-09-06 00:23:19 +00:00
Andreas Gustafsson
3f538ef15c pullup:
[RT #1709]
Change isc_entropy_usebestsource() to have saner semantics:
 - If an invalid file is specified, an error will be returned instead of the
   keyboard being used.
 - If no file is specified but a random device is present, the keyboard will
   be used if there is an error opening the random device.
 - ISC_ENTROPY_KEYBOARDYES indicates that the keyboard should be the
   only device used.  Otherwise, passing '-r keyboard' is meaningless
   on a machine with a random device, since the keyboard will not be used.

Change the callers in the dnssec tools and rndc-confgen to check for the
special file "keyboard" and call isc_entropy_usebestsource() with the right set
of parameters.
2001-09-06 00:14:18 +00:00
Andreas Gustafsson
f58f6043ce pullup:
Assertion failure when ISC_MEM_DEBUGRECORD set.
2001-09-05 17:51:13 +00:00
Andreas Gustafsson
f17bffa68d pullup:
isc_time_formattimestamp() created static const for bad time string
2001-09-05 17:32:05 +00:00
Andreas Gustafsson
b1436346a0 pullup:
isc_file_getmodtime() does not need write access to file
2001-09-05 17:29:25 +00:00
Andreas Gustafsson
fdd3a3e7fa pullup:
needs #include <isc/print.h>
2001-09-05 17:04:43 +00:00
Andreas Gustafsson
d73ed70241 capitalize 2001-09-05 01:00:32 +00:00
Andreas Gustafsson
aa8953a586 added --- 9.2.0rc2 released --- marker 2001-09-05 00:59:45 +00:00
Andreas Gustafsson
caaa091d76 regenerated 2001-09-05 00:57:37 +00:00
Andreas Gustafsson
f5c726cbef typo 2001-09-05 00:56:38 +00:00
Andreas Gustafsson
b7d04c63c0 updated for 9.2.0rc2 2001-09-05 00:39:28 +00:00
Andreas Gustafsson
7ee450d5f6 pullup:
972.   [bug]           The file modification time code in zone.c was using the
                        wrong epoch.  [RT #1667]
(This pullup includes not only the changes to zone.c, but all the
recent epoch-related fixes)
2001-09-05 00:38:13 +00:00
Andreas Gustafsson
641e33bdd4 pullup:
978.   [bug]           dns_db_attachversion() had an invalid REQUIRE()
                        condition.
2001-09-04 23:09:33 +00:00
Andreas Gustafsson
faedfb6dce pullup:
Previous update was missing the release version of telling how to build the
resource file [RT #1668]
2001-09-04 22:54:59 +00:00
Andreas Gustafsson
89227c76be pullup:
977.   [bug]           Improve "not at top of zone" error message.
2001-09-04 22:51:41 +00:00
Andreas Gustafsson
f6fc4b1391 pullup:
updated to properly support shutdowns.  See RT #1672 as it relates to NT
2001-09-04 19:40:20 +00:00
Andreas Gustafsson
44caf20759 <named/types.h> needed for interfacemgr type declaration 2001-09-04 19:38:46 +00:00
Andreas Gustafsson
e5094285ce pullup:
Update to change path to resolv.conf and define RESOLV_CONF
2001-09-04 19:36:33 +00:00
Andreas Gustafsson
15fd491c85 pullup:
Changed RESOLV_CONF to be conditionally defined allowing win32 to override this definition
2001-09-04 19:35:49 +00:00
Andreas Gustafsson
2c141ce0fb pullup:
975.   [bug]           "max-cache-size default;" as a view option
                        caused an assertion failure.

 974.   [bug]           "max-cahe-size unlimited;" as a global option
                        was not accepted.
2001-09-04 19:15:36 +00:00
Andreas Gustafsson
9113f8b75c pullup: string formats 2001-08-31 18:01:22 +00:00
Mark Andrews
ac9d955cdd pullup:
The request object would fail to send its completion event when
the control event was delivered if a response was received between
sending and delivery of the completion event [RT #1676]
Fix locking hierarchy violation [RT #1672]
2001-08-31 02:07:11 +00:00
Andreas Gustafsson
54706e9e57 pullup:
973.   [bug]           Failed to log the question name when logging:
                        "bad zone transfer request: non-authoritative zone
                        (NOTAUTH)".
2001-08-31 00:37:12 +00:00
Andreas Gustafsson
6aa1a89bf1 pullup:
RT #1675 resolv.conf was specified to be in an invalid directory.
Location was changed to be in the same etc directory as all of the other
configuration files
2001-08-30 20:29:53 +00:00
Andreas Gustafsson
31d635e582 pullup:
Remove shutdown privilege-enabling code. Installer should not be shutting down the system.
2001-08-30 20:27:55 +00:00
cvs2git
02da396800 This commit was manufactured by cvs2git to create branch 'v9_2'. 2001-08-30 04:33:21 +00:00
856 changed files with 43307 additions and 54357 deletions

736
CHANGES

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
Copyright (C) 1996-2001 Internet Software Consortium.
Copyright (C) 1996-2002 Internet Software Consortium.
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -13,7 +13,7 @@ FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
$Id: COPYRIGHT,v 1.7 2002/02/20 03:32:42 marka Exp $
$Id: COPYRIGHT,v 1.6.2.2 2002/02/12 06:05:48 marka Exp $
Portions Copyright (C) 1996-2001 Nominum, Inc.

118
EXCLUDED Normal file
View File

@@ -0,0 +1,118 @@
1007. [port] config.guess, config.sub from autoconf-2.52.
1008. [port] libtool.m4, ltmain.sh from libtool-1.4.2.
1009. [port] OpenUNIX 8 support. [RT #1728]
1024. [port] Compilation failed on HP-UX 11.11 due to
incompatible use of the SIOCGLIFCONF macro
name. [RT #1831]
[needs more work]
1025. [bug] Don't use multicast addresses to resolve iterative
queries. [RT #101]
1034. [bug] Ignore the RD bit on multicast queries as specified
in RFC 1123. [RT #137]
1035. [bug] If we respond to multicast queries (which we
currently do not), respond from a unicast address
as specified in RFC 1123. [RT #137]
1037. [bug] Negative responses whose authority section contain
SOA or NS records whose owner names are not equal
equal to or parents of the query name should be
rejected. [RT #1862]
1073. [bug] The ADB cache cleaning should also be space driven.
[RT #1915, #1938]
[ New function dns_adb_setadbsize() ]
1079. [bug] BIND 8 compatibility: accept bare elements at top
level of sort list treating them as if they were
a single element list. [RT #1963]
1080. [bug] BIND 8 compatibility: accept bare IP prefixes
as the second element of a two-element top level
sort list statement. [RT #1964]
1105. [port] OpenUNIX 8 enable threads by default. [RT #1970]
[Functional change]
1110. [bug] dig should only accept valid abbreviations of +options.
[RT #2003]
[Potentially breaks scripts. Leave to 9.3.0.]
1143. [bug] When a trusted-keys statement was present and named
was built without crypto support, it would leak memory.
[ Not applicable to 9.2 ]
1150. [bug] named incorrectly accepted TTL values
containing plus or minus signs, such as
1d+1h-1s.
[ Uses new function isc_parse_uint32() ]
1151. [bug] nslookup failed to check that the arguments to
the port, timeout, and retry options were
valid integers and in range. [RT #2099]
[ Uses new function isc_parse_uint32() ]
1159. [bug] MD and MF are not permitted to be loaded by RFC1123
[ Could cause zones that loaded in 9.2.0 to fail
to load. Leave such breakages to 9.3.0. ]
1187. [bug] named was incorrectly returning DNSSEC records
in negative responses when the DO bit was not set.
[ Requires API change (new argument) to
dns_rdataset_towire(), dns_rdataset_towirepartial()
and dns_rdataset_towirepartial() ]
1192. [bug] The seconds fields in LOC records were restricted
to three decimal places. More decimal places should
be allowed but warned about.
1209. [bug] Dig, host, nslookup were not checking the message ids
on the responses. [RT #2454]
1233. [bug] The flags field of a KEY record can be expressed in
hex as well as decimal.
[ Not applicable to 9.2.x ]
1234. [bug] 'rrset-order' and 'sortlist' should be additive
not exclusive.
1271. [bug] "recursion available: {denied,approved}" was too
confusing.
1348. [port] Win32: Rewrote code to use I/O Completion Ports
in socket.c and eliminating a host of socket
errors. Performance is enhanced.
[review for 9.2.3]
1255. [bug] When verifying that an NXT proves nonexistence, check
the rcode of the message and only do the matching NXT
check. That is, for NXDOMAIN responses, check that
the name is in the range between the NXT owner and
next name, and for NOERROR NODATA responses, check
that the type is not present in the NXT bitmap.
[required changes from DS support]
1322. [bug] dnssec-signzone usage message was misleading.
[DS specific]
1247. [bug] Don't reset the interface index for link/site local
addresses. [RT #2576]
[depends on new functions]
1224. [bug] 'rrset-order' and 'sortlist' should be additive
not exclusive.
[tightly coupled with 'cyclic' and 'random' support]
1321. [bug] If the last RRset in a zone is glue, dnssec-signzone
would incorrectly duplicate its output and sign it.
[DS specific]
1328. [bug] The validator could incorrectly verify an invalid
negative proof.
[DS specific]

68
FAQ
View File

@@ -136,9 +136,9 @@ Q: I have a BIND 9 master and a BIND 8.2.3 slave, and the master is
logging error messages like "notify to 10.0.0.1#53 failed: unexpected
end of input". What's wrong?
A: This error message is caused by a known bug in BIND 8.2.3 and 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.
A: This error message is caused by a known bug in BIND 8.2.3 and is fixed
in BIND 8.2.4. It can be safely ignored - the notify has been acted on by
the slave despite the error message.
Q: I keep getting log messages like the following. Why?
@@ -231,7 +231,7 @@ 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.
on the slave were transferred from the same view on the master.
A: You will need to give the master and slave multiple IP addresses and
use those to make sure you reach the correct view on the other machine.
@@ -266,44 +266,23 @@ use those to make sure you reach the correct view on the other machine.
You put the external address on the alias so that all the other
dns clients on these boxes see the internal view by default.
A: (BIND 9.3 and later) Use TSIG to select the appropriate view.
Master 10.0.1.1:
key "external" {
algorithm hmac-md5;
secret "xxxxxxxx";
};
view "internal" {
match-clients { !key external; 10.0.1/24; };
...
};
view "external" {
match-clients { key external; any; };
server 10.0.0.2 { keys external; };
recursion no;
...
};
Q: When I try to use rndc, I get the error message "network
unreachable" or "connection refused", even though I know named is
running.
Slave 10.0.1.2:
key "external" {
algorithm hmac-md5;
secret "xxxxxxxx";
};
view "internal" {
match-clients { !key external; 10.0.1/24; };
};
view "external" {
match-clients { key external; any; };
server 10.0.0.1 { keys external; };
recursion no;
...
};
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.
Q: I have Freebsd 4.4 and "rndc-confgen -a" just sits there.
A: /dev/random is not configured. Use rndcontrol(8) to tell the kernel
to use certian interupts as a source of random events. You can make this
to use certain interrupts as a source of random events. You can make this
permanent by setting rand_irqs in /etc/rc.conf.
e.g.
@@ -319,16 +298,17 @@ port and/or address.
Q: I get error messages like "multiple RRs of singleton type" and
"CNAME and other data" when transfering a zone. What does this mean?
"CNAME and other data" when transferring a zone. What does this mean?
A: These indicate a malformed master zone. You can identify the
exact records involved by transfering the zone using dig then
exact records involved by transferring the zone using dig then
running named-checkzone on it.
e.g.
dig axfr example.com @master-server > tmp
named-checkzone example.com tmp
Q: I get error messages like "named.conf:99: unexpected end of input" where
99 is the last line of named.conf.
@@ -336,3 +316,17 @@ A: Some text editors (notepad and wordpad) fail to put a line termination
indication (e.g. CR/LF) on the last line of a text file. This can be fixed
by "adding" a blank line to the end of the file. Named expects to see EOF
immediately after EOL and treats text files where this is not met as truncated.
Q: I get warning messages like "zone example.com/IN: refresh: failure trying master
1.2.3.4#53: timed out".
A: Check that you can make UDP queries from the slave to the master
dig +norec example.com soa @1.2.3.4
A: You could be generating queries faster than the slave can cope with. Lower
the serial query rate.
serial-query-rate 5; // default 20

51
README
View File

@@ -44,21 +44,28 @@ BIND 9
Nominum, Inc.
BIND 9.3.0
BIND 9.2.2
BIND 9.3.0 has a number of new features over 9.2,
including:
BIND 9.2.2 is a maintenance release, containing fixes for
a number of bugs in 9.2.1 but no new features. RFC 2535
style DNSSEC is disabled as it is incompatible with the
forthcoming DS style DNSSEC.
NOTE:
* Zones containing MD and MF will now be rejected.
* dig, nslookup name. now report "Not Implemented" as
NOTIMP rather than NOTIMPL. This will have impact on scripts
that are looking for NOTIMPL.
libbind: from BIND 8.3.3. [CERT CA-2002-19]
Minimum OpenSSL version now 0.9.6e. [CERT CA-2002-23]
BIND 9.2.1
BIND 9.2.1 is a maintenance release, containing fixes for
a number of bugs in 9.2.0 but no new features.
NOTE: dig, nslookup name. now report "Not Implemented" as
NOTIMP rather than NOTIMPL. This will have impact on scripts
that are looking for NOTIMPL.
BIND 9.2.0
BIND 9.2.0 has a number of new features over 9.1,
BIND 9.2.0 introduces a number of new features over 9.1,
including:
- The size of the cache can now be limited using the
@@ -80,7 +87,7 @@ BIND 9.2.0
- The named.conf parser has been completely rewritten.
It now supports "include" directives in more
places such as inside "view" statememnts, and it no
places such as inside "view" statements, and it no
longer has any reserved words.
- The "rndc status" command is now implemented.
@@ -163,13 +170,16 @@ 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
HP-UX 11.x, x < 11
IRIX64 6.5
NetBSD 1.5
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:
@@ -178,11 +188,11 @@ Building
Slackware Linux 7.x, 8.0
Red Hat Linux 7.1
Debian GNU/Linux 2.2 and 3.0
Mandrake 8.1
OpenBSD 2.6, 2.8, 2.9
UnixWare 7.1.1
HP-UX 10.20
BSD/OS 4.2
OpenUNIX 8
Mac OS X 10.1
To build, just
@@ -213,8 +223,11 @@ Building
Defaults to empty string.
Possible settings:
Change the default syslog facility of named/lwresd.
e.g. -DISC_FACILITY=LOG_LOCAL0
-DISC_RFC2535
Enable support RFC 2535 style DNSSEC. This
is incompatable with the upcoming DS support
and SHOULD NOT be set unless you are currently
making use of it.
To build shared libraries, specify "--with-libtool" on the
configure command line.
@@ -266,6 +279,10 @@ Building
Building with gcc is not supported, unless gcc is the vendor's usual
compiler (e.g. the various BSD systems, Linux).
* gcc-3.2.1 and gcc-3.1.1 is known to cause problems with solaris-x86
if the optimiser is enabled. Use -O0 to disable the optimiser.
* gcc ultrasparc generates incorrect code at -02.
A limited test suite can be run with "make test". Many of
the tests require you to configure a set of virtual IP addresses
@@ -301,15 +318,15 @@ Bug Reports and Mailing Lists
To join the BIND 9 Users mailing list, send mail to
bind9-users-request@isc.org
archives of which can be found via
http://www.isc.org/ml-archives/
If you're planning on making changes to the BIND 9 source
code, you might want to join the BIND 9 Workers mailing list.
code, you might want to join the BIND Workers mailing list.
Send mail to
bind9-workers-request@isc.org
bind-workers-request@isc.org

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: acconfig.h,v 1.37 2002/06/07 00:03:46 marka Exp $ */
/* $Id: acconfig.h,v 1.35.2.1 2001/10/22 23:28:07 gson Exp $ */
/***
*** This file is not to be included by any public header files, because
@@ -129,6 +129,3 @@ int sigwait(const unsigned int *set, int *sig);
/* define if you have strerror in the C library. */
#undef HAVE_STRERROR
/* Define if you are running under Compaq TruCluster.. */
#undef HAVE_TRUCLUSTER

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.20 2002/02/20 03:32:48 marka Exp $
# $Id: Makefile.in,v 1.15.2.3 2002/02/12 06:05:50 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -21,23 +21,20 @@ top_srcdir = @top_srcdir@
@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
@BIND9_INCLUDES@
CINCLUDES = ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \
${ISC_INCLUDES}
CINCLUDES = ${DNS_INCLUDES} ${ISCCFG_INCLUDES} ${ISC_INCLUDES}
CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_OPENSSL_LIBS@ @DNS_GSSAPI_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCLIBS = ../../lib/isc/libisc.@A@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
DNSDEPLIBS = ../../lib/dns/libdns.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
ISCDEPLIBS = ../../lib/isc/libisc.@A@
BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
LIBS = @LIBS@
@@ -65,9 +62,10 @@ 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} ${BIND9DEPLIBS}
named-checkconf: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \
${ISCCFGDEPLIBS} ${DNSDEPLIBS}
${LIBTOOL} ${PURIFY} ${CC} ${CFLAGS} -o $@ named-checkconf.@O@ \
check-tool.@O@ ${BIND9LIBS} ${DNSLIBS} ${ISCCFGLIBS} ${ISCLIBS} ${LIBS}
check-tool.@O@ ${ISCCFGLIBS} ${DNSLIBS} ${ISCLIBS} ${LIBS}
named-checkzone: named-checkzone.@O@ check-tool.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
${LIBTOOL} ${PURIFY} ${CC} ${CFLAGS} -o $@ named-checkzone.@O@ \

View File

@@ -15,39 +15,18 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: check-tool.c,v 1.7 2002/04/02 06:54:00 marka Exp $ */
/* $Id: check-tool.c,v 1.4 2001/03/03 23:11:33 bwelling Exp $ */
#include <config.h>
#include <stdio.h>
#include <string.h>
#include "check-tool.h"
#include <isc/util.h>
#include <isc/buffer.h>
#include <isc/log.h>
#include <isc/region.h>
#include <isc/types.h>
#include <dns/fixedname.h>
#include <dns/name.h>
#include <dns/rdataclass.h>
#include <dns/types.h>
#include <dns/zone.h>
#define CHECK(r) \
do { \
result = (r); \
if (result != ISC_R_SUCCESS) \
goto cleanup; \
} while (0)
static const char *dbtype[] = { "rbt" };
int debug = 0;
isc_boolean_t nomerge = ISC_TRUE;
isc_result_t
setup_logging(isc_mem_t *mctx, isc_log_t **logp) {
isc_logdestination_t destination;
@@ -71,55 +50,3 @@ setup_logging(isc_mem_t *mctx, isc_log_t **logp) {
*logp = log;
return (ISC_R_SUCCESS);
}
isc_result_t
load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
const char *classname, dns_zone_t **zonep)
{
isc_result_t result;
dns_rdataclass_t rdclass;
isc_textregion_t region;
isc_buffer_t buffer;
dns_fixedname_t fixorigin;
dns_name_t *origin;
dns_zone_t *zone = NULL;
REQUIRE(zonep == NULL || *zonep == NULL);
if (debug)
fprintf(stderr, "loading \"%s\" from \"%s\" class \"%s\"\n",
zonename, filename, classname);
CHECK(dns_zone_create(&zone, mctx));
dns_zone_settype(zone, dns_zone_master);
isc_buffer_init(&buffer, zonename, strlen(zonename));
isc_buffer_add(&buffer, strlen(zonename));
dns_fixedname_init(&fixorigin);
origin = dns_fixedname_name(&fixorigin);
CHECK(dns_name_fromtext(origin, &buffer, dns_rootname,
ISC_FALSE, NULL));
CHECK(dns_zone_setorigin(zone, origin));
CHECK(dns_zone_setdbtype(zone, 1, (const char * const *) dbtype));
CHECK(dns_zone_setfile(zone, filename));
DE_CONST(classname, region.base);
region.length = strlen(classname);
CHECK(dns_rdataclass_fromtext(&rdclass, &region));
dns_zone_setclass(zone, rdclass);
dns_zone_setoption(zone, DNS_ZONEOPT_MANYERRORS, ISC_TRUE);
dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge);
CHECK(dns_zone_load(zone));
if (zonep != NULL){
*zonep = zone;
zone = NULL;
}
cleanup:
if (zone != NULL)
dns_zone_detach(&zone);
return (result);
}

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: check-tool.h,v 1.4 2002/04/02 06:54:02 marka Exp $ */
/* $Id: check-tool.h,v 1.2 2001/01/09 21:39:09 bwelling Exp $ */
#ifndef CHECK_TOOL_H
#define CHECK_TOOL_H
@@ -23,20 +23,12 @@
#include <isc/lang.h>
#include <isc/types.h>
#include <dns/types.h>
ISC_LANG_BEGINDECLS
isc_result_t
setup_logging(isc_mem_t *mctx, isc_log_t **logp);
isc_result_t
load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
const char *classname, dns_zone_t **zonep);
extern int debug;
extern isc_boolean_t nomerge;
ISC_LANG_ENDDECLS
#endif

View File

@@ -19,7 +19,7 @@
named-checkconf \- named configuration file syntax checking tool
.SH SYNOPSIS
.sp
\fBnamed-checkconf\fR [ \fB-v\fR ] [ \fB-t \fIdirectory\fB\fR ] \fBfilename\fR [ \fB-z\fR ]
\fBnamed-checkconf\fR [ \fB-v\fR ] [ \fB-t \fIdirectory\fB\fR ] \fBfilename\fR
.SH "DESCRIPTION"
.PP
\fBnamed-checkconf\fR checks the syntax, but not
@@ -35,10 +35,6 @@ run by a similarly chrooted named.
Print the version of the \fBnamed-checkconf\fR
program and exit.
.TP
\fB-z\fR
Perform a check load the master zonefiles found in
\fInamed.conf\fR.
.TP
\fBfilename\fR
The name of the configuration file to be checked. If not
specified, it defaults to \fI/etc/named.conf\fR.

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1999-2002 Internet Software Consortium.
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named-checkconf.c,v 1.23 2002/04/02 06:54:03 marka Exp $ */
/* $Id: named-checkconf.c,v 1.12 2001/07/27 17:45:26 gson Exp $ */
#include <config.h>
@@ -31,28 +31,16 @@
#include <isc/string.h>
#include <isc/util.h>
#include <isccfg/namedconf.h>
#include <bind9/check.h>
#include <dns/log.h>
#include <dns/result.h>
#include <isccfg/cfg.h>
#include <isccfg/check.h>
#include "check-tool.h"
isc_log_t *logc = NULL;
#define CHECK(r)\
do { \
result = (r); \
if (result != ISC_R_SUCCESS) \
goto cleanup; \
} while (0)
static void
usage(void) {
fprintf(stderr, "usage: named-checkconf [-v] [-z] [-t directory] "
"[named.conf]\n");
fprintf(stderr, "usage: named-checkconf [-v] [-t directory] [named.conf]\n");
exit(1);
}
@@ -73,7 +61,7 @@ directory_callback(const char *clausename, cfg_obj_t *obj, void *arg) {
result = isc_dir_chdir(directory);
if (result != ISC_R_SUCCESS) {
cfg_obj_log(obj, logc, ISC_LOG_ERROR,
"change directory to '%s' failed: %s\n",
"change directory to '%s' failed: %s",
directory, isc_result_totext(result));
return (result);
}
@@ -81,112 +69,6 @@ directory_callback(const char *clausename, cfg_obj_t *obj, void *arg) {
return (ISC_R_SUCCESS);
}
static isc_result_t
configure_zone(const char *vclass, const char *view, cfg_obj_t *zconfig,
isc_mem_t *mctx)
{
isc_result_t result;
const char *zclass;
const char *zname;
const char *zfile;
cfg_obj_t *zoptions = NULL;
cfg_obj_t *classobj = NULL;
cfg_obj_t *typeobj = NULL;
cfg_obj_t *fileobj = NULL;
cfg_obj_t *dbobj = NULL;
zname = cfg_obj_asstring(cfg_tuple_get(zconfig, "name"));
classobj = cfg_tuple_get(zconfig, "class");
if (!cfg_obj_isstring(classobj))
zclass = vclass;
else
zclass = cfg_obj_asstring(classobj);
zoptions = cfg_tuple_get(zconfig, "options");
cfg_map_get(zoptions, "type", &typeobj);
if (typeobj == NULL)
return (ISC_R_FAILURE);
if (strcasecmp(cfg_obj_asstring(typeobj), "master") != 0)
return (ISC_R_SUCCESS);
cfg_map_get(zoptions, "database", &dbobj);
if (dbobj != NULL)
return (ISC_R_SUCCESS);
cfg_map_get(zoptions, "file", &fileobj);
if (fileobj == NULL)
return (ISC_R_FAILURE);
zfile = cfg_obj_asstring(fileobj);
result = load_zone(mctx, zname, zfile, zclass, NULL);
if (result != ISC_R_SUCCESS)
fprintf(stderr, "%s/%s/%s: %s\n", view, zname, zclass,
dns_result_totext(result));
return(result);
}
static isc_result_t
configure_view(const char *vclass, const char *view, cfg_obj_t *config,
cfg_obj_t *vconfig, isc_mem_t *mctx)
{
cfg_listelt_t *element;
cfg_obj_t *voptions;
cfg_obj_t *zonelist;
isc_result_t result = ISC_R_SUCCESS;
voptions = NULL;
if (vconfig != NULL)
voptions = cfg_tuple_get(vconfig, "options");
zonelist = NULL;
if (voptions != NULL)
(void)cfg_map_get(voptions, "zone", &zonelist);
else
(void)cfg_map_get(config, "zone", &zonelist);
for (element = cfg_list_first(zonelist);
element != NULL;
element = cfg_list_next(element))
{
cfg_obj_t *zconfig = cfg_listelt_value(element);
CHECK(configure_zone(vclass, view, zconfig, mctx));
}
cleanup:
return (result);
}
static isc_result_t
load_zones_fromconfig(cfg_obj_t *config, isc_mem_t *mctx) {
cfg_listelt_t *element;
cfg_obj_t *classobj;
cfg_obj_t *views;
cfg_obj_t *vconfig;
const char *vclass;
isc_result_t result = ISC_R_SUCCESS;
views = NULL;
(void)cfg_map_get(config, "view", &views);
for (element = cfg_list_first(views);
element != NULL;
element = cfg_list_next(element))
{
const char *vname;
vclass = "IN";
vconfig = cfg_listelt_value(element);
if (vconfig != NULL) {
classobj = cfg_tuple_get(vconfig, "class");
if (cfg_obj_isstring(classobj))
vclass = cfg_obj_asstring(classobj);
}
vname = cfg_obj_asstring(cfg_tuple_get(vconfig, "name"));
CHECK(configure_view(vclass, vname, config, vconfig, mctx));
}
if (views == NULL)
CHECK(configure_view("IN", "_default", config, NULL, mctx));
cleanup:
return (result);
}
int
main(int argc, char **argv) {
int c;
@@ -196,20 +78,9 @@ main(int argc, char **argv) {
isc_mem_t *mctx = NULL;
isc_result_t result;
int exit_status = 0;
isc_boolean_t load_zones = ISC_FALSE;
isc_mem_debugging |= ISC_MEM_DEBUGRECORD;
while ((c = isc_commandline_parse(argc, argv, "dt:vz")) != EOF) {
while ((c = isc_commandline_parse(argc, argv, "t:v")) != EOF) {
switch (c) {
case 'd':
debug++;
break;
case 'm':
nomerge = ISC_FALSE;
break;
case 't':
result = isc_dir_chroot(isc_commandline_argument);
if (result != ISC_R_SUCCESS) {
@@ -229,10 +100,6 @@ main(int argc, char **argv) {
printf(VERSION "\n");
exit(0);
case 'z':
load_zones = ISC_TRUE;
break;
default:
usage();
}
@@ -247,8 +114,6 @@ main(int argc, char **argv) {
RUNTIME_CHECK(setup_logging(mctx, &logc) == ISC_R_SUCCESS);
dns_result_register();
RUNTIME_CHECK(cfg_parser_create(mctx, logc, &parser) == ISC_R_SUCCESS);
cfg_parser_setcallback(parser, directory_callback, NULL);
@@ -257,18 +122,10 @@ main(int argc, char **argv) {
ISC_R_SUCCESS)
exit(1);
result = bind9_check_namedconf(config, logc, mctx);
result = cfg_check_namedconf(config, logc, mctx);
if (result != ISC_R_SUCCESS)
exit_status = 1;
if (result == ISC_R_SUCCESS && load_zones) {
dns_log_init(logc);
dns_log_setcontext(logc);
result = load_zones_fromconfig(config, mctx);
if (result != ISC_R_SUCCESS)
exit_status = 1;
}
cfg_obj_destroy(parser, &config);
cfg_parser_destroy(&parser);

View File

@@ -1,6 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!--
- Copyright (C) 2001 Internet Software Consortium.
- Copyright (C) 2001, 2002 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +16,7 @@
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: named-checkconf.docbook,v 1.5 2002/04/02 06:54:05 marka Exp $ -->
<!-- $Id: named-checkconf.docbook,v 1.3.2.1 2002/02/08 03:56:57 marka Exp $ -->
<refentry>
<refentryinfo>
@@ -38,10 +38,8 @@
<cmdsynopsis>
<command>named-checkconf</command>
<arg><option>-v</option></arg>
<arg><option>-m</option></arg>
<arg><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
<arg choice="req">filename</arg>
<arg><option>-z</option></arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -78,25 +76,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-z</term>
<listitem>
<para>
Perform a check load the master zonefiles found in
<filename>named.conf</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-m</term>
<listitem>
<para>
When loading a zonefile merge the journal if it exists.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>filename</term>
<listitem>

View File

@@ -20,7 +20,7 @@
>named-checkconf</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -70,15 +70,12 @@ CLASS="REPLACEABLE"
>directory</I
></TT
></TT
>] {filename} [<TT
CLASS="OPTION"
>-z</TT
>]</P
>] {filename}</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN24"
NAME="AEN22"
></A
><H2
>DESCRIPTION</H2
@@ -93,7 +90,7 @@ CLASS="COMMAND"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN28"
NAME="AEN26"
></A
><H2
>OPTIONS</H2
@@ -131,17 +128,6 @@ CLASS="COMMAND"
</P
></DD
><DT
>-z</DT
><DD
><P
> Perform a check load the master zonefiles found in
<TT
CLASS="FILENAME"
>named.conf</TT
>.
</P
></DD
><DT
>filename</DT
><DD
><P
@@ -158,7 +144,7 @@ CLASS="FILENAME"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN52"
NAME="AEN45"
></A
><H2
>RETURN VALUES</H2
@@ -173,7 +159,7 @@ CLASS="COMMAND"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN56"
NAME="AEN49"
></A
><H2
>SEE ALSO</H2
@@ -194,7 +180,7 @@ CLASS="CITETITLE"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN63"
NAME="AEN56"
></A
><H2
>AUTHOR</H2
@@ -204,4 +190,4 @@ NAME="AEN63"
></DIV
></BODY
></HTML
>
>

View File

@@ -19,7 +19,7 @@
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 ] [ \fB-t \fIdirectory\fB\fR ] [ \fB-w \fIdirectory\fB\fR ] \fBzonename\fR \fBfilename\fR
\fBnamed-checkzone\fR [ \fB-d\fR ] [ \fB-j\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
@@ -39,20 +39,12 @@ Quiet mode - exit code only.
Print the version of the \fBnamed-checkzone\fR
program and exit.
.TP
\fB-j\fR
When loading the zone file read the journal if it exists.
.TP
\fB-c \fIclass\fB\fR
Specify the class of the zone. If not specified "IN" is assumed.
.TP
\fB-t \fIdirectory\fB\fR
chroot to \fIdirectory\fR so that include
directives in the configuration file are processed as if
run by a similarly chrooted named.
.TP
\fB-w \fIdirectory\fB\fR
chdir to \fIdirectory\fR so that relative
filenames in master file $INCLUDE directives work. This
is similar to the directory clause in
\fInamed.conf\fR.
.TP
\fBzonename\fR
The domain name of the zone being checked.
.TP

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named-checkzone.c,v 1.21 2002/04/02 06:54:06 marka Exp $ */
/* $Id: named-checkzone.c,v 1.13.2.3 2002/07/11 05:44:10 marka Exp $ */
#include <config.h>
@@ -23,7 +23,6 @@
#include <isc/app.h>
#include <isc/commandline.h>
#include <isc/dir.h>
#include <isc/log.h>
#include <isc/mem.h>
#include <isc/socket.h>
@@ -42,10 +41,13 @@
#include "check-tool.h"
static int debug = 0;
isc_boolean_t nomerge = ISC_TRUE;
static int quiet = 0;
static isc_mem_t *mctx = NULL;
dns_zone_t *zone = NULL;
dns_zonetype_t zonetype = dns_zone_master;
static const char *dbtype[] = { "rbt" };
#define ERRRET(result, function) \
do { \
@@ -60,10 +62,58 @@ dns_zonetype_t zonetype = dns_zone_master;
static void
usage(void) {
fprintf(stderr,
"usage: named-checkzone [-dqv] [-c class] zonename filename\n");
"usage: named-checkzone [-djqv] [-c class] zonename filename \n");
exit(1);
}
static isc_result_t
setup(char *zonename, char *filename, char *classname) {
isc_result_t result;
dns_rdataclass_t rdclass;
isc_textregion_t region;
isc_buffer_t buffer;
dns_fixedname_t fixorigin;
dns_name_t *origin;
if (debug)
fprintf(stderr, "loading \"%s\" from \"%s\" class \"%s\"\n",
zonename, filename, classname);
result = dns_zone_create(&zone, mctx);
ERRRET(result, "dns_zone_new");
dns_zone_settype(zone, zonetype);
isc_buffer_init(&buffer, zonename, strlen(zonename));
isc_buffer_add(&buffer, strlen(zonename));
dns_fixedname_init(&fixorigin);
result = dns_name_fromtext(dns_fixedname_name(&fixorigin),
&buffer, dns_rootname, ISC_FALSE, NULL);
ERRRET(result, "dns_name_fromtext");
origin = dns_fixedname_name(&fixorigin);
result = dns_zone_setorigin(zone, origin);
ERRRET(result, "dns_zone_setorigin");
result = dns_zone_setdbtype(zone, 1, (const char * const *) dbtype);
ERRRET(result, "dns_zone_setdatabase");
result = dns_zone_setfile(zone, filename);
ERRRET(result, "dns_zone_setdatabase");
region.base = classname;
region.length = strlen(classname);
result = dns_rdataclass_fromtext(&rdclass, &region);
ERRRET(result, "dns_rdataclass_fromtext");
dns_zone_setclass(zone, rdclass);
dns_zone_setoption(zone, DNS_ZONEOPT_MANYERRORS, ISC_TRUE);
dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge);
result = dns_zone_load(zone);
return (result);
}
static void
destroy(void) {
if (zone != NULL)
@@ -79,64 +129,30 @@ main(int argc, char **argv) {
isc_result_t result;
char classname_in[] = "IN";
char *classname = classname_in;
const char *workdir = NULL;
while ((c = isc_commandline_parse(argc, argv, "c:dimqst:vw:")) != EOF) {
while ((c = isc_commandline_parse(argc, argv, "c:djqsv")) != EOF) {
switch (c) {
case 'c':
classname = isc_commandline_argument;
break;
case 'd':
debug++;
break;
case 'm':
case 'j':
nomerge = ISC_FALSE;
break;
case 'q':
quiet++;
break;
case 't':
result = isc_dir_chroot(isc_commandline_argument);
if (result != ISC_R_SUCCESS) {
fprintf(stderr, "isc_dir_chroot: %s: %s\n",
isc_commandline_argument,
isc_result_totext(result));
exit(1);
}
result = isc_dir_chdir("/");
if (result != ISC_R_SUCCESS) {
fprintf(stderr, "isc_dir_chdir: %s\n",
isc_result_totext(result));
exit(1);
}
break;
case 'v':
printf(VERSION "\n");
exit(0);
case 'w':
workdir = isc_commandline_argument;
break;
default:
usage();
}
}
if (workdir != NULL) {
result = isc_dir_chdir(workdir);
if (result != ISC_R_SUCCESS) {
fprintf(stderr, "isc_dir_chdir: %s: %s\n",
workdir, isc_result_totext(result));
exit(1);
}
}
if (isc_commandline_index + 2 > argc)
usage();
@@ -151,7 +167,7 @@ main(int argc, char **argv) {
origin = argv[isc_commandline_index++];
filename = argv[isc_commandline_index++];
result = load_zone(mctx, origin, filename, classname, &zone);
result = setup(origin, filename, classname);
if (!quiet && result == ISC_R_SUCCESS)
fprintf(stdout, "OK\n");
destroy();

View File

@@ -1,6 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!--
- Copyright (C) 2001 Internet Software Consortium.
- Copyright (C) 2001, 2002 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +16,7 @@
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: named-checkzone.docbook,v 1.5 2002/04/02 06:54:07 marka Exp $ -->
<!-- $Id: named-checkzone.docbook,v 1.3.2.2 2002/08/05 06:57:01 marka Exp $ -->
<refentry>
<refentryinfo>
@@ -38,12 +38,10 @@
<cmdsynopsis>
<command>named-checkzone</command>
<arg><option>-d</option></arg>
<arg><option>-m</option></arg>
<arg><option>-j</option></arg>
<arg><option>-q</option></arg>
<arg><option>-v</option></arg>
<arg><option>-c <replaceable class="parameter">class</replaceable></option></arg>
<arg><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
<arg><option>-w <replaceable class="parameter">directory</replaceable></option></arg>
<arg choice="req">zonename</arg>
<arg choice="req">filename</arg>
</cmdsynopsis>
@@ -93,10 +91,10 @@
</varlistentry>
<varlistentry>
<term>-m</term>
<term>-j</term>
<listitem>
<para>
When loading the zone file merge the journal if it exists.
When loading the zone file read the journal if it exists.
</para>
</listitem>
@@ -109,29 +107,6 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-t <replaceable class="parameter">directory</replaceable></term>
<listitem>
<para>
chroot to <filename>directory</filename> so that include
directives in the configuration file are processed as if
run by a similarly chrooted named.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-w <replaceable class="parameter">directory</replaceable></term>
<listitem>
<para>
chdir to <filename>directory</filename> so that relative
filenames in master file $INCLUDE directives work. This
is similar to the directory clause in
<filename>named.conf</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>zonename</term>
<listitem>

View File

@@ -20,7 +20,7 @@
>named-checkzone</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -64,6 +64,9 @@ CLASS="OPTION"
>-d</TT
>] [<TT
CLASS="OPTION"
>-j</TT
>] [<TT
CLASS="OPTION"
>-q</TT
>] [<TT
CLASS="OPTION"
@@ -76,28 +79,12 @@ CLASS="REPLACEABLE"
>class</I
></TT
></TT
>] [<TT
CLASS="OPTION"
>-t <TT
CLASS="REPLACEABLE"
><I
>directory</I
></TT
></TT
>] [<TT
CLASS="OPTION"
>-w <TT
CLASS="REPLACEABLE"
><I
>directory</I
></TT
></TT
>] {zonename} {filename}</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN33"
NAME="AEN29"
></A
><H2
>DESCRIPTION</H2
@@ -121,7 +108,7 @@ CLASS="COMMAND"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN39"
NAME="AEN35"
></A
><H2
>OPTIONS</H2
@@ -156,6 +143,13 @@ CLASS="COMMAND"
</P
></DD
><DT
>-j</DT
><DD
><P
> When loading the zone file read the journal if it exists.
</P
></DD
><DT
>-c <TT
CLASS="REPLACEABLE"
><I
@@ -168,44 +162,6 @@ CLASS="REPLACEABLE"
</P
></DD
><DT
>-t <TT
CLASS="REPLACEABLE"
><I
>directory</I
></TT
></DT
><DD
><P
> chroot to <TT
CLASS="FILENAME"
>directory</TT
> so that include
directives in the configuration file are processed as if
run by a similarly chrooted named.
</P
></DD
><DT
>-w <TT
CLASS="REPLACEABLE"
><I
>directory</I
></TT
></DT
><DD
><P
> chdir to <TT
CLASS="FILENAME"
>directory</TT
> so that relative
filenames in master file $INCLUDE directives work. This
is similar to the directory clause in
<TT
CLASS="FILENAME"
>named.conf</TT
>.
</P
></DD
><DT
>zonename</DT
><DD
><P
@@ -225,7 +181,7 @@ CLASS="FILENAME"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN81"
NAME="AEN68"
></A
><H2
>RETURN VALUES</H2
@@ -240,7 +196,7 @@ CLASS="COMMAND"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN85"
NAME="AEN72"
></A
><H2
>SEE ALSO</H2
@@ -265,7 +221,7 @@ CLASS="CITETITLE"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN93"
NAME="AEN80"
></A
><H2
>AUTHOR</H2
@@ -275,4 +231,4 @@ NAME="AEN93"
></DIV
></BODY
></HTML
>
>

View File

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

View File

@@ -25,9 +25,6 @@ NULL=
NULL=nul
!ENDIF
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "namedcheckconf - Win32 Release"
OUTDIR=.\Release
@@ -36,21 +33,10 @@ INTDIR=.\Release
OutDir=.\Release
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Release\named-checkconf.exe" "$(OUTDIR)\namedcheckconf.bsc"
!ELSE
ALL : "libdns - Win32 Release" "libisccfg - Win32 Release" "libisc - Win32 Release" "..\..\..\Build\Release\named-checkconf.exe" "$(OUTDIR)\namedcheckconf.bsc"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libisc - Win32 ReleaseCLEAN" "libisccfg - Win32 ReleaseCLEAN" "libdns - Win32 ReleaseCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\check-tool.obj"
-@erase "$(INTDIR)\check-tool.sbr"
-@erase "$(INTDIR)\named-checkconf.obj"
@@ -62,96 +48,8 @@ CLEAN :
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/isccfg/include" /I "../../../lib/bind9/include" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D "__STDC__" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\namedcheckconf.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\namedcheckconf.bsc"
BSC32_SBRS= \
"$(INTDIR)\check-tool.sbr" \
"$(INTDIR)\named-checkconf.sbr"
"$(OUTDIR)\namedcheckconf.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib ../../../lib/isccfg/win32/Release/libisccfg.lib ../../../lib/bind9/win32/Release/libbind9.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\named-checkconf.pdb" /machine:I386 /out:"../../../Build/Release/named-checkconf.exe"
LINK32_OBJS= \
"$(INTDIR)\check-tool.obj" \
"$(INTDIR)\named-checkconf.obj" \
"..\..\..\lib\isc\win32\Release\libisc.lib" \
"..\..\..\lib\isccfg\win32\Release\libisccfg.lib" \
"..\..\..\lib\dns\win32\Release\libdns.lib"
"..\..\..\Build\Release\named-checkconf.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "namedcheckconf - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Debug\named-checkconf.exe" "$(OUTDIR)\namedcheckconf.bsc"
!ELSE
ALL : "libdns - Win32 Debug" "libisccfg - Win32 Debug" "libisc - Win32 Debug" "..\..\..\Build\Debug\named-checkconf.exe" "$(OUTDIR)\namedcheckconf.bsc"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libisc - Win32 DebugCLEAN" "libisccfg - Win32 DebugCLEAN" "libdns - Win32 DebugCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\check-tool.obj"
-@erase "$(INTDIR)\check-tool.sbr"
-@erase "$(INTDIR)\named-checkconf.obj"
-@erase "$(INTDIR)\named-checkconf.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\named-checkconf.pdb"
-@erase "$(OUTDIR)\namedcheckconf.bsc"
-@erase "..\..\..\Build\Debug\named-checkconf.exe"
-@erase "..\..\..\Build\Debug\named-checkconf.ilk"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/isccfg/include" /I "../../../lib/bind9/include" /D "_DEBUG" /D "__STDC__" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\namedcheckconf.bsc"
BSC32_SBRS= \
"$(INTDIR)\check-tool.sbr" \
"$(INTDIR)\named-checkconf.sbr"
"$(OUTDIR)\namedcheckconf.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib ../../../lib/isccfg/win32/Debug/libisccfg.lib ../../../lib/bind9/win32/Debug/libbind9.lib ../../../lib/bind9/win32/Debug/libbind9.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\named-checkconf.pdb" /debug /machine:I386 /out:"../../../Build/Debug/named-checkconf.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\check-tool.obj" \
"$(INTDIR)\named-checkconf.obj" \
"..\..\..\lib\isc\win32\Debug\libisc.lib" \
"..\..\..\lib\isccfg\win32\Debug\libisccfg.lib" \
"..\..\..\lib\dns\win32\Debug\libdns.lib"
"..\..\..\Build\Debug\named-checkconf.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
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) @<<
@@ -183,6 +81,113 @@ LINK32_OBJS= \
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\namedcheckconf.bsc"
BSC32_SBRS= \
"$(INTDIR)\check-tool.sbr" \
"$(INTDIR)\named-checkconf.sbr"
"$(OUTDIR)\namedcheckconf.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/isccfg/win32/Release/libisccfg.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\named-checkconf.pdb" /machine:I386 /out:"../../../Build/Release/named-checkconf.exe"
LINK32_OBJS= \
"$(INTDIR)\check-tool.obj" \
"$(INTDIR)\named-checkconf.obj"
"..\..\..\Build\Release\named-checkconf.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!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")
@@ -206,84 +211,6 @@ SOURCE="..\named-checkconf.c"
$(CPP) $(CPP_PROJ) $(SOURCE)
!IF "$(CFG)" == "namedcheckconf - Win32 Release"
"libisc - Win32 Release" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release"
cd "..\..\..\bin\check\win32"
"libisc - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!ELSEIF "$(CFG)" == "namedcheckconf - Win32 Debug"
"libisc - Win32 Debug" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug"
cd "..\..\..\bin\check\win32"
"libisc - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!ENDIF
!IF "$(CFG)" == "namedcheckconf - Win32 Release"
"libisccfg - Win32 Release" :
cd "\bind-9.3.0a03\lib\isccfg\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisccfg.mak" CFG="libisccfg - Win32 Release"
cd "..\..\..\bin\check\win32"
"libisccfg - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\isccfg\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisccfg.mak" CFG="libisccfg - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!ELSEIF "$(CFG)" == "namedcheckconf - Win32 Debug"
"libisccfg - Win32 Debug" :
cd "\bind-9.3.0a03\lib\isccfg\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisccfg.mak" CFG="libisccfg - Win32 Debug"
cd "..\..\..\bin\check\win32"
"libisccfg - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\isccfg\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisccfg.mak" CFG="libisccfg - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!ENDIF
!IF "$(CFG)" == "namedcheckconf - Win32 Release"
"libdns - Win32 Release" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release"
cd "..\..\..\bin\check\win32"
"libdns - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!ELSEIF "$(CFG)" == "namedcheckconf - Win32 Debug"
"libdns - Win32 Debug" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug"
cd "..\..\..\bin\check\win32"
"libdns - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!ENDIF
!ENDIF

View File

@@ -25,9 +25,6 @@ NULL=
NULL=nul
!ENDIF
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "namedcheckzone - Win32 Release"
OUTDIR=.\Release
@@ -36,21 +33,10 @@ INTDIR=.\Release
OutDir=.\Release
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Release\named-checkzone.exe" "$(OUTDIR)\namedcheckzone.bsc"
!ELSE
ALL : "libisc - Win32 Release" "libdns - Win32 Release" "..\..\..\Build\Release\named-checkzone.exe" "$(OUTDIR)\namedcheckzone.bsc"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libdns - Win32 ReleaseCLEAN" "libisc - Win32 ReleaseCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\check-tool.obj"
-@erase "$(INTDIR)\check-tool.sbr"
-@erase "$(INTDIR)\named-checkzone.obj"
@@ -62,94 +48,8 @@ CLEAN :
"$(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
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\namedcheckzone.bsc"
BSC32_SBRS= \
"$(INTDIR)\check-tool.sbr" \
"$(INTDIR)\named-checkzone.sbr"
"$(OUTDIR)\namedcheckzone.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\named-checkzone.pdb" /machine:I386 /out:"../../../Build/Release/named-checkzone.exe"
LINK32_OBJS= \
"$(INTDIR)\check-tool.obj" \
"$(INTDIR)\named-checkzone.obj" \
"..\..\..\lib\dns\win32\Release\libdns.lib" \
"..\..\..\lib\isc\win32\Release\libisc.lib"
"..\..\..\Build\Release\named-checkzone.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "namedcheckzone - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Debug\named-checkzone.exe" "$(OUTDIR)\namedcheckzone.bsc"
!ELSE
ALL : "libisc - Win32 Debug" "libdns - Win32 Debug" "..\..\..\Build\Debug\named-checkzone.exe" "$(OUTDIR)\namedcheckzone.bsc"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libdns - Win32 DebugCLEAN" "libisc - Win32 DebugCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\check-tool.obj"
-@erase "$(INTDIR)\check-tool.sbr"
-@erase "$(INTDIR)\named-checkzone.obj"
-@erase "$(INTDIR)\named-checkzone.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\named-checkzone.pdb"
-@erase "$(OUTDIR)\namedcheckzone.bsc"
-@erase "..\..\..\Build\Debug\named-checkzone.exe"
-@erase "..\..\..\Build\Debug\named-checkzone.ilk"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_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
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\namedcheckzone.bsc"
BSC32_SBRS= \
"$(INTDIR)\check-tool.sbr" \
"$(INTDIR)\named-checkzone.sbr"
"$(OUTDIR)\namedcheckzone.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\named-checkzone.pdb" /debug /machine:I386 /out:"../../../Build/Debug/named-checkzone.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\check-tool.obj" \
"$(INTDIR)\named-checkzone.obj" \
"..\..\..\lib\dns\win32\Debug\libdns.lib" \
"..\..\..\lib\isc\win32\Debug\libisc.lib"
"..\..\..\Build\Debug\named-checkzone.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
.c{$(INTDIR)}.obj::
$(CPP) @<<
@@ -181,6 +81,113 @@ LINK32_OBJS= \
$(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")
@@ -204,58 +211,6 @@ SOURCE="..\named-checkzone.c"
$(CPP) $(CPP_PROJ) $(SOURCE)
!IF "$(CFG)" == "namedcheckzone - Win32 Release"
"libdns - Win32 Release" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release"
cd "..\..\..\bin\check\win32"
"libdns - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!ELSEIF "$(CFG)" == "namedcheckzone - Win32 Debug"
"libdns - Win32 Debug" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug"
cd "..\..\..\bin\check\win32"
"libdns - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!ENDIF
!IF "$(CFG)" == "namedcheckzone - Win32 Release"
"libisc - Win32 Release" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release"
cd "..\..\..\bin\check\win32"
"libisc - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!ELSEIF "$(CFG)" == "namedcheckzone - Win32 Debug"
"libisc - Win32 Debug" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug"
cd "..\..\..\bin\check\win32"
"libisc - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\check\win32"
!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.29 2001/11/21 02:19:00 gson Exp $
# $Id: Makefile.in,v 1.25 2001/06/08 17:18:06 gson Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -21,27 +21,22 @@ top_srcdir = @top_srcdir@
@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
@BIND9_INCLUDES@
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${BIND9_INCLUDES} \
${ISC_INCLUDES}
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${ISC_INCLUDES}
CDEFINES = -DVERSION=\"${VERSION}\"
CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_OPENSSL_LIBS@ @DNS_GSSAPI_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
DNSDEPLIBS = ../../lib/dns/libdns.@A@
BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
ISCDEPLIBS = ../../lib/isc/libisc.@A@
DEPLIBS = ${DNSDEPLIBS} ${BIND9DEPLIBS} ${ISCDEPLIBS} ${ISCCFGDEPLIBS}
DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS}
LIBS = ${DNSLIBS} ${BIND9LIBS} ${ISCLIBS} ${ISCCFGLIBS} @LIBS@
LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@
SUBDIRS =

View File

@@ -48,10 +48,6 @@ Unless it is told to query a specific name server,
.PP
When no command line arguments or options are given, will perform an
NS query for "." (the root).
.PP
It is possible to set per-user defaults for \fBdig\fR via
\fI${HOME}/.digrc\fR. This file is read and any options in it
are applied before the command line arguments.
.SH "SIMPLE USAGE"
.PP
A typical invocation of \fBdig\fR looks like:
@@ -190,7 +186,7 @@ The search list is not used by default.
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
This option does nothing. It is provided for compatibility with old
versions of \fBdig\fR where it set an unimplemented
resolver flag.
.TP
@@ -279,16 +275,10 @@ An attempt to set \fIT\fR to less than 1 will result
in a query timeout of 1 second being applied.
.TP
\fB+tries=T\fR
Sets the number of times to try UDP queries to server to
Sets the number of times to retry UDP queries to server to
\fIT\fR instead of the default, 3. If
\fIT\fR is less than or equal to zero, the number of
tries is silently rounded up to 1.
.TP
\fB+retry=T\fR
Sets the number of times to retry UDP queries to server to
\fIT\fR instead of the default, 2. Unlike
\fI+tries\fR, this does not include the initial
query.
retries is silently rounded up to 1.
.TP
\fB+ndots=D\fR
Set the number of dots that have to appear in
@@ -362,8 +352,6 @@ isc.org.
.SH "FILES"
.PP
\fI/etc/resolv.conf\fR
.PP
\fI${HOME}/.digrc\fR
.SH "SEE ALSO"
.PP
\fBhost\fR(1),

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2000, 2001 Internet Software Consortium.
* Copyright (C) 2000-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dig.c,v 1.178 2002/05/29 05:30:59 marka Exp $ */
/* $Id: dig.c,v 1.157.2.7 2002/03/12 03:55:57 marka Exp $ */
#include <config.h>
#include <stdlib.h>
@@ -24,7 +24,6 @@
#include <isc/app.h>
#include <isc/netaddr.h>
#include <isc/parseint.h>
#include <isc/print.h>
#include <isc/string.h>
#include <isc/util.h>
@@ -63,6 +62,7 @@ extern isc_mem_t *mctx;
extern dns_messageid_t id;
extern int sendcount;
extern int ndots;
extern int tries;
extern int lookup_counter;
extern int exitcode;
extern isc_sockaddr_t bind_address;
@@ -85,7 +85,7 @@ static char domainopt[DNS_NAME_MAXTEXT];
static isc_boolean_t short_form = ISC_FALSE, printcmd = ISC_TRUE,
nibble = ISC_FALSE, plusquest = ISC_FALSE, pluscomm = ISC_FALSE,
multiline = ISC_FALSE, nottl = ISC_FALSE, noclass = ISC_FALSE;
multiline = ISC_FALSE;
static const char *opcodetext[] = {
"QUERY",
@@ -144,11 +144,6 @@ usage(void) {
exit(1);
}
static void
version(void) {
fputs("DiG " VERSION "\n", stderr);
}
static void
help(void) {
print_usage(stdout);
@@ -172,7 +167,6 @@ help(void) {
" +[no]tcp (TCP mode, alternate syntax)\n"
" +time=### (Set query timeout) [5]\n"
" +tries=### (Set number of UDP attempts) [3]\n"
" +retry=### (Set number of UDP retries) [2]\n"
" +domain=### (Set default domainname)\n"
" +bufsize=### (Set EDNS0 Max UDP packet size)\n"
" +ndots=### (Set NDOTS value)\n"
@@ -186,7 +180,6 @@ help(void) {
" +[no]aaonly (Set AA flag in query)\n"
" +[no]adflag (Set AD flag in query)\n"
" +[no]cdflag (Set CD flag in query)\n"
" +[no]cl (Control display of class in records)\n"
" +[no]cmd (Control display of command line)\n"
" +[no]comments (Control display of comment lines)\n"
" +[no]question (Control display of question)\n"
@@ -196,7 +189,6 @@ help(void) {
" +[no]stats (Control display of statistics)\n"
" +[no]short (Disable everything except short\n"
" form of answer)\n"
" +[no]ttlid (Control display of ttls in records)\n"
" +[no]all (Set or clear all display flags)\n"
" +[no]qr (Print question before sending)\n"
" +[no]nssearch (Search all authoritative nameservers)\n"
@@ -205,9 +197,7 @@ help(void) {
" +[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"
" -h (print help and exit)\n"
" -v (print version and exit)\n",
" local d-opts and servers (after host name) affect only that lookup.\n",
stdout);
}
@@ -218,12 +208,14 @@ void
received(int bytes, isc_sockaddr_t *from, dig_query_t *query) {
isc_uint64_t diff;
isc_time_t now;
isc_result_t result;
time_t tnow;
char fromtext[ISC_SOCKADDR_FORMATSIZE];
isc_sockaddr_format(from, fromtext, sizeof(fromtext));
TIME_NOW(&now);
result = isc_time_now(&now);
check_result(result, "isc_time_now");
if (query->lookup->stats && !short_form) {
diff = isc_time_microdiff(&now, &query->time_sent);
@@ -232,8 +224,8 @@ received(int bytes, isc_sockaddr_t *from, dig_query_t *query) {
time(&tnow);
printf(";; WHEN: %s", ctime(&tnow));
if (query->lookup->doing_xfr) {
printf(";; XFR size: %u records (messages %u)\n",
query->rr_count, query->msg_count);
printf(";; XFR size: %d records\n",
query->rr_count);
} else {
printf(";; MSG SIZE rcvd: %d\n", bytes);
@@ -285,7 +277,9 @@ say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) {
result = dns_rdata_totext(rdata, NULL, buf);
check_result(result, "dns_rdata_totext");
if (query->lookup->identify) {
TIME_NOW(&now);
result = isc_time_now(&now);
if (result != ISC_R_SUCCESS)
return (result);
diff = isc_time_microdiff(&now, &query->time_sent);
ADD_STRING(buf, " from server ");
ADD_STRING(buf, query->servname);
@@ -358,33 +352,12 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
dns_messagetextflag_t flags;
isc_buffer_t *buf = NULL;
unsigned int len = OUTPUTBUF;
dns_master_style_t *style = NULL;
unsigned int styleflags = 0;
const dns_master_style_t *style;
styleflags |= DNS_STYLEFLAG_REL_OWNER;
if (nottl)
styleflags |= DNS_STYLEFLAG_NO_TTL;
if (noclass)
styleflags |= DNS_STYLEFLAG_NO_CLASS;
if (multiline) {
styleflags |= DNS_STYLEFLAG_OMIT_OWNER;
styleflags |= DNS_STYLEFLAG_OMIT_CLASS;
styleflags |= DNS_STYLEFLAG_REL_DATA;
styleflags |= DNS_STYLEFLAG_OMIT_TTL;
styleflags |= DNS_STYLEFLAG_TTL;
styleflags |= DNS_STYLEFLAG_MULTILINE;
styleflags |= DNS_STYLEFLAG_COMMENT;
}
if (multiline || (nottl && noclass))
result = dns_master_stylecreate(&style, styleflags,
24, 24, 24, 32, 80, 8, mctx);
else if (nottl || noclass)
result = dns_master_stylecreate(&style, styleflags,
24, 24, 32, 40, 80, 8, mctx);
else
result = dns_master_stylecreate(&style, styleflags,
24, 32, 40, 48, 80, 8, mctx);
check_result(result, "dns_master_stylecreate");
if (multiline)
style = &dns_master_style_default;
else
style = &dns_master_style_debug;
if (query->lookup->cmdline[0] != 0) {
if (!short_form)
@@ -461,7 +434,7 @@ buftoosmall:
if (result == ISC_R_SUCCESS)
goto repopulate_buffer;
else
goto cleanup;
return (result);
}
check_result(result,
"dns_message_pseudosectiontotext");
@@ -539,10 +512,6 @@ buftoosmall:
printf("%.*s", (int)isc_buffer_usedlength(buf),
(char *)isc_buffer_base(buf));
isc_buffer_free(&buf);
cleanup:
if (style != NULL)
dns_master_styledestroy(&style, mctx);
return (result);
}
@@ -572,7 +541,7 @@ printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
strlen(lookup->cmdline) - 1;
strncat(lookup->cmdline, "\n", remaining);
if (first) {
snprintf(append, sizeof(append),
snprintf(append, sizeof (append),
";; global options: %s %s\n",
short_form ? "short_form" : "",
printcmd ? "printcmd" : "");
@@ -622,14 +591,14 @@ reorder_args(int argc, char *argv[]) {
static isc_uint32_t
parse_uint(char *arg, const char *desc, isc_uint32_t max) {
isc_result_t result;
char *endp;
isc_uint32_t tmp;
result = isc_parse_uint32(&tmp, arg, 10);
if (result == ISC_R_SUCCESS && tmp > max)
result = ISC_R_RANGE;
if (result != ISC_R_SUCCESS)
fatal("%s '%s': %s", desc, arg, isc_result_totext(result));
tmp = strtoul(arg, &endp, 10);
if (*endp != '\0')
fatal("%s '%s' must be numeric", desc, arg);
if (tmp > max)
fatal("%s '%s' out of range", desc, arg);
return (tmp);
}
@@ -651,46 +620,28 @@ plus_option(char *option, isc_boolean_t is_batchfile,
strncpy(option_store, option, sizeof(option_store));
option_store[sizeof(option_store)-1]=0;
ptr = option_store;
cmd = next_token(&ptr,"=");
cmd=next_token(&ptr,"=");
if (cmd == NULL) {
printf(";; Invalid option %s\n",option_store);
return;
}
value = ptr;
value=ptr;
if (strncasecmp(cmd,"no",2)==0) {
cmd += 2;
state = ISC_FALSE;
}
#define FULLCHECK(A) \
do { \
size_t _l = strlen(cmd); \
if (_l >= sizeof(A) || strncasecmp(cmd, A, _l) != 0) \
goto invalid_option; \
} while (0)
#define FULLCHECK2(A, B) \
do { \
size_t _l = strlen(cmd); \
if ((_l >= sizeof(A) || strncasecmp(cmd, A, _l) != 0) && \
(_l >= sizeof(B) || strncasecmp(cmd, B, _l) != 0)) \
goto invalid_option; \
} while (0)
switch (cmd[0]) {
case 'a':
switch (cmd[1]) {
case 'a': /* aaflag */
FULLCHECK("aaflag");
lookup->aaonly = state;
break;
case 'd':
switch (cmd[2]) {
case 'd': /* additional */
FULLCHECK("additional");
lookup->section_additional = state;
break;
case 'f': /* adflag */
FULLCHECK("adflag");
lookup->adflag = state;
break;
default:
@@ -698,7 +649,6 @@ plus_option(char *option, isc_boolean_t is_batchfile,
}
break;
case 'l': /* all */
FULLCHECK("all");
lookup->section_question = state;
lookup->section_authority = state;
lookup->section_answer = state;
@@ -708,11 +658,9 @@ plus_option(char *option, isc_boolean_t is_batchfile,
printcmd = state;
break;
case 'n': /* answer */
FULLCHECK("answer");
lookup->section_answer = state;
break;
case 'u': /* authority */
FULLCHECK("authority");
lookup->section_authority = state;
break;
default:
@@ -722,11 +670,9 @@ plus_option(char *option, isc_boolean_t is_batchfile,
case 'b':
switch (cmd[1]) {
case 'e':/* besteffort */
FULLCHECK("besteffort");
lookup->besteffort = state;
break;
case 'u':/* bufsize */
FULLCHECK("bufsize");
if (value == NULL)
goto need_value;
if (!state)
@@ -743,19 +689,12 @@ plus_option(char *option, isc_boolean_t is_batchfile,
case 'c':
switch (cmd[1]) {
case 'd':/* cdflag */
FULLCHECK("cdflag");
lookup->cdflag = state;
break;
case 'l': /* cl */
FULLCHECK("cl");
noclass = !state;
break;
case 'm': /* cmd */
FULLCHECK("cmd");
printcmd = state;
break;
case 'o': /* comments */
FULLCHECK("comments");
lookup->comments = state;
if (lookup == default_lookup)
pluscomm = state;
@@ -767,15 +706,12 @@ plus_option(char *option, isc_boolean_t is_batchfile,
case 'd':
switch (cmd[1]) {
case 'e': /* defname */
FULLCHECK("defname");
usesearch = state;
break;
case 'n': /* dnssec */
FULLCHECK("dnssec");
lookup->dnssec = state;
break;
case 'o': /* domain */
FULLCHECK("domain");
if (value == NULL)
goto need_value;
if (!state)
@@ -788,29 +724,24 @@ plus_option(char *option, isc_boolean_t is_batchfile,
}
break;
case 'f': /* fail */
FULLCHECK("fail");
lookup->servfail_stops = state;
break;
case 'i':
switch (cmd[1]) {
case 'd': /* identify */
FULLCHECK("identify");
lookup->identify = state;
break;
case 'g': /* ignore */
default: /* Inherets default for compatibility */
FULLCHECK("ignore");
lookup->ignore = ISC_TRUE;
}
break;
case 'm': /* multiline */
FULLCHECK("multiline");
multiline = state;
break;
case 'n':
switch (cmd[1]) {
case 'd': /* ndots */
FULLCHECK("ndots");
if (value == NULL)
goto need_value;
if (!state)
@@ -818,7 +749,6 @@ plus_option(char *option, isc_boolean_t is_batchfile,
ndots = parse_uint(value, "ndots", MAXNDOTS);
break;
case 's': /* nssearch */
FULLCHECK("nssearch");
lookup->ns_search_only = state;
if (state) {
lookup->trace_root = ISC_TRUE;
@@ -841,11 +771,9 @@ plus_option(char *option, isc_boolean_t is_batchfile,
case 'q':
switch (cmd[1]) {
case 'r': /* qr */
FULLCHECK("qr");
qr = state;
break;
case 'u': /* question */
FULLCHECK("question");
lookup->section_question = state;
if (lookup == default_lookup)
plusquest = state;
@@ -854,40 +782,15 @@ plus_option(char *option, isc_boolean_t is_batchfile,
goto invalid_option;
}
break;
case 'r':
switch (cmd[1]) {
case 'e':
switch (cmd[2]) {
case 'c': /* recurse */
FULLCHECK("recurse");
lookup->recurse = state;
break;
case 't': /* retry / retries */
FULLCHECK2("retry", "retries");
if (value == NULL)
goto need_value;
if (!state)
goto invalid_option;
lookup->retries = parse_uint(value, "retries",
MAXTRIES - 1);
lookup->retries++;
break;
default:
goto invalid_option;
}
break;
default:
goto invalid_option;
}
case 'r': /* recurse */
lookup->recurse = state;
break;
case 's':
switch (cmd[1]) {
case 'e': /* search */
FULLCHECK("search");
usesearch = state;
break;
case 'h': /* short */
FULLCHECK("short");
short_form = state;
if (state) {
printcmd = ISC_FALSE;
@@ -900,7 +803,6 @@ plus_option(char *option, isc_boolean_t is_batchfile,
}
break;
case 't': /* stats */
FULLCHECK("stats");
lookup->stats = state;
break;
default:
@@ -910,12 +812,10 @@ plus_option(char *option, isc_boolean_t is_batchfile,
case 't':
switch (cmd[1]) {
case 'c': /* tcp */
FULLCHECK("tcp");
if (!is_batchfile)
lookup->tcp_mode = state;
break;
case 'i': /* timeout */
FULLCHECK("timeout");
if (value == NULL)
goto need_value;
if (!state)
@@ -927,7 +827,6 @@ plus_option(char *option, isc_boolean_t is_batchfile,
case 'r':
switch (cmd[2]) {
case 'a': /* trace */
FULLCHECK("trace");
lookup->trace = state;
lookup->trace_root = state;
if (state) {
@@ -941,12 +840,11 @@ plus_option(char *option, isc_boolean_t is_batchfile,
}
break;
case 'i': /* tries */
FULLCHECK("tries");
if (value == NULL)
goto need_value;
if (!state)
goto invalid_option;
lookup->retries = parse_uint(value, "tries",
lookup->retries = parse_uint(value, "retries",
MAXTRIES);
if (lookup->retries == 0)
lookup->retries = 1;
@@ -955,16 +853,11 @@ plus_option(char *option, isc_boolean_t is_batchfile,
goto invalid_option;
}
break;
case 't': /* ttlid */
FULLCHECK("ttlid");
nottl = !state;
break;
default:
goto invalid_option;
}
break;
case 'v':
FULLCHECK("vc");
if (!is_batchfile)
lookup->tcp_mode = state;
break;
@@ -1019,10 +912,6 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
case 'n':
nibble = ISC_TRUE;
return (ISC_FALSE);
case 'v':
version();
exit(0);
break;
}
if (value == NULL)
goto invalid_option;
@@ -1121,9 +1010,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
return (value_from_next);
case 'x':
*lookup = clone_lookup(default_lookup, ISC_TRUE);
if (get_reverse(textname, value, nibble, ISC_FALSE)
== ISC_R_SUCCESS)
{
if (get_reverse(textname, value, nibble) == ISC_R_SUCCESS) {
strncpy((*lookup)->textname, textname,
sizeof((*lookup)->textname));
debug("looking up %s", (*lookup)->textname);
@@ -1220,17 +1107,14 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
#ifndef NOPOSIX
/*
* Treat ${HOME}/.digrc as a special batchfile
* Treat .digrc as a special batchfile
*/
INSIST(batchfp == NULL);
homedir = getenv("HOME");
if (homedir != NULL) {
unsigned int n;
n = snprintf(rcfile, sizeof(rcfile), "%s/.digrc",
homedir);
if (n < sizeof(rcfile))
batchfp = fopen(rcfile, "r");
}
if (homedir != NULL)
snprintf(rcfile, sizeof(rcfile), "%s/.digrc", homedir);
else
strcpy(rcfile, ".digrc");
batchfp = fopen(rcfile, "r");
if (batchfp != NULL) {
while (fgets(batchline, sizeof(batchline),
batchfp) != 0) {
@@ -1241,8 +1125,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
while ((bargv[bargc] != NULL) &&
(bargc < 62)) {
bargc++;
bargv[bargc] =
next_token(&input, " \t\r\n");
bargv[bargc] = next_token(&input, " \t\r\n");
}
bargv[0] = argv[0];
@@ -1300,7 +1183,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
tr.base = rv[0];
tr.length = strlen(rv[0]);
result = dns_rdatatype_fromtext(&rdtype,
(isc_textregion_t *)&tr);
(isc_textregion_t *)&tr);
if (result == ISC_R_SUCCESS &&
rdtype == dns_rdatatype_ixfr)
{
@@ -1311,30 +1194,28 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
continue;
}
}
if (result == ISC_R_SUCCESS) {
if (result == ISC_R_SUCCESS)
{
if (lookup->rdtypeset) {
fprintf(stderr, ";; Warning, "
"extra type option\n");
}
if (rdtype == dns_rdatatype_ixfr) {
lookup->rdtype =
dns_rdatatype_ixfr;
lookup->rdtype = dns_rdatatype_ixfr;
lookup->rdtypeset = ISC_TRUE;
lookup->ixfr_serial =
parse_uint(&rv[0][5],
"serial number",
MAXSERIAL);
lookup->section_question =
plusquest;
lookup->section_question = plusquest;
lookup->comments = pluscomm;
} else {
lookup->rdtype = rdtype;
lookup->rdtypeset = ISC_TRUE;
if (rdtype ==
dns_rdatatype_axfr) {
lookup->section_question =
if (rdtype == dns_rdatatype_axfr) {
lookup->section_question =
plusquest;
lookup->comments = pluscomm;
lookup->comments = pluscomm;
}
lookup->ixfr_serial = ISC_FALSE;
}
@@ -1385,7 +1266,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
perror(batchname);
if (exitcode < 8)
exitcode = 8;
fatal("couldn't open specified batch file");
fatal("Couldn't open specified batch file");
}
/* XXX Remove code dup from shutdown code */
next_line:

View File

@@ -1,6 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!--
- Copyright (C) 2000, 2001 Internet Software Consortium.
- Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +16,7 @@
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: dig.docbook,v 1.11 2002/05/22 04:58:30 marka Exp $ -->
<!-- $Id: dig.docbook,v 1.4.2.2.4.2 2003/02/17 07:05:02 marka Exp $ -->
<refentry>
@@ -98,12 +98,6 @@ When no command line arguments or options are given, will perform an
NS query for "." (the root).
</para>
<para>
It is possible to set per-user defaults for <command>dig</command> via
<filename>${HOME}/.digrc</filename>. This file is read and any options in it
are applied before the command line arguments.
</para>
</refsect1>
<refsect1>
@@ -296,7 +290,7 @@ Deprecated, treated as a synonym for <parameter>+[no]search</parameter>
<varlistentry><term><option>+[no]aaonly</option></term>
<listitem><para>
This option does nothing. It is provided for compatibilty with old
This option does nothing. It is provided for compatibility with old
versions of <command>dig</command> where it set an unimplemented
resolver flag.
</para></listitem></varlistentry>
@@ -315,16 +309,6 @@ Set [do not set] the CD (checking disabled) bit in the query. This
requests the server to not perform DNSSEC validation of responses.
</para></listitem></varlistentry>
<varlistentry><term><option>+[no]cl</option></term>
<listitem><para>
Display [do not display] the CLASS when printing the record.
</para></listitem></varlistentry>
<varlistentry><term><option>+[no]ttlid</option></term>
<listitem><para>
Display [do not display] the TTL when printing the record.
</para></listitem></varlistentry>
<varlistentry><term><option>+[no]recursive</option></term>
<listitem><para>
Toggle the setting of the RD (recursion desired) bit in the query.
@@ -432,18 +416,10 @@ in a query timeout of 1 second being applied.
<varlistentry><term><option>+tries=T</option></term>
<listitem><para>
Sets the number of times to try UDP queries to server to
Sets the number of times to retry UDP queries to server to
<parameter>T</parameter> instead of the default, 3. If
<parameter>T</parameter> is less than or equal to zero, the number of
tries is silently rounded up to 1.
</para></listitem></varlistentry>
<varlistentry><term><option>+retry=T</option></term>
<listitem><para>
Sets the number of times to retry UDP queries to server to
<parameter>T</parameter> instead of the default, 2. Unlike
<parameter>+tries</parameter>, this does not include the initial
query.
retries is silently rounded up to 1.
</para></listitem></varlistentry>
<varlistentry><term><option>+ndots=D</option></term>
@@ -551,9 +527,6 @@ will not print the initial query when it looks up the NS records for
<para>
<filename>/etc/resolv.conf</filename>
</para>
<para>
<filename>${HOME}/.digrc</filename>
</para>
</refsect1>
<refsect1>

View File

@@ -20,7 +20,7 @@
>dig</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -186,21 +186,11 @@ CLASS="FILENAME"
><P
>When no command line arguments or options are given, will perform an
NS query for "." (the root).</P
><P
>It is possible to set per-user defaults for <B
CLASS="COMMAND"
>dig</B
> via
<TT
CLASS="FILENAME"
>${HOME}/.digrc</TT
>. This file is read and any options in it
are applied before the command line arguments.</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN68"
NAME="AEN65"
></A
><H2
>SIMPLE USAGE</H2
@@ -297,7 +287,7 @@ CLASS="COMMAND"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN97"
NAME="AEN94"
></A
><H2
>OPTIONS</H2
@@ -511,7 +501,7 @@ CLASS="FILENAME"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN147"
NAME="AEN144"
></A
><H2
>QUERY OPTIONS</H2
@@ -647,7 +637,7 @@ CLASS="OPTION"
></DT
><DD
><P
>This option does nothing. It is provided for compatibilty with old
>This option does nothing. It is provided for compatibility with old
versions of <B
CLASS="COMMAND"
>dig</B
@@ -884,7 +874,7 @@ CLASS="OPTION"
></DT
><DD
><P
>Sets the number of times to try UDP queries to server to
>Sets the number of times to retry UDP queries to server to
<TT
CLASS="PARAMETER"
><I
@@ -897,29 +887,7 @@ CLASS="PARAMETER"
>T</I
></TT
> is less than or equal to zero, the number of
tries is silently rounded up to 1.</P
></DD
><DT
><TT
CLASS="OPTION"
>+retry=T</TT
></DT
><DD
><P
>Sets the number of times to retry UDP queries to server to
<TT
CLASS="PARAMETER"
><I
>T</I
></TT
> instead of the default, 2. Unlike
<TT
CLASS="PARAMETER"
><I
>+tries</I
></TT
>, this does not include the initial
query.</P
retries is silently rounded up to 1.</P
></DD
><DT
><TT
@@ -1029,7 +997,7 @@ in the the OPT record in the additional section of the query.</P
><DIV
CLASS="REFSECT1"
><A
NAME="AEN345"
NAME="AEN335"
></A
><H2
>MULTIPLE QUERIES</H2
@@ -1113,7 +1081,7 @@ CLASS="LITERAL"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN363"
NAME="AEN353"
></A
><H2
>FILES</H2
@@ -1122,16 +1090,11 @@ NAME="AEN363"
CLASS="FILENAME"
>/etc/resolv.conf</TT
></P
><P
><TT
CLASS="FILENAME"
>${HOME}/.digrc</TT
></P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN369"
NAME="AEN357"
></A
><H2
>SEE ALSO</H2
@@ -1165,7 +1128,7 @@ CLASS="CITETITLE"
><DIV
CLASS="REFSECT1"
><A
NAME="AEN382"
NAME="AEN370"
></A
><H2
>BUGS </H2
@@ -1174,4 +1137,4 @@ NAME="AEN382"
></DIV
></BODY
></HTML
>
>

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dighost.c,v 1.244 2002/05/29 05:31:02 marka Exp $ */
/* $Id: dighost.c,v 1.221.2.14 2002/08/06 02:40:11 marka Exp $ */
/*
* Notice to programmers: Do not use this code as an example of how to
@@ -52,6 +52,7 @@
#include <isc/entropy.h>
#include <isc/lang.h>
#include <isc/netaddr.h>
#include <isc/netdb.h>
#include <isc/print.h>
#include <isc/result.h>
#include <isc/string.h>
@@ -60,10 +61,22 @@
#include <isc/types.h>
#include <isc/util.h>
#include <bind9/getaddresses.h>
#include <dig/dig.h>
#ifdef HAVE_ADDRINFO
#ifdef HAVE_GETADDRINFO
#ifdef HAVE_GAISTRERROR
#define USE_GETADDRINFO
#endif
#endif
#endif
#ifndef USE_GETADDRINFO
#ifndef ISC_PLATFORM_NONSTDHERRNO
extern int h_errno;
#endif
#endif
ISC_LIST(dig_lookup_t) lookup_list;
dig_serverlist_t server_list;
ISC_LIST(dig_searchlist_t) search_list;
@@ -90,7 +103,7 @@ int sendcount = 0;
int recvcount = 0;
int sockcount = 0;
int ndots = -1;
int tries = 3;
int tries = 2;
int lookup_counter = 0;
/*
@@ -187,90 +200,54 @@ hex_dump(isc_buffer_t *b) {
printf("\n");
}
/*
* Append 'len' bytes of 'text' at '*p', failing with
* ISC_R_NOSPACE if that would advance p past 'end'.
*/
static isc_result_t
append(const char *text, int len, char **p, char *end) {
if (len > end - *p)
return (ISC_R_NOSPACE);
memcpy(*p, text, len);
*p += len;
return (ISC_R_SUCCESS);
}
static isc_result_t
reverse_octets(const char *in, char **p, char *end) {
char *dot = strchr(in, '.');
int len;
if (dot != NULL) {
isc_result_t result;
result = reverse_octets(dot + 1, p, end);
if (result != ISC_R_SUCCESS)
return (result);
result = append(".", 1, p, end);
if (result != ISC_R_SUCCESS)
return (result);
len = dot - in;
} else {
len = strlen(in);
}
return (append(in, len, p, end));
}
isc_result_t
get_reverse(char *reverse, char *value, isc_boolean_t nibble,
isc_boolean_t strict)
{
int r;
get_reverse(char *reverse, char *value, isc_boolean_t nibble) {
int adrs[4];
char working[MXNAME];
int remaining;
int i, n;
isc_result_t result;
isc_netaddr_t addr;
addr.family = AF_INET6;
r = inet_pton(AF_INET6, value, &addr.type.in6);
if (r > 0) {
/* This is a valid IPv6 address. */
result = DNS_R_BADDOTTEDQUAD;
reverse[0] = 0;
debug("get_reverse(%s)", value);
if (strspn(value, "0123456789.") == strlen(value)) {
n = sscanf(value, "%d.%d.%d.%d",
&adrs[0], &adrs[1],
&adrs[2], &adrs[3]);
if (n == 0) {
return (DNS_R_BADDOTTEDQUAD);
}
reverse[MXNAME - 1] = 0;
for (i = n - 1; i >= 0; i--) {
snprintf(working, sizeof(working), "%d.",
adrs[i]);
remaining = MXNAME - strlen(reverse) - 1;
strncat(reverse, working, remaining);
}
remaining = MXNAME - strlen(reverse) - 1;
strncat(reverse, "in-addr.arpa.", remaining);
result = ISC_R_SUCCESS;
} else if (strspn(value, "0123456789abcdefABCDEF:")
== strlen(value)) {
isc_netaddr_t addr;
dns_fixedname_t fname;
dns_name_t *name;
addr.family = AF_INET6;
n = inet_pton(AF_INET6, value, &addr.type.in6);
if (n <= 0)
return (DNS_R_BADDOTTEDQUAD);
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
result = dns_byaddr_createptrname(&addr, nibble, name);
if (result != ISC_R_SUCCESS)
return (result);
dns_name_format(name, reverse, MXNAME);
return (ISC_R_SUCCESS);
} else {
/*
* Not a valid IPv6 address. Assume IPv4.
* If 'strict' is not set, construct the
* in-addr.arpa name by blindly reversing
* octets whether or not they look like integers,
* so that this can be used for RFC2317 names
* and such.
*/
char *p = reverse;
char *end = reverse + MXNAME;
if (strict) {
int adrs[4];
int n;
if (strspn(value, "0123456789.") != strlen(value))
return (DNS_R_BADDOTTEDQUAD);
n = sscanf(value, "%d.%d.%d.%d",
&adrs[0], &adrs[1],
&adrs[2], &adrs[3]);
if (n == 0)
return (DNS_R_BADDOTTEDQUAD);
}
result = reverse_octets(value, &p, end);
if (result != ISC_R_SUCCESS)
return (result);
/* Append .in-addr.arpa. and a terminating NUL. */
result = append(".in-addr.arpa.", 15, &p, end);
if (result != ISC_R_SUCCESS)
return (result);
return (ISC_R_SUCCESS);
}
return (result);
}
void
@@ -320,7 +297,7 @@ make_server(const char *servname) {
debug("make_server(%s)", servname);
srv = isc_mem_allocate(mctx, sizeof(struct dig_server));
if (srv == NULL)
fatal("memory allocation failure in %s:%d",
fatal("Memory allocation failure in %s:%d",
__FILE__, __LINE__);
strncpy(srv->servername, servname, MXNAME);
srv->servername[MXNAME-1] = 0;
@@ -362,7 +339,7 @@ make_empty_lookup(void) {
looknew = isc_mem_allocate(mctx, sizeof(struct dig_lookup));
if (looknew == NULL)
fatal("memory allocation failure in %s:%d",
fatal("Memory allocation failure in %s:%d",
__FILE__, __LINE__);
looknew->pending = ISC_TRUE;
looknew->textname[0] = 0;
@@ -488,7 +465,7 @@ requeue_lookup(dig_lookup_t *lookold, isc_boolean_t servers) {
lookup_counter++;
if (lookup_counter > LOOKUP_LIMIT)
fatal("too many lookups");
fatal("Too many lookups");
looknew = clone_lookup(lookold, servers);
INSIST(looknew != NULL);
@@ -519,7 +496,7 @@ setup_text_key(void) {
secretsize = strlen(keysecret) * 3 / 4;
secretstore = isc_mem_allocate(mctx, secretsize);
if (secretstore == NULL)
fatal("memory allocation failure in %s:%d",
fatal("Memory allocation failure in %s:%d",
__FILE__, __LINE__);
isc_buffer_init(&secretbuf, secretstore, secretsize);
result = isc_base64_decodestring(keysecret, &secretbuf);
@@ -582,7 +559,7 @@ make_searchlist_entry(char *domain) {
dig_searchlist_t *search;
search = isc_mem_allocate(mctx, sizeof(*search));
if (search == NULL)
fatal("memory allocation failure in %s:%d",
fatal("Memory allocation failure in %s:%d",
__FILE__, __LINE__);
strncpy(search->origin, domain, MXNAME);
search->origin[MXNAME-1] = 0;
@@ -898,7 +875,7 @@ try_clear_lookup(dig_lookup_t *lookup) {
q->servname);
q = ISC_LIST_NEXT(q, link);
}
return (ISC_FALSE);
return (ISC_FALSE);
}
}
/*
@@ -1408,7 +1385,7 @@ setup_lookup(dig_lookup_t *lookup) {
serv = ISC_LIST_NEXT(serv, link)) {
query = isc_mem_allocate(mctx, sizeof(dig_query_t));
if (query == NULL)
fatal("memory allocation failure in %s:%d",
fatal("Memory allocation failure in %s:%d",
__FILE__, __LINE__);
debug("create query %p linked to lookup %p",
query, lookup);
@@ -1423,7 +1400,6 @@ setup_lookup(dig_lookup_t *lookup) {
query->second_rr_serial = 0;
query->servname = serv->servername;
query->rr_count = 0;
query->msg_count = 0;
ISC_LINK_INIT(query, link);
ISC_LIST_INIT(query->recvlist);
ISC_LIST_INIT(query->lengthlist);
@@ -1572,7 +1548,7 @@ send_tcp_connect(dig_query_t *query) {
INSIST(query->sock == NULL);
result = isc_socket_create(socketmgr,
isc_sockaddr_pf(&query->sockaddr),
isc_sockettype_tcp, &query->sock);
isc_sockettype_tcp, &query->sock) ;
check_result(result, "isc_socket_create");
sockcount++;
debug("sockcount=%d", sockcount);
@@ -1661,7 +1637,8 @@ send_udp(dig_query_t *query) {
ISC_LIST_ENQUEUE(query->sendlist, &l->sendbuf,
link);
debug("sending a request");
TIME_NOW(&query->time_sent);
result = isc_time_now(&query->time_sent);
check_result(result, "isc_time_now");
INSIST(query->sock != NULL);
result = isc_socket_sendtov(query->sock, &query->sendlist,
global_task, send_done, query,
@@ -1687,8 +1664,8 @@ send_udp(dig_query_t *query) {
*/
static void
connect_timeout(isc_task_t *task, isc_event_t *event) {
dig_lookup_t *l = NULL;
dig_query_t *query = NULL, *cq;
dig_lookup_t *l=NULL, *n;
dig_query_t *query=NULL, *cq;
UNUSED(task);
REQUIRE(event->ev_type == ISC_TIMEREVENT_IDLE);
@@ -1723,7 +1700,8 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
debug("making new TCP request, %d tries left",
l->retries);
l->retries--;
requeue_lookup(l, ISC_TRUE);
n = requeue_lookup(l, ISC_TRUE);
n->origin = query->lookup->origin;
cancel_lookup(l);
}
} else {
@@ -1867,7 +1845,8 @@ launch_next_query(dig_query_t *query, isc_boolean_t include_question) {
debug("recvcount=%d",recvcount);
if (!query->first_soa_rcvd) {
debug("sending a request in launch_next_query");
TIME_NOW(&query->time_sent);
result = isc_time_now(&query->time_sent);
check_result(result, "isc_time_now");
result = isc_socket_sendv(query->sock, &query->sendlist,
global_task, send_done, query);
check_result(result, "isc_socket_sendv");
@@ -1989,7 +1968,6 @@ check_for_more_data(dig_query_t *query, dns_message_t *msg,
* an SOA rr.
*/
query->msg_count++;
result = dns_message_firstname(msg, DNS_SECTION_ANSWER);
if (result != ISC_R_SUCCESS) {
puts("; Transfer failed.");
@@ -2216,7 +2194,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
"expected ID %u, got %u\n",
l->sendmsg->id, id);
else
printf(";; ERROR: runt message\n");
printf(";; ERROR: short (< header size) message\n");
isc_event_free(&event);
clear_query(query);
check_next_lookup(l);
@@ -2227,7 +2205,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
printf(";; Warning: ID mismatch: "
"expected ID %u, got %u\n", l->sendmsg->id, id);
else
printf(";; Warning: runt message received\n");
printf(";; Warning: short (< header size) message received\n");
match = ISC_FALSE;
}
@@ -2295,6 +2273,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
printf(";; Truncated, retrying in TCP mode.\n");
n = requeue_lookup(l, ISC_TRUE);
n->tcp_mode = ISC_TRUE;
n->origin = query->lookup->origin;
dns_message_destroy(&msg);
isc_event_free(&event);
clear_query(query);
@@ -2477,16 +2456,61 @@ recv_done(isc_task_t *task, isc_event_t *event) {
*/
void
get_address(char *host, in_port_t port, isc_sockaddr_t *sockaddr) {
int count;
isc_result_t result;
struct in_addr in4;
struct in6_addr in6;
#ifdef USE_GETADDRINFO
struct addrinfo *res = NULL, hints;
int result;
#else
struct hostent *he;
#endif
isc_app_block();
result = bind9_getaddresses(host, port, sockaddr, 1, &count);
isc_app_unblock();
if (result != ISC_R_SUCCESS)
fatal("couldn't get address for '%s': %s",
host, isc_result_totext(result));
INSIST(count == 1);
debug("get_address()");
if (inet_pton(AF_INET6, host, &in6) == 1) {
if (!have_ipv6)
fatal("Protocol family INET6 not supported '%s'", host);
isc_sockaddr_fromin6(sockaddr, &in6, port);
} else if (inet_pton(AF_INET, host, &in4) == 1) {
if (have_ipv4)
isc_sockaddr_fromin(sockaddr, &in4, port);
else
isc_sockaddr_v6fromin(sockaddr, &in4, port);
} else {
#ifdef USE_GETADDRINFO
memset(&hints, 0, sizeof(hints));
if (!have_ipv6)
hints.ai_family = PF_INET;
else if (!have_ipv4)
hints.ai_family = PF_INET6;
else
hints.ai_family = PF_UNSPEC;
debug ("before getaddrinfo()");
isc_app_block();
result = getaddrinfo(host, NULL, &hints, &res);
isc_app_unblock();
if (result != 0) {
fatal("Couldn't find server '%s': %s",
host, gai_strerror(result));
}
memcpy(&sockaddr->type.sa, res->ai_addr, res->ai_addrlen);
sockaddr->length = res->ai_addrlen;
isc_sockaddr_setport(sockaddr, port);
freeaddrinfo(res);
#else
debug ("before gethostbyname()");
isc_app_block();
he = gethostbyname(host);
isc_app_unblock();
if (he == NULL)
fatal("Couldn't find server '%s' (h_errno=%d)",
host, h_errno);
INSIST(he->h_addrtype == AF_INET);
isc_sockaddr_fromin(sockaddr,
(struct in_addr *)(he->h_addr_list[0]),
port);
#endif
}
}
/*

View File

@@ -62,7 +62,7 @@ output.
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
compatibility with older implementations. This option is equivalent
to making a query of type AXFR.
.PP
The \fB-n\fR

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2000, 2001 Internet Software Consortium.
* Copyright (C) 2000-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: host.c,v 1.83 2001/12/19 12:16:40 marka Exp $ */
/* $Id: host.c,v 1.76.2.2 2002/02/08 03:57:04 marka Exp $ */
#include <config.h>
#include <stdlib.h>
@@ -24,7 +24,6 @@
#include <isc/app.h>
#include <isc/commandline.h>
#include <isc/netaddr.h>
#include <isc/print.h>
#include <isc/string.h>
#include <isc/util.h>
#include <isc/task.h>
@@ -94,28 +93,111 @@ static const char *rcodetext[] = {
"BADVERS"
};
struct rtype {
unsigned int type;
const char *text;
};
static const char *rtypetext[] = {
"zero", /* 0 */
"has address", /* 1 */
"name server", /* 2 */
"MD", /* 3 */
"MF", /* 4 */
"is an alias for", /* 5 */
"SOA", /* 6 */
"MB", /* 7 */
"MG", /* 8 */
"MR", /* 9 */
"NULL", /* 10 */
"has well known services", /* 11 */
"domain name pointer", /* 12 */
"host information", /* 13 */
"MINFO", /* 14 */
"mail is handled by", /* 15 */
"text", /* 16 */
"RP", /* 17 */
"AFSDB", /* 18 */
"x25 address", /* 19 */
"isdn address", /* 20 */
"RT", /* 21 */
"NSAP", /* 22 */
"NSAP_PTR", /* 23 */
"has signature", /* 24 */
"has key", /* 25 */
"PX", /* 26 */
"GPOS", /* 27 */
"has AAAA address", /* 28 */
"LOC", /* 29 */
"has next record", /* 30 */
"EID", /* 31 */
"NIMLOC", /* 32 */
"SRV", /* 33 */
"ATMA", /* 34 */
"NAPTR", /* 35 */
"KX", /* 36 */
"CERT", /* 37 */
"has v6 address", /* 38 */
"DNAME", /* 39 */
"has optional information", /* 41 */
"has 42 record", /* 42 */
"has 43 record", /* 43 */
"has 44 record", /* 44 */
"has 45 record", /* 45 */
"has 46 record", /* 46 */
"has 47 record", /* 47 */
"has 48 record", /* 48 */
"has 49 record", /* 49 */
"has 50 record", /* 50 */
"has 51 record", /* 51 */
"has 52 record", /* 52 */
"has 53 record", /* 53 */
"has 54 record", /* 54 */
"has 55 record", /* 55 */
"has 56 record", /* 56 */
"has 57 record", /* 57 */
"has 58 record", /* 58 */
"has 59 record", /* 59 */
"has 60 record", /* 60 */
"has 61 record", /* 61 */
"has 62 record", /* 62 */
"has 63 record", /* 63 */
"has 64 record", /* 64 */
"has 65 record", /* 65 */
"has 66 record", /* 66 */
"has 67 record", /* 67 */
"has 68 record", /* 68 */
"has 69 record", /* 69 */
"has 70 record", /* 70 */
"has 71 record", /* 71 */
"has 72 record", /* 72 */
"has 73 record", /* 73 */
"has 74 record", /* 74 */
"has 75 record", /* 75 */
"has 76 record", /* 76 */
"has 77 record", /* 77 */
"has 78 record", /* 78 */
"has 79 record", /* 79 */
"has 80 record", /* 80 */
"has 81 record", /* 81 */
"has 82 record", /* 82 */
"has 83 record", /* 83 */
"has 84 record", /* 84 */
"has 85 record", /* 85 */
"has 86 record", /* 86 */
"has 87 record", /* 87 */
"has 88 record", /* 88 */
"has 89 record", /* 89 */
"has 90 record", /* 90 */
"has 91 record", /* 91 */
"has 92 record", /* 92 */
"has 93 record", /* 93 */
"has 94 record", /* 94 */
"has 95 record", /* 95 */
"has 96 record", /* 96 */
"has 97 record", /* 97 */
"has 98 record", /* 98 */
"has 99 record", /* 99 */
"UINFO", /* 100 */
"UID", /* 101 */
"GID", /* 102 */
"UNSPEC"}; /* 103 */
struct rtype rtypes[] = {
{ 1, "has address" },
{ 2, "name server" },
{ 5, "is an alias for" },
{ 11, "has well known services" },
{ 12, "domain name pointer" },
{ 13, "host information" },
{ 15, "mail is handled by" },
{ 16, "descriptive text" },
{ 19, "x25 address" },
{ 20, "ISDN address" },
{ 24, "has signature" },
{ 25, "has key" },
{ 28, "has IPv6 address" },
{ 29, "location" },
{ 0, NULL }
};
static void
show_usage(void) {
@@ -145,14 +227,17 @@ dighost_shutdown(void) {
}
void
received(int bytes, isc_sockaddr_t *from, dig_query_t *query) {
received(int bytes, isc_sockaddr_t *from, dig_query_t *query)
{
isc_time_t now;
isc_result_t result;
int diff;
if (!short_form) {
char fromtext[ISC_SOCKADDR_FORMATSIZE];
isc_sockaddr_format(from, fromtext, sizeof(fromtext));
TIME_NOW(&now);
result = isc_time_now(&now);
check_result(result, "isc_time_now");
diff = (int) isc_time_microdiff(&now, &query->time_sent);
printf("Received %u bytes from %s in %d ms\n",
bytes, fromtext, diff/1000);
@@ -218,6 +303,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
char t[4096];
isc_boolean_t first;
isc_boolean_t no_rdata;
const char *rtt;
if (sectionid == DNS_SECTION_QUESTION)
no_rdata = ISC_TRUE;
@@ -265,27 +351,15 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
} else {
loopresult = dns_rdataset_first(rdataset);
while (loopresult == ISC_R_SUCCESS) {
struct rtype *t;
const char *rtt;
char typebuf[DNS_RDATATYPE_FORMATSIZE];
char typebuf2[DNS_RDATATYPE_FORMATSIZE
+ 20];
dns_rdataset_current(rdataset, &rdata);
for (t = rtypes; t->text != NULL; t++) {
if (t->type == rdata.type) {
rtt = t->text;
goto found;
}
}
dns_rdatatype_format(rdata.type,
typebuf,
sizeof(typebuf));
snprintf(typebuf2, sizeof(typebuf2),
"has %s record", typebuf);
rtt = typebuf2;
found:
if (rdata.type <= 103)
rtt = rtypetext[rdata.type];
else if (rdata.type == 249)
rtt = "key";
else if (rdata.type == 250)
rtt = "signature";
else
rtt = "unknown";
say_message(print_name, rtt,
&rdata, query);
dns_rdata_reset(&rdata);
@@ -457,15 +531,6 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
if (!short_form)
printf("\n");
if (short_form && ISC_LIST_EMPTY(msg->sections[DNS_SECTION_ANSWER])) {
char namestr[DNS_NAME_FORMATSIZE];
char typestr[DNS_RDATATYPE_FORMATSIZE];
dns_name_format(query->lookup->name, namestr, sizeof(namestr));
dns_rdatatype_format(query->lookup->rdtype, typestr,
sizeof(typestr));
printf("%s has no %s record\n", namestr, typestr);
}
return (result);
}
@@ -507,7 +572,7 @@ 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",
fprintf(stderr,"Warning: invalid type: %s\n",
isc_commandline_argument);
else {
lookup->rdtype = rdtype;
@@ -521,7 +586,7 @@ 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",
fprintf(stderr,"Warning: invalid class: %s\n",
isc_commandline_argument);
else {
lookup->rdclass = rdclass;
@@ -576,10 +641,9 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
break;
}
}
if (isc_commandline_index >= argc)
if (isc_commandline_index >= argc) {
show_usage();
}
strncpy(hostname, argv[isc_commandline_index], sizeof(hostname));
hostname[sizeof(hostname)-1]=0;
if (argc > isc_commandline_index + 1) {
@@ -590,9 +654,7 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
}
lookup->pending = ISC_FALSE;
if (get_reverse(store, hostname, lookup->nibble, ISC_TRUE)
== ISC_R_SUCCESS)
{
if (get_reverse(store, hostname, lookup->nibble) == ISC_R_SUCCESS) {
strncpy(lookup->textname, store, sizeof(lookup->textname));
lookup->textname[sizeof(lookup->textname)-1] = 0;
lookup->rdtype = dns_rdatatype_ptr;

View File

@@ -1,6 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!--
- Copyright (C) 2000, 2001 Internet Software Consortium.
- Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +16,7 @@
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: host.docbook,v 1.2 2001/06/08 17:18:13 gson Exp $ -->
<!-- $Id: host.docbook,v 1.2.10.2 2003/02/17 07:05:03 marka Exp $ -->
<refentry>
@@ -104,7 +104,7 @@ output.
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
compatibility with older implementations. This option is equivalent
to making a query of type AXFR.
</para>

View File

@@ -20,7 +20,7 @@
>host</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -225,7 +225,7 @@ CLASS="PARAMETER"
>name</I
></TT
>. The argument is provided for
compatibility with older implemementations. This option is equivalent
compatibility with older implementations. This option is equivalent
to making a query of type AXFR.</P
><P
>The <TT
@@ -437,4 +437,4 @@ CLASS="REFENTRYTITLE"
></DIV
></BODY
></HTML
>
>

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dig.h,v 1.77 2002/05/29 05:31:05 marka Exp $ */
/* $Id: dig.h,v 1.71.2.3 2001/11/15 01:24:13 marka Exp $ */
#ifndef DIG_H
#define DIG_H
@@ -155,7 +155,6 @@ struct dig_query {
recv_made;
isc_uint32_t first_rr_serial;
isc_uint32_t second_rr_serial;
isc_uint32_t msg_count;
isc_uint32_t rr_count;
char *servname;
isc_bufferlist_t sendlist,
@@ -190,8 +189,7 @@ 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,
isc_boolean_t strict);
get_reverse(char *reverse, char *value, isc_boolean_t nibble);
void
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2000, 2001 Internet Software Consortium.
* Copyright (C) 2000-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: nslookup.c,v 1.96 2002/03/20 18:20:03 marka Exp $ */
/* $Id: nslookup.c,v 1.90.2.3 2002/03/20 22:45:11 marka Exp $ */
#include <config.h>
@@ -25,7 +25,6 @@
#include <isc/buffer.h>
#include <isc/commandline.h>
#include <isc/event.h>
#include <isc/parseint.h>
#include <isc/string.h>
#include <isc/timer.h>
#include <isc/util.h>
@@ -48,12 +47,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, debugging;
extern isc_boolean_t have_ipv6, usesearch, qr, debugging;
extern in_port_t port;
extern unsigned int timeout;
extern isc_mem_t *mctx;
extern dns_messageid_t id;
extern int sendcount;
extern int ndots;
extern int tries;
extern int lookup_counter;
extern int exitcode;
extern isc_taskmgr_t *taskmgr;
extern isc_task_t *global_task;
extern char *progname;
@@ -133,8 +137,7 @@ static const char *rtypetext[] = {
"v6 address = ", /* 38 */
"dname = ", /* 39 */
"rtype_40 = ", /* 40 */
"optional = " /* 41 */
};
"optional = "}; /* 41 */
#define N_KNOWN_RRTYPES (sizeof(rtypetext) / sizeof(rtypetext[0]))
@@ -518,45 +521,7 @@ safecpy(char *dest, char *src, int size) {
strncpy(dest, src, size);
dest[size-1] = 0;
}
static isc_result_t
parse_uint(isc_uint32_t *uip, const char *value, isc_uint32_t max, const char *desc) {
isc_uint32_t n;
isc_result_t result = isc_parse_uint32(&n, value, 10);
if (result == ISC_R_SUCCESS && n > max)
result = ISC_R_RANGE;
if (result != ISC_R_SUCCESS) {
printf("invalid %s '%s': %s\n", desc,
value, isc_result_totext(result));
return result;
}
*uip = n;
return (ISC_R_SUCCESS);
}
static void
set_port(const char *value) {
isc_uint32_t n;
isc_result_t result = parse_uint(&n, value, 65535, "port");
if (result == ISC_R_SUCCESS)
port = n;
}
static void
set_timeout(const char *value) {
isc_uint32_t n;
isc_result_t result = parse_uint(&n, value, UINT_MAX, "timeout");
if (result == ISC_R_SUCCESS)
timeout = n;
}
static void
set_tries(const char *value) {
isc_uint32_t n;
isc_result_t result = parse_uint(&n, value, INT_MAX, "tries");
if (result == ISC_R_SUCCESS)
tries = n;
}
static void
setoption(char *opt) {
@@ -595,21 +560,21 @@ setoption(char *opt) {
set_search_domain(domainopt);
usesearch = ISC_TRUE;
} else if (strncasecmp(opt, "port=", 5) == 0) {
set_port(&opt[5]);
port = atoi(&opt[5]);
} else if (strncasecmp(opt, "po=", 3) == 0) {
set_port(&opt[3]);
port = atoi(&opt[3]);
} else if (strncasecmp(opt, "timeout=", 8) == 0) {
set_timeout(&opt[8]);
timeout = atoi(&opt[8]);
} else if (strncasecmp(opt, "t=", 2) == 0) {
set_timeout(&opt[2]);
timeout = atoi(&opt[2]);
} else if (strncasecmp(opt, "rec", 3) == 0) {
recurse = ISC_TRUE;
} else if (strncasecmp(opt, "norec", 5) == 0) {
recurse = ISC_FALSE;
} else if (strncasecmp(opt, "retry=", 6) == 0) {
set_tries(&opt[6]);
tries = atoi(&opt[6]);
} else if (strncasecmp(opt, "ret=", 4) == 0) {
set_tries(&opt[4]);
tries = atoi(&opt[4]);
} else if (strncasecmp(opt, "def", 3) == 0) {
usesearch = ISC_TRUE;
} else if (strncasecmp(opt, "nodef", 5) == 0) {
@@ -626,11 +591,11 @@ setoption(char *opt) {
debugging = ISC_TRUE;
} else if (strncasecmp(opt, "nod2", 4) == 0) {
debugging = ISC_FALSE;
} else if (strncasecmp(opt, "search", 3) == 0) {
} else if (strncasecmp(opt, "search",3) == 0) {
usesearch = ISC_TRUE;
} else if (strncasecmp(opt, "nosearch", 5) == 0) {
} else if (strncasecmp(opt, "nosearch",5) == 0) {
usesearch = ISC_FALSE;
} else if (strncasecmp(opt, "sil", 3) == 0) {
} else if (strncasecmp(opt, "sil",3) == 0) {
deprecation_msg = ISC_FALSE;
} else {
printf("*** Invalid option: %s\n", opt);
@@ -662,9 +627,7 @@ addlookup(char *opt) {
rdclass = dns_rdataclass_in;
}
lookup = make_empty_lookup();
if (get_reverse(store, opt, lookup->nibble, ISC_TRUE)
== ISC_R_SUCCESS)
{
if (get_reverse(store, opt, lookup->nibble) == ISC_R_SUCCESS) {
safecpy(lookup->textname, store, sizeof(lookup->textname));
lookup->rdtype = dns_rdatatype_ptr;
lookup->rdtypeset = ISC_TRUE;

View File

@@ -42,7 +42,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /I "../../../lib/bind9/include" /D "WIN32" /D "__STDC__" /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
@@ -50,7 +50,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib ../../../lib/bind9/win32/Release/libbind9.lib /nologo /subsystem:console /machine:I386 /out:"../../../Build/Release/dig.exe"
# 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"
@@ -66,7 +66,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /I "../../../lib/bind9/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /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"
@@ -75,7 +75,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib ../../../lib/bind9/win32/Debug/libbind9.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../../Build/Debug/dig.exe" /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

View File

@@ -25,29 +25,15 @@ NULL=
NULL=nul
!ENDIF
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "dig - Win32 Release"
OUTDIR=.\Release
INTDIR=.\Release
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Release\dig.exe"
!ELSE
ALL : "libbind9 - Win32 Release" "libisc - Win32 Release" "libdns - Win32 Release" "..\..\..\Build\Release\dig.exe"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libdns - Win32 ReleaseCLEAN" "libisc - Win32 ReleaseCLEAN" "libbind9 - Win32 ReleaseCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\dig.obj"
-@erase "$(INTDIR)\dighost.obj"
-@erase "$(INTDIR)\vc60.idb"
@@ -56,89 +42,8 @@ CLEAN :
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /I "../../../lib/bind9/include" /D "WIN32" /D "__STDC__" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\dig.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\dig.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib ../../../lib/bind9/win32/Release/libbind9.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\dig.pdb" /machine:I386 /out:"../../../Build/Release/dig.exe"
LINK32_OBJS= \
"$(INTDIR)\dig.obj" \
"$(INTDIR)\dighost.obj" \
"..\..\..\lib\dns\win32\Release\libdns.lib" \
"..\..\..\lib\isc\win32\Release\libisc.lib" \
"..\..\..\lib\bind9\win32\Release\libbind9.lib"
"..\..\..\Build\Release\dig.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "dig - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Debug\dig.exe" "$(OUTDIR)\dig.bsc"
!ELSE
ALL : "libbind9 - Win32 Debug" "libisc - Win32 Debug" "libdns - Win32 Debug" "..\..\..\Build\Debug\dig.exe" "$(OUTDIR)\dig.bsc"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libdns - Win32 DebugCLEAN" "libisc - Win32 DebugCLEAN" "libbind9 - Win32 DebugCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\dig.obj"
-@erase "$(INTDIR)\dig.sbr"
-@erase "$(INTDIR)\dighost.obj"
-@erase "$(INTDIR)\dighost.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\dig.bsc"
-@erase "$(OUTDIR)\dig.pdb"
-@erase "..\..\..\Build\Debug\dig.exe"
-@erase "..\..\..\Build\Debug\dig.ilk"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /I "../../../lib/bind9/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\dig.bsc"
BSC32_SBRS= \
"$(INTDIR)\dig.sbr" \
"$(INTDIR)\dighost.sbr"
"$(OUTDIR)\dig.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib ../../../lib/bind9/win32/Debug/libbind9.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\dig.pdb" /debug /machine:I386 /out:"../../../Build/Debug/dig.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\dig.obj" \
"$(INTDIR)\dighost.obj" \
"..\..\..\lib\dns\win32\Debug\libdns.lib" \
"..\..\..\lib\isc\win32\Debug\libisc.lib" \
"..\..\..\lib\bind9\win32\Debug\libbind9.lib"
"..\..\..\Build\Debug\dig.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
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) @<<
@@ -170,6 +75,106 @@ LINK32_OBJS= \
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\dig.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\dig.pdb" /machine:I386 /out:"../../../Build/Release/dig.exe"
LINK32_OBJS= \
"$(INTDIR)\dig.obj" \
"$(INTDIR)\dighost.obj"
"..\..\..\Build\Release\dig.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!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")
@@ -217,84 +222,6 @@ SOURCE=..\dighost.c
!ENDIF
!IF "$(CFG)" == "dig - Win32 Release"
"libdns - Win32 Release" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release"
cd "..\..\..\bin\dig\win32"
"libdns - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "dig - Win32 Debug"
"libdns - Win32 Debug" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"libdns - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!IF "$(CFG)" == "dig - Win32 Release"
"libisc - Win32 Release" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release"
cd "..\..\..\bin\dig\win32"
"libisc - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "dig - Win32 Debug"
"libisc - Win32 Debug" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"libisc - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!IF "$(CFG)" == "dig - Win32 Release"
"libbind9 - Win32 Release" :
cd "\bind-9.3.0a03\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Release"
cd "..\..\..\bin\dig\win32"
"libbind9 - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "dig - Win32 Debug"
"libbind9 - Win32 Debug" :
cd "\bind-9.3.0a03\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"libbind9 - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!ENDIF

View File

@@ -42,7 +42,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /I "../../../lib/bind9/include" /D "WIN32" /D "__STDC__" /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
@@ -50,7 +50,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib ../../../lib/bind9/win32/Release/libbind9.lib /nologo /subsystem:console /machine:I386 /out:"../../../Build/Release/host.exe"
# 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"
@@ -66,7 +66,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /I "../../../lib/bind9/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /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"
@@ -75,7 +75,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib ../../../lib/bind9/win32/Debug/libbind9.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../../Build/Debug/host.exe" /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

View File

@@ -25,29 +25,15 @@ NULL=
NULL=nul
!ENDIF
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "host - Win32 Release"
OUTDIR=.\Release
INTDIR=.\Release
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Release\host.exe"
!ELSE
ALL : "libbind9 - Win32 Release" "libisc - Win32 Release" "libdns - Win32 Release" "..\..\..\Build\Release\host.exe"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libdns - Win32 ReleaseCLEAN" "libisc - Win32 ReleaseCLEAN" "libbind9 - Win32 ReleaseCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\dighost.obj"
-@erase "$(INTDIR)\host.obj"
-@erase "$(INTDIR)\vc60.idb"
@@ -56,89 +42,8 @@ CLEAN :
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /I "../../../lib/bind9/include" /D "WIN32" /D "__STDC__" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\host.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\host.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib ../../../lib/bind9/win32/Release/libbind9.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\host.pdb" /machine:I386 /out:"../../../Build/Release/host.exe"
LINK32_OBJS= \
"$(INTDIR)\dighost.obj" \
"$(INTDIR)\host.obj" \
"..\..\..\lib\dns\win32\Release\libdns.lib" \
"..\..\..\lib\isc\win32\Release\libisc.lib" \
"..\..\..\lib\bind9\win32\Release\libbind9.lib"
"..\..\..\Build\Release\host.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "host - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Debug\host.exe" "$(OUTDIR)\host.bsc"
!ELSE
ALL : "libbind9 - Win32 Debug" "libisc - Win32 Debug" "libdns - Win32 Debug" "..\..\..\Build\Debug\host.exe" "$(OUTDIR)\host.bsc"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libdns - Win32 DebugCLEAN" "libisc - Win32 DebugCLEAN" "libbind9 - Win32 DebugCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\dighost.obj"
-@erase "$(INTDIR)\dighost.sbr"
-@erase "$(INTDIR)\host.obj"
-@erase "$(INTDIR)\host.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\host.bsc"
-@erase "$(OUTDIR)\host.pdb"
-@erase "..\..\..\Build\Debug\host.exe"
-@erase "..\..\..\Build\Debug\host.ilk"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /I "../../../lib/bind9/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\host.bsc"
BSC32_SBRS= \
"$(INTDIR)\dighost.sbr" \
"$(INTDIR)\host.sbr"
"$(OUTDIR)\host.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib ../../../lib/bind9/win32/Debug/libbind9.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\host.pdb" /debug /machine:I386 /out:"../../../Build/Debug/host.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\dighost.obj" \
"$(INTDIR)\host.obj" \
"..\..\..\lib\dns\win32\Debug\libdns.lib" \
"..\..\..\lib\isc\win32\Debug\libisc.lib" \
"..\..\..\lib\bind9\win32\Debug\libbind9.lib"
"..\..\..\Build\Debug\host.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
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) @<<
@@ -170,6 +75,106 @@ LINK32_OBJS= \
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\host.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\host.pdb" /machine:I386 /out:"../../../Build/Release/host.exe"
LINK32_OBJS= \
"$(INTDIR)\dighost.obj" \
"$(INTDIR)\host.obj"
"..\..\..\Build\Release\host.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!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")
@@ -217,84 +222,6 @@ SOURCE=..\host.c
!ENDIF
!IF "$(CFG)" == "host - Win32 Release"
"libdns - Win32 Release" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release"
cd "..\..\..\bin\dig\win32"
"libdns - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "host - Win32 Debug"
"libdns - Win32 Debug" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"libdns - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!IF "$(CFG)" == "host - Win32 Release"
"libisc - Win32 Release" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release"
cd "..\..\..\bin\dig\win32"
"libisc - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "host - Win32 Debug"
"libisc - Win32 Debug" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"libisc - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!IF "$(CFG)" == "host - Win32 Release"
"libbind9 - Win32 Release" :
cd "\bind-9.3.0a03\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Release"
cd "..\..\..\bin\dig\win32"
"libbind9 - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "host - Win32 Debug"
"libbind9 - Win32 Debug" :
cd "\bind-9.3.0a03\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"libbind9 - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!ENDIF

View File

@@ -42,7 +42,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /I "../../../lib/bind9/include" /D "WIN32" /D "__STDC__" /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
@@ -50,7 +50,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib ../../../lib/bind9/win32/Release/libbind9.lib /nologo /subsystem:console /machine:I386 /out:"../../../Build/Release/nslookup.exe"
# 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"
@@ -66,7 +66,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /I "../../../lib/bind9/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /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"
@@ -75,7 +75,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib ../../../lib/bind9/win32/Debug/libbind9.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../../Build/Debug/nslookup.exe" /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

View File

@@ -25,29 +25,15 @@ NULL=
NULL=nul
!ENDIF
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "nslookup - Win32 Release"
OUTDIR=.\Release
INTDIR=.\Release
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Release\nslookup.exe"
!ELSE
ALL : "libbind9 - Win32 Release" "libisc - Win32 Release" "libdns - Win32 Release" "..\..\..\Build\Release\nslookup.exe"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libdns - Win32 ReleaseCLEAN" "libisc - Win32 ReleaseCLEAN" "libbind9 - Win32 ReleaseCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\dighost.obj"
-@erase "$(INTDIR)\nslookup.obj"
-@erase "$(INTDIR)\vc60.idb"
@@ -56,89 +42,8 @@ CLEAN :
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /I "../../../lib/bind9/include" /D "WIN32" /D "__STDC__" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\nslookup.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\nslookup.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib ../../../lib/bind9/win32/Release/libbind9.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\nslookup.pdb" /machine:I386 /out:"../../../Build/Release/nslookup.exe"
LINK32_OBJS= \
"$(INTDIR)\dighost.obj" \
"$(INTDIR)\nslookup.obj" \
"..\..\..\lib\dns\win32\Release\libdns.lib" \
"..\..\..\lib\isc\win32\Release\libisc.lib" \
"..\..\..\lib\bind9\win32\Release\libbind9.lib"
"..\..\..\Build\Release\nslookup.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "nslookup - Win32 Debug"
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Debug\nslookup.exe" "$(OUTDIR)\nslookup.bsc"
!ELSE
ALL : "libbind9 - Win32 Debug" "libisc - Win32 Debug" "libdns - Win32 Debug" "..\..\..\Build\Debug\nslookup.exe" "$(OUTDIR)\nslookup.bsc"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libdns - Win32 DebugCLEAN" "libisc - Win32 DebugCLEAN" "libbind9 - Win32 DebugCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\dighost.obj"
-@erase "$(INTDIR)\dighost.sbr"
-@erase "$(INTDIR)\nslookup.obj"
-@erase "$(INTDIR)\nslookup.sbr"
-@erase "$(INTDIR)\vc60.idb"
-@erase "$(INTDIR)\vc60.pdb"
-@erase "$(OUTDIR)\nslookup.bsc"
-@erase "$(OUTDIR)\nslookup.pdb"
-@erase "..\..\..\Build\Debug\nslookup.exe"
-@erase "..\..\..\Build\Debug\nslookup.ilk"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /I "./" /I "../include" /I "../../../" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /I "../../../lib/bind9/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\nslookup.bsc"
BSC32_SBRS= \
"$(INTDIR)\dighost.sbr" \
"$(INTDIR)\nslookup.sbr"
"$(OUTDIR)\nslookup.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib ../../../lib/bind9/win32/Debug/libbind9.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\nslookup.pdb" /debug /machine:I386 /out:"../../../Build/Debug/nslookup.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\dighost.obj" \
"$(INTDIR)\nslookup.obj" \
"..\..\..\lib\dns\win32\Debug\libdns.lib" \
"..\..\..\lib\isc\win32\Debug\libisc.lib" \
"..\..\..\lib\bind9\win32\Debug\libbind9.lib"
"..\..\..\Build\Debug\nslookup.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
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) @<<
@@ -170,6 +75,106 @@ LINK32_OBJS= \
$(CPP_PROJ) $<
<<
RSC=rc.exe
BSC32=bscmake.exe
BSC32_FLAGS=/nologo /o"$(OUTDIR)\nslookup.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\nslookup.pdb" /machine:I386 /out:"../../../Build/Release/nslookup.exe"
LINK32_OBJS= \
"$(INTDIR)\dighost.obj" \
"$(INTDIR)\nslookup.obj"
"..\..\..\Build\Release\nslookup.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!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")
@@ -217,84 +222,6 @@ SOURCE=..\nslookup.c
!ENDIF
!IF "$(CFG)" == "nslookup - Win32 Release"
"libdns - Win32 Release" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release"
cd "..\..\..\bin\dig\win32"
"libdns - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "nslookup - Win32 Debug"
"libdns - Win32 Debug" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"libdns - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!IF "$(CFG)" == "nslookup - Win32 Release"
"libisc - Win32 Release" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release"
cd "..\..\..\bin\dig\win32"
"libisc - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "nslookup - Win32 Debug"
"libisc - Win32 Debug" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"libisc - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ENDIF
!IF "$(CFG)" == "nslookup - Win32 Release"
"libbind9 - Win32 Release" :
cd "\bind-9.3.0a03\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Release"
cd "..\..\..\bin\dig\win32"
"libbind9 - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!ELSEIF "$(CFG)" == "nslookup - Win32 Debug"
"libbind9 - Win32 Debug" :
cd "\bind-9.3.0a03\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Debug"
cd "..\..\..\bin\dig\win32"
"libbind9 - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\dig\win32"
!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.22 2002/06/17 04:01:03 marka Exp $
# $Id: Makefile.in,v 1.19 2001/06/01 00:44:58 bwelling Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -21,14 +21,14 @@ top_srcdir = @top_srcdir@
@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
@BIND9_INCLUDES@
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES}
CDEFINES =
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_OPENSSL_LIBS@ @DNS_GSSAPI_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@
DNSDEPLIBS = ../../lib/dns/libdns.@A@
@@ -39,15 +39,26 @@ DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS}
LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@
# Alphabetically
TARGETS = dnssec-keygen dnssec-signzone
TARGETS = dnssec-keygen \
dnssec-makekeyset \
dnssec-signkey \
dnssec-signzone
OBJS = dnssectool.@O@
SRCS = dnssec-keygen.c dnssec-signzone.c dnssectool.c
SRCS = dnssec-keygen.c dnssec-makekeyset.c \
dnssec-signkey.c dnssec-signzone.c \
dnssectool.c
MANPAGES = dnssec-keygen.8 dnssec-signzone.8
MANPAGES = dnssec-keygen.8 \
dnssec-makekeyset.8 \
dnssec-signkey.8 \
dnssec-signzone.8
HTMLPAGES = dnssec-keygen.html dnssec-signzone.html
HTMLPAGES = dnssec-keygen.html \
dnssec-makekeyset.html \
dnssec-signkey.html \
dnssec-signzone.html
MANOBJS = ${MANPAGES} ${HTMLPAGES}
@@ -56,6 +67,12 @@ MANOBJS = ${MANPAGES} ${HTMLPAGES}
dnssec-keygen: dnssec-keygen.@O@ ${OBJS} ${DEPLIBS}
${LIBTOOL} ${PURIFY} ${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}
dnssec-signkey: dnssec-signkey.@O@ ${OBJS} ${DEPLIBS}
${LIBTOOL} ${PURIFY} ${CC} ${CFLAGS} -o $@ dnssec-signkey.@O@ ${OBJS} ${LIBS}
dnssec-signzone.@O@: dnssec-signzone.c
${LIBTOOL} ${PURIFY} ${CC} ${ALL_CFLAGS} -DVERSION=\"${VERSION}\" -c $<

View File

@@ -71,7 +71,8 @@ Prints a short summary of the options and arguments to
.TP
\fB-p \fIprotocol\fB\fR
Sets the protocol value for the generated key. The protocol
is a number between 0 and 255. The default is 3 (DNSSEC).
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

View File

@@ -1,5 +1,5 @@
/*
* Portions Copyright (C) 2000-2002 Internet Software Consortium.
* Portions Copyright (C) 2000, 2001 Internet Software Consortium.
* Portions Copyright (C) 1995-2000 by Network Associates, Inc.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-keygen.c,v 1.61 2002/02/20 03:32:58 marka Exp $ */
/* $Id: dnssec-keygen.c,v 1.48.2.1 2001/10/05 00:21:44 bwelling Exp $ */
#include <config.h>
@@ -48,8 +48,6 @@
const char *program = "dnssec-keygen";
int verbose;
static const char *algs = "RSA | RSAMD5 | DH | DSA | RSASHA1 | HMAC-MD5";
static isc_boolean_t
dsa_size_ok(int size) {
return (ISC_TF(size >= 512 && size <= 1024 && size % 64 == 0));
@@ -61,29 +59,27 @@ usage(void) {
fprintf(stderr, " %s -a alg -b bits -n type [options] name\n\n",
program);
fprintf(stderr, "Required options:\n");
fprintf(stderr, " -a algorithm: %s\n", algs);
fprintf(stderr, " -a algorithm: RSA | RSAMD5 | DH | DSA | HMAC-MD5"
"\n");
fprintf(stderr, " -b key size, in bits:\n");
fprintf(stderr, " RSAMD5:\t\t[512..%d]\n", MAX_RSA);
fprintf(stderr, " RSASHA1:\t\t[512..%d]\n", MAX_RSA);
fprintf(stderr, " RSA:\t\t[512..%d]\n", MAX_RSA);
fprintf(stderr, " DH:\t\t[128..4096]\n");
fprintf(stderr, " DSA:\t\t[512..1024] and divisible by 64\n");
fprintf(stderr, " HMAC-MD5:\t[1..512]\n");
fprintf(stderr, " -n nametype: ZONE | HOST | ENTITY | USER\n");
fprintf(stderr, " name: owner of the key\n");
fprintf(stderr, "Other options:\n");
fprintf(stderr, " -c <class> (default: IN)\n");
fprintf(stderr, " -e use large exponent (RSAMD5/RSASHA1 only)\n");
fprintf(stderr, " -g <generator> use specified generator "
"(DH only)\n");
fprintf(stderr, " -t <type>: "
"AUTHCONF | NOAUTHCONF | NOAUTH | NOCONF "
"(default: AUTHCONF)\n");
fprintf(stderr, " -p <protocol>: "
"default: 3 [dnssec]\n");
fprintf(stderr, " -s <strength> strength value this key signs DNS "
"records with (default: 0)\n");
fprintf(stderr, " -r <randomdev>: a file containing random data\n");
fprintf(stderr, " -v <verbose level>\n");
fprintf(stderr, " -c class (default: IN)\n");
fprintf(stderr, " -e use large exponent (RSA only)\n");
fprintf(stderr, " -g use specified generator (DH only)\n");
fprintf(stderr, " -t type: AUTHCONF | NOAUTHCONF | NOAUTH | NOCONF "
"(default: AUTHCONF)\n");
fprintf(stderr, " -p protocol value "
"(default: 2 [email] for USER, 3 [dnssec] otherwise)\n");
fprintf(stderr, " -s strength value this key signs DNS records "
"with (default: 0)\n");
fprintf(stderr, " -r randomdev (a file containing random data)\n");
fprintf(stderr, " -v verbose level\n");
fprintf(stderr, "Output:\n");
fprintf(stderr, " K<name>+<alg>+<id>.key, "
"K<name>+<alg>+<id>.private\n");
@@ -95,7 +91,8 @@ int
main(int argc, char **argv) {
char *algname = NULL, *nametype = NULL, *type = NULL;
char *classname = NULL;
char *endp;
char *randomfile = NULL;
char *prog, *endp;
dst_key_t *key = NULL, *oldkey;
dns_fixedname_t fname;
dns_name_t *name;
@@ -113,15 +110,22 @@ main(int argc, char **argv) {
isc_entropy_t *ectx = NULL;
dns_rdataclass_t rdclass;
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
if ((prog = strrchr(argv[0],'/')) == NULL)
prog = isc_mem_strdup(mctx, argv[0]);
else
prog = isc_mem_strdup(mctx, ++prog);
if (prog == NULL)
fatal("out of memory");
if (argc == 1)
usage();
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
dns_result_register();
while ((ch = isc_commandline_parse(argc, argv,
"a:b:c:eg:n:t:p:s:r:v:h")) != -1)
"a:b:c:eg:n:t:p:s:hr:v:")) != -1)
{
switch (ch) {
case 'a':
@@ -146,9 +150,13 @@ main(int argc, char **argv) {
break;
case 'n':
nametype = isc_commandline_argument;
if (nametype == NULL)
fatal("out of memory");
break;
case 't':
type = isc_commandline_argument;
if (type == NULL)
fatal("out of memory");
break;
case 'p':
protocol = strtol(isc_commandline_argument, &endp, 10);
@@ -164,7 +172,7 @@ main(int argc, char **argv) {
"[0..15]");
break;
case 'r':
setup_entropy(mctx, isc_commandline_argument, &ectx);
randomfile = isc_commandline_argument;
break;
case 'v':
endp = NULL;
@@ -182,8 +190,7 @@ main(int argc, char **argv) {
}
}
if (ectx == NULL)
setup_entropy(mctx, NULL, &ectx);
setup_entropy(mctx, randomfile, &ectx);
ret = dst_lib_init(mctx, ectx,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
if (ret != ISC_R_SUCCESS)
@@ -198,7 +205,9 @@ main(int argc, char **argv) {
if (algname == NULL)
fatal("no algorithm was specified");
if (strcasecmp(algname, "HMAC-MD5") == 0)
if (strcasecmp(algname, "RSA") == 0)
alg = DNS_KEYALG_RSA;
else if (strcasecmp(algname, "HMAC-MD5") == 0)
alg = DST_ALG_HMACMD5;
else {
r.base = algname;
@@ -228,8 +237,7 @@ main(int argc, char **argv) {
fatal("key size not specified (-b option)");
switch (alg) {
case DNS_KEYALG_RSAMD5:
case DNS_KEYALG_RSASHA1:
case DNS_KEYALG_RSA:
if (size != 0 && (size < 512 || size > MAX_RSA))
fatal("RSA key size %d out of range", size);
break;
@@ -239,7 +247,7 @@ main(int argc, char **argv) {
break;
case DNS_KEYALG_DSA:
if (size != 0 && !dsa_size_ok(size))
fatal("invalid DSS key size: %d", size);
fatal("Invalid DSS key size: %d", size);
break;
case DST_ALG_HMACMD5:
if (size < 1 || size > 512)
@@ -247,12 +255,11 @@ main(int argc, char **argv) {
break;
}
if (!(alg == DNS_KEYALG_RSAMD5 || alg == DNS_KEYALG_RSASHA1) &&
rsa_exp != 0)
fatal("specified RSA exponent for a non-RSA key");
if (alg != DNS_KEYALG_RSA && rsa_exp != 0)
fatal("specified RSA exponent without RSA");
if (alg != DNS_KEYALG_DH && generator != 0)
fatal("specified DH generator for a non-DH key");
fatal("specified DH generator without DH");
if (nametype == NULL)
fatal("no nametype specified");
@@ -266,25 +273,31 @@ main(int argc, char **argv) {
else
fatal("invalid nametype %s", nametype);
rdclass = strtoclass(classname);
if (classname != NULL) {
r.base = classname;
r.length = strlen(classname);
ret = dns_rdataclass_fromtext(&rdclass, &r);
if (ret != ISC_R_SUCCESS)
fatal("unknown class %s",classname);
} else
rdclass = dns_rdataclass_in;
flags |= signatory;
if (protocol == -1)
protocol = DNS_KEYPROTO_DNSSEC;
if (protocol == -1) {
if ((flags & DNS_KEYFLAG_OWNERMASK) == DNS_KEYOWNER_USER)
protocol = DNS_KEYPROTO_EMAIL;
else
protocol = DNS_KEYPROTO_DNSSEC;
}
if ((flags & DNS_KEYFLAG_TYPEMASK) == DNS_KEYTYPE_NOKEY) {
if (size > 0)
fatal("specified null key with non-zero size");
fatal("Specified null key with non-zero size");
if ((flags & DNS_KEYFLAG_SIGNATORYMASK) != 0)
fatal("specified null key with signing authority");
fatal("Specified null key with signing authority");
}
if ((flags & DNS_KEYFLAG_OWNERMASK) == DNS_KEYOWNER_ZONE &&
(alg == DNS_KEYALG_DH || alg == DST_ALG_HMACMD5))
fatal("a key with algorithm '%s' cannot be a zone key",
algname);
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
isc_buffer_init(&buf, argv[isc_commandline_index],
@@ -292,12 +305,11 @@ main(int argc, char **argv) {
isc_buffer_add(&buf, strlen(argv[isc_commandline_index]));
ret = dns_name_fromtext(name, &buf, dns_rootname, ISC_FALSE, NULL);
if (ret != ISC_R_SUCCESS)
fatal("invalid key name %s: %s", argv[isc_commandline_index],
fatal("Invalid key name %s: %s", argv[isc_commandline_index],
isc_result_totext(ret));
switch(alg) {
case DNS_KEYALG_RSAMD5:
case DNS_KEYALG_RSASHA1:
case DNS_KEYALG_RSA:
param = rsa_exp;
break;
case DNS_KEYALG_DH:
@@ -326,8 +338,8 @@ main(int argc, char **argv) {
if (ret != ISC_R_SUCCESS) {
char namestr[DNS_NAME_FORMATSIZE];
char algstr[ALG_FORMATSIZE];
dns_name_format(name, namestr, sizeof(namestr));
alg_format(alg, algstr, sizeof(algstr));
dns_name_format(name, namestr, sizeof namestr);
alg_format(alg, algstr, sizeof algstr);
fatal("failed to generate key %s/%s: %s\n",
namestr, algstr, isc_result_totext(ret));
exit(-1);
@@ -369,7 +381,7 @@ main(int argc, char **argv) {
ret = dst_key_tofile(key, DST_TYPE_PUBLIC | DST_TYPE_PRIVATE, NULL);
if (ret != ISC_R_SUCCESS) {
char keystr[KEY_FORMATSIZE];
key_format(key, keystr, sizeof(keystr));
key_format(key, keystr, sizeof keystr);
fatal("failed to write key %s: %s\n", keystr,
isc_result_totext(ret));
}
@@ -377,6 +389,7 @@ main(int argc, char **argv) {
isc_buffer_clear(&buf);
ret = dst_key_buildfilename(key, 0, NULL, &buf);
printf("%s\n", filename);
isc_mem_free(mctx, prog);
dst_key_free(&key);
cleanup_logging(&log);

View File

@@ -1,6 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!--
- Copyright (C) 2001, 2002 Internet Software Consortium.
- 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
@@ -16,7 +16,7 @@
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: dnssec-keygen.docbook,v 1.5 2002/02/20 03:33:00 marka Exp $ -->
<!-- $Id: dnssec-keygen.docbook,v 1.3 2001/04/10 21:50:26 bwelling Exp $ -->
<refentry>
<refentryinfo>
@@ -156,7 +156,8 @@
<listitem>
<para>
Sets the protocol value for the generated key. The protocol
is a number between 0 and 255. The default is 3 (DNSSEC).
is a number between 0 and 255. The default is 2 (email) for
keys of type USER and 3 (DNSSEC) for all other key types.
Other possible values for this argument are listed in
RFC 2535 and its successors.
</para>

View File

@@ -20,7 +20,7 @@
>dnssec-keygen</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -281,7 +281,8 @@ CLASS="REPLACEABLE"
><DD
><P
> Sets the protocol value for the generated key. The protocol
is a number between 0 and 255. The default is 3 (DNSSEC).
is a number between 0 and 255. The default is 2 (email) for
keys of type USER and 3 (DNSSEC) for all other key types.
Other possible values for this argument are listed in
RFC 2535 and its successors.
</P
@@ -568,4 +569,4 @@ NAME="AEN177"
></DIV
></BODY
></HTML
>
>

View File

@@ -48,7 +48,7 @@ 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
the start time. A time relative to the current time is
indicated with now+N. If no \fBend-time\fR is
specified, 30 days from the start time is used as a default.
.TP

View File

@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-makekeyset.c,v 1.58 2001/10/04 23:48:14 gson Exp $ */
/* $Id: dnssec-makekeyset.c,v 1.52.2.1 2001/10/05 00:21:45 bwelling Exp $ */
#include <config.h>
@@ -30,11 +30,11 @@
#include <isc/util.h>
#include <dns/db.h>
#include <dns/diff.h>
#include <dns/dnssec.h>
#include <dns/fixedname.h>
#include <dns/log.h>
#include <dns/rdata.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
#include <dns/result.h>
#include <dns/secalg.h>
@@ -44,6 +44,8 @@
#include "dnssectool.h"
#define BUFSIZE 2048
const char *program = "dnssec-makekeyset";
int verbose;
@@ -110,29 +112,42 @@ zonekey_on_list(dst_key_t *key) {
return (ISC_FALSE);
}
static isc_boolean_t
rdata_on_list(dns_rdata_t *rdata, dns_rdatalist_t *list) {
dns_rdata_t *trdata;
for (trdata = ISC_LIST_HEAD(list->rdata);
trdata != NULL;
trdata = ISC_LIST_NEXT(trdata, link))
{
if (dns_rdata_compare(trdata, rdata) == 0)
return (ISC_TRUE);
}
return (ISC_FALSE);
}
int
main(int argc, char *argv[]) {
int i, ch;
char *startstr = NULL, *endstr = NULL;
char *randomfile = NULL;
dns_fixedname_t fdomain;
dns_name_t *domain = NULL;
char *output = NULL;
char *endp;
unsigned char data[65536];
unsigned char *data;
dns_db_t *db;
dns_dbnode_t *node;
dns_dbversion_t *version;
dns_diff_t diff;
dns_difftuple_t *tuple;
dns_fixedname_t tname;
dst_key_t *key = NULL;
dns_rdata_t rdata = DNS_RDATA_INIT;
dns_rdataset_t rdataset;
dns_rdataclass_t rdclass;
dns_rdata_t *rdata;
dns_rdatalist_t rdatalist, sigrdatalist;
dns_rdataset_t rdataset, sigrdataset;
isc_result_t result;
isc_buffer_t b;
isc_region_t r;
isc_log_t *log = NULL;
keynode_t *keynode;
dns_name_t *savedname = NULL;
unsigned int eflags;
isc_boolean_t pseudorandom = ISC_FALSE;
isc_boolean_t tryverify = ISC_FALSE;
@@ -166,7 +181,7 @@ main(int argc, char *argv[]) {
break;
case 'r':
setup_entropy(mctx, isc_commandline_argument, &ectx);
randomfile = isc_commandline_argument;
break;
case 'v':
@@ -193,14 +208,13 @@ main(int argc, char *argv[]) {
if (argc < 1)
usage();
if (ectx == NULL)
setup_entropy(mctx, NULL, &ectx);
setup_entropy(mctx, randomfile, &ectx);
eflags = ISC_ENTROPY_BLOCKING;
if (!pseudorandom)
eflags |= ISC_ENTROPY_GOODONLY;
result = dst_lib_init(mctx, ectx, eflags);
if (result != ISC_R_SUCCESS)
fatal("could not initialize dst: %s",
fatal("could not initialize dst: %s",
isc_result_totext(result));
isc_stdtime_get(&now);
@@ -223,8 +237,11 @@ main(int argc, char *argv[]) {
setup_logging(verbose, mctx, &log);
dns_diff_init(mctx, &diff);
rdclass = 0;
dns_rdatalist_init(&rdatalist);
rdatalist.rdclass = 0;
rdatalist.type = dns_rdatatype_key;
rdatalist.covers = 0;
rdatalist.ttl = ttl;
ISC_LIST_INIT(keylist);
@@ -238,36 +255,48 @@ main(int argc, char *argv[]) {
if (result != ISC_R_SUCCESS)
fatal("error loading key from %s: %s", argv[i],
isc_result_totext(result));
if (rdclass == 0)
rdclass = dst_key_class(key);
if (rdatalist.rdclass == 0)
rdatalist.rdclass = dst_key_class(key);
isc_buffer_init(&namebuf, namestr, sizeof(namestr));
isc_buffer_init(&namebuf, namestr, sizeof namestr);
result = dns_name_tofilenametext(dst_key_name(key),
ISC_FALSE,
&namebuf);
check_result(result, "dns_name_tofilenametext");
isc_buffer_putuint8(&namebuf, 0);
if (domain == NULL) {
dns_fixedname_init(&fdomain);
domain = dns_fixedname_name(&fdomain);
dns_name_copy(dst_key_name(key), domain, NULL);
} else if (!dns_name_equal(domain, dst_key_name(key))) {
char str[DNS_NAME_FORMATSIZE];
dns_name_format(domain, str, sizeof(str));
fatal("all keys must have the same owner - %s "
"and %s do not match", str, namestr);
if (savedname == NULL) {
savedname = isc_mem_get(mctx, sizeof(dns_name_t));
if (savedname == NULL)
fatal("out of memory");
dns_name_init(savedname, NULL);
result = dns_name_dup(dst_key_name(key), mctx,
savedname);
if (result != ISC_R_SUCCESS)
fatal("out of memory");
} else {
char savednamestr[DNS_NAME_FORMATSIZE];
dns_name_format(savedname, savednamestr,
sizeof savednamestr);
if (!dns_name_equal(savedname, dst_key_name(key)) != 0)
fatal("all keys must have the same owner - %s "
"and %s do not match",
savednamestr, namestr);
}
if (output == NULL) {
output = isc_mem_allocate(mctx,
strlen("keyset-") +
strlen(namestr) + 1);
if (output == NULL)
fatal("out of memory");
sprintf(output, "keyset-%s", namestr);
strcpy(output, "keyset-");
strcat(output, namestr);
}
if (domain == NULL) {
dns_fixedname_init(&fdomain);
domain = dns_fixedname_name(&fdomain);
dns_name_copy(dst_key_name(key), domain, NULL);
}
if (dst_key_iszonekey(key)) {
dst_key_t *zonekey = NULL;
result = dst_key_fromnamedfile(argv[i],
@@ -278,7 +307,8 @@ main(int argc, char *argv[]) {
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));
keynode = isc_mem_get(mctx,
sizeof (keynode_t));
if (keynode == NULL)
fatal("out of memory");
keynode->key = zonekey;
@@ -286,41 +316,39 @@ main(int argc, char *argv[]) {
} else
dst_key_free(&zonekey);
}
dns_rdata_reset(&rdata);
isc_buffer_init(&b, data, sizeof(data));
rdata = isc_mem_get(mctx, sizeof(dns_rdata_t));
if (rdata == NULL)
fatal("out of memory");
dns_rdata_init(rdata);
data = isc_mem_get(mctx, BUFSIZE);
if (data == NULL)
fatal("out of memory");
isc_buffer_init(&b, data, BUFSIZE);
result = dst_key_todns(key, &b);
dst_key_free(&key);
if (result != ISC_R_SUCCESS)
fatal("failed to convert key %s to a DNS KEY: %s",
argv[i], isc_result_totext(result));
isc_buffer_usedregion(&b, &r);
dns_rdata_fromregion(&rdata, rdclass, dns_rdatatype_key, &r);
tuple = NULL;
result = dns_difftuple_create(mctx, DNS_DIFFOP_ADD,
domain, ttl, &rdata, &tuple);
check_result(result, "dns_difftuple_create");
dns_diff_append(&diff, &tuple);
dns_rdata_fromregion(rdata, rdatalist.rdclass,
dns_rdatatype_key, &r);
if (!rdata_on_list(rdata, &rdatalist))
ISC_LIST_APPEND(rdatalist.rdata, rdata, link);
else {
isc_mem_put(mctx, data, BUFSIZE);
isc_mem_put(mctx, rdata, sizeof *rdata);
}
dst_key_free(&key);
}
db = NULL;
result = dns_db_create(mctx, "rbt", dns_rootname, dns_dbtype_zone,
rdclass, 0, NULL, &db);
if (result != ISC_R_SUCCESS)
fatal("failed to create a database");
version = NULL;
dns_db_newversion(db, &version);
result = dns_diff_apply(&diff, db, version);
check_result(result, "dns_diff_apply");
dns_diff_clear(&diff);
dns_fixedname_init(&tname);
dns_rdataset_init(&rdataset);
result = dns_db_find(db, domain, version, dns_rdatatype_key, 0, 0,
NULL, dns_fixedname_name(&tname), &rdataset,
NULL);
check_result(result, "dns_db_find");
result = dns_rdatalist_tordataset(&rdatalist, &rdataset);
check_result(result, "dns_rdatalist_tordataset()");
dns_rdatalist_init(&sigrdatalist);
sigrdatalist.rdclass = rdatalist.rdclass;
sigrdatalist.type = dns_rdatatype_sig;
sigrdatalist.covers = dns_rdatatype_key;
sigrdatalist.ttl = ttl;
if (ISC_LIST_EMPTY(keylist))
fprintf(stderr,
@@ -330,48 +358,69 @@ main(int argc, char *argv[]) {
keynode != NULL;
keynode = ISC_LIST_NEXT(keynode, link))
{
dns_rdata_reset(&rdata);
isc_buffer_init(&b, data, sizeof(data));
rdata = isc_mem_get(mctx, sizeof(dns_rdata_t));
if (rdata == NULL)
fatal("out of memory");
dns_rdata_init(rdata);
data = isc_mem_get(mctx, BUFSIZE);
if (data == NULL)
fatal("out of memory");
isc_buffer_init(&b, data, BUFSIZE);
result = dns_dnssec_sign(domain, &rdataset, keynode->key,
&starttime, &endtime, mctx, &b,
&rdata);
rdata);
isc_entropy_stopcallbacksources(ectx);
if (result != ISC_R_SUCCESS) {
char keystr[KEY_FORMATSIZE];
key_format(keynode->key, keystr, sizeof(keystr));
key_format(keynode->key, keystr, sizeof keystr);
fatal("failed to sign keyset with key %s: %s",
keystr, isc_result_totext(result));
}
if (tryverify) {
result = dns_dnssec_verify(domain, &rdataset,
keynode->key, ISC_TRUE,
mctx, &rdata);
mctx, rdata);
if (result != ISC_R_SUCCESS) {
char keystr[KEY_FORMATSIZE];
key_format(keynode->key, keystr, sizeof(keystr));
key_format(keynode->key, keystr, sizeof keystr);
fatal("signature from key '%s' failed to "
"verify: %s",
keystr, isc_result_totext(result));
}
}
tuple = NULL;
result = dns_difftuple_create(mctx, DNS_DIFFOP_ADD,
domain, ttl, &rdata, &tuple);
check_result(result, "dns_difftuple_create");
dns_diff_append(&diff, &tuple);
ISC_LIST_APPEND(sigrdatalist.rdata, rdata, link);
dns_rdataset_init(&sigrdataset);
result = dns_rdatalist_tordataset(&sigrdatalist, &sigrdataset);
check_result(result, "dns_rdatalist_tordataset()");
}
result = dns_diff_apply(&diff, db, version);
check_result(result, "dns_diff_apply");
dns_diff_clear(&diff);
db = NULL;
result = dns_db_create(mctx, "rbt", dns_rootname, dns_dbtype_zone,
rdataset.rdclass, 0, NULL, &db);
if (result != ISC_R_SUCCESS) {
char domainstr[DNS_NAME_FORMATSIZE];
dns_name_format(domain, domainstr, sizeof domainstr);
fatal("failed to create a database for %s", domainstr);
}
dns_rdataset_disassociate(&rdataset);
version = NULL;
dns_db_newversion(db, &version);
node = NULL;
result = dns_db_findnode(db, domain, ISC_TRUE, &node);
check_result(result, "dns_db_findnode()");
dns_db_addrdataset(db, node, version, 0, &rdataset, 0, NULL);
if (!ISC_LIST_EMPTY(keylist))
dns_db_addrdataset(db, node, version, 0, &sigrdataset, 0,
NULL);
dns_db_detachnode(db, &node);
dns_db_closeversion(db, &version, ISC_TRUE);
result = dns_db_dump(db, version, output);
if (result != ISC_R_SUCCESS) {
char domainstr[DNS_NAME_FORMATSIZE];
dns_name_format(domain, domainstr, sizeof(domainstr));
dns_name_format(domain, domainstr, sizeof domainstr);
fatal("failed to write database for %s to %s",
domainstr, output);
}
@@ -380,6 +429,20 @@ main(int argc, char *argv[]) {
dns_db_detach(&db);
dns_rdataset_disassociate(&rdataset);
while (!ISC_LIST_EMPTY(rdatalist.rdata)) {
rdata = ISC_LIST_HEAD(rdatalist.rdata);
ISC_LIST_UNLINK(rdatalist.rdata, rdata, link);
isc_mem_put(mctx, rdata->data, BUFSIZE);
isc_mem_put(mctx, rdata, sizeof *rdata);
}
while (!ISC_LIST_EMPTY(sigrdatalist.rdata)) {
rdata = ISC_LIST_HEAD(sigrdatalist.rdata);
ISC_LIST_UNLINK(sigrdatalist.rdata, rdata, link);
isc_mem_put(mctx, rdata->data, BUFSIZE);
isc_mem_put(mctx, rdata, sizeof *rdata);
}
while (!ISC_LIST_EMPTY(keylist)) {
keynode = ISC_LIST_HEAD(keylist);
ISC_LIST_UNLINK(keylist, keynode, link);
@@ -387,6 +450,11 @@ main(int argc, char *argv[]) {
isc_mem_put(mctx, keynode, sizeof(keynode_t));
}
if (savedname != NULL) {
dns_name_free(savedname, mctx);
isc_mem_put(mctx, savedname, sizeof(dns_name_t));
}
cleanup_logging(&log);
cleanup_entropy(&ectx);

View File

@@ -1,6 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!--
- Copyright (C) 2001 Internet Software Consortium.
- Copyright (C) 2001, 2003 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +16,7 @@
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: dnssec-makekeyset.docbook,v 1.3 2001/09/14 20:20:54 gson Exp $ -->
<!-- $Id: dnssec-makekeyset.docbook,v 1.2.2.1.6.2 2003/02/17 07:05:03 marka Exp $ -->
<refentry>
<refentryinfo>
@@ -98,7 +98,7 @@
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
the start time. A time relative to the current time is
indicated with now+N. If no <option>end-time</option> is
specified, 30 days from the start time is used as a default.
</para>

View File

@@ -20,7 +20,7 @@
>dnssec-makekeyset</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -195,7 +195,7 @@ CLASS="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
the start time. A time relative to the current time is
indicated with now+N. If no <TT
CLASS="OPTION"
>end-time</TT
@@ -401,4 +401,4 @@ NAME="AEN123"
></DIV
></BODY
></HTML
>
>

View File

@@ -51,7 +51,7 @@ 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
the start time. A time relative to the current time is
indicated with now+N. If no \fBend-time\fR is
specified, 30 days from the start time is used as a default.
.TP

View File

@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-signkey.c,v 1.57 2001/10/11 22:53:46 gson Exp $ */
/* $Id: dnssec-signkey.c,v 1.50.2.1 2001/10/05 00:21:46 bwelling Exp $ */
#include <config.h>
@@ -31,12 +31,12 @@
#include <dns/db.h>
#include <dns/dbiterator.h>
#include <dns/diff.h>
#include <dns/dnssec.h>
#include <dns/fixedname.h>
#include <dns/log.h>
#include <dns/rdata.h>
#include <dns/rdataclass.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
#include <dns/rdatasetiter.h>
#include <dns/rdatastruct.h>
@@ -50,6 +50,8 @@
const char *program = "dnssec-signkey";
int verbose;
#define BUFSIZE 2048
typedef struct keynode keynode_t;
struct keynode {
dst_key_t *key;
@@ -117,11 +119,9 @@ loadkeys(dns_name_t *name, dns_rdataset_t *rdataset) {
result = dns_dnssec_keyfromrdata(name, &rdata, mctx, &key);
if (result != ISC_R_SUCCESS)
continue;
if (!dst_key_iszonekey(key)) {
dst_key_free(&key);
if (!dst_key_iszonekey(key))
continue;
}
keynode = isc_mem_get(mctx, sizeof(keynode_t));
keynode = isc_mem_get(mctx, sizeof (keynode_t));
if (keynode == NULL)
fatal("out of memory");
keynode->key = key;
@@ -158,28 +158,28 @@ main(int argc, char *argv[]) {
dns_name_t *domain;
char *output = NULL;
char *endp;
unsigned char data[65536];
unsigned char *data;
char *randomfile = NULL;
dns_db_t *db;
dns_dbnode_t *node;
dns_dbversion_t *version;
dns_diff_t diff;
dns_difftuple_t *tuple;
dns_dbiterator_t *dbiter;
dns_rdatasetiter_t *rdsiter;
dst_key_t *key = NULL;
dns_rdata_t rdata = DNS_RDATA_INIT;
dns_rdata_t *rdata;
dns_rdata_t sigrdata = DNS_RDATA_INIT;
dns_rdataset_t rdataset, sigrdataset;
dns_rdatalist_t sigrdatalist;
dns_rdataset_t rdataset, sigrdataset, newsigrdataset;
dns_rdata_sig_t sig;
isc_result_t result;
isc_buffer_t b;
isc_textregion_t tr;
isc_log_t *log = NULL;
keynode_t *keynode;
isc_boolean_t pseudorandom = ISC_FALSE;
unsigned int eflags;
dns_rdataclass_t rdclass;
isc_boolean_t tryverify = ISC_FALSE;
isc_boolean_t settime = ISC_FALSE;
static isc_boolean_t tryverify = ISC_FALSE;
result = isc_mem_create(0, 0, &mctx);
check_result(result, "isc_mem_create()");
@@ -209,7 +209,7 @@ main(int argc, char *argv[]) {
break;
case 'r':
setup_entropy(mctx, isc_commandline_argument, &ectx);
randomfile = isc_commandline_argument;
break;
case 'v':
@@ -232,10 +232,16 @@ main(int argc, char *argv[]) {
if (argc < 2)
usage();
rdclass = strtoclass(classname);
if (classname != NULL) {
tr.base = classname;
tr.length = strlen(classname);
result = dns_rdataclass_fromtext(&rdclass, &tr);
if (result != ISC_R_SUCCESS)
fatal("unknown class %s",classname);
} else
rdclass = dns_rdataclass_in;
if (ectx == NULL)
setup_entropy(mctx, NULL, &ectx);
setup_entropy(mctx, randomfile, &ectx);
eflags = ISC_ENTROPY_BLOCKING;
if (!pseudorandom)
eflags |= ISC_ENTROPY_GOODONLY;
@@ -250,12 +256,6 @@ main(int argc, char *argv[]) {
!(startstr == NULL && endstr == NULL))
fatal("if -s or -e is specified, both must be");
if (startstr != NULL) {
starttime = strtotime(startstr, now, now);
endtime = strtotime(endstr, now, starttime);
settime = ISC_TRUE;
}
setup_logging(verbose, mctx, &log);
if (strlen(argv[0]) < 8 || strncmp(argv[0], "keyset-", 7) != 0)
@@ -306,7 +306,8 @@ main(int argc, char *argv[]) {
strlen("signedkey-") + strlen(tdomain) + 1);
if (output == NULL)
fatal("out of memory");
sprintf(output, "signedkey-%s", tdomain);
strcpy(output, "signedkey-");
strcat(output, tdomain);
version = NULL;
dns_db_newversion(db, &version);
@@ -317,15 +318,13 @@ main(int argc, char *argv[]) {
0, &rdataset, &sigrdataset);
if (result != ISC_R_SUCCESS) {
char domainstr[DNS_NAME_FORMATSIZE];
dns_name_format(domain, domainstr, sizeof(domainstr));
dns_name_format(domain, domainstr, sizeof domainstr);
fatal("failed to find rdataset '%s KEY': %s",
domainstr, isc_result_totext(result));
}
loadkeys(domain, &rdataset);
dns_diff_init(mctx, &diff);
if (!dns_rdataset_isassociated(&sigrdataset))
fatal("no SIG KEY set present");
@@ -340,29 +339,47 @@ main(int argc, char *argv[]) {
ISC_TRUE, mctx, &sigrdata);
if (result != ISC_R_SUCCESS) {
char keystr[KEY_FORMATSIZE];
key_format(key, keystr, sizeof(keystr));
key_format(key, keystr, sizeof keystr);
fatal("signature by key '%s' did not verify: %s",
keystr, isc_result_totext(result));
}
if (!settime) {
starttime = sig.timesigned;
endtime = sig.timeexpire;
settime = ISC_TRUE;
}
dns_rdata_freestruct(&sig);
dns_rdata_reset(&sigrdata);
dns_rdata_freestruct(&sig);
result = dns_rdataset_next(&sigrdataset);
} while (result == ISC_R_SUCCESS);
if (startstr != NULL) {
starttime = strtotime(startstr, now, now);
endtime = strtotime(endstr, now, starttime);
} else {
starttime = sig.timesigned;
endtime = sig.timeexpire;
}
for (keynode = ISC_LIST_HEAD(keylist);
keynode != NULL;
keynode = ISC_LIST_NEXT(keynode, link))
if (!keynode->verified)
fatal("not all zone keys self signed the key set");
fatal("Not all zone keys self signed the key set");
result = dns_rdataset_first(&sigrdataset);
check_result(result, "dns_rdataset_first()");
dns_rdataset_current(&sigrdataset, &sigrdata);
result = dns_rdata_tostruct(&sigrdata, &sig, mctx);
check_result(result, "dns_rdata_tostruct()");
dns_rdataset_disassociate(&sigrdataset);
argc -= 1;
argv += 1;
dns_rdatalist_init(&sigrdatalist);
sigrdatalist.rdclass = rdataset.rdclass;
sigrdatalist.type = dns_rdatatype_sig;
sigrdatalist.covers = dns_rdatatype_key;
sigrdatalist.ttl = rdataset.ttl;
for (i = 0; i < argc; i++) {
key = NULL;
result = dst_key_fromnamedfile(argv[i],
@@ -373,45 +390,45 @@ main(int argc, char *argv[]) {
fatal("failed to read key %s from disk: %s",
argv[i], isc_result_totext(result));
dns_rdata_reset(&rdata);
isc_buffer_init(&b, data, sizeof(data));
rdata = isc_mem_get(mctx, sizeof(dns_rdata_t));
if (rdata == NULL)
fatal("out of memory");
dns_rdata_init(rdata);
data = isc_mem_get(mctx, BUFSIZE);
if (data == NULL)
fatal("out of memory");
isc_buffer_init(&b, data, BUFSIZE);
result = dns_dnssec_sign(domain, &rdataset, key,
&starttime, &endtime,
mctx, &b, &rdata);
mctx, &b, rdata);
isc_entropy_stopcallbacksources(ectx);
if (result != ISC_R_SUCCESS) {
char keystr[KEY_FORMATSIZE];
key_format(key, keystr, sizeof(keystr));
key_format(key, keystr, sizeof keystr);
fatal("key '%s' failed to sign data: %s",
keystr, isc_result_totext(result));
}
if (tryverify) {
result = dns_dnssec_verify(domain, &rdataset, key,
ISC_TRUE, mctx, &rdata);
ISC_TRUE, mctx, rdata);
if (result != ISC_R_SUCCESS) {
char keystr[KEY_FORMATSIZE];
key_format(key, keystr, sizeof(keystr));
key_format(key, keystr, sizeof keystr);
fatal("signature from key '%s' failed to "
"verify: %s",
keystr, isc_result_totext(result));
}
}
tuple = NULL;
result = dns_difftuple_create(mctx, DNS_DIFFOP_ADD,
domain, rdataset.ttl,
&rdata, &tuple);
check_result(result, "dns_difftuple_create");
dns_diff_append(&diff, &tuple);
ISC_LIST_APPEND(sigrdatalist.rdata, rdata, link);
dst_key_free(&key);
}
result = dns_db_deleterdataset(db, node, version, dns_rdatatype_sig,
dns_rdatatype_key);
check_result(result, "dns_db_deleterdataset");
dns_rdataset_init(&newsigrdataset);
result = dns_rdatalist_tordataset(&sigrdatalist, &newsigrdataset);
check_result (result, "dns_rdatalist_tordataset()");
result = dns_diff_apply(&diff, db, version);
check_result(result, "dns_diff_apply");
dns_diff_clear(&diff);
dns_db_addrdataset(db, node, version, 0, &newsigrdataset, 0, NULL);
check_result (result, "dns_db_addrdataset()");
dns_db_detachnode(db, &node);
dns_db_closeversion(db, &version, ISC_TRUE);
@@ -423,7 +440,16 @@ main(int argc, char *argv[]) {
printf("%s\n", output);
dns_rdataset_disassociate(&rdataset);
dns_rdataset_disassociate(&sigrdataset);
dns_rdataset_disassociate(&newsigrdataset);
dns_rdata_freestruct(&sig);
while (!ISC_LIST_EMPTY(sigrdatalist.rdata)) {
rdata = ISC_LIST_HEAD(sigrdatalist.rdata);
ISC_LIST_UNLINK(sigrdatalist.rdata, rdata, link);
isc_mem_put(mctx, rdata->data, BUFSIZE);
isc_mem_put(mctx, rdata, sizeof *rdata);
}
dns_db_detach(&db);

View File

@@ -1,6 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!--
- Copyright (C) 2001 Internet Software Consortium.
- Copyright (C) 2001, 2003 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +16,7 @@
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: dnssec-signkey.docbook,v 1.2 2001/04/10 21:50:34 bwelling Exp $ -->
<!-- $Id: dnssec-signkey.docbook,v 1.2.120.2 2003/02/17 07:05:03 marka Exp $ -->
<refentry>
<refentryinfo>
@@ -108,7 +108,7 @@
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
the start time. A time relative to the current time is
indicated with now+N. If no <option>end-time</option> is
specified, 30 days from the start time is used as a default.
</para>

View File

@@ -20,7 +20,7 @@
>dnssec-signkey</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -207,7 +207,7 @@ CLASS="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
the start time. A time relative to the current time is
indicated with now+N. If no <TT
CLASS="OPTION"
>end-time</TT
@@ -401,4 +401,4 @@ NAME="AEN128"
></DIV
></BODY
></HTML
>
>

View File

@@ -57,7 +57,7 @@ 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
the start time. A time relative to the current time is
indicated with now+N. If no \fBend-time\fR is
specified, 30 days from the start time is used as a default.
.TP

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!--
- Copyright (C) 2001 Internet Software Consortium.
- Copyright (C) 2001, 2003 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +16,7 @@
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-->
<!-- $Id: dnssec-signzone.docbook,v 1.2 2001/04/10 21:50:37 bwelling Exp $ -->
<!-- $Id: dnssec-signzone.docbook,v 1.2.52.2 2003/02/17 07:05:03 marka Exp $ -->
<refentry>
<refentryinfo>
@@ -126,7 +126,7 @@
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
the start time. A time relative to the current time is
indicated with now+N. If no <option>end-time</option> is
specified, 30 days from the start time is used as a default.
</para>

View File

@@ -20,7 +20,7 @@
>dnssec-signzone</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -268,7 +268,7 @@ CLASS="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
the start time. A time relative to the current time is
indicated with now+N. If no <TT
CLASS="OPTION"
>end-time</TT
@@ -550,4 +550,4 @@ NAME="AEN179"
></DIV
></BODY
></HTML
>
>

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssectool.c,v 1.36 2001/11/27 22:08:58 bwelling Exp $ */
/* $Id: dnssectool.c,v 1.31.2.2 2001/11/27 22:41:49 gson Exp $ */
#include <config.h>
@@ -23,8 +23,6 @@
#include <isc/buffer.h>
#include <isc/entropy.h>
#include <isc/list.h>
#include <isc/mem.h>
#include <isc/string.h>
#include <isc/time.h>
#include <isc/util.h>
@@ -33,7 +31,6 @@
#include <dns/log.h>
#include <dns/name.h>
#include <dns/rdatastruct.h>
#include <dns/rdataclass.h>
#include <dns/rdatatype.h>
#include <dns/result.h>
#include <dns/secalg.h>
@@ -44,15 +41,7 @@
extern int verbose;
extern const char *program;
typedef struct entropysource entropysource_t;
struct entropysource {
isc_entropysource_t *source;
isc_mem_t *mctx;
ISC_LINK(entropysource_t) link;
};
static ISC_LIST(entropysource_t) sources;
static isc_entropysource_t *source = NULL;
static fatalcallback_t *fatalcallback = NULL;
void
@@ -122,8 +111,8 @@ sig_format(dns_rdata_sig_t *sig, char *cp, unsigned int size) {
char namestr[DNS_NAME_FORMATSIZE];
char algstr[DNS_NAME_FORMATSIZE];
dns_name_format(&sig->signer, namestr, sizeof(namestr));
alg_format(sig->algorithm, algstr, sizeof(algstr));
dns_name_format(&sig->signer, namestr, sizeof namestr);
alg_format(sig->algorithm, algstr, sizeof algstr);
snprintf(cp, size, "%s/%s/%d", namestr, algstr, sig->keyid);
}
@@ -132,8 +121,8 @@ key_format(const dst_key_t *key, char *cp, unsigned int size) {
char namestr[DNS_NAME_FORMATSIZE];
char algstr[DNS_NAME_FORMATSIZE];
dns_name_format(dst_key_name(key), namestr, sizeof(namestr));
alg_format((dns_secalg_t) dst_key_alg(key), algstr, sizeof(algstr));
dns_name_format(dst_key_name(key), namestr, sizeof namestr);
alg_format((dns_secalg_t) dst_key_alg(key), algstr, sizeof algstr);
snprintf(cp, size, "%s/%s/%d", namestr, algstr, dst_key_id(key));
}
@@ -209,8 +198,6 @@ cleanup_logging(isc_log_t **logp) {
void
setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx) {
isc_result_t result;
isc_entropysource_t *source = NULL;
entropysource_t *elt;
int usekeyboard = ISC_ENTROPY_KEYBOARDMAYBE;
REQUIRE(ectx != NULL);
@@ -219,7 +206,6 @@ setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx) {
result = isc_entropy_create(mctx, ectx);
if (result != ISC_R_SUCCESS)
fatal("could not create entropy object");
ISC_LIST_INIT(sources);
}
if (randomfile != NULL && strcmp(randomfile, "keyboard") == 0) {
@@ -233,32 +219,17 @@ setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx) {
if (result != ISC_R_SUCCESS)
fatal("could not initialize entropy source: %s",
isc_result_totext(result));
if (source != NULL) {
elt = isc_mem_get(mctx, sizeof(*elt));
if (elt == NULL)
fatal("out of memory");
elt->source = source;
elt->mctx = mctx;
ISC_LINK_INIT(elt, link);
ISC_LIST_APPEND(sources, elt, link);
}
}
void
cleanup_entropy(isc_entropy_t **ectx) {
entropysource_t *source;
while (!ISC_LIST_EMPTY(sources)) {
source = ISC_LIST_HEAD(sources);
ISC_LIST_UNLINK(sources, source, link);
isc_entropy_destroysource(&source->source);
isc_mem_put(source->mctx, source, sizeof(*source));
}
if (source != NULL)
isc_entropy_destroysource(&source);
isc_entropy_detach(ectx);
}
isc_stdtime_t
strtotime(const char *str, isc_int64_t now, isc_int64_t base) {
strtotime(char *str, isc_int64_t now, isc_int64_t base) {
isc_int64_t val, offset;
isc_result_t result;
char *endp;
@@ -287,19 +258,3 @@ strtotime(const char *str, isc_int64_t now, isc_int64_t base) {
return ((isc_stdtime_t) val);
}
dns_rdataclass_t
strtoclass(const char *str) {
isc_consttextregion_t r;
dns_rdataclass_t rdclass;
isc_result_t ret;
if (str == NULL)
return dns_rdataclass_in;
r.base = str;
r.length = strlen(str);
ret = dns_rdataclass_fromtext(&rdclass, (isc_textregion_t *)&r);
if (ret != ISC_R_SUCCESS)
fatal("unknown class %s", str);
return (rdclass);
}

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssectool.h,v 1.16 2001/09/21 00:17:01 bwelling Exp $ */
/* $Id: dnssectool.h,v 1.15 2001/08/08 22:54:16 gson Exp $ */
#ifndef DNSSECTOOL_H
#define DNSSECTOOL_H 1
@@ -68,9 +68,6 @@ void
cleanup_entropy(isc_entropy_t **ectx);
isc_stdtime_t
strtotime(const char *str, isc_int64_t now, isc_int64_t base);
dns_rdataclass_t
strtoclass(const char *str);
strtotime(char *str, isc_int64_t now, isc_int64_t base);
#endif /* DNSSEC_DNSSECTOOL_H */

View File

@@ -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.77 2001/11/20 01:14:55 gson Exp $
# $Id: Makefile.in,v 1.74 2001/06/01 00:45:00 bwelling Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -21,7 +21,7 @@ top_srcdir = @top_srcdir@
@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
@BIND9_INCLUDES@
#
# Add database drivers here.
@@ -32,39 +32,36 @@ DBDRIVER_INCLUDES =
DBDRIVER_LIBS =
CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include \
${LWRES_INCLUDES} ${DNS_INCLUDES} ${BIND9_INCLUDES} \
${LWRES_INCLUDES} ${DNS_INCLUDES} \
${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} ${ISC_INCLUDES} \
${DBDRIVER_INCLUDES}
CDEFINES =
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_OPENSSL_LIBS@ @DNS_GSSAPI_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
ISCLIBS = ../../lib/isc/libisc.@A@
LWRESLIBS = ../../lib/lwres/liblwres.@A@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
DNSDEPLIBS = ../../lib/dns/libdns.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCDEPLIBS = ../../lib/isccc/libisccc.@A@
ISCDEPLIBS = ../../lib/isc/libisc.@A@
LWRESDEPLIBS = ../../lib/lwres/liblwres.@A@
BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
DEPLIBS = ${LWRESDEPLIBS} ${DNSDEPLIBS} ${BIND9DEPLIBS} \
DEPLIBS = ${LWRESDEPLIBS} ${DNSDEPLIBS} \
${ISCCFGDEPLIBS} ${ISCCCDEPLIBS} ${ISCDEPLIBS}
LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} \
LIBS = ${LWRESLIBS} ${DNSLIBS} \
${ISCCFGLIBS} ${ISCCCLIBS} ${ISCLIBS} ${DBDRIVER_LIBS} @LIBS@
SUBDIRS = unix
TARGETS = named lwresd
OBJS = aclconf.@O@ builtin.@O@ client.@O@ config.@O@ control.@O@ \
controlconf.@O@ interfacemgr.@O@ \
OBJS = aclconf.@O@ client.@O@ config.@O@ control.@O@ controlconf.@O@ interfacemgr.@O@ \
listenlist.@O@ log.@O@ logconf.@O@ main.@O@ notify.@O@ \
query.@O@ server.@O@ sortlist.@O@ \
tkeyconf.@O@ tsigconf.@O@ update.@O@ xfrout.@O@ \
@@ -75,8 +72,7 @@ OBJS = aclconf.@O@ builtin.@O@ client.@O@ config.@O@ control.@O@ \
UOBJS = unix/os.@O@
SRCS = aclconf.c builtin.c client.c config.c control.c \
controlconf.c interfacemgr.c \
SRCS = aclconf.c client.c config.c control.c controlconf.c interfacemgr.c \
listenlist.c log.c logconf.c main.c notify.c \
query.c server.c sortlist.c \
tkeyconf.c tsigconf.c update.c xfrout.c \
@@ -116,7 +112,7 @@ docclean manclean maintainer-clean::
rm -f ${MANOBJS}
clean distclean maintainer-clean::
rm -f ${TARGETS} ${OBJS}
rm -f ${TARGETS}
installdirs:
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1999-2002 Internet Software Consortium.
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: aclconf.c,v 1.29 2002/02/20 03:33:04 marka Exp $ */
/* $Id: aclconf.c,v 1.27 2001/04/12 21:02:46 tale Exp $ */
#include <config.h>
@@ -23,8 +23,6 @@
#include <isc/string.h> /* Required for HP/UX (and others?) */
#include <isc/util.h>
#include <isccfg/namedconf.h>
#include <dns/acl.h>
#include <dns/fixedname.h>
#include <dns/log.h>

View File

@@ -1,207 +0,0 @@
/*
* Copyright (C) 2001, 2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND 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: builtin.c,v 1.3 2002/02/20 03:33:06 marka Exp $ */
/*
* The built-in "version", "hostname", and "authors" databases.
*/
#include <config.h>
#include <string.h>
#include <stdio.h>
#include <isc/print.h>
#include <isc/result.h>
#include <isc/util.h>
#include <dns/sdb.h>
#include <dns/result.h>
#include <named/builtin.h>
#include <named/globals.h>
#include <named/server.h>
#include <named/os.h>
typedef struct builtin builtin_t;
static isc_result_t do_version_lookup(dns_sdblookup_t *lookup);
static isc_result_t do_hostname_lookup(dns_sdblookup_t *lookup);
static isc_result_t do_authors_lookup(dns_sdblookup_t *lookup);
/*
* We can't use function pointers as the db_data directly
* because ANSI C does not guarantee that function pointers
* can safely be cast to void pointers and back.
*/
struct builtin {
isc_result_t (*do_lookup)(dns_sdblookup_t *lookup);
};
static builtin_t version_builtin = { do_version_lookup };
static builtin_t hostname_builtin = { do_hostname_lookup };
static builtin_t authors_builtin = { do_authors_lookup };
static dns_sdbimplementation_t *builtin_impl;
static isc_result_t
builtin_lookup(const char *zone, const char *name, void *dbdata,
dns_sdblookup_t *lookup)
{
builtin_t *b = (builtin_t *) dbdata;
UNUSED(zone);
if (strcmp(name, "@") == 0)
return (b->do_lookup(lookup));
else
return (ISC_R_NOTFOUND);
}
static isc_result_t
put_txt(dns_sdblookup_t *lookup, const char *text) {
unsigned char buf[256];
unsigned int len = strlen(text);
if (len > 255)
len = 255; /* Silently truncate */
buf[0] = len;
memcpy(&buf[1], text, len);
return (dns_sdb_putrdata(lookup, dns_rdatatype_txt, 0, buf, len + 1));
}
static isc_result_t
do_version_lookup(dns_sdblookup_t *lookup) {
if (ns_g_server->version_set) {
if (ns_g_server->version == NULL)
return (ISC_R_SUCCESS);
else
return (put_txt(lookup, ns_g_server->version));
} else {
return (put_txt(lookup, ns_g_version));
}
}
static isc_result_t
do_hostname_lookup(dns_sdblookup_t *lookup) {
if (ns_g_server->hostname_set) {
if (ns_g_server->hostname == NULL)
return (ISC_R_SUCCESS);
else
return (put_txt(lookup, ns_g_server->hostname));
} else {
char buf[256];
isc_result_t result = ns_os_gethostname(buf, sizeof(buf));
if (result != ISC_R_SUCCESS)
return (result);
return (put_txt(lookup, buf));
}
}
static isc_result_t
do_authors_lookup(dns_sdblookup_t *lookup) {
isc_result_t result;
const char **p;
static const char *authors[] = {
"Mark Andrews",
"James Brister",
"Ben Cottrell",
"Michael Graff",
"Andreas Gustafsson",
"Bob Halley",
"David Lawrence",
"Danny Mayer",
"Damien Neil",
"Matt Nelson",
"Michael Sawyer",
"Brian Wellington",
NULL
};
/*
* If a version string is specified, disable the authors.bind zone.
*/
if (ns_g_server->version_set)
return (ISC_R_SUCCESS);
for (p = authors; *p != NULL; p++) {
result = put_txt(lookup, *p);
if (result != ISC_R_SUCCESS)
return (result);
}
return (ISC_R_SUCCESS);
}
static isc_result_t
builtin_authority(const char *zone, void *dbdata, dns_sdblookup_t *lookup) {
isc_result_t result;
UNUSED(zone);
UNUSED(dbdata);
result = dns_sdb_putsoa(lookup, "@", "hostmaster", 0);
if (result != ISC_R_SUCCESS)
return (ISC_R_FAILURE);
result = dns_sdb_putrr(lookup, "ns", 0, "@");
if (result != ISC_R_SUCCESS)
return (ISC_R_FAILURE);
return (ISC_R_SUCCESS);
}
static isc_result_t
builtin_create(const char *zone, int argc, char **argv,
void *driverdata, void **dbdata)
{
UNUSED(zone);
UNUSED(driverdata);
if (argc != 1)
return (DNS_R_SYNTAX);
if (strcmp(argv[0], "version") == 0)
*dbdata = &version_builtin;
else if (strcmp(argv[0], "hostname") == 0)
*dbdata = &hostname_builtin;
else if (strcmp(argv[0], "authors") == 0)
*dbdata = &authors_builtin;
else
return (ISC_R_NOTIMPLEMENTED);
return (ISC_R_SUCCESS);
}
static dns_sdbmethods_t builtin_methods = {
builtin_lookup,
builtin_authority,
NULL, /* allnodes */
builtin_create,
NULL /* destroy */
};
isc_result_t
ns_builtin_init(void) {
RUNTIME_CHECK(dns_sdb_register("_builtin", &builtin_methods, NULL,
DNS_SDBFLAG_RELATIVEOWNER |
DNS_SDBFLAG_RELATIVERDATA,
ns_g_mctx, &builtin_impl)
== ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
}
void
ns_builtin_deinit(void) {
dns_sdb_unregister(&builtin_impl);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1999-2002 Internet Software Consortium.
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: client.c,v 1.210 2002/05/24 06:22:30 marka Exp $ */
/* $Id: client.c,v 1.176.2.11.4.2 2003/02/17 07:05:04 marka Exp $ */
#include <config.h>
@@ -33,7 +33,6 @@
#include <dns/dispatch.h>
#include <dns/events.h>
#include <dns/message.h>
#include <dns/rcode.h>
#include <dns/rdata.h>
#include <dns/rdataclass.h>
#include <dns/rdatalist.h>
@@ -96,7 +95,6 @@ struct ns_clientmgr {
/* Locked by lock. */
isc_boolean_t exiting;
client_list_t active; /* Active clients */
client_list_t recursing; /* Recursing clients */
client_list_t inactive; /* To be recycled */
};
@@ -152,7 +150,7 @@ struct ns_clientmgr {
#define NS_CLIENTSTATE_WORKING 4
/*
* The client object has received a request and is working
* on it. It has a view, and it may have any of a non-reset OPT,
* on it. It has a view, and it may have any of a non-reset OPT,
* recursion quota, and an outstanding write request.
*/
@@ -175,27 +173,6 @@ static void client_start(isc_task_t *task, isc_event_t *event);
static void client_request(isc_task_t *task, isc_event_t *event);
static void ns_client_dumpmessage(ns_client_t *client, const char *reason);
void
ns_client_recursing(ns_client_t *client, isc_boolean_t killoldest) {
ns_client_t *oldest;
REQUIRE(NS_CLIENT_VALID(client));
LOCK(&client->manager->lock);
if (killoldest) {
oldest = ISC_LIST_HEAD(client->manager->recursing);
if (oldest != NULL) {
ns_query_cancel(oldest);
ISC_LIST_UNLINK(*oldest->list, oldest, link);
ISC_LIST_APPEND(client->manager->active, oldest, link);
oldest->list = &client->manager->active;
}
}
ISC_LIST_UNLINK(*client->list, client, link);
ISC_LIST_APPEND(client->manager->recursing, client, link);
client->list = &client->manager->recursing;
UNLOCK(&client->manager->lock);
}
void
ns_client_settimeout(ns_client_t *client, unsigned int seconds) {
isc_result_t result;
@@ -311,9 +288,9 @@ exit_check(ns_client_t *client) {
isc_quota_detach(&client->tcpquota);
if (client->timerset) {
(void)isc_timer_reset(client->timer,
isc_timertype_inactive,
NULL, NULL, ISC_TRUE);
(void) isc_timer_reset(client->timer,
isc_timertype_inactive,
NULL, NULL, ISC_TRUE);
client->timerset = ISC_FALSE;
}
@@ -446,8 +423,7 @@ exit_check(ns_client_t *client) {
client->list = NULL;
if (manager->exiting &&
ISC_LIST_EMPTY(manager->active) &&
ISC_LIST_EMPTY(manager->inactive) &&
ISC_LIST_EMPTY(manager->recursing))
ISC_LIST_EMPTY(manager->inactive))
destroy_manager = manager;
}
/*
@@ -536,6 +512,7 @@ client_shutdown(isc_task_t *task, isc_event_t *event) {
(void)exit_check(client);
}
static void
ns_client_endrequest(ns_client_t *client) {
INSIST(client->naccepts == 0);
@@ -633,7 +610,7 @@ ns_client_next(ns_client_t *client, isc_result_t result) {
if (client->newstate > newstate)
client->newstate = newstate;
(void)exit_check(client);
(void) exit_check(client);
}
@@ -763,8 +740,7 @@ client_sendpkg(ns_client_t *client, isc_buffer_t *buffer) {
sockflags |= ISC_SOCKFLAG_NORETRY;
}
if ((client->attributes & NS_CLIENTATTR_PKTINFO) != 0 &&
(client->attributes & NS_CLIENTATTR_MULTICAST) == 0)
if ((client->attributes & NS_CLIENTATTR_PKTINFO) != 0)
pktinfo = &client->pktinfo;
else
pktinfo = NULL;
@@ -842,8 +818,6 @@ ns_client_send(ns_client_t *client) {
dns_compress_t cctx;
isc_boolean_t cleanup_cctx = ISC_FALSE;
unsigned char sendbuf[SEND_BUFFER_SIZE];
unsigned int dnssec_opts;
unsigned int preferred_glue;
REQUIRE(NS_CLIENT_VALID(client));
@@ -852,19 +826,6 @@ ns_client_send(ns_client_t *client) {
if ((client->attributes & NS_CLIENTATTR_RA) != 0)
client->message->flags |= DNS_MESSAGEFLAG_RA;
if ((client->attributes & NS_CLIENTATTR_WANTDNSSEC) != 0)
dnssec_opts = 0;
else
dnssec_opts = DNS_MESSAGERENDER_OMITDNSSEC;
preferred_glue = 0;
if (client->view != NULL) {
if (client->view->preferred_glue == dns_rdatatype_a)
preferred_glue = DNS_MESSAGERENDER_PREFER_A;
else if (client->view->preferred_glue == dns_rdatatype_aaaa)
preferred_glue = DNS_MESSAGERENDER_PREFER_AAAA;
}
/*
* XXXRTH The following doesn't deal with TCP buffer resizing.
*/
@@ -900,8 +861,7 @@ ns_client_send(ns_client_t *client) {
goto done;
result = dns_message_rendersection(client->message,
DNS_SECTION_ANSWER,
DNS_MESSAGERENDER_PARTIAL |
dnssec_opts);
DNS_MESSAGERENDER_PARTIAL);
if (result == ISC_R_NOSPACE) {
client->message->flags |= DNS_MESSAGEFLAG_TC;
goto renderend;
@@ -910,8 +870,7 @@ ns_client_send(ns_client_t *client) {
goto done;
result = dns_message_rendersection(client->message,
DNS_SECTION_AUTHORITY,
DNS_MESSAGERENDER_PARTIAL |
dnssec_opts);
DNS_MESSAGERENDER_PARTIAL);
if (result == ISC_R_NOSPACE) {
client->message->flags |= DNS_MESSAGEFLAG_TC;
goto renderend;
@@ -919,8 +878,7 @@ ns_client_send(ns_client_t *client) {
if (result != ISC_R_SUCCESS)
goto done;
result = dns_message_rendersection(client->message,
DNS_SECTION_ADDITIONAL,
preferred_glue | dnssec_opts);
DNS_SECTION_ADDITIONAL, 0);
if (result != ISC_R_SUCCESS && result != ISC_R_NOSPACE)
goto done;
renderend:
@@ -1054,9 +1012,13 @@ client_addopt(ns_client_t *client) {
rdatalist->rdclass = RECV_BUFFER_SIZE;
/*
* Set EXTENDED-RCODE, VERSION and Z to 0.
* Set EXTENDED-RCODE, VERSION, and Z to 0.
*/
#ifdef ISC_RFC2535
rdatalist->ttl = (client->extflags & DNS_MESSAGEEXTFLAG_REPLYPRESERVE);
#else
rdatalist->ttl = 0;
#endif
/*
* No ENDS options in the default case.
@@ -1069,8 +1031,7 @@ client_addopt(ns_client_t *client) {
ISC_LIST_INIT(rdatalist->rdata);
ISC_LIST_APPEND(rdatalist->rdata, rdata, link);
RUNTIME_CHECK(dns_rdatalist_tordataset(rdatalist, rdataset)
== ISC_R_SUCCESS);
dns_rdatalist_tordataset(rdatalist, rdataset);
client->opt = rdataset;
@@ -1078,13 +1039,13 @@ client_addopt(ns_client_t *client) {
}
static inline isc_boolean_t
allowed(isc_netaddr_t *addr, dns_name_t *signer, dns_acl_t *acl) {
allowed(isc_netaddr_t *addr, dns_acl_t *acl) {
int match;
isc_result_t result;
if (acl == NULL)
return (ISC_TRUE);
result = dns_acl_match(addr, signer, acl, &ns_g_server->aclenv,
result = dns_acl_match(addr, NULL, acl, &ns_g_server->aclenv,
&match, NULL);
if (result == ISC_R_SUCCESS && match > 0)
return (ISC_TRUE);
@@ -1100,7 +1061,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
ns_client_t *client;
isc_socketevent_t *sevent;
isc_result_t result;
isc_result_t sigresult = ISC_R_SUCCESS;
isc_result_t sigresult;
isc_buffer_t *buffer;
isc_buffer_t tbuffer;
dns_view_t *view;
@@ -1210,15 +1171,13 @@ client_request(isc_task_t *task, isc_event_t *event) {
}
}
/*
* Silently drop multicast requests for the present.
* XXXMPA look at when/if mDNS spec stabilizes.
*/
if ((client->attributes & NS_CLIENTATTR_MULTICAST) != 0) {
ns_client_log(client, NS_LOGCATEGORY_CLIENT,
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(2),
"dropping multicast request");
ns_client_next(client, DNS_R_REFUSED);
"multicast request");
#if 0
ns_client_error(client, DNS_R_REFUSED);
#endif
}
result = dns_message_peekheader(buffer, &id, &flags);
@@ -1275,10 +1234,6 @@ client_request(isc_task_t *task, isc_event_t *event) {
client->message->rcode = dns_rcode_noerror;
/* RFC1123 section 6.1.3.2 */
if ((client->attributes & NS_CLIENTATTR_MULTICAST) != 0)
client->message->flags &= ~DNS_MESSAGEFLAG_RD;
/*
* Deal with EDNS.
*/
@@ -1357,16 +1312,10 @@ client_request(isc_task_t *task, isc_event_t *event) {
if (client->message->rdclass == view->rdclass ||
client->message->rdclass == dns_rdataclass_any)
{
dns_name_t *tsig = NULL;
sigresult = dns_message_rechecksig(client->message,
view);
if (sigresult == ISC_R_SUCCESS)
tsig = client->message->tsigname;
if (allowed(&netaddr, tsig, view->matchclients) &&
allowed(&destaddr, tsig, view->matchdestinations) &&
!((client->message->flags & DNS_MESSAGEFLAG_RD)
== 0 && view->matchrecursiveonly))
if (allowed(&netaddr, view->matchclients) &&
allowed(&destaddr, view->matchdestinations) &&
!((flags & DNS_MESSAGEFLAG_RD) == 0 &&
view->matchrecursiveonly))
{
dns_view_attach(view, &client->view);
break;
@@ -1384,9 +1333,6 @@ client_request(isc_task_t *task, isc_event_t *event) {
*/
isc_buffer_t b;
isc_region_t *r;
dns_message_resetsig(client->message);
r = dns_message_getrawmessage(client->message);
isc_buffer_init(&b, r->base, r->length);
isc_buffer_add(&b, r->length);
@@ -1412,6 +1358,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
* not. We do not log the lack of a signature unless we are
* debugging.
*/
sigresult = dns_message_checksig(client->message, client->view);
client->signer = NULL;
dns_name_init(&client->signername, NULL);
result = dns_message_signer(client->message, &client->signername);
@@ -1429,19 +1376,11 @@ client_request(isc_task_t *task, isc_event_t *event) {
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3),
"request is signed by a nonauthoritative key");
} else {
char tsigrcode[64];
isc_buffer_t b;
isc_buffer_init(&b, tsigrcode, sizeof(tsigrcode) - 1);
RUNTIME_CHECK(dns_tsigrcode_totext(client->message->tsigstatus,
&b) == ISC_R_SUCCESS);
tsigrcode[isc_buffer_usedlength(&b)] = '\0';
/* There is a signature, but it is bad. */
ns_client_log(client, DNS_LOGCATEGORY_SECURITY,
NS_LOGMODULE_CLIENT, ISC_LOG_ERROR,
"request has invalid signature: %s (%s)",
isc_result_totext(result),
tsigrcode);
"request has invalid signature: %s",
isc_result_totext(result));
/*
* Accept update messages signed by unknown keys so that
* update forwarding works transparently through slaves
@@ -1463,17 +1402,15 @@ client_request(isc_task_t *task, isc_event_t *event) {
ra = ISC_FALSE;
if (client->view->resolver != NULL &&
client->view->recursion == ISC_TRUE &&
ns_client_checkaclsilent(client, client->view->recursionacl,
ISC_TRUE) == ISC_R_SUCCESS)
/* XXX this will log too much too early */
ns_client_checkacl(client, "recursion available:",
client->view->recursionacl,
ISC_TRUE, ISC_LOG_DEBUG(1)) == ISC_R_SUCCESS)
ra = ISC_TRUE;
if (ra == ISC_TRUE)
client->attributes |= NS_CLIENTATTR_RA;
ns_client_log(client, DNS_LOGCATEGORY_SECURITY, NS_LOGMODULE_CLIENT,
ISC_LOG_DEBUG(3), ra ? "recursion available" :
"recursion not available");
/*
* Dispatch the request.
*/
@@ -1531,7 +1468,7 @@ client_timeout(isc_task_t *task, isc_event_t *event) {
if (client->newstate > NS_CLIENTSTATE_READY)
client->newstate = NS_CLIENTSTATE_READY;
(void)exit_check(client);
(void) exit_check(client);
}
static isc_result_t
@@ -1550,7 +1487,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp)
REQUIRE(clientp != NULL && *clientp == NULL);
client = isc_mem_get(manager->mctx, sizeof(*client));
client = isc_mem_get(manager->mctx, sizeof *client);
if (client == NULL)
return (ISC_R_NOMEMORY);
@@ -1689,7 +1626,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp)
isc_task_detach(&client->task);
cleanup_client:
isc_mem_put(manager->mctx, client, sizeof(*client));
isc_mem_put(manager->mctx, client, sizeof *client);
return (result);
}
@@ -1752,8 +1689,8 @@ client_newconn(isc_task_t *task, isc_event_t *event) {
client->state = NS_CLIENTSTATE_READING;
INSIST(client->recursionquota == NULL);
(void)isc_socket_getpeername(client->tcpsocket,
&client->peeraddr);
(void) isc_socket_getpeername(client->tcpsocket,
&client->peeraddr);
client->peeraddr_valid = ISC_TRUE;
ns_client_log(client, NS_LOGCATEGORY_CLIENT,
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3),
@@ -1873,7 +1810,7 @@ client_udprecv(ns_client_t *client) {
isc_result_totext(result));
/*
* This cannot happen in the current implementation, since
* isc_socket_recv2() cannot fail if flags == 0.
* isc_socket_recv2() cannot fail if flags == 0A
*
* If this does fail, we just go idle.
*/
@@ -1905,7 +1842,7 @@ ns_client_detach(ns_client_t **clientp) {
ns_client_log(client, NS_LOGCATEGORY_CLIENT,
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(10),
"ns_client_detach: ref = %d", client->references);
(void)exit_check(client);
(void) exit_check(client);
}
isc_boolean_t
@@ -1944,13 +1881,12 @@ static void
clientmgr_destroy(ns_clientmgr_t *manager) {
REQUIRE(ISC_LIST_EMPTY(manager->active));
REQUIRE(ISC_LIST_EMPTY(manager->inactive));
REQUIRE(ISC_LIST_EMPTY(manager->recursing));
MTRACE("clientmgr_destroy");
DESTROYLOCK(&manager->lock);
manager->magic = 0;
isc_mem_put(manager->mctx, manager, sizeof(*manager));
isc_mem_put(manager->mctx, manager, sizeof *manager);
}
isc_result_t
@@ -1960,7 +1896,7 @@ ns_clientmgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
ns_clientmgr_t *manager;
isc_result_t result;
manager = isc_mem_get(mctx, sizeof(*manager));
manager = isc_mem_get(mctx, sizeof *manager);
if (manager == NULL)
return (ISC_R_NOMEMORY);
@@ -1974,7 +1910,6 @@ ns_clientmgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
manager->exiting = ISC_FALSE;
ISC_LIST_INIT(manager->active);
ISC_LIST_INIT(manager->inactive);
ISC_LIST_INIT(manager->recursing);
manager->magic = MANAGER_MAGIC;
MTRACE("create");
@@ -1984,7 +1919,7 @@ ns_clientmgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
return (ISC_R_SUCCESS);
cleanup_manager:
isc_mem_put(manager->mctx, manager, sizeof(*manager));
isc_mem_put(manager->mctx, manager, sizeof *manager);
return (result);
}
@@ -2005,11 +1940,6 @@ ns_clientmgr_destroy(ns_clientmgr_t **managerp) {
manager->exiting = ISC_TRUE;
for (client = ISC_LIST_HEAD(manager->recursing);
client != NULL;
client = ISC_LIST_NEXT(client, link))
isc_task_shutdown(client->task);
for (client = ISC_LIST_HEAD(manager->active);
client != NULL;
client = ISC_LIST_NEXT(client, link))
@@ -2021,8 +1951,7 @@ ns_clientmgr_destroy(ns_clientmgr_t **managerp) {
isc_task_shutdown(client->task);
if (ISC_LIST_EMPTY(manager->active) &&
ISC_LIST_EMPTY(manager->inactive) &&
ISC_LIST_EMPTY(manager->recursing))
ISC_LIST_EMPTY(manager->inactive))
need_destroy = ISC_TRUE;
UNLOCK(&manager->lock);
@@ -2175,25 +2104,23 @@ ns_client_name(ns_client_t *client, char *peerbuf, size_t len) {
snprintf(peerbuf, len, "@%p", client);
}
void
static void
ns_client_logv(ns_client_t *client, isc_logcategory_t *category,
isc_logmodule_t *module, int level, const char *fmt, va_list ap)
ISC_FORMAT_PRINTF(5, 0);
static void
ns_client_logv(ns_client_t *client, isc_logcategory_t *category,
isc_logmodule_t *module, int level, const char *fmt, va_list ap)
{
char msgbuf[2048];
char peerbuf[ISC_SOCKADDR_FORMATSIZE];
const char *name = "";
const char *sep = "";
vsnprintf(msgbuf, sizeof(msgbuf), fmt, ap);
ns_client_name(client, peerbuf, sizeof(peerbuf));
if (client->view != NULL && strcmp(client->view->name, "_bind") != 0 &&
strcmp(client->view->name, "_default") != 0) {
name = client->view->name;
sep = ": view ";
}
ns_client_name(client, peerbuf, sizeof peerbuf);
isc_log_write(ns_g_lctx, category, module, level,
"client %s%s%s: %s", peerbuf, sep, name, msgbuf);
"client %s: %s", peerbuf, msgbuf);
}
void

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: config.c,v 1.29 2002/03/07 13:46:35 marka Exp $ */
/* $Id: config.c,v 1.11.2.4 2002/03/20 20:32:41 marka Exp $ */
#include <config.h>
@@ -30,12 +30,11 @@
#include <isc/sockaddr.h>
#include <isc/util.h>
#include <isccfg/namedconf.h>
#include <isccfg/cfg.h>
#include <dns/fixedname.h>
#include <dns/name.h>
#include <dns/rdataclass.h>
#include <dns/rdatatype.h>
#include <dns/tsig.h>
#include <dns/zone.h>
@@ -88,6 +87,7 @@ options {\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\
@@ -142,29 +142,7 @@ options {\n\
min-refresh-time 300;\n\
sig-validity-interval 30; /* days */\n\
zone-statistics false;\n\
max-journal-size unlimited;\n\
ixfr-from-differences false;\n\
};\n\
\n\
view \"_bind\" chaos {\n\
recursion no;\n\
\n\
zone \"version.bind\" chaos {\n\
type master;\n\
database \"_builtin version\";\n\
};\n\
\n\
zone \"hostname.bind\" chaos {\n\
type master;\n\
database \"_builtin hostname\";\n\
};\n\
\n\
zone \"authors.bind\" chaos {\n\
type master;\n\
database \"_builtin authors\";\n\
};\n\
};\n\
";
};";
isc_result_t
ns_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf) {
@@ -179,7 +157,7 @@ isc_result_t
ns_config_get(cfg_obj_t **maps, const char* name, cfg_obj_t **obj) {
int i;
for (i = 0;; i++) {
for (i = 0; ; i++) {
if (maps[i] == NULL)
return (ISC_R_NOTFOUND);
if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS)
@@ -219,27 +197,6 @@ ns_config_getclass(cfg_obj_t *classobj, dns_rdataclass_t defclass,
return (result);
}
isc_result_t
ns_config_gettype(cfg_obj_t *typeobj, dns_rdatatype_t deftype,
dns_rdatatype_t *typep) {
char *str;
isc_textregion_t r;
isc_result_t result;
if (!cfg_obj_isstring(typeobj)) {
*typep = deftype;
return (ISC_R_SUCCESS);
}
str = cfg_obj_asstring(typeobj);
r.base = str;
r.length = strlen(str);
result = dns_rdatatype_fromtext(typep, &r);
if (result != ISC_R_SUCCESS)
cfg_obj_log(typeobj, ns_g_lctx, ISC_LOG_ERROR,
"unknown type '%s'", str);
return (result);
}
dns_zonetype_t
ns_config_getzonetype(cfg_obj_t *zonetypeobj) {
dns_zonetype_t ztype = dns_zone_none;
@@ -271,7 +228,6 @@ ns_config_getiplist(cfg_obj_t *config, cfg_obj_t *list,
isc_result_t result;
INSIST(addrsp != NULL && *addrsp == NULL);
INSIST(countp != NULL);
addrlist = cfg_tuple_get(list, "addresses");
count = ns_config_listcount(addrlist);
@@ -421,7 +377,7 @@ ns_config_getipandkeylist(cfg_obj_t *config, cfg_obj_t *list, isc_mem_t *mctx,
isc_mem_put(mctx, addrs, count * sizeof(isc_sockaddr_t));
if (keys != NULL) {
unsigned int j;
for (j = 0; j <= i; j++) {
for (j = 0 ; j <= i; j++) {
if (keys[j] == NULL)
continue;
if (dns_name_dynamic(keys[j]))
@@ -463,7 +419,7 @@ ns_config_getport(cfg_obj_t *config, in_port_t *portp) {
isc_result_t result;
int i;
(void)cfg_map_get(config, "options", &options);
cfg_map_get(config, "options", &options);
i = 0;
if (options != NULL)
maps[i++] = options;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2001, 2002 Internet Software Consortium.
* 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
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: control.c,v 1.13 2002/06/13 05:12:51 marka Exp $ */
/* $Id: control.c,v 1.7 2001/05/31 01:21:06 bwelling Exp $ */
#include <config.h>
@@ -32,7 +32,6 @@
#include <named/control.h>
#include <named/log.h>
#include <named/os.h>
#include <named/server.h>
static isc_boolean_t
@@ -86,16 +85,12 @@ ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) {
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_RETRANSFER)) {
result = ns_server_retransfercommand(ns_g_server, command);
} else if (command_compare(command, NS_COMMAND_HALT)) {
ns_server_flushonshutdown(ns_g_server, ISC_FALSE);
ns_os_shutdownmsg(command, text);
isc_app_shutdown();
result = ISC_R_SUCCESS;
} else if (command_compare(command, NS_COMMAND_STOP)) {
ns_server_flushonshutdown(ns_g_server, ISC_TRUE);
ns_os_shutdownmsg(command, text);
isc_app_shutdown();
result = ISC_R_SUCCESS;
} else if (command_compare(command, NS_COMMAND_DUMPSTATS)) {
@@ -103,7 +98,7 @@ ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) {
} else if (command_compare(command, NS_COMMAND_QUERYLOG)) {
result = ns_server_togglequerylog(ns_g_server);
} else if (command_compare(command, NS_COMMAND_DUMPDB)) {
ns_server_dumpdb(ns_g_server, command);
ns_server_dumpdb(ns_g_server);
result = ISC_R_SUCCESS;
} else if (command_compare(command, NS_COMMAND_TRACE)) {
result = ns_server_setdebuglevel(ns_g_server, command);
@@ -113,14 +108,8 @@ ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) {
result = ISC_R_SUCCESS;
} else if (command_compare(command, NS_COMMAND_FLUSH)) {
result = ns_server_flushcache(ns_g_server, command);
} else if (command_compare(command, NS_COMMAND_FLUSHNAME)) {
result = ns_server_flushname(ns_g_server, command);
} else if (command_compare(command, NS_COMMAND_STATUS)) {
result = ns_server_status(ns_g_server, text);
} else if (command_compare(command, NS_COMMAND_FREEZE)) {
result = ns_server_freeze(ns_g_server, ISC_TRUE, command);
} else if (command_compare(command, NS_COMMAND_UNFREEZE)) {
result = ns_server_freeze(ns_g_server, ISC_FALSE, command);
} else {
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_CONTROL, ISC_LOG_WARNING,

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2001, 2002 Internet Software Consortium.
* 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
@@ -15,25 +15,29 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: controlconf.c,v 1.38 2002/02/20 03:33:14 marka Exp $ */
/* $Id: controlconf.c,v 1.28.2.7 2001/11/27 22:38:14 gson Exp $ */
#include <config.h>
#include <isc/base64.h>
#include <isc/buffer.h>
#include <isc/event.h>
#include <isc/file.h>
#include <isc/fsaccess.h>
#include <isc/mem.h>
#include <isc/net.h>
#include <isc/netaddr.h>
#include <isc/print.h>
#include <isc/random.h>
#include <isc/result.h>
#include <isc/stdio.h>
#include <isc/stdtime.h>
#include <isc/string.h>
#include <isc/timer.h>
#include <isc/util.h>
#include <isccfg/namedconf.h>
#include <bind9/check.h>
#include <isccfg/cfg.h>
#include <isccfg/check.h>
#include <isccc/alist.h>
#include <isccc/cc.h>
@@ -43,8 +47,11 @@
#include <isccc/sexpr.h>
#include <isccc/util.h>
#include <dns/keyvalues.h>
#include <dns/result.h>
#include <dst/dst.h>
#include <named/config.h>
#include <named/control.h>
#include <named/log.h>
@@ -759,7 +766,7 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
if (keyid->keyname == NULL)
CHECK(ISC_R_NOMEMORY);
CHECK(bind9_check_key(key, ns_g_lctx));
CHECK(cfg_check_key(key, ns_g_lctx));
(void)cfg_map_get(key, "algorithm", &algobj);
(void)cfg_map_get(key, "secret", &secretobj);

View File

@@ -1,29 +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: builtin.h,v 1.1 2001/11/20 01:18:15 gson Exp $ */
#ifndef NAMED_BUILTIN_H
#define NAMED_BUILTIN_H 1
#include <isc/types.h>
isc_result_t ns_builtin_init(void);
void ns_builtin_deinit(void);
#endif /* NAMED_BUILTIN_H */

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1999-2002 Internet Software Consortium.
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: client.h,v 1.66 2002/02/20 03:33:29 marka Exp $ */
/* $Id: client.h,v 1.60.2.2 2001/11/15 02:51:46 marka Exp $ */
#ifndef NAMED_CLIENT_H
#define NAMED_CLIENT_H 1
@@ -153,8 +153,6 @@ struct ns_client {
#define NS_CLIENTATTR_RA 0x02 /* Client gets recusive service */
#define NS_CLIENTATTR_PKTINFO 0x04 /* pktinfo is valid */
#define NS_CLIENTATTR_MULTICAST 0x08 /* recv'd from multicast */
#define NS_CLIENTATTR_WANTDNSSEC 0x10 /* include dnssec records */
/***
*** Functions
@@ -305,19 +303,8 @@ ns_client_log(ns_client_t *client, isc_logcategory_t *category,
isc_logmodule_t *module, int level,
const char *fmt, ...) ISC_FORMAT_PRINTF(5, 6);
void
ns_client_logv(ns_client_t *client, isc_logcategory_t *category,
isc_logmodule_t *module, int level, const char *fmt, va_list ap) ISC_FORMAT_PRINTF(5, 0);
void
ns_client_aclmsg(const char *msg, dns_name_t *name, dns_rdataclass_t rdclass,
char *buf, size_t len);
void
ns_client_recursing(ns_client_t *client, isc_boolean_t killoldest);
/*
* Add client to end of recursing list. If 'killoldest' is true
* kill the oldest recursive client (list head).
*/
#endif /* NAMED_CLIENT_H */

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: config.h,v 1.5 2002/03/07 13:46:41 marka Exp $ */
/* $Id: config.h,v 1.4 2001/08/09 17:21:06 gson Exp $ */
#ifndef NAMED_CONFIG_H
#define NAMED_CONFIG_H 1
@@ -38,10 +38,6 @@ isc_result_t
ns_config_getclass(cfg_obj_t *classobj, dns_rdataclass_t defclass,
dns_rdataclass_t *classp);
isc_result_t
ns_config_gettype(cfg_obj_t *typeobj, dns_rdatatype_t deftype,
dns_rdatatype_t *typep);
dns_zonetype_t
ns_config_getzonetype(cfg_obj_t *zonetypeobj);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2001, 2002 Internet Software Consortium.
* 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
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: control.h,v 1.10 2002/02/20 03:33:30 marka Exp $ */
/* $Id: control.h,v 1.6 2001/05/08 04:09:40 bwelling Exp $ */
#ifndef NAMED_CONTROL_H
#define NAMED_CONTROL_H 1
@@ -36,17 +36,13 @@
#define NS_COMMAND_RELOAD "reload"
#define NS_COMMAND_RECONFIG "reconfig"
#define NS_COMMAND_REFRESH "refresh"
#define NS_COMMAND_RETRANSFER "retransfer"
#define NS_COMMAND_DUMPSTATS "stats"
#define NS_COMMAND_QUERYLOG "querylog"
#define NS_COMMAND_DUMPDB "dumpdb"
#define NS_COMMAND_TRACE "trace"
#define NS_COMMAND_NOTRACE "notrace"
#define NS_COMMAND_FLUSH "flush"
#define NS_COMMAND_FLUSHNAME "flushname"
#define NS_COMMAND_STATUS "status"
#define NS_COMMAND_FREEZE "freeze"
#define NS_COMMAND_UNFREEZE "unfreeze"
isc_result_t
ns_controls_create(ns_server_t *server, ns_controls_t **ctrlsp);

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: log.h,v 1.20 2002/06/12 06:29:44 marka Exp $ */
/* $Id: log.h,v 1.19 2001/05/28 05:17:02 marka Exp $ */
#ifndef NAMED_LOG_H
#define NAMED_LOG_H 1
@@ -33,7 +33,6 @@
#define NS_LOGCATEGORY_UPDATE (&ns_g_categories[3])
#define NS_LOGCATEGORY_QUERIES (&ns_g_categories[4])
#define NS_LOGCATEGORY_UNMATCHED (&ns_g_categories[5])
#define NS_LOGCATEGORY_UPDATE_SECURITY (&ns_g_categories[6])
/*
* Backwards compatibility.

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1999-2001 Internet Software Consortium.
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: main.h,v 1.10 2002/05/03 05:28:23 marka Exp $ */
/* $Id: main.h,v 1.8.2.2 2002/08/05 06:57:03 marka Exp $ */
#ifndef NAMED_MAIN_H
#define NAMED_MAIN_H 1
@@ -26,7 +26,4 @@ ns_main_earlyfatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
void
ns_main_earlywarning(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
void
ns_main_setmemstats(const char *);
#endif /* NAMED_MAIN_H */

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: query.h,v 1.33 2002/02/20 03:33:31 marka Exp $ */
/* $Id: query.h,v 1.28.2.3 2002/02/08 03:57:17 marka Exp $ */
#ifndef NAMED_QUERY_H
#define NAMED_QUERY_H 1
@@ -49,7 +49,6 @@ struct ns_query {
dns_zone_t * authzone;
isc_boolean_t authdbset;
isc_boolean_t isreferral;
isc_mutex_t fetchlock;
dns_fetch_t * fetch;
dns_a6context_t a6ctx;
isc_bufferlist_t namebufs;
@@ -72,7 +71,7 @@ struct ns_query {
#define NS_QUERYATTR_QUERYOKVALID 0x0040
#define NS_QUERYATTR_QUERYOK 0x0080
#define NS_QUERYATTR_WANTRECURSION 0x0100
/* unused */
#define NS_QUERYATTR_WANTDNSSEC 0x0200
#define NS_QUERYATTR_NOAUTHORITY 0x0400
#define NS_QUERYATTR_NOADDITIONAL 0x0800
@@ -85,7 +84,4 @@ ns_query_free(ns_client_t *client);
void
ns_query_start(ns_client_t *client);
void
ns_query_cancel(ns_client_t *client);
#endif /* NAMED_QUERY_H */

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1999-2002 Internet Software Consortium.
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: server.h,v 1.66 2002/06/13 05:12:54 marka Exp $ */
/* $Id: server.h,v 1.58.2.1 2001/09/04 19:38:46 gson Exp $ */
#ifndef NAMED_SERVER_H
#define NAMED_SERVER_H 1
@@ -49,12 +49,6 @@ struct ns_server {
isc_quota_t tcpquota;
isc_quota_t recursionquota;
dns_acl_t *blackholeacl;
char * statsfile; /* Statistics file name */
char * dumpfile; /* Dump file name */
isc_boolean_t version_set; /* User has set version */
char * version; /* User-specified version */
isc_boolean_t hostname_set; /* User has set hostname */
char * hostname; /* User-specified hostname */
/*
* Current ACL environment. This defines the
@@ -82,8 +76,11 @@ struct ns_server {
isc_boolean_t flushonshutdown;
isc_boolean_t log_queries; /* For BIND 8 compatibility */
char * statsfile; /* Statistics file name */
isc_uint64_t * querystats; /* Query statistics counters */
char * dumpfile; /* Dump file name */
ns_controls_t * controls; /* Control channels */
};
@@ -137,12 +134,6 @@ ns_server_refreshcommand(ns_server_t *server, char *args);
* Act on a "refresh" command from the command channel.
*/
isc_result_t
ns_server_retransfercommand(ns_server_t *server, char *args);
/*
* Act on a "retransfer" command from the command channel.
*/
isc_result_t
ns_server_togglequerylog(ns_server_t *server);
/*
@@ -159,7 +150,7 @@ ns_server_dumpstats(ns_server_t *server);
* Dump the current cache to the dump file.
*/
isc_result_t
ns_server_dumpdb(ns_server_t *server, char *args);
ns_server_dumpdb(ns_server_t *server);
/*
* Change or increment the server debug level.
@@ -173,22 +164,10 @@ ns_server_setdebuglevel(ns_server_t *server, char *args);
isc_result_t
ns_server_flushcache(ns_server_t *server, char *args);
/*
* Flush a particular name from the server's cache(s)
*/
isc_result_t
ns_server_flushname(ns_server_t *server, char *args);
/*
* Report the server's status.
*/
isc_result_t
ns_server_status(ns_server_t *server, isc_buffer_t *text);
/*
* Enable or disable updates for a zone.
*/
isc_result_t
ns_server_freeze(ns_server_t *server, isc_boolean_t freeze, char *args);
#endif /* NAMED_SERVER_H */

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: zoneconf.h,v 1.18 2002/02/20 03:33:35 marka Exp $ */
/* $Id: zoneconf.h,v 1.16.2.2 2002/08/05 06:57:03 marka Exp $ */
#ifndef NS_ZONECONF_H
#define NS_ZONECONF_H 1

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1999-2001 Internet Software Consortium.
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: interfacemgr.c,v 1.67 2002/05/27 00:40:16 marka Exp $ */
/* $Id: interfacemgr.c,v 1.59.2.5 2002/02/08 03:57:10 marka Exp $ */
#include <config.h>
@@ -119,7 +119,7 @@ ns_interfacemgr_destroy(ns_interfacemgr_t *mgr) {
ns_listenlist_detach(&mgr->listenon6);
DESTROYLOCK(&mgr->lock);
mgr->magic = 0;
isc_mem_put(mgr->mctx, mgr, sizeof(*mgr));
isc_mem_put(mgr->mctx, mgr, sizeof *mgr);
}
dns_aclenv_t *
@@ -294,9 +294,6 @@ ns_interface_accepttcp(ns_interface_t *ifp) {
isc_result_totext(result));
goto tcp_socket_failure;
}
#ifndef ISC_ALLOW_MAPPED
isc_socket_ipv6only(ifp->tcpsocket, ISC_TRUE);
#endif
result = isc_socket_bind(ifp->tcpsocket, &ifp->addr);
if (result != ISC_R_SUCCESS) {
isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_ERROR,
@@ -312,12 +309,6 @@ ns_interface_accepttcp(ns_interface_t *ifp) {
goto tcp_listen_failure;
}
/*
* If/when there a multiple filters listen to the
* result.
*/
(void)isc_socket_filter(ifp->tcpsocket, "dataready");
result = ns_clientmgr_createclients(ifp->clientmgr,
ifp->ntcptarget, ifp,
ISC_TRUE);
@@ -482,9 +473,6 @@ static isc_result_t
do_ipv4(ns_interfacemgr_t *mgr) {
isc_interfaceiter_t *iter = NULL;
isc_result_t result;
isc_netaddr_t zero_address;
isc_netaddr_any(&zero_address);
result = isc_interfaceiter_create(mgr->mctx, &iter);
if (result != ISC_R_SUCCESS)
@@ -514,14 +502,7 @@ do_ipv4(ns_interfacemgr_t *mgr) {
if (interface.address.family != AF_INET)
continue;
/*
* Test for the address being nonzero rather than testing
* INTERFACE_F_UP, because on some systems the latter
* follows the media state and we could end up ignoring
* the interface for an entire rescan interval due to
* a temporary media glitch at rescan time.
*/
if (isc_netaddr_equal(&interface.address, &zero_address))
if ((interface.flags & INTERFACE_F_UP) == 0)
continue;
elt.type = dns_aclelementtype_ipprefix;

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: log.c,v 1.36 2002/06/12 06:29:42 marka Exp $ */
/* $Id: log.c,v 1.33.2.1 2001/10/31 22:44:15 marka Exp $ */
#include <config.h>
@@ -25,10 +25,6 @@
#include <named/log.h>
#ifndef ISC_FACILITY
#define ISC_FACILITY LOG_DAEMON
#endif
/*
* When adding a new category, be sure to add the appropriate
* #define to <named/log.h>.
@@ -40,7 +36,6 @@ static isc_logcategory_t categories[] = {
{ "update", 0 },
{ "queries", 0 },
{ "unmatched", 0 },
{ "update-security", 0 },
{ NULL, 0 }
};
@@ -131,15 +126,6 @@ ns_log_setdefaultchannels(isc_logconfig_t *lcfg) {
goto cleanup;
}
#if ISC_FACILITY != LOG_DAEMON
destination.facility = ISC_FACILITY;
result = isc_log_createchannel(lcfg, "default_syslog",
ISC_LOG_TOSYSLOG, ISC_LOG_INFO,
&destination, 0);
if (result != ISC_R_SUCCESS)
goto cleanup;
#endif
/*
* Set the initial debug level.
*/

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: logconf.c,v 1.33 2001/10/11 01:16:15 gson Exp $ */
/* $Id: logconf.c,v 1.30.2.3 2001/10/11 02:03:20 marka Exp $ */
#include <config.h>

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwdclient.c,v 1.16 2001/11/30 01:58:45 gson Exp $ */
/* $Id: lwdclient.c,v 1.13 2001/01/22 22:29:02 gson Exp $ */
#include <config.h>
@@ -29,7 +29,6 @@
#include <dns/log.h>
#include <named/types.h>
#include <named/log.h>
#include <named/lwresd.h>
#include <named/lwdclient.h>
@@ -82,7 +81,7 @@ ns_lwdclientmgr_create(ns_lwreslistener_t *listener, unsigned int nclients,
!= ISC_R_SUCCESS)
goto errout;
for (i = 0; i < nclients; i++) {
for (i = 0 ; i < nclients ; i++) {
client = isc_mem_get(lwresd->mctx, sizeof(ns_lwdclient_t));
if (client != NULL) {
ns_lwdclient_log(50, "created client %p, manager %p",
@@ -117,7 +116,7 @@ ns_lwdclientmgr_create(ns_lwreslistener_t *listener, unsigned int nclients,
client = ISC_LIST_HEAD(cm->idle);
while (client != NULL) {
ISC_LIST_UNLINK(cm->idle, client, link);
isc_mem_put(lwresd->mctx, client, sizeof(*client));
isc_mem_put(lwresd->mctx, client, sizeof (*client));
client = ISC_LIST_HEAD(cm->idle);
}
@@ -127,7 +126,7 @@ ns_lwdclientmgr_create(ns_lwreslistener_t *listener, unsigned int nclients,
if (cm->lwctx != NULL)
lwres_context_destroy(&cm->lwctx);
isc_mem_put(lwresd->mctx, cm, sizeof(*cm));
isc_mem_put(lwresd->mctx, cm, sizeof (*cm));
return (result);
}
@@ -149,7 +148,7 @@ lwdclientmgr_destroy(ns_lwdclientmgr_t *cm) {
ns_lwdclient_log(50, "destroying client %p, manager %p",
client, cm);
ISC_LIST_UNLINK(cm->idle, client, link);
isc_mem_put(cm->mctx, client, sizeof(*client));
isc_mem_put(cm->mctx, client, sizeof (*client));
client = ISC_LIST_HEAD(cm->idle);
}
@@ -164,7 +163,7 @@ lwdclientmgr_destroy(ns_lwdclientmgr_t *cm) {
listener = cm->listener;
ns_lwreslistener_unlinkcm(listener, cm);
ns_lwdclient_log(50, "destroying manager %p", cm);
isc_mem_put(cm->mctx, cm, sizeof(*cm));
isc_mem_put(cm->mctx, cm, sizeof (*cm));
ns_lwreslistener_detach(&listener);
}
@@ -212,7 +211,6 @@ process_request(ns_lwdclient_t *client) {
void
ns_lwdclient_recv(isc_task_t *task, isc_event_t *ev) {
isc_result_t result;
ns_lwdclient_t *client = ev->ev_arg;
ns_lwdclientmgr_t *cm = client->clientmgr;
isc_socketevent_t *dev = (isc_socketevent_t *)ev;
@@ -252,13 +250,7 @@ ns_lwdclient_recv(isc_task_t *task, isc_event_t *ev) {
isc_event_free(&ev);
dev = NULL;
result = ns_lwdclient_startrecv(cm);
if (result != ISC_R_SUCCESS)
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_LWRESD, ISC_LOG_ERROR,
"could not start lwres "
"client handler: %s",
isc_result_totext(result));
ns_lwdclient_startrecv(cm);
process_request(client);
}
@@ -337,7 +329,7 @@ lwdclientmgr_shutdown_callback(isc_task_t *task, isc_event_t *ev) {
ns_lwdclient_log(50, "destroying client %p, manager %p",
client, cm);
ISC_LIST_UNLINK(cm->idle, client, link);
isc_mem_put(cm->mctx, client, sizeof(*client));
isc_mem_put(cm->mctx, client, sizeof (*client));
client = ISC_LIST_HEAD(cm->idle);
}
@@ -374,7 +366,6 @@ lwdclientmgr_shutdown_callback(isc_task_t *task, isc_event_t *ev) {
void
ns_lwdclient_stateidle(ns_lwdclient_t *client) {
ns_lwdclientmgr_t *cm;
isc_result_t result;
cm = client->clientmgr;
@@ -389,13 +380,7 @@ ns_lwdclient_stateidle(ns_lwdclient_t *client) {
NS_LWDCLIENT_SETIDLE(client);
result = ns_lwdclient_startrecv(cm);
if (result != ISC_R_SUCCESS)
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_LWRESD, ISC_LOG_ERROR,
"could not start lwres "
"client handler: %s",
isc_result_totext(result));
ns_lwdclient_startrecv(cm);
}
void

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwdgabn.c,v 1.14 2001/11/27 00:55:34 gson Exp $ */
/* $Id: lwdgabn.c,v 1.13 2001/01/22 22:12:16 bwelling Exp $ */
#include <config.h>
@@ -546,11 +546,11 @@ init_gabn(ns_lwdclient_t *client) {
* Initialize the real name and alias arrays in the reply we're
* going to build up.
*/
for (i = 0; i < LWRES_MAX_ALIASES; 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++) {
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);

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwdgnba.c,v 1.14 2001/11/27 00:55:35 gson Exp $ */
/* $Id: lwdgnba.c,v 1.13 2001/08/08 22:54:19 gson Exp $ */
#include <config.h>
@@ -179,11 +179,11 @@ init_gnba(ns_lwdclient_t *client) {
* Initialize the real name and alias arrays in the reply we're
* going to build up.
*/
for (i = 0; i < LWRES_MAX_ALIASES; 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++) {
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);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2000-2002 Internet Software Consortium.
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: lwresd.c,v 1.43 2002/02/20 03:33:15 marka Exp $ */
/* $Id: lwresd.c,v 1.37 2001/08/07 01:58:55 marka Exp $ */
/*
* Main program for the Lightweight Resolver Daemon.
@@ -38,7 +38,7 @@
#include <isc/task.h>
#include <isc/util.h>
#include <isccfg/namedconf.h>
#include <isccfg/cfg.h>
#include <dns/log.h>
#include <dns/result.h>
@@ -152,7 +152,7 @@ ns_lwresd_parseeresolvconf(isc_mem_t *mctx, cfg_parser_t *pctx,
if (lwc->nsnext > 0) {
CHECK(buffer_putstr(&b, "\tforwarders {\n"));
for (i = 0; i < lwc->nsnext; i++) {
for (i = 0 ; i < lwc->nsnext ; i++) {
CHECK(lwaddr_sockaddr_fromlwresaddr(
&sa,
&lwc->nameservers[i],
@@ -173,7 +173,7 @@ ns_lwresd_parseeresolvconf(isc_mem_t *mctx, cfg_parser_t *pctx,
CHECK(buffer_putstr(&b, "\t\t{\n"));
CHECK(buffer_putstr(&b, "\t\t\tany;\n"));
CHECK(buffer_putstr(&b, "\t\t\t{\n"));
for (i = 0; i < lwc->sortlistnxt; i++) {
for (i = 0 ; i < lwc->sortlistnxt; i++) {
lwres_addr_t *lwaddr = &lwc->sortlist[i].addr;
lwres_addr_t *lwmask = &lwc->sortlist[i].mask;
unsigned int mask;
@@ -245,7 +245,7 @@ ns_lwresd_parseeresolvconf(isc_mem_t *mctx, cfg_parser_t *pctx,
if (lwc->lwnext > 0) {
CHECK(buffer_putstr(&b, "\tlisten-on {\n"));
for (i = 0; i < lwc->lwnext; i++) {
for (i = 0 ; i < lwc->lwnext ; i++) {
CHECK(lwaddr_sockaddr_fromlwresaddr(&sa,
&lwc->lwservers[i],
0));
@@ -341,7 +341,7 @@ ns_lwdmanager_create(isc_mem_t *mctx, cfg_obj_t *lwres,
}
searchobj = NULL;
(void)cfg_map_get(lwres, "search", &searchobj);
cfg_map_get(lwres, "search", &searchobj);
if (searchobj != NULL) {
lwresd->search = NULL;
result = ns_lwsearchlist_create(lwresd->mctx,
@@ -599,7 +599,7 @@ listener_startclients(ns_lwreslistener_t *listener) {
* Create the client managers.
*/
result = ISC_R_SUCCESS;
for (i = 0; i < NTASKS && result == ISC_R_SUCCESS; i++)
for (i = 0 ; i < NTASKS && result == ISC_R_SUCCESS; i++)
result = ns_lwdclientmgr_create(listener, NRECVS,
ns_g_taskmgr);
@@ -615,13 +615,7 @@ listener_startclients(ns_lwreslistener_t *listener) {
LOCK(&listener->lock);
cm = ISC_LIST_HEAD(listener->cmgrs);
while (cm != NULL) {
result = ns_lwdclient_startrecv(cm);
if (result != ISC_R_SUCCESS)
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
NS_LOGMODULE_LWRESD, ISC_LOG_ERROR,
"could not start lwres "
"client handler: %s",
isc_result_totext(result));
ns_lwdclient_startrecv(cm);
cm = ISC_LIST_NEXT(cm, link);
}
UNLOCK(&listener->lock);
@@ -789,7 +783,7 @@ ns_lwresd_configure(isc_mem_t *mctx, cfg_obj_t *config) {
port = LWRES_UDP_PORT;
listenerslist = NULL;
(void)cfg_map_get(lwres, "listen-on", &listenerslist);
cfg_map_get(lwres, "listen-on", &listenerslist);
if (listenerslist == NULL) {
struct in_addr localhost;
isc_sockaddr_t address;

View File

@@ -20,7 +20,7 @@
>lwresd</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -535,4 +535,4 @@ NAME="AEN162"
></DIV
></BODY
></HTML
>
>

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1999-2001 Internet Software Consortium.
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: main.c,v 1.128 2002/05/03 05:28:19 marka Exp $ */
/* $Id: main.c,v 1.119.2.2 2002/08/05 06:57:01 marka Exp $ */
#include <config.h>
@@ -31,7 +31,6 @@
#include <isc/os.h>
#include <isc/platform.h>
#include <isc/resource.h>
#include <isc/stdio.h>
#include <isc/task.h>
#include <isc/timer.h>
#include <isc/util.h>
@@ -50,7 +49,6 @@
*/
#define NS_MAIN 1
#include <named/builtin.h>
#include <named/control.h>
#include <named/globals.h> /* Explicit, though named/log.h includes it. */
#include <named/interfacemgr.h>
@@ -218,8 +216,7 @@ lwresd_usage(void) {
"[-d debuglevel] [-f|-g]\n"
" [-n number_of_cpus] [-p port]"
"[-P listen-port] [-s]\n"
" [-t chrootdir] [-u username] [-i pidfile]\n"
" [-m {usage|trace|record}]\n");
" [-t chrootdir] [-u username] [-i pidfile]\n");
}
static void
@@ -231,8 +228,7 @@ usage(void) {
fprintf(stderr,
"usage: named [-c conffile] [-d debuglevel] "
"[-f|-g] [-n number_of_cpus]\n"
" [-p port] [-s] [-t chrootdir] [-u username]\n"
" [-m {usage|trace|record}]\n");
" [-p port] [-s] [-t chrootdir] [-u username]\n");
}
static void
@@ -293,38 +289,6 @@ parse_int(char *arg, const char *desc) {
return (tmp);
}
static struct flag_def {
const char *name;
unsigned int value;
} mem_debug_flags[] = {
{ "trace", ISC_MEM_DEBUGTRACE },
{ "record", ISC_MEM_DEBUGRECORD },
{ "usage", ISC_MEM_DEBUGUSAGE },
{ NULL, 0 }
};
static void
set_flags(const char *arg, struct flag_def *defs, unsigned int *ret) {
for (;;) {
const struct flag_def *def;
const char *end = strchr(arg, ',');
if (end == NULL)
end = arg + strlen(arg);
for (def = defs; def->name != NULL; def++) {
if (end - arg == (int)strlen(def->name) &&
memcmp(arg, def->name, end - arg) == 0) {
*ret |= def->value;
goto found;
}
}
ns_main_earlyfatal("unrecognized flag '%.*s'", end - arg, arg);
found:
if (*end == '\0')
break;
arg = end + 1;
}
}
static void
parse_command_line(int argc, char *argv[]) {
int ch;
@@ -334,7 +298,7 @@ parse_command_line(int argc, char *argv[]) {
isc_commandline_errprint = ISC_FALSE;
while ((ch = isc_commandline_parse(argc, argv,
"c:C:d:fgi:lm:n:N:p:P:st:u:vx:")) !=
"c:C:d:fgi:ln:N:p:P:st:u:vx:")) !=
-1) {
switch (ch) {
case 'c':
@@ -368,10 +332,6 @@ parse_command_line(int argc, char *argv[]) {
case 'l':
ns_g_lwresdonly = ISC_TRUE;
break;
case 'm':
set_flags(isc_commandline_argument, mem_debug_flags,
&isc_mem_debugging);
break;
case 'N': /* Deprecated. */
case 'n':
ns_g_cpus = parse_int(isc_commandline_argument,
@@ -424,26 +384,23 @@ parse_command_line(int argc, char *argv[]) {
usage();
ns_main_earlyfatal("extra command line arguments");
}
}
static isc_result_t
create_managers(void) {
isc_result_t result;
#ifdef ISC_PLATFORM_USETHREADS
unsigned int cpus_detected;
#endif
#ifdef ISC_PLATFORM_USETHREADS
cpus_detected = isc_os_ncpus();
if (ns_g_cpus == 0)
ns_g_cpus = cpus_detected;
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER,
ISC_LOG_INFO, "found %u CPU%s, using %u worker thread%s",
cpus_detected, cpus_detected == 1 ? "" : "s",
ns_g_cpus, ns_g_cpus == 1 ? "" : "s");
ns_g_cpus = isc_os_ncpus();
#else
ns_g_cpus = 1;
#endif
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL, NS_LOGMODULE_SERVER,
ISC_LOG_INFO, "using %u CPU%s",
ns_g_cpus, ns_g_cpus == 1 ? "" : "s");
result = isc_taskmgr_create(ns_g_mctx, ns_g_cpus, 0, &ns_g_taskmgr);
if (result != ISC_R_SUCCESS) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
@@ -566,8 +523,6 @@ setup(void) {
ns_main_earlyfatal("create_managers() failed: %s",
isc_result_totext(result));
ns_builtin_init();
/*
* Add calls to register sdb drivers here.
*/
@@ -582,8 +537,6 @@ cleanup(void) {
ns_server_destroy(&ns_g_server);
ns_builtin_deinit();
/*
* Add calls to unregister sdb drivers here.
*/
@@ -594,25 +547,6 @@ cleanup(void) {
ns_log_shutdown();
}
static char *memstats = NULL;
void
ns_main_setmemstats(const char *filename) {
/*
* Caller has to ensure locking.
*/
if (memstats != NULL) {
free(memstats);
memstats = NULL;
}
if (filename == NULL)
return;
memstats = malloc(strlen(filename) + 1);
if (memstats)
strcpy(memstats, filename);
}
int
main(int argc, char *argv[]) {
isc_result_t result;
@@ -635,29 +569,17 @@ main(int argc, char *argv[]) {
ns_main_earlyfatal("isc_app_start() failed: %s",
isc_result_totext(result));
result = isc_mem_create(0, 0, &ns_g_mctx);
if (result != ISC_R_SUCCESS)
ns_main_earlyfatal("isc_mem_create() failed: %s",
isc_result_totext(result));
dns_result_register();
dst_result_register();
isccc_result_register();
parse_command_line(argc, argv);
/*
* Warn about common configuration error.
*/
if (ns_g_chrootdir != NULL) {
int len = strlen(ns_g_chrootdir);
if (strncmp(ns_g_chrootdir, ns_g_conffile, len) == 0 &&
(ns_g_conffile[len] == '/' || ns_g_conffile[len] == '\\'))
ns_main_earlywarning("config filename (-c %s) contains "
"chroot path (-t %s)",
ns_g_conffile, ns_g_chrootdir);
}
result = isc_mem_create(0, 0, &ns_g_mctx);
if (result != ISC_R_SUCCESS)
ns_main_earlyfatal("isc_mem_create() failed: %s",
isc_result_totext(result));
setup();
/*
@@ -686,19 +608,8 @@ main(int argc, char *argv[]) {
isc_mem_stats(ns_g_mctx, stdout);
isc_mutex_stats(stdout);
}
if (memstats != NULL) {
FILE *fp = NULL;
result = isc_stdio_open(memstats, "w", &fp);
if (result == ISC_R_SUCCESS) {
isc_mem_stats(ns_g_mctx, fp);
isc_mutex_stats(fp);
isc_stdio_close(fp);
}
}
isc_mem_destroy(&ns_g_mctx);
ns_main_setmemstats(NULL);
isc_app_finish();
ns_os_shutdown();

View File

@@ -20,7 +20,7 @@
>named</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.61
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
@@ -627,4 +627,4 @@ NAME="AEN182"
></DIV
></BODY
></HTML
>
>

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: notify.c,v 1.26 2001/12/10 23:09:23 marka Exp $ */
/* $Id: notify.c,v 1.24 2001/03/31 01:03:26 bwelling Exp $ */
#include <config.h>
@@ -36,11 +36,11 @@
*/
static void
notify_log(ns_client_t *client, int level, const char *fmt, ...) {
notify_log(int level, const char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
ns_client_logv(client, DNS_LOGCATEGORY_NOTIFY, NS_LOGMODULE_NOTIFY,
isc_log_vwrite(ns_g_lctx, DNS_LOGCATEGORY_NOTIFY, NS_LOGMODULE_NOTIFY,
level, fmt, ap);
va_end(ap);
}
@@ -83,7 +83,7 @@ ns_notify_start(ns_client_t *client) {
*/
result = dns_message_firstname(request, DNS_SECTION_QUESTION);
if (result != ISC_R_SUCCESS) {
notify_log(client, ISC_LOG_INFO, "notify question section empty");
notify_log(ISC_LOG_INFO, "notify question section empty");
goto failure;
}
@@ -94,7 +94,7 @@ ns_notify_start(ns_client_t *client) {
dns_message_currentname(request, DNS_SECTION_QUESTION, &zonename);
zone_rdataset = ISC_LIST_HEAD(zonename->list);
if (ISC_LIST_NEXT(zone_rdataset, link) != NULL) {
notify_log(client, ISC_LOG_INFO,
notify_log(ISC_LOG_INFO,
"notify question section contains multiple RRs");
goto failure;
}
@@ -102,14 +102,14 @@ ns_notify_start(ns_client_t *client) {
/* The zone section must have exactly one name. */
result = dns_message_nextname(request, DNS_SECTION_ZONE);
if (result != ISC_R_NOMORE) {
notify_log(client, ISC_LOG_INFO,
notify_log(ISC_LOG_INFO,
"notify question section contains multiple RRs");
goto failure;
}
/* The one rdataset must be an SOA. */
if (zone_rdataset->type != dns_rdatatype_soa) {
notify_log(client, ISC_LOG_INFO,
notify_log(ISC_LOG_INFO,
"notify question section contains no SOA");
goto failure;
}
@@ -118,13 +118,13 @@ ns_notify_start(ns_client_t *client) {
&zone);
if (result != ISC_R_SUCCESS) {
dns_name_format(zonename, str, sizeof(str));
notify_log(client, ISC_LOG_INFO,
notify_log(ISC_LOG_INFO,
"received notify for zone '%s': not authoritative",
str);
goto failure;
}
switch (dns_zone_gettype(zone)) {
switch(dns_zone_gettype(zone)) {
case dns_zone_master:
case dns_zone_slave:
case dns_zone_stub: /* Allow dialup passive to work. */
@@ -133,7 +133,7 @@ ns_notify_start(ns_client_t *client) {
break;
default:
dns_name_format(zonename, str, sizeof(str));
notify_log(client, ISC_LOG_INFO,
notify_log(ISC_LOG_INFO,
"received notify for zone '%s': not authoritative",
str);
goto failure;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1999-2002 Internet Software Consortium.
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: query.c,v 1.221 2002/06/25 04:12:51 marka Exp $ */
/* $Id: query.c,v 1.198.2.8.4.2 2003/02/17 07:05:04 marka Exp $ */
#include <config.h>
@@ -29,7 +29,6 @@
#include <dns/db.h>
#include <dns/events.h>
#include <dns/message.h>
#include <dns/order.h>
#include <dns/rdata.h>
#include <dns/rdataclass.h>
#include <dns/rdatalist.h>
@@ -63,8 +62,8 @@
NS_QUERYATTR_CACHEGLUEOK) != 0)
#define WANTRECURSION(c) (((c)->query.attributes & \
NS_QUERYATTR_WANTRECURSION) != 0)
#define WANTDNSSEC(c) (((c)->attributes & \
NS_CLIENTATTR_WANTDNSSEC) != 0)
#define WANTDNSSEC(c) (((c)->query.attributes & \
NS_QUERYATTR_WANTDNSSEC) != 0)
#define NOAUTHORITY(c) (((c)->query.attributes & \
NS_QUERYATTR_NOAUTHORITY) != 0)
#define NOADDITIONAL(c) (((c)->query.attributes & \
@@ -205,44 +204,11 @@ query_maybeputqname(ns_client_t *client) {
}
}
static inline void
query_freefreeversions(ns_client_t *client, isc_boolean_t everything) {
ns_dbversion_t *dbversion, *dbversion_next;
unsigned int i;
for (dbversion = ISC_LIST_HEAD(client->query.freeversions), i = 0;
dbversion != NULL;
dbversion = dbversion_next, i++)
{
dbversion_next = ISC_LIST_NEXT(dbversion, link);
/*
* If we're not freeing everything, we keep the first three
* dbversions structures around.
*/
if (i > 3 || everything) {
ISC_LIST_UNLINK(client->query.freeversions, dbversion,
link);
isc_mem_put(client->mctx, dbversion,
sizeof(*dbversion));
}
}
}
void
ns_query_cancel(ns_client_t *client) {
LOCK(&client->query.fetchlock);
if (client->query.fetch != NULL) {
dns_resolver_cancelfetch(client->query.fetch);
client->query.fetch = NULL;
}
UNLOCK(&client->query.fetchlock);
}
static inline void
query_reset(ns_client_t *client, isc_boolean_t everything) {
isc_buffer_t *dbuf, *dbuf_next;
ns_dbversion_t *dbversion, *dbversion_next;
unsigned int i;
/*
* Reset the query state of a client to its default state.
@@ -251,7 +217,11 @@ query_reset(ns_client_t *client, isc_boolean_t everything) {
/*
* Cancel the fetch if it's running.
*/
ns_query_cancel(client);
if (client->query.fetch != NULL) {
dns_resolver_cancelfetch(client->query.fetch);
client->query.fetch = NULL;
}
/*
* Cleanup any active versions.
@@ -273,7 +243,24 @@ query_reset(ns_client_t *client, isc_boolean_t everything) {
if (client->query.authzone != NULL)
dns_zone_detach(&client->query.authzone);
query_freefreeversions(client, everything);
/*
* Clean up free versions.
*/
for (dbversion = ISC_LIST_HEAD(client->query.freeversions), i = 0;
dbversion != NULL;
dbversion = dbversion_next, i++) {
dbversion_next = ISC_LIST_NEXT(dbversion, link);
/*
* If we're not freeing everything, we keep the first three
* dbversions structures around.
*/
if (i > 3 || everything) {
ISC_LIST_UNLINK(client->query.freeversions, dbversion,
link);
isc_mem_put(client->mctx, dbversion,
sizeof *dbversion);
}
}
for (dbuf = ISC_LIST_HEAD(client->query.namebufs);
dbuf != NULL;
@@ -474,7 +461,7 @@ query_newdbversion(ns_client_t *client, unsigned int n) {
ns_dbversion_t *dbversion;
for (i = 0; i < n; i++) {
dbversion = isc_mem_get(client->mctx, sizeof(*dbversion));
dbversion = isc_mem_get(client->mctx, sizeof *dbversion);
if (dbversion != NULL) {
dbversion->db = NULL;
dbversion->version = NULL;
@@ -522,9 +509,6 @@ ns_query_init(ns_client_t *client) {
client->query.restarts = 0;
client->query.timerset = ISC_FALSE;
client->query.qname = NULL;
result = isc_mutex_init(&client->query.fetchlock);
if (result != ISC_R_SUCCESS)
return (result);
client->query.fetch = NULL;
client->query.authdb = NULL;
client->query.authzone = NULL;
@@ -532,17 +516,11 @@ ns_query_init(ns_client_t *client) {
client->query.isreferral = ISC_FALSE;
query_reset(client, ISC_FALSE);
result = query_newdbversion(client, 3);
if (result != ISC_R_SUCCESS) {
DESTROYLOCK(&client->query.fetchlock);
if (result != ISC_R_SUCCESS)
return (result);
}
dns_a6_init(&client->query.a6ctx, query_simplefind, query_adda6rrset,
NULL, NULL, client);
result = query_newnamebuf(client);
if (result != ISC_R_SUCCESS)
query_freefreeversions(client, ISC_TRUE);
return (result);
return (query_newnamebuf(client));
}
static inline ns_dbversion_t *
@@ -679,7 +657,7 @@ query_getzonedb(ns_client_t *client, dns_name_t *name, unsigned int options,
result = ns_client_checkaclsilent(client, queryacl, ISC_TRUE);
if (log) {
char msg[DNS_NAME_FORMATSIZE + DNS_RDATACLASS_FORMATSIZE
+ sizeof("query '/'")];
+ sizeof "query '/'"];
if (result == ISC_R_SUCCESS) {
if (isc_log_wouldlog(ns_g_lctx,
ISC_LOG_DEBUG(3)))
@@ -1421,7 +1399,7 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
*/
if (a6rdataset != NULL) {
dns_a6_reset(&client->query.a6ctx);
(void)dns_a6_foreach(&client->query.a6ctx, a6rdataset, client->now);
dns_a6_foreach(&client->query.a6ctx, a6rdataset, client->now);
}
cleanup:
@@ -1537,10 +1515,6 @@ query_addrdataset(ns_client_t *client, dns_name_t *fname,
ISC_LIST_APPEND(fname->list, rdataset, link);
if (client->view->order != NULL)
rdataset->attributes |= dns_order_find(client->view->order,
fname, rdataset->type,
rdataset->rdclass);
if (NOADDITIONAL(client))
return;
@@ -1710,9 +1684,7 @@ query_addsoa(ns_client_t *client, dns_db_t *db, isc_boolean_t zero_ttl) {
result = dns_rdataset_first(rdataset);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
dns_rdataset_current(rdataset, &rdata);
result = dns_rdata_tostruct(&rdata, &soa, NULL);
if (result != ISC_R_SUCCESS)
goto cleanup;
dns_rdata_tostruct(&rdata, &soa, NULL);
if (zero_ttl) {
rdataset->ttl = 0;
@@ -1880,8 +1852,7 @@ query_addcnamelike(ns_client_t *client, dns_name_t *qname, dns_name_t *tname,
ISC_LIST_INIT(rdatalist->rdata);
ISC_LIST_APPEND(rdatalist->rdata, rdata, link);
RUNTIME_CHECK(dns_rdatalist_tordataset(rdatalist, rdataset)
== ISC_R_SUCCESS);
dns_rdatalist_tordataset(rdatalist, rdataset);
query_addrrset(client, anamep, &rdataset, NULL, NULL,
DNS_SECTION_ANSWER);
@@ -2045,70 +2016,6 @@ query_addbestns(ns_client_t *client) {
}
}
static void
query_addds(ns_client_t *client, dns_db_t *db, dns_dbnode_t *node) {
dns_name_t *rname;
dns_rdataset_t *rdataset, *sigrdataset;
isc_result_t result;
CTRACE("query_addds");
rname = NULL;
rdataset = NULL;
sigrdataset = NULL;
/*
* We'll need some resources...
*/
rdataset = query_newrdataset(client);
sigrdataset = query_newrdataset(client);
if (rdataset == NULL || sigrdataset == NULL)
return;
/*
* Look for the DS record, which may or may not be present.
*/
result = dns_db_findrdataset(db, node, NULL, dns_rdatatype_ds, 0,
client->now, rdataset, sigrdataset);
/*
* If we didn't find it, look for an NXT. */
if (result == ISC_R_NOTFOUND)
result = dns_db_findrdataset(db, node, NULL,
dns_rdatatype_nxt, 0, client->now,
rdataset, sigrdataset);
if (result != ISC_R_SUCCESS && result != ISC_R_NOTFOUND)
goto cleanup;
if (!dns_rdataset_isassociated(rdataset) ||
!dns_rdataset_isassociated(sigrdataset))
goto cleanup;
/*
* We've already added the NS record, so if the name's not there,
* we have other problems. Use this name rather than calling
* query_addrrset().
*/
result = dns_message_firstname(client->message, DNS_SECTION_AUTHORITY);
if (result != ISC_R_SUCCESS)
goto cleanup;
rname = NULL;
dns_message_currentname(client->message, DNS_SECTION_AUTHORITY,
&rname);
result = dns_message_findtype(rname, dns_rdatatype_ns, 0, NULL);
if (result != ISC_R_SUCCESS)
goto cleanup;
ISC_LIST_APPEND(rname->list, rdataset, link);
ISC_LIST_APPEND(rname->list, sigrdataset, link);
rdataset = NULL;
sigrdataset = NULL;
cleanup:
if (rdataset != NULL)
query_putrdataset(client, &rdataset);
if (sigrdataset != NULL)
query_putrdataset(client, &sigrdataset);
}
static void
query_resume(isc_task_t *task, isc_event_t *event) {
dns_fetchevent_t *devent = (dns_fetchevent_t *)event;
@@ -2127,8 +2034,7 @@ query_resume(isc_task_t *task, isc_event_t *event) {
REQUIRE(task == client->task);
REQUIRE(RECURSING(client));
LOCK(&client->query.fetchlock);
if (client->query.fetch != NULL) {
if (devent->fetch != NULL) {
/*
* This is the fetch we've been waiting for.
*/
@@ -2146,7 +2052,6 @@ query_resume(isc_task_t *task, isc_event_t *event) {
*/
fetch_cancelled = ISC_TRUE;
}
UNLOCK(&client->query.fetchlock);
INSIST(client->query.fetch == NULL);
client->query.attributes &= ~NS_QUERYATTR_RECURSING;
@@ -2166,10 +2071,7 @@ query_resume(isc_task_t *task, isc_event_t *event) {
if (devent->sigrdataset != NULL)
query_putrdataset(client, &devent->sigrdataset);
isc_event_free(&event);
if (fetch_cancelled)
query_error(client, DNS_R_SERVFAIL);
else
query_next(client, ISC_R_CANCELED);
query_next(client, ISC_R_CANCELED);
/*
* This may destroy the client.
*/
@@ -2198,22 +2100,10 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qdomain,
* because those have already been replaced when the
* connection was accepted (if allowed by the TCP quota).
*/
if (! client->mortal) {
isc_boolean_t killoldest = ISC_FALSE;
if (client->recursionquota == NULL) {
result = isc_quota_attach(&ns_g_server->recursionquota,
&client->recursionquota);
if (result == ISC_R_SOFTQUOTA) {
ns_client_log(client, NS_LOGCATEGORY_CLIENT,
NS_LOGMODULE_QUERY, ISC_LOG_WARNING,
"recursive-clients limit exceeded, "
"aborting oldest query");
killoldest = ISC_TRUE;
result = ISC_R_SUCCESS;
}
if (dns_resolver_nrunning(client->view->resolver) >
(unsigned int)ns_g_server->recursionquota.max)
result = ISC_R_QUOTA;
if (result == ISC_R_SUCCESS &&
if (result == ISC_R_SUCCESS && !client->mortal &&
(client->attributes & NS_CLIENTATTR_TCP) == 0)
result = ns_client_replace(client);
if (result != ISC_R_SUCCESS) {
@@ -2223,7 +2113,6 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qdomain,
isc_result_totext(result));
return (result);
}
ns_client_recursing(client, killoldest);
}
/*
@@ -2270,6 +2159,98 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qdomain,
return (result);
}
static inline isc_result_t
query_findparentkey(ns_client_t *client, dns_name_t *name,
dns_zone_t **zonep, dns_db_t **dbp,
dns_dbversion_t **versionp, dns_dbnode_t **nodep,
dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset)
{
dns_db_t *pdb;
dns_dbnode_t *pnode;
dns_dbversion_t *pversion;
dns_rdataset_t prdataset, psigrdataset;
dns_rdataset_t *psigrdatasetp;
isc_result_t result;
dns_zone_t *pzone;
isc_boolean_t is_zone;
dns_fixedname_t pfoundname;
/*
* 'name' is at a zone cut. Try to find a KEY for 'name' in
* the deepest ancestor zone of 'name' (if any). If it exists,
* update *zonep, *dbp, *nodep, rdataset, and sigrdataset and
* return ISC_R_SUCCESS. If not, leave them alone and return a
* non-success status.
*/
pzone = NULL;
pdb = NULL;
pnode = NULL;
pversion = NULL;
dns_rdataset_init(&prdataset);
if (sigrdataset != NULL)
dns_rdataset_init(&psigrdataset);
is_zone = ISC_FALSE;
dns_fixedname_init(&pfoundname);
result = query_getdb(client, name, DNS_GETDB_NOEXACT,
&pzone, &pdb, &pversion, &is_zone);
if (result != ISC_R_SUCCESS)
goto cleanup;
if (!is_zone) {
result = ISC_R_FAILURE;
goto cleanup;
}
if (sigrdataset != NULL)
psigrdatasetp = &psigrdataset;
else
psigrdatasetp = NULL;
result = dns_db_find(pdb, name, pversion, dns_rdatatype_key,
client->query.dboptions,
client->now, &pnode,
dns_fixedname_name(&pfoundname),
&prdataset, psigrdatasetp);
if (result == ISC_R_SUCCESS) {
if (dns_rdataset_isassociated(rdataset))
dns_rdataset_disassociate(rdataset);
dns_rdataset_clone(&prdataset, rdataset);
if (sigrdataset != NULL) {
if (dns_rdataset_isassociated(sigrdataset))
dns_rdataset_disassociate(sigrdataset);
if (dns_rdataset_isassociated(&psigrdataset))
dns_rdataset_clone(&psigrdataset, sigrdataset);
}
if (*nodep != NULL)
dns_db_detachnode(*dbp, nodep);
*nodep = pnode;
pnode = NULL;
*versionp = pversion;
if (*dbp != NULL)
dns_db_detach(dbp);
*dbp = pdb;
pdb = NULL;
if (*zonep != NULL)
dns_zone_detach(zonep);
*zonep = pzone;
pzone = NULL;
}
cleanup:
if (dns_rdataset_isassociated(&prdataset))
dns_rdataset_disassociate(&prdataset);
if (sigrdataset != NULL && dns_rdataset_isassociated(&psigrdataset))
dns_rdataset_disassociate(&psigrdataset);
if (pnode != NULL)
dns_db_detachnode(pdb, &pnode);
if (pdb != NULL)
dns_db_detach(&pdb);
if (pzone != NULL)
dns_zone_detach(&pzone);
return (result);
}
#define MAX_RESTARTS 16
#define QUERY_ERROR(r) \
@@ -2391,7 +2372,6 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
dns_zone_t *zone;
dns_rdata_cname_t cname;
dns_rdata_dname_t dname;
unsigned int options;
CTRACE("query_find");
@@ -2481,11 +2461,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
/*
* First we must find the right database.
*/
options = 0;
if (dns_rdatatype_atparent(qtype) &&
!dns_name_equal(client->query.qname, dns_rootname))
options |= DNS_GETDB_NOEXACT;
result = query_getdb(client, client->query.qname, options, &zone, &db,
result = query_getdb(client, client->query.qname, 0, &zone, &db,
&version, &is_zone);
if (result != ISC_R_SUCCESS) {
if (result == DNS_R_REFUSED)
@@ -2537,6 +2513,63 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
client->query.dboptions, client->now,
&node, fname, rdataset, sigrdataset);
/*
* We interrupt our normal query processing to bring you this special
* case...
*
* RFC 2535 (DNSSEC), section 2.3.4, discusses various special
* cases that can occur at delegation points.
*
* One of these cases is that the NULL KEY for an unsecure zone
* may occur in the delegating zone instead of in the delegated zone.
* If we're authoritative for both zones, we need to look for the
* key in the delegator if we didn't find it in the delegatee. If
* we didn't do this, a client doing DNSSEC validation could fail
* because it couldn't get the NULL KEY.
*/
if (type == dns_rdatatype_key &&
is_zone &&
result == DNS_R_NXRRSET &&
!dns_db_issecure(db) &&
dns_name_equal(client->query.qname, dns_db_origin(db))) {
/*
* We're looking for a KEY at the top of an unsecure zone,
* and we didn't find it.
*/
result = query_findparentkey(client, client->query.qname,
&zone, &db, &version, &node,
rdataset, sigrdataset);
if (result == ISC_R_SUCCESS) {
/*
* We found the parent KEY.
*
* zone, db, version, node, rdataset, and sigrdataset
* have all been updated to refer to the parent's
* data. We will resume query processing as if
* we had looked for the KEY in the parent zone in
* the first place.
*
* We need to set fname correctly. We do this here
* instead of in query_findparentkey() because
* dns_name_copy() can fail (though it shouldn't
* ever do so since we should have enough space).
*/
result = dns_name_copy(client->query.qname,
fname, NULL);
if (result != ISC_R_SUCCESS) {
QUERY_ERROR(DNS_R_SERVFAIL);
goto cleanup;
}
} else {
/*
* We couldn't find the KEY in a parent zone.
* Continue with processing of the original
* results of dns_db_find().
*/
result = DNS_R_NXRRSET;
}
}
resume:
CTRACE("query_find: resume");
switch (result) {
@@ -2650,8 +2683,6 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
&rdataset, sigrdatasetp,
dbuf, DNS_SECTION_AUTHORITY);
client->query.gluedb = NULL;
if (WANTDNSSEC(client) && dns_db_issecure(db))
query_addds(client, db, node);
} else {
/*
* We might have a better answer or delegation
@@ -2711,7 +2742,6 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
/*
* Recurse!
*/
/* XXXBEW look at this? */
if (type == dns_rdatatype_key)
result = query_recurse(client, qtype,
NULL, NULL);
@@ -2749,9 +2779,6 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
client->query.gluedb = NULL;
client->query.attributes &=
~NS_QUERYATTR_CACHEGLUEOK;
if (WANTDNSSEC(client) &&
!dns_rdataset_isassociated(sigrdataset))
query_addds(client, db, node);
}
}
goto cleanup;
@@ -2783,8 +2810,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
/*
* Add NXT record if we found one.
*/
if (WANTDNSSEC(client)) {
if (dns_rdataset_isassociated(rdataset))
if (dns_rdataset_isassociated(rdataset)) {
if (WANTDNSSEC(client))
query_addrrset(client, &fname, &rdataset,
&sigrdataset,
NULL, DNS_SECTION_AUTHORITY);
@@ -3009,8 +3036,8 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
* since the synthesized CNAME is NOT in the zone.
*/
dns_name_init(tname, NULL);
(void)query_addcnamelike(client, client->query.qname, fname,
0, &tname, dns_rdatatype_cname);
query_addcnamelike(client, client->query.qname, fname,
0, &tname, dns_rdatatype_cname);
if (tname != NULL)
dns_message_puttempname(client->message, &tname);
/*
@@ -3145,13 +3172,14 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
* Add NS records to the authority section (if we haven't already
* added them to the answer section).
*/
if (!want_restart && !NOAUTHORITY(client)) {
if (!want_restart && !NOAUTHORITY(client)
) {
if (is_zone) {
if (!((qtype == dns_rdatatype_ns ||
qtype == dns_rdatatype_any) &&
dns_name_equal(client->query.qname,
dns_db_origin(db))))
(void)query_addns(client, db);
query_addns(client, db);
} else if (qtype != dns_rdatatype_ns) {
if (fname != NULL)
query_releasename(client, &fname);
@@ -3251,10 +3279,7 @@ log_query(ns_client_t *client) {
dns_rdatatype_format(rdataset->type, typename, sizeof(typename));
ns_client_log(client, NS_LOGCATEGORY_QUERIES, NS_LOGMODULE_QUERY,
level, "query: %s %s %s %s%s%s", namebuf, classname,
typename, WANTRECURSION(client) ? "+" : "-",
(client->signer != NULL) ? "S": "",
(client->opt != NULL) ? "E" : "");
level, "query: %s %s %s", namebuf, classname, typename);
}
void
@@ -3275,9 +3300,11 @@ ns_query_start(ns_client_t *client) {
if ((message->flags & DNS_MESSAGEFLAG_RD) != 0)
client->query.attributes |= NS_QUERYATTR_WANTRECURSION;
#ifdef ISC_RFC2535
if ((client->extflags & DNS_MESSAGEEXTFLAG_DO) != 0 ||
(message->flags & DNS_MESSAGEFLAG_AD) != 0)
client->attributes |= NS_CLIENTATTR_WANTDNSSEC;
client->query.attributes |= NS_QUERYATTR_WANTDNSSEC;
#endif
if (client->view->minimalresponses)
client->query.attributes |= (NS_QUERYATTR_NOAUTHORITY |
@@ -3491,7 +3518,7 @@ synth_fwd_startfind(ns_client_t *client) {
ptarget = query_newname(client, dbuf, &b);
if (ptarget == NULL)
goto fail;
RUNTIME_CHECK(dns_name_copy(target, ptarget, NULL) == ISC_R_SUCCESS);
dns_name_copy(target, ptarget, NULL);
dns_adb_destroyfind(&find);
@@ -3632,8 +3659,7 @@ synth_fwd_respond(ns_client_t *client, dns_adbfind_t *find) {
ISC_LIST_APPEND(rdatalist->rdata, rdata, link);
}
RUNTIME_CHECK(dns_rdatalist_tordataset(rdatalist, rdataset)
== ISC_R_SUCCESS);
dns_rdatalist_tordataset(rdatalist, rdataset);
query_addrrset(client, &tname, &rdataset, NULL, NULL,
DNS_SECTION_ANSWER);

File diff suppressed because it is too large Load Diff

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: sortlist.c,v 1.8 2001/10/30 20:19:32 gson Exp $ */
/* $Id: sortlist.c,v 1.5 2001/03/26 23:36:00 gson Exp $ */
#include <config.h>
@@ -42,58 +42,40 @@ ns_sortlist_setup(dns_acl_t *acl, isc_netaddr_t *clientaddr, void **argp) {
* in the sortlist (see ARM).
*/
dns_aclelement_t *e = &acl->elements[i];
dns_aclelement_t *try_elt;
dns_aclelement_t *order_elt = NULL;
dns_aclelement_t *matched_elt = NULL;
dns_aclelement_t *matchelt = NULL;
dns_acl_t *inner;
if (e->type == dns_aclelementtype_nestedacl) {
dns_acl_t *inner = e->u.nestedacl;
if (e->type != dns_aclelementtype_nestedacl)
goto dont_sort;
if (inner->length < 1 || inner->length > 2)
goto dont_sort;
if (inner->elements[0].negative)
goto dont_sort;
try_elt = &inner->elements[0];
if (inner->length == 2)
order_elt = &inner->elements[1];
} else {
/*
* BIND 8 allows bare elements at the top level
* as an undocumented feature.
*/
try_elt = e;
}
inner = e->u.nestedacl;
if (dns_aclelement_match(clientaddr, NULL, try_elt,
if (inner->length < 1 || inner->length > 2)
goto dont_sort;
if (inner->elements[0].negative)
goto dont_sort;
if (dns_aclelement_match(clientaddr, NULL,
&inner->elements[0],
&ns_g_server->aclenv,
&matched_elt)) {
if (order_elt != NULL) {
if (order_elt->type ==
dns_aclelementtype_nestedacl) {
*argp = order_elt->u.nestedacl;
return (NS_SORTLISTTYPE_2ELEMENT);
} else if (order_elt->type ==
dns_aclelementtype_localhost &&
ns_g_server->aclenv.localhost != NULL) {
&matchelt)) {
if (inner->length == 2) {
dns_aclelement_t *elt1 = &inner->elements[1];
if (elt1->type == dns_aclelementtype_nestedacl)
*argp = elt1->u.nestedacl;
else if (elt1->type == dns_aclelementtype_localhost &&
ns_g_server->aclenv.localhost != NULL)
*argp = ns_g_server->aclenv.localhost;
return (NS_SORTLISTTYPE_2ELEMENT);
} else if (order_elt->type ==
dns_aclelementtype_localnets &&
ns_g_server->aclenv.localnets != NULL) {
else if (elt1->type == dns_aclelementtype_localnets &&
ns_g_server->aclenv.localnets != NULL)
*argp = ns_g_server->aclenv.localnets;
return (NS_SORTLISTTYPE_2ELEMENT);
} else {
/*
* BIND 8 allows a bare IP prefix as
* the 2nd element of a 2-element
* sortlist statement.
*/
*argp = order_elt;
return (NS_SORTLISTTYPE_1ELEMENT);
}
else
goto dont_sort;
return (NS_SORTLISTTYPE_2ELEMENT);
} else {
INSIST(matched_elt != NULL);
*argp = matched_elt;
INSIST(matchelt != NULL);
*argp = matchelt;
return (NS_SORTLISTTYPE_1ELEMENT);
}
}

View File

@@ -13,13 +13,13 @@
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
# $Id: Makefile.in,v 1.7 2001/09/20 15:16:26 marka Exp $
# $Id: Makefile.in,v 1.6 2001/01/09 21:40:37 bwelling Exp $
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
@BIND9_MAKE_INCLUDES@
@BIND9_INCLUDES@
CINCLUDES = -I${srcdir}/include -I${srcdir}/../include \
${DNS_INCLUDES} ${ISC_INCLUDES}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1999-2001 Internet Software Consortium.
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: os.h,v 1.19 2002/05/03 05:28:26 marka Exp $ */
/* $Id: os.h,v 1.14.2.2 2002/08/05 06:57:03 marka Exp $ */
#ifndef NS_OS_H
#define NS_OS_H 1
@@ -46,10 +46,4 @@ ns_os_writepidfile(const char *filename, isc_boolean_t first_time);
void
ns_os_shutdown(void);
isc_result_t
ns_os_gethostname(char *buf, size_t len);
void
ns_os_shutdownmsg(char *command, isc_buffer_t *text);
#endif /* NS_OS_H */

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1999-2001 Internet Software Consortium.
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: os.c,v 1.58 2002/05/03 05:28:25 marka Exp $ */
/* $Id: os.c,v 1.46.2.4 2002/08/05 06:57:03 marka Exp $ */
#include <config.h>
#include <stdarg.h>
@@ -33,7 +33,6 @@
#include <syslog.h>
#include <unistd.h>
#include <isc/buffer.h>
#include <isc/file.h>
#include <isc/print.h>
#include <isc/result.h>
@@ -45,10 +44,6 @@
static char *pidfile = NULL;
#ifndef ISC_FACILITY
#define ISC_FACILITY LOG_DAEMON
#endif
/*
* If there's no <linux/capability.h>, we don't care about <sys/prctl.h>
*/
@@ -58,36 +53,36 @@ static char *pidfile = NULL;
/*
* Linux defines:
* (T) HAVE_LINUXTHREADS
* (C) HAVE_LINUX_CAPABILITY_H
* (P) HAVE_SYS_PRCTL_H
* (T) HAVE_LINUXTHREADS
* (C) HAVE_LINUX_CAPABILITY_H
* (P) HAVE_SYS_PRCTL_H
* The possible cases are:
* none: setuid() normally
* T: no setuid()
* C: setuid() normally, drop caps (keep CAP_SETUID)
* T+C: no setuid(), drop caps (don't keep CAP_SETUID)
* T+C+P: setuid() early, drop caps (keep CAP_SETUID)
* C+P: setuid() normally, drop caps (keep CAP_SETUID)
* none: setuid() normally
* T: no setuid()
* C: setuid() normally, drop caps (keep CAP_SETUID)
* T+C: no setuid(), drop caps (don't keep CAP_SETUID)
* T+C+P: setuid() early, drop caps (keep CAP_SETUID)
* C+P: setuid() normally, drop caps (keep CAP_SETUID)
* P: not possible
* T+P: not possible
*
* if (C)
* caps = BIND_SERVICE + CHROOT + SETGID
* if ((T && C && P) || !T)
* caps += SETUID
* endif
* capset(caps)
* caps = BIND_SERVICE + CHROOT + SETGID
* if ((T && C && P) || !T)
* caps += SETUID
* endif
* capset(caps)
* endif
* if (T && C && P && -u)
* setuid()
* setuid()
* else if (T && -u)
* fail
* fail
* --> start threads
* if (!T && -u)
* setuid()
* setuid()
* if (C && (P || !-u))
* caps = BIND_SERVICE
* capset(caps)
* caps = BIND_SERVICE
* capset(caps)
* endif
*
* It will be nice when Linux threads work properly with setuid().
@@ -132,6 +127,9 @@ static isc_boolean_t non_root_caps = ISC_FALSE;
#endif /* HAVE_SYS_PRCTL_H */
#ifndef SYS_capset
#ifndef __NR_capset
#include <asm/unistd.h> /* Slackware 4.0 needs this. */
#endif
#define SYS_capset __NR_capset
#endif
@@ -144,10 +142,10 @@ linux_setcaps(unsigned int caps) {
if ((getuid() != 0 && !non_root_caps) || non_root)
return;
memset(&caphead, 0, sizeof(caphead));
memset(&caphead, 0, sizeof caphead);
caphead.version = _LINUX_CAPABILITY_VERSION;
caphead.pid = 0;
memset(&cap, 0, sizeof(cap));
memset(&cap, 0, sizeof cap);
cap.effective = caps;
cap.permitted = caps;
cap.inheritable = caps;
@@ -272,7 +270,8 @@ setup_syslog(const char *progname) {
#ifdef LOG_NDELAY
options |= LOG_NDELAY;
#endif
openlog(isc_file_basename(progname), options, ISC_FACILITY);
openlog(isc_file_basename(progname), options, LOG_DAEMON);
}
void
@@ -308,7 +307,7 @@ ns_os_daemonize(void) {
mainpid = getpid();
#endif
if (setsid() == -1) {
if (setsid() == -1) {
isc__strerror(errno, strbuf, sizeof(strbuf));
ns_main_earlyfatal("setsid(): %s", strbuf);
}
@@ -325,11 +324,11 @@ ns_os_daemonize(void) {
*/
fd = open("/dev/null", O_RDWR, 0);
if (fd != -1) {
(void)close(STDIN_FILENO);
close(STDIN_FILENO);
(void)dup2(fd, STDIN_FILENO);
(void)close(STDOUT_FILENO);
close(STDOUT_FILENO);
(void)dup2(fd, STDOUT_FILENO);
(void)close(STDERR_FILENO);
close(STDERR_FILENO);
(void)dup2(fd, STDERR_FILENO);
if (fd != STDIN_FILENO &&
fd != STDOUT_FILENO &&
@@ -439,23 +438,23 @@ ns_os_minprivs(void) {
static int
safe_open(const char *filename, isc_boolean_t append) {
int fd;
struct stat sb;
struct stat sb;
if (stat(filename, &sb) == -1) {
if (errno != ENOENT)
if (stat(filename, &sb) == -1) {
if (errno != ENOENT)
return (-1);
} else if ((sb.st_mode & S_IFREG) == 0) {
} else if ((sb.st_mode & S_IFREG) == 0) {
errno = EOPNOTSUPP;
return (-1);
}
if (append)
fd = open(filename, O_WRONLY|O_CREAT|O_APPEND,
S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
else {
(void)unlink(filename);
fd = open(filename, O_WRONLY|O_CREAT|O_EXCL,
S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
}
return (fd);
}
@@ -471,7 +470,7 @@ cleanup_pidfile(void) {
void
ns_os_writepidfile(const char *filename, isc_boolean_t first_time) {
int fd;
int fd;
FILE *lockfile;
size_t len;
pid_t pid;
@@ -486,29 +485,26 @@ ns_os_writepidfile(const char *filename, isc_boolean_t first_time) {
cleanup_pidfile();
if (filename == NULL)
return;
len = strlen(filename);
pidfile = malloc(len + 1);
if (pidfile == NULL) {
isc__strerror(errno, strbuf, sizeof(strbuf));
(*report)("couldn't malloc '%s': %s", filename, strbuf);
(*report)("couldn't malloc '%s': %s", filename, strbuf);
return;
}
/* This is safe. */
strcpy(pidfile, filename);
fd = safe_open(filename, ISC_FALSE);
if (fd < 0) {
fd = safe_open(filename, ISC_FALSE);
if (fd < 0) {
isc__strerror(errno, strbuf, sizeof(strbuf));
(*report)("couldn't open pid file '%s': %s", filename, strbuf);
(*report)("couldn't open pid file '%s': %s", filename, strbuf);
free(pidfile);
pidfile = NULL;
return;
}
lockfile = fdopen(fd, "w");
if (lockfile == NULL) {
lockfile = fdopen(fd, "w");
if (lockfile == NULL) {
isc__strerror(errno, strbuf, sizeof(strbuf));
(*report)("could not fdopen() pid file '%s': %s",
filename, strbuf);
@@ -521,14 +517,14 @@ ns_os_writepidfile(const char *filename, isc_boolean_t first_time) {
#else
pid = getpid();
#endif
if (fprintf(lockfile, "%ld\n", (long)pid) < 0) {
(*report)("fprintf() to pid file '%s' failed", filename);
if (fprintf(lockfile, "%ld\n", (long)pid) < 0) {
(*report)("fprintf() to pid file '%s' failed", filename);
(void)fclose(lockfile);
cleanup_pidfile();
return;
}
if (fflush(lockfile) == EOF) {
(*report)("fflush() to pid file '%s' failed", filename);
if (fflush(lockfile) == EOF) {
(*report)("fflush() to pid file '%s' failed", filename);
(void)fclose(lockfile);
cleanup_pidfile();
return;
@@ -541,57 +537,3 @@ ns_os_shutdown(void) {
closelog();
cleanup_pidfile();
}
isc_result_t
ns_os_gethostname(char *buf, size_t len) {
int n;
n = gethostname(buf, len);
return ((n == 0) ? ISC_R_SUCCESS : ISC_R_FAILURE);
}
static char *
next_token(char **stringp, const char *delim) {
char *res;
do {
res = strsep(stringp, delim);
if (res == NULL)
break;
} while (*res == '\0');
return (res);
}
void
ns_os_shutdownmsg(char *command, isc_buffer_t *text) {
char *input, *ptr;
unsigned int n;
pid_t pid;
input = command;
/* Skip the command name. */
ptr = next_token(&input, " \t");
if (ptr == NULL)
return;
ptr = next_token(&input, " \t");
if (ptr == NULL)
return;
if (strcmp(ptr, "-p") != 0)
return;
#ifdef HAVE_LINUXTHREADS
pid = mainpid;
#else
pid = getpid();
#endif
n = snprintf((char *)isc_buffer_used(text),
isc_buffer_availablelength(text),
"pid: %d", pid);
/* Only send a message if it is complete. */
if (n < isc_buffer_availablelength(text))
isc_buffer_add(text, n);
}

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: update.c,v 1.100 2002/06/12 06:29:43 marka Exp $ */
/* $Id: update.c,v 1.88.2.3 2002/02/08 03:57:15 marka Exp $ */
#include <config.h>
@@ -36,7 +36,6 @@
#include <dns/rdataclass.h>
#include <dns/rdataset.h>
#include <dns/rdatasetiter.h>
#include <dns/rdatatype.h>
#include <dns/soa.h>
#include <dns/ssu.h>
#include <dns/view.h>
@@ -107,34 +106,6 @@
if (result != ISC_R_SUCCESS) goto failure; \
} while (0)
#define FAILN(code, name, msg) \
do { \
result = (code); \
if (isc_log_wouldlog(ns_g_lctx, LOGLEVEL_PROTOCOL)) { \
char _nbuf[DNS_NAME_FORMATSIZE]; \
dns_name_format(name, _nbuf, sizeof(_nbuf)); \
update_log(client, zone, LOGLEVEL_PROTOCOL, \
"update failed: %s: %s (%s)", _nbuf, \
msg, isc_result_totext(result)); \
} \
if (result != ISC_R_SUCCESS) goto failure; \
} while (0)
#define FAILNT(code, name, type, msg) \
do { \
result = (code); \
if (isc_log_wouldlog(ns_g_lctx, LOGLEVEL_PROTOCOL)) { \
char _nbuf[DNS_NAME_FORMATSIZE]; \
char _tbuf[DNS_RDATATYPE_FORMATSIZE]; \
dns_name_format(name, _nbuf, sizeof(_nbuf)); \
dns_rdatatype_format(type, _tbuf, sizeof(_tbuf)); \
update_log(client, zone, LOGLEVEL_PROTOCOL, \
"update failed: %s/%s: %s (%s)", \
_nbuf, _tbuf, msg, \
isc_result_totext(result)); \
} \
if (result != ISC_R_SUCCESS) goto failure; \
} while (0)
/*
* Fail unconditionally and log as a server error.
* The test against ISC_R_SUCCESS is there to keep the Solaris compiler
@@ -205,7 +176,7 @@ update_log(ns_client_t *client, dns_zone_t *zone,
sizeof(classbuf));
va_start(ap, fmt);
vsnprintf(message, sizeof(message), fmt, ap);
vsnprintf(message, sizeof message, fmt, ap);
va_end(ap);
ns_client_log(client, NS_LOGCATEGORY_UPDATE, NS_LOGMODULE_UPDATE,
@@ -213,33 +184,6 @@ update_log(ns_client_t *client, dns_zone_t *zone,
namebuf, classbuf, message);
}
static isc_result_t
checkupdateacl(ns_client_t *client, dns_acl_t *acl, const char *message,
dns_name_t *zonename)
{
char namebuf[DNS_NAME_FORMATSIZE];
char classbuf[DNS_RDATACLASS_FORMATSIZE];
int level = ISC_LOG_ERROR;
const char *msg = "denied";
isc_result_t result;
result = ns_client_checkaclsilent(client, acl, ISC_FALSE);
if (result == ISC_R_SUCCESS) {
level = ISC_LOG_DEBUG(3);
msg = "approved";
}
dns_name_format(zonename, namebuf, sizeof(namebuf));
dns_rdataclass_format(client->view->rdclass, classbuf,
sizeof(classbuf));
ns_client_log(client, NS_LOGCATEGORY_UPDATE_SECURITY,
NS_LOGMODULE_UPDATE, level, "%s '%s/%s' %s",
message, namebuf, classbuf, msg);
return (result);
}
/*
* Update a single RR in version 'ver' of 'db' and log the
* update in 'diff'.
@@ -781,13 +725,11 @@ temp_order(const void *av, const void *bv) {
*
* Return ISC_R_SUCCESS if the prerequisites are satisfied,
* rcode(dns_rcode_nxrrset) if not.
*
* 'temp' must be pre-sorted.
*/
static isc_result_t
temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
dns_dbversion_t *ver, dns_name_t *tmpname, dns_rdatatype_t *typep)
dns_dbversion_t *ver)
{
isc_result_t result;
dns_name_t *name;
@@ -795,6 +737,18 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
dns_difftuple_t *t;
dns_diff_t trash;
/* Exit early if the list is empty (for efficiency only). */
if (ISC_LIST_HEAD(temp->tuples) == NULL)
return (ISC_R_SUCCESS);
/*
* Sort the prerequisite records by owner name,
* type, and rdata.
*/
result = dns_diff_sort(temp, temp_order);
if (result != ISC_R_SUCCESS)
return (result);
dns_diff_init(mctx, &trash);
/*
@@ -805,8 +759,6 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
t = ISC_LIST_HEAD(temp->tuples);
while (t != NULL) {
name = &t->name;
(void)dns_name_copy(name, tmpname, NULL);
*typep = t->rdata.type;
/* A new unique name begins here. */
node = NULL;
@@ -825,7 +777,7 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
dns_diff_t u_rrs; /* Update RRs with
this name and type */
*typep = type = t->rdata.type;
type = t->rdata.type;
if (type == dns_rdatatype_sig)
covers = dns_rdata_covers(&t->rdata);
else
@@ -1288,8 +1240,9 @@ namelist_append_subdomain(dns_db_t *db, dns_name_t *name, dns_diff_t *affected)
result = dns_dbiterator_next(dbit))
{
dns_dbnode_t *node = NULL;
CHECK(dns_dbiterator_current(dbit, &node, child));
result = dns_dbiterator_current(dbit, &node, child);
dns_db_detachnode(db, &node);
CHECK(result);
if (! dns_name_issubdomain(child, name))
break;
CHECK(namelist_append_name(affected, child));
@@ -1405,9 +1358,8 @@ is_glue(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
* a zone cut.
*/
static isc_result_t
next_active(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
dns_dbversion_t *ver, dns_name_t *oldname, dns_name_t *newname,
isc_boolean_t forward)
next_active(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *oldname,
dns_name_t *newname, isc_boolean_t forward)
{
isc_result_t result;
dns_dbiterator_t *dbit = NULL;
@@ -1434,13 +1386,15 @@ next_active(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
CHECK(dns_dbiterator_last(dbit));
wraps++;
if (wraps == 2) {
update_log(client, zone, ISC_LOG_ERROR,
"secure zone with no NXTs");
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_UPDATE,
NS_LOGMODULE_UPDATE,
ISC_LOG_ERROR,
"secure zone with no NXTs");
result = DNS_R_BADZONE;
goto failure;
}
}
CHECK(dns_dbiterator_current(dbit, &node, newname));
dns_dbiterator_current(dbit, &node, newname);
dns_db_detachnode(db, &node);
/*
@@ -1466,8 +1420,7 @@ next_active(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
* The existing NXT is removed.
*/
static isc_result_t
add_nxt(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
dns_dbversion_t *ver, dns_name_t *name, dns_diff_t *diff)
add_nxt(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name, dns_diff_t *diff)
{
isc_result_t result;
dns_dbnode_t *node = NULL;
@@ -1483,7 +1436,7 @@ add_nxt(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
/*
* Find the successor name, aka NXT target.
*/
CHECK(next_active(client, zone, db, ver, name, target, ISC_TRUE));
CHECK(next_active(db, ver, name, target, ISC_TRUE));
/*
* Create the NXT RDATA.
@@ -1526,7 +1479,7 @@ add_placeholder_nxt(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
dns_rdata_t rdata = DNS_RDATA_INIT;
r.base = data;
r.length = sizeof(data);
r.length = sizeof data;
dns_rdata_fromregion(&rdata, dns_db_class(db), dns_rdatatype_nxt, &r);
CHECK(dns_difftuple_create(diff->mctx, DNS_DIFFOP_ADD, name, 0,
&rdata, &tuple));
@@ -1536,16 +1489,14 @@ add_placeholder_nxt(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
}
static isc_result_t
find_zone_keys(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
isc_mem_t *mctx, unsigned int maxkeys,
dst_key_t **keys, unsigned int *nkeys)
find_zone_keys(dns_db_t *db, dns_dbversion_t *ver, isc_mem_t *mctx,
unsigned int maxkeys, dst_key_t **keys, unsigned int *nkeys)
{
isc_result_t result;
dns_dbnode_t *node = NULL;
const char *directory = dns_zone_getkeydirectory(zone);
CHECK(dns_db_findnode(db, dns_db_origin(db), ISC_FALSE, &node));
CHECK(dns_dnssec_findzonekeys2(db, ver, node, dns_db_origin(db),
directory, mctx, maxkeys, keys, nkeys));
CHECK(dns_dnssec_findzonekeys(db, ver, node, dns_db_origin(db),
mctx, maxkeys, keys, nkeys));
failure:
if (node != NULL)
dns_db_detachnode(db, &node);
@@ -1612,9 +1563,9 @@ add_sigs(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
* The SIGs generated will be valid for 'sigvalidityinterval' seconds.
*/
static isc_result_t
update_signatures(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
dns_dbversion_t *oldver, dns_dbversion_t *newver,
dns_diff_t *diff, isc_uint32_t sigvalidityinterval)
update_signatures(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *oldver,
dns_dbversion_t *newver, dns_diff_t *diff,
isc_uint32_t sigvalidityinterval)
{
isc_result_t result;
dns_difftuple_t *t;
@@ -1629,18 +1580,20 @@ update_signatures(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
unsigned int i;
isc_stdtime_t now, inception, expire;
dns_diff_init(client->mctx, &diffnames);
dns_diff_init(client->mctx, &affected);
dns_diff_init(mctx, &diffnames);
dns_diff_init(mctx, &affected);
dns_diff_init(client->mctx, &sig_diff);
dns_diff_init(client->mctx, &nxt_diff);
dns_diff_init(client->mctx, &nxt_mindiff);
dns_diff_init(mctx, &sig_diff);
dns_diff_init(mctx, &nxt_diff);
dns_diff_init(mctx, &nxt_mindiff);
result = find_zone_keys(zone, db, newver, client->mctx,
result = find_zone_keys(db, newver, mctx,
MAXZONEKEYS, zone_keys, &nkeys);
if (result != ISC_R_SUCCESS) {
update_log(client, zone, ISC_LOG_ERROR,
"could not get zone keys for secure dynamic update");
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_UPDATE,
NS_LOGMODULE_UPDATE, ISC_LOG_ERROR,
"could not get zone keys for secure "
"dynamic update");
goto failure;
}
@@ -1692,8 +1645,7 @@ update_signatures(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
if (flag) {
CHECK(add_sigs(db, newver, name, type,
&sig_diff, zone_keys, nkeys,
client->mctx, inception,
expire));
mctx, inception, expire));
}
skip:
/* Skip any other updates to the same RRset. */
@@ -1749,8 +1701,7 @@ update_signatures(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
* a newly unobscured node, and those nodes are on the
* "affected" list in any case.
*/
CHECK(next_active(client, zone, db, newver,
&t->name, prevname, ISC_FALSE));
CHECK(next_active(db, newver, &t->name, prevname, ISC_FALSE));
CHECK(namelist_append_name(&affected, prevname));
}
@@ -1818,9 +1769,10 @@ update_signatures(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
*/
CHECK(rrset_exists(db, newver, &t->name,
dns_rdatatype_nxt, 0, &flag));
if (! flag)
CHECK(add_placeholder_nxt(db, newver, &t->name,
diff));
if (! flag) {
add_placeholder_nxt(db, newver, &t->name,
diff);
}
}
}
@@ -1851,8 +1803,7 @@ update_signatures(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
* there is other data, and if there is other data,
* there are other SIGs.
*/
CHECK(add_nxt(client, zone, db, newver,
&t->name, &nxt_diff));
CHECK(add_nxt(db, newver, &t->name, &nxt_diff));
}
}
@@ -1877,8 +1828,8 @@ update_signatures(ns_client_t *client, dns_zone_t *zone, dns_db_t *db,
NULL, &sig_diff));
} else if (t->op == DNS_DIFFOP_ADD) {
CHECK(add_sigs(db, newver, &t->name, dns_rdatatype_nxt,
&sig_diff, zone_keys, nkeys,
client->mctx, inception, expire));
&sig_diff, zone_keys, nkeys, mctx,
inception, expire));
} else {
INSIST(0);
}
@@ -2020,8 +1971,9 @@ ns_update_start(ns_client_t *client, isc_result_t sigresult) {
CHECK(send_update_event(client, zone));
break;
case dns_zone_slave:
CHECK(checkupdateacl(client, dns_zone_getforwardacl(zone),
"update forwarding", zonename));
CHECK(ns_client_checkacl(client, "update forwarding",
dns_zone_getforwardacl(zone),
ISC_FALSE, ISC_LOG_ERROR));
CHECK(send_forward_event(client, zone));
break;
default:
@@ -2060,8 +2012,6 @@ update_action(isc_task_t *task, isc_event_t *event) {
dns_rdataclass_t zoneclass;
dns_name_t *zonename;
dns_ssutable_t *ssutable = NULL;
dns_fixedname_t tmpnamefixed;
dns_name_t *tmpname = NULL;
INSIST(event->ev_type == DNS_EVENT_UPDATE);
@@ -2096,7 +2046,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
FAILC(DNS_R_FORMERR, "prerequisite TTL is not zero");
if (! dns_name_issubdomain(name, zonename))
FAILN(DNS_R_NOTZONE, name,
FAILC(DNS_R_NOTZONE,
"prerequisite name is out of zone");
if (update_class == dns_rdataclass_any) {
@@ -2107,7 +2057,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
if (rdata.type == dns_rdatatype_any) {
CHECK(name_exists(db, ver, name, &flag));
if (! flag) {
FAILN(DNS_R_NXDOMAIN, name,
FAILC(DNS_R_NXDOMAIN,
"'name in use' prerequisite "
"not satisfied");
}
@@ -2116,7 +2066,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
rdata.type, covers, &flag));
if (! flag) {
/* RRset does not exist. */
FAILNT(DNS_R_NXRRSET, name, rdata.type,
FAILC(DNS_R_NXRRSET,
"'rrset exists (value independent)' "
"prerequisite not satisfied");
}
@@ -2129,7 +2079,7 @@ update_action(isc_task_t *task, isc_event_t *event) {
if (rdata.type == dns_rdatatype_any) {
CHECK(name_exists(db, ver, name, &flag));
if (flag) {
FAILN(DNS_R_YXDOMAIN, name,
FAILC(DNS_R_YXDOMAIN,
"'name not in use' prerequisite "
"not satisfied");
}
@@ -2138,9 +2088,9 @@ update_action(isc_task_t *task, isc_event_t *event) {
rdata.type, covers, &flag));
if (flag) {
/* RRset exists. */
FAILNT(DNS_R_YXRRSET, name, rdata.type,
"'rrset does not exist' "
"prerequisite not satisfied");
FAILC(DNS_R_YXRRSET,
"'rrset does not exist' "
"prerequisite not satisfied");
}
}
} else if (update_class == zoneclass) {
@@ -2159,31 +2109,14 @@ update_action(isc_task_t *task, isc_event_t *event) {
if (result != ISC_R_NOMORE)
FAIL(result);
/*
* Perform the final check of the "rrset exists (value dependent)"
* prerequisites.
*/
if (ISC_LIST_HEAD(temp.tuples) != NULL) {
dns_rdatatype_t type;
/*
* Sort the prerequisite records by owner name,
* type, and rdata.
*/
result = dns_diff_sort(&temp, temp_order);
if (result != ISC_R_SUCCESS)
FAILC(result, "'RRset exists (value dependent)' "
"prerequisite not satisfied");
dns_fixedname_init(&tmpnamefixed);
tmpname = dns_fixedname_name(&tmpnamefixed);
result = temp_check(mctx, &temp, db, ver, tmpname, &type);
if (result != ISC_R_SUCCESS)
FAILNT(result, tmpname, type,
"'RRset exists (value dependent)' "
"prerequisite not satisfied");
}
result = temp_check(mctx, &temp, db, ver);
if (result != ISC_R_SUCCESS)
FAILC(result, "'RRset exists (value dependent)' "
"prerequisite not satisfied");
update_log(client, zone, LOGLEVEL_DEBUG,
"prerequisites are OK");
@@ -2192,15 +2125,23 @@ update_action(isc_task_t *task, isc_event_t *event) {
* Check Requestor's Permissions. It seems a bit silly to do this
* only after prerequisite testing, but that is what RFC2136 says.
*/
result = ISC_R_SUCCESS;
if (ssutable == NULL)
CHECK(checkupdateacl(client, dns_zone_getupdateacl(zone),
"update", zonename));
else if (client->signer == NULL)
CHECK(checkupdateacl(client, NULL, "update", zonename));
if (dns_zone_getupdatedisabled(zone))
FAILC(DNS_R_REFUSED, "dynamic update temporarily disabled");
if (ssutable == NULL) {
char msg[DNS_RDATACLASS_FORMATSIZE + DNS_NAME_FORMATSIZE
+ sizeof("update '/'")];
ns_client_aclmsg("update", zonename, client->view->rdclass,
msg, sizeof(msg));
CHECK(ns_client_checkacl(client, msg,
dns_zone_getupdateacl(zone),
ISC_FALSE, ISC_LOG_ERROR));
} else if (client->signer == NULL) {
/* This gets us a free log message. */
char msg[DNS_RDATACLASS_FORMATSIZE + DNS_NAME_FORMATSIZE
+ sizeof("update '/'")];
ns_client_aclmsg("update", zonename, client->view->rdclass,
msg, sizeof(msg));
CHECK(ns_client_checkacl(client, msg, NULL, ISC_FALSE,
ISC_LOG_ERROR));
}
/*
* Perform the Update Section Prescan.
@@ -2305,20 +2246,6 @@ update_action(isc_task_t *task, isc_event_t *event) {
&name, &rdata, &covers, &ttl, &update_class);
if (update_class == zoneclass) {
/*
* RFC 1123 doesn't allow MF and MD in master zones. */
if (rdata.type == dns_rdatatype_md ||
rdata.type == dns_rdatatype_mf) {
char typebuf[DNS_RDATATYPE_FORMATSIZE];
dns_rdatatype_format(rdata.type, typebuf,
sizeof(typebuf));
update_log(client, zone, LOGLEVEL_PROTOCOL,
"attempt to add %s ignored",
typebuf);
continue;
}
if (rdata.type == dns_rdatatype_cname) {
CHECK(cname_incompatible_rrset_exists(db, ver,
name,
@@ -2369,19 +2296,9 @@ update_action(isc_task_t *task, isc_event_t *event) {
}
soa_serial_changed = ISC_TRUE;
}
if (isc_log_wouldlog(ns_g_lctx, LOGLEVEL_PROTOCOL)) {
char namestr[DNS_NAME_FORMATSIZE];
char typestr[DNS_RDATATYPE_FORMATSIZE];
dns_name_format(name, namestr,
sizeof(namestr));
dns_rdatatype_format(rdata.type, typestr,
sizeof(typestr));
update_log(client, zone,
LOGLEVEL_PROTOCOL,
"adding an RR at '%s' %s",
namestr, typestr);
}
update_log(client, zone,
LOGLEVEL_PROTOCOL, "adding an RR");
/* Prepare the affected RRset for the addition. */
{
@@ -2411,17 +2328,9 @@ update_action(isc_task_t *task, isc_event_t *event) {
}
} else if (update_class == dns_rdataclass_any) {
if (rdata.type == dns_rdatatype_any) {
if (isc_log_wouldlog(ns_g_lctx,
LOGLEVEL_PROTOCOL))
{
char namestr[DNS_NAME_FORMATSIZE];
dns_name_format(name, namestr,
sizeof(namestr));
update_log(client, zone,
LOGLEVEL_PROTOCOL,
"delete all rrsets from "
"name '%s'", namestr);
}
update_log(client, zone,
LOGLEVEL_PROTOCOL,
"delete all rrsets from a name");
if (dns_name_equal(name, zonename)) {
CHECK(delete_if(type_not_soa_nor_ns_p,
db, ver, name,
@@ -2441,21 +2350,9 @@ update_action(isc_task_t *task, isc_event_t *event) {
"or NS records ignored");
continue;
} else {
if (isc_log_wouldlog(ns_g_lctx,
LOGLEVEL_PROTOCOL))
{
char namestr[DNS_NAME_FORMATSIZE];
char typestr[DNS_RDATATYPE_FORMATSIZE];
dns_name_format(name, namestr,
sizeof(namestr));
dns_rdatatype_format(rdata.type,
typestr,
sizeof(typestr));
update_log(client, zone,
LOGLEVEL_PROTOCOL,
"deleting rrset at '%s' %s",
namestr, typestr);
}
update_log(client, zone,
LOGLEVEL_PROTOCOL,
"deleting an rrset");
CHECK(delete_if(true_p, db, ver, name,
rdata.type, covers, &rdata,
&diff));
@@ -2516,9 +2413,8 @@ update_action(isc_task_t *task, isc_event_t *event) {
}
if (dns_db_issecure(db)) {
result = update_signatures(client, zone, db, oldver,
ver, &diff,
dns_zone_getsigvalidityinterval(zone));
result = update_signatures(mctx, db, oldver, ver,
&diff, dns_zone_getsigvalidityinterval(zone));
if (result != ISC_R_SUCCESS) {
update_log(client, zone,
ISC_LOG_ERROR,

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1999-2001 Internet Software Consortium.
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: os.h,v 1.6 2002/05/03 05:28:29 marka Exp $ */
/* $Id: os.h,v 1.1.2.2 2002/08/05 06:57:04 marka Exp $ */
#ifndef NS_OS_H
#define NS_OS_H 1
@@ -46,10 +46,4 @@ ns_os_writepidfile(const char *filename, isc_boolean_t first_time);
void
ns_os_shutdown(void);
isc_result_t
ns_os_gethostname(char *buf, size_t len);
void
ns_os_shutdownmsg(char *command, isc_buffer_t *text);
#endif /* NS_OS_H */

View File

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

View File

@@ -25,31 +25,16 @@ NULL=
NULL=nul
!ENDIF
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "named - Win32 Release"
OUTDIR=.\Release
INTDIR=.\Release
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Release\named.exe"
!ELSE
ALL : "libisccfg - Win32 Release" "libisccc - Win32 Release" "liblwres - Win32 Release" "libbind9 - Win32 Release" "libisc - Win32 Release" "libdns - Win32 Release" "..\..\..\Build\Release\named.exe"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libdns - Win32 ReleaseCLEAN" "libisc - Win32 ReleaseCLEAN" "libbind9 - Win32 ReleaseCLEAN" "liblwres - Win32 ReleaseCLEAN" "libisccc - Win32 ReleaseCLEAN" "libisccfg - Win32 ReleaseCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\aclconf.obj"
-@erase "$(INTDIR)\builtin.obj"
-@erase "$(INTDIR)\client.obj"
-@erase "$(INTDIR)\config.obj"
-@erase "$(INTDIR)\control.obj"
@@ -85,13 +70,46 @@ CLEAN :
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../win32/include" /I "../include" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/win32/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /I "../../../lib/isccc/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /I "../../../lib/isccfg/include" /I "../../../lib/bind9/include" /D "WIN32" /D "NDEBUG" /D "__STDC__" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\named.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
CPP=cl.exe
CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "./" /I "../../../" /I "../win32/include" /I "../include" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/win32/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /I "../../../lib/isccc/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /I "../../../lib/isccfg/include" /D "WIN32" /D "NDEBUG" /D "__STDC__" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\named.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)\named.bsc"
BSC32_SBRS= \
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib kernel32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib ../../../lib/isccc/win32/Release/libisccc.lib ../../../lib/lwres/win32/Release/liblwres.lib ../../../lib/isccfg/win32/Release/libisccfg.lib ../../../lib/bind9/win32/Release/libbind9.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\named.pdb" /machine:I386 /out:"../../../Build/Release/named.exe"
LINK32_FLAGS=user32.lib advapi32.lib kernel32.lib ws2_32.lib ../../../lib/isc/win32/Release/libisc.lib ../../../lib/dns/win32/Release/libdns.lib ../../../lib/isccc/win32/Release/libisccc.lib ../../../lib/lwres/win32/Release/liblwres.lib ../../../lib/isccfg/win32/Release/libisccfg.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\named.pdb" /machine:I386 /out:"../../../Build/Release/named.exe"
LINK32_OBJS= \
"$(INTDIR)\aclconf.obj" \
"$(INTDIR)\client.obj" \
@@ -122,14 +140,7 @@ LINK32_OBJS= \
"$(INTDIR)\tsigconf.obj" \
"$(INTDIR)\update.obj" \
"$(INTDIR)\xfrout.obj" \
"$(INTDIR)\zoneconf.obj" \
"$(INTDIR)\builtin.obj" \
"..\..\..\lib\dns\win32\Release\libdns.lib" \
"..\..\..\lib\isc\win32\Release\libisc.lib" \
"..\..\..\lib\bind9\win32\Release\libbind9.lib" \
"..\..\..\lib\lwres\win32\Release\liblwres.lib" \
"..\..\..\lib\isccc\win32\Release\libisccc.lib" \
"..\..\..\lib\isccfg\win32\Release\libisccfg.lib"
"$(INTDIR)\zoneconf.obj"
"..\..\..\Build\Release\named.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
@@ -144,25 +155,12 @@ INTDIR=.\Debug
OutDir=.\Debug
# End Custom Macros
!IF "$(RECURSE)" == "0"
ALL : "..\..\..\Build\Debug\named.exe" "$(OUTDIR)\named.bsc"
!ELSE
ALL : "libisccfg - Win32 Debug" "libisccc - Win32 Debug" "liblwres - Win32 Debug" "libbind9 - Win32 Debug" "libisc - Win32 Debug" "libdns - Win32 Debug" "..\..\..\Build\Debug\named.exe" "$(OUTDIR)\named.bsc"
!ENDIF
!IF "$(RECURSE)" == "1"
CLEAN :"libdns - Win32 DebugCLEAN" "libisc - Win32 DebugCLEAN" "libbind9 - Win32 DebugCLEAN" "liblwres - Win32 DebugCLEAN" "libisccc - Win32 DebugCLEAN" "libisccfg - Win32 DebugCLEAN"
!ELSE
CLEAN :
!ENDIF
-@erase "$(INTDIR)\aclconf.obj"
-@erase "$(INTDIR)\aclconf.sbr"
-@erase "$(INTDIR)\builtin.obj"
-@erase "$(INTDIR)\builtin.sbr"
-@erase "$(INTDIR)\client.obj"
-@erase "$(INTDIR)\client.sbr"
-@erase "$(INTDIR)\config.obj"
@@ -232,7 +230,40 @@ CLEAN :
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "../win32/include" /I "../include" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/win32/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /I "../../../lib/isccc/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /I "../../../lib/isccfg/include" /I "../../../lib/bind9/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "i386" /FR"$(INTDIR)\\" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
CPP=cl.exe
CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "./" /I "../../../" /I "../win32/include" /I "../include" /I "../../../lib/isc/win32" /I "../../../lib/isc/win32/include" /I "../../../lib/isc/include" /I "../../../lib/dns/win32/include" /I "../../../lib/dns/include" /I "../../../lib/dns/sec/dst/include" /I "../../../lib/isccc/include" /I "../../../lib/lwres/win32/include" /I "../../../lib/lwres/include" /I "../../../lib/isccfg/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "i386" /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)\named.bsc"
BSC32_SBRS= \
@@ -265,8 +296,7 @@ BSC32_SBRS= \
"$(INTDIR)\tsigconf.sbr" \
"$(INTDIR)\update.sbr" \
"$(INTDIR)\xfrout.sbr" \
"$(INTDIR)\zoneconf.sbr" \
"$(INTDIR)\builtin.sbr"
"$(INTDIR)\zoneconf.sbr"
"$(OUTDIR)\named.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
@@ -274,7 +304,7 @@ BSC32_SBRS= \
<<
LINK32=link.exe
LINK32_FLAGS=user32.lib advapi32.lib kernel32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib ../../../lib/isccc/win32/Debug/libisccc.lib ../../../lib/lwres/win32/Debug/liblwres.lib ../../../lib/isccfg/win32/Debug/libisccfg.lib ../../../lib/bind9/win32/Debug/libbind9.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\named.pdb" /map:"$(INTDIR)\named.map" /debug /machine:I386 /out:"../../../Build/Debug/named.exe" /pdbtype:sept
LINK32_FLAGS=user32.lib advapi32.lib kernel32.lib ws2_32.lib ../../../lib/isc/win32/Debug/libisc.lib ../../../lib/dns/win32/Debug/libdns.lib ../../../lib/isccc/win32/Debug/libisccc.lib ../../../lib/lwres/win32/Debug/liblwres.lib ../../../lib/isccfg/win32/Debug/libisccfg.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\named.pdb" /map:"$(INTDIR)\named.map" /debug /machine:I386 /out:"../../../Build/Debug/named.exe" /pdbtype:sept
LINK32_OBJS= \
"$(INTDIR)\aclconf.obj" \
"$(INTDIR)\client.obj" \
@@ -305,14 +335,7 @@ LINK32_OBJS= \
"$(INTDIR)\tsigconf.obj" \
"$(INTDIR)\update.obj" \
"$(INTDIR)\xfrout.obj" \
"$(INTDIR)\zoneconf.obj" \
"$(INTDIR)\builtin.obj" \
"..\..\..\lib\dns\win32\Debug\libdns.lib" \
"..\..\..\lib\isc\win32\Debug\libisc.lib" \
"..\..\..\lib\bind9\win32\Debug\libbind9.lib" \
"..\..\..\lib\lwres\win32\Debug\liblwres.lib" \
"..\..\..\lib\isccc\win32\Debug\libisccc.lib" \
"..\..\..\lib\isccfg\win32\Debug\libisccfg.lib"
"$(INTDIR)\zoneconf.obj"
"..\..\..\Build\Debug\named.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
@@ -321,36 +344,6 @@ LINK32_OBJS= \
!ENDIF
.c{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.obj::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.c{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cpp{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
.cxx{$(INTDIR)}.sbr::
$(CPP) @<<
$(CPP_PROJ) $<
<<
!IF "$(NO_EXTERNAL_DEPS)" != "1"
!IF EXISTS("named.dep")
@@ -378,24 +371,6 @@ SOURCE=..\aclconf.c
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
SOURCE=..\builtin.c
!IF "$(CFG)" == "named - Win32 Release"
"$(INTDIR)\builtin.obj" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "named - Win32 Debug"
"$(INTDIR)\builtin.obj" "$(INTDIR)\builtin.sbr" : $(SOURCE) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
SOURCE=..\client.c
@@ -916,162 +891,6 @@ SOURCE=..\zoneconf.c
!ENDIF
!IF "$(CFG)" == "named - Win32 Release"
"libdns - Win32 Release" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release"
cd "..\..\..\bin\named\win32"
"libdns - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\named\win32"
!ELSEIF "$(CFG)" == "named - Win32 Debug"
"libdns - Win32 Debug" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug"
cd "..\..\..\bin\named\win32"
"libdns - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\dns\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libdns.mak" CFG="libdns - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\named\win32"
!ENDIF
!IF "$(CFG)" == "named - Win32 Release"
"libisc - Win32 Release" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release"
cd "..\..\..\bin\named\win32"
"libisc - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\named\win32"
!ELSEIF "$(CFG)" == "named - Win32 Debug"
"libisc - Win32 Debug" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug"
cd "..\..\..\bin\named\win32"
"libisc - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\isc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisc.mak" CFG="libisc - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\named\win32"
!ENDIF
!IF "$(CFG)" == "named - Win32 Release"
"libbind9 - Win32 Release" :
cd "\bind-9.3.0a03\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Release"
cd "..\..\..\bin\named\win32"
"libbind9 - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\named\win32"
!ELSEIF "$(CFG)" == "named - Win32 Debug"
"libbind9 - Win32 Debug" :
cd "\bind-9.3.0a03\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Debug"
cd "..\..\..\bin\named\win32"
"libbind9 - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\bind9\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libbind9.mak" CFG="libbind9 - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\named\win32"
!ENDIF
!IF "$(CFG)" == "named - Win32 Release"
"liblwres - Win32 Release" :
cd "\bind-9.3.0a03\lib\lwres\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\liblwres.mak" CFG="liblwres - Win32 Release"
cd "..\..\..\bin\named\win32"
"liblwres - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\lwres\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\liblwres.mak" CFG="liblwres - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\named\win32"
!ELSEIF "$(CFG)" == "named - Win32 Debug"
"liblwres - Win32 Debug" :
cd "\bind-9.3.0a03\lib\lwres\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\liblwres.mak" CFG="liblwres - Win32 Debug"
cd "..\..\..\bin\named\win32"
"liblwres - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\lwres\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\liblwres.mak" CFG="liblwres - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\named\win32"
!ENDIF
!IF "$(CFG)" == "named - Win32 Release"
"libisccc - Win32 Release" :
cd "\bind-9.3.0a03\lib\isccc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisccc.mak" CFG="libisccc - Win32 Release"
cd "..\..\..\bin\named\win32"
"libisccc - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\isccc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisccc.mak" CFG="libisccc - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\named\win32"
!ELSEIF "$(CFG)" == "named - Win32 Debug"
"libisccc - Win32 Debug" :
cd "\bind-9.3.0a03\lib\isccc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisccc.mak" CFG="libisccc - Win32 Debug"
cd "..\..\..\bin\named\win32"
"libisccc - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\isccc\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisccc.mak" CFG="libisccc - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\named\win32"
!ENDIF
!IF "$(CFG)" == "named - Win32 Release"
"libisccfg - Win32 Release" :
cd "\bind-9.3.0a03\lib\isccfg\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisccfg.mak" CFG="libisccfg - Win32 Release"
cd "..\..\..\bin\named\win32"
"libisccfg - Win32 ReleaseCLEAN" :
cd "\bind-9.3.0a03\lib\isccfg\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisccfg.mak" CFG="libisccfg - Win32 Release" RECURSE=1 CLEAN
cd "..\..\..\bin\named\win32"
!ELSEIF "$(CFG)" == "named - Win32 Debug"
"libisccfg - Win32 Debug" :
cd "\bind-9.3.0a03\lib\isccfg\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisccfg.mak" CFG="libisccfg - Win32 Debug"
cd "..\..\..\bin\named\win32"
"libisccfg - Win32 DebugCLEAN" :
cd "\bind-9.3.0a03\lib\isccfg\win32"
$(MAKE) /$(MAKEFLAGS) /F ".\libisccfg.mak" CFG="libisccfg - Win32 Debug" RECURSE=1 CLEAN
cd "..\..\..\bin\named\win32"
!ENDIF
!ENDIF

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1999-2002 Internet Software Consortium.
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: ntservice.c,v 1.6 2002/02/20 03:33:36 marka Exp $ */
/* $Id: ntservice.c,v 1.3.2.1 2001/09/04 19:40:20 gson Exp $ */
#include <config.h>
#include <stdio.h>
@@ -135,7 +135,6 @@ ServiceControl(DWORD dwCtrlCode) {
UpdateSCM(0);
break;
case SERVICE_CONTROL_SHUTDOWN:
case SERVICE_CONTROL_STOP:
ns_server_flushonshutdown(ns_g_server, ISC_TRUE);
isc_app_shutdown();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1999-2001 Internet Software Consortium.
* Copyright (C) 1999-2002 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: os.c,v 1.14 2002/05/03 05:28:27 marka Exp $ */
/* $Id: os.c,v 1.5.2.3 2002/08/08 19:15:19 mayer Exp $ */
#include <config.h>
#include <stdarg.h>
@@ -33,8 +33,8 @@
#include <isc/print.h>
#include <isc/result.h>
#include <isc/strerror.h>
#include <isc/string.h>
//#include <isc/ntfile.h>
#include <isc/ntpaths.h>
#include <named/main.h>
@@ -131,21 +131,21 @@ ns_os_minprivs(void) {
static int
safe_open(const char *filename, isc_boolean_t append) {
int fd;
struct stat sb;
struct stat sb;
if (stat(filename, &sb) == -1) {
if (errno != ENOENT)
if (stat(filename, &sb) == -1) {
if (errno != ENOENT)
return (-1);
} else if ((sb.st_mode & S_IFREG) == 0)
} else if ((sb.st_mode & S_IFREG) == 0)
return (-1);
if (append)
fd = open(filename, O_WRONLY|O_CREAT|O_APPEND,
S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
else {
(void)unlink(filename);
fd = open(filename, O_WRONLY|O_CREAT|O_EXCL,
S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
}
return (fd);
}
@@ -161,11 +161,10 @@ cleanup_pidfile(void) {
void
ns_os_writepidfile(const char *filename, isc_boolean_t first_time) {
int fd;
int fd;
FILE *lockfile;
size_t len;
pid_t pid;
char strbuf[ISC_STRERRORSIZE];
void (*report)(const char *, ...);
/*
@@ -176,31 +175,28 @@ ns_os_writepidfile(const char *filename, isc_boolean_t first_time) {
cleanup_pidfile();
if (strcmp(filename, "none") == 0)
return;
len = strlen(filename);
pidfile = malloc(len + 1);
if (pidfile == NULL) {
isc__strerror(errno, strbuf, sizeof(strbuf));
(*report)("couldn't malloc '%s': %s", filename, strbuf);
(*report)("couldn't malloc '%s': %s", filename,
strerror(errno));
return;
}
/* This is safe. */
strcpy(pidfile, filename);
fd = safe_open(filename, ISC_FALSE);
if (fd < 0) {
isc__strerror(errno, strbuf, sizeof(strbuf));
(*report)("couldn't open pid file '%s': %s", filename, strbuf);
fd = safe_open(filename, ISC_FALSE);
if (fd < 0) {
(*report)("couldn't open pid file '%s': %s", filename,
strerror(errno));
free(pidfile);
pidfile = NULL;
return;
}
lockfile = fdopen(fd, "w");
if (lockfile == NULL) {
isc__strerror(errno, strbuf, sizeof(strbuf));
(*report)("could not fdopen() pid file '%s': %s",
filename, strbuf);
lockfile = fdopen(fd, "w");
if (lockfile == NULL) {
(*report)("could not fdopen() pid file '%s': %s", filename,
strerror(errno));
(void)close(fd);
cleanup_pidfile();
return;
@@ -208,15 +204,15 @@ ns_os_writepidfile(const char *filename, isc_boolean_t first_time) {
pid = getpid();
if (fprintf(lockfile, "%ld\n", (long)pid) < 0) {
(*report)("fprintf() to pid file '%s' failed", filename);
(void)fclose(fd);
if (fprintf(lockfile, "%ld\n", (long)pid) < 0) {
(*report)("fprintf() to pid file '%s' failed", filename);
(void)fclose(lockfile);
cleanup_pidfile();
return;
}
if (fflush(lockfile) == EOF) {
(*report)("fflush() to pid file '%s' failed", filename);
(void)fclose(fd);
if (fflush(lockfile) == EOF) {
(*report)("fflush() to pid file '%s' failed", filename);
(void)fclose(lockfile);
cleanup_pidfile();
return;
}
@@ -229,17 +225,3 @@ ns_os_shutdown(void) {
cleanup_pidfile();
ntservice_shutdown(); /* This MUST be the last thing done */
}
isc_result_t
ns_os_gethostname(char *buf, size_t len) {
int n;
n = gethostname(buf, len);
return ((n == 0) ? ISC_R_SUCCESS : ISC_R_FAILURE);
}
void
ns_os_shutdownmsg(char *command, isc_buffer_t *text) {
UNUSED(command);
UNUSED(text);
}

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: xfrout.c,v 1.108 2002/06/25 04:08:43 marka Exp $ */
/* $Id: xfrout.c,v 1.101.2.3 2001/10/30 01:28:29 marka Exp $ */
#include <config.h>
@@ -38,7 +38,6 @@
#include <dns/result.h>
#include <dns/soa.h>
#include <dns/timer.h>
#include <dns/tsig.h>
#include <dns/view.h>
#include <dns/zone.h>
#include <dns/zt.h>
@@ -243,7 +242,7 @@ db_rr_iterator_next(db_rr_iterator_t *it) {
static void
db_rr_iterator_pause(db_rr_iterator_t *it) {
RUNTIME_CHECK(dns_dbiterator_pause(it->dbit) == ISC_R_SUCCESS);
dns_dbiterator_pause(it->dbit);
}
static void
@@ -725,7 +724,7 @@ compound_rrstream_first(rrstream_t *rs) {
do {
rrstream_t *curstream = s->components[s->state];
s->result = curstream->methods->first(curstream);
} while (s->result == ISC_R_NOMORE && s->state < 2);
} while (s->result == ISC_R_NOMORE && s->state < 2) ;
return (s->result);
}
@@ -890,7 +889,6 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
char *journalfile;
char msg[DNS_RDATACLASS_FORMATSIZE + DNS_NAME_FORMATSIZE
+ sizeof("zone transfer '/'")];
char keyname[DNS_NAME_FORMATSIZE];
isc_boolean_t is_poll = ISC_FALSE;
switch (reqtype) {
@@ -1136,18 +1134,12 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
CHECK(xfr->stream->methods->first(xfr->stream));
if (xfr->tsigkey != NULL) {
dns_name_format(&xfr->tsigkey->name, keyname, sizeof(keyname));
} else
keyname[0] = '\0';
if (is_poll)
xfrout_log1(client, question_name, question_class,
ISC_LOG_DEBUG(1), "IXFR poll up to date%s",
(xfr->tsigkey != NULL) ? ": TSIG " : "", keyname);
ISC_LOG_DEBUG(1), "IXFR poll up to date");
else
xfrout_log1(client, question_name, question_class,
ISC_LOG_INFO, "%s started%s%s", mnemonic,
(xfr->tsigkey != NULL) ? ": TSIG " : "", keyname);
ISC_LOG_INFO, "%s started", mnemonic);
/*
* Hand the context over to sendstream(). Set xfr to NULL;
@@ -1334,7 +1326,7 @@ sendstream(xfrout_ctx_t *xfr) {
msg->flags = DNS_MESSAGEFLAG_QR | DNS_MESSAGEFLAG_AA;
if ((xfr->client->attributes & NS_CLIENTATTR_RA) != 0)
msg->flags |= DNS_MESSAGEFLAG_RA;
CHECK(dns_message_settsigkey(msg, xfr->tsigkey));
dns_message_settsigkey(msg, xfr->tsigkey);
CHECK(dns_message_setquerytsig(msg, xfr->lasttsig));
if (xfr->lasttsig != NULL)
isc_buffer_free(&xfr->lasttsig);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1999-2002 Internet Software Consortium.
* Copyright (C) 1999-2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,14 +15,12 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: zoneconf.c,v 1.101 2002/02/20 03:33:26 marka Exp $ */
/* $Id: zoneconf.c,v 1.87.2.4 2001/11/13 01:15:33 gson Exp $ */
#include <config.h>
#include <isc/buffer.h>
#include <isc/file.h>
#include <isc/mem.h>
#include <isc/print.h>
#include <isc/string.h> /* Required for HP/UX (and others?) */
#include <isc/util.h>
@@ -315,7 +313,6 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
dns_dialuptype_t dialup = dns_dialuptype_no;
dns_zonetype_t ztype;
int i;
isc_int32_t journal_size;
i = 0;
if (zconfig != NULL) {
@@ -411,7 +408,7 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
obj = NULL;
result = ns_config_get(maps, "zone-statistics", &obj);
INSIST(result == ISC_R_SUCCESS);
RETERR(dns_zone_setstatistics(zone, cfg_obj_asboolean(obj)));
dns_zone_setstatistics(zone, cfg_obj_asboolean(obj));
/*
* Configure master functionality. This applies
@@ -456,12 +453,12 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
obj = NULL;
result = ns_config_get(maps, "notify-source", &obj);
INSIST(result == ISC_R_SUCCESS);
RETERR(dns_zone_setnotifysrc4(zone, cfg_obj_assockaddr(obj)));
dns_zone_setnotifysrc4(zone, cfg_obj_assockaddr(obj));
obj = NULL;
result = ns_config_get(maps, "notify-source-v6", &obj);
INSIST(result == ISC_R_SUCCESS);
RETERR(dns_zone_setnotifysrc6(zone, cfg_obj_assockaddr(obj)));
dns_zone_setnotifysrc6(zone, cfg_obj_assockaddr(obj));
RETERR(configure_zone_acl(zconfig, vconfig, config,
"allow-transfer", ac, zone,
@@ -477,36 +474,6 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
result = ns_config_get(maps, "max-transfer-idle-out", &obj);
INSIST(result == ISC_R_SUCCESS);
dns_zone_setidleout(zone, cfg_obj_asuint32(obj) * 60);
obj = NULL;
result = ns_config_get(maps, "max-journal-size", &obj);
INSIST(result == ISC_R_SUCCESS);
dns_zone_setjournalsize(zone, -1);
if (cfg_obj_isstring(obj)) {
const char *str = cfg_obj_asstring(obj);
INSIST(strcasecmp(str, "unlimited") == 0);
journal_size = ISC_UINT32_MAX / 2;
} else {
isc_resourcevalue_t value;
value = cfg_obj_asuint64(obj);
if (value > ISC_UINT32_MAX / 2) {
cfg_obj_log(obj, ns_g_lctx,
ISC_LOG_ERROR,
"'max-journal-size "
"%" ISC_PRINT_QUADFORMAT "d' "
"is too large",
value);
RETERR(ISC_R_RANGE);
}
journal_size = (isc_uint32_t)value;
}
dns_zone_setjournalsize(zone, journal_size);
obj = NULL;
result = ns_config_get(maps, "ixfr-from-differences", &obj);
INSIST(result == ISC_R_SUCCESS);
dns_zone_setoption(zone, DNS_ZONEOPT_IXFRFROMDIFFS,
cfg_obj_asboolean(obj));
}
/*
@@ -535,20 +502,6 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
INSIST(result == ISC_R_SUCCESS);
dns_zone_setsigvalidityinterval(zone,
cfg_obj_asuint32(obj) * 86400);
obj = NULL;
result = ns_config_get(maps, "key-directory", &obj);
if (result == ISC_R_SUCCESS) {
filename = cfg_obj_asstring(obj);
if (!isc_file_isabsolute(filename)) {
cfg_obj_log(obj, ns_g_lctx, ISC_LOG_ERROR,
"key-directory '%s' "
"is not absolute", filename);
return (ISC_R_FAILURE);
}
RETERR(dns_zone_setkeydirectory(zone, filename));
}
} else if (ztype == dns_zone_slave) {
RETERR(configure_zone_acl(zconfig, vconfig, config,
"allow-update-forwarding", ac, zone,
@@ -611,12 +564,12 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
obj = NULL;
result = ns_config_get(maps, "transfer-source", &obj);
INSIST(result == ISC_R_SUCCESS);
RETERR(dns_zone_setxfrsource4(zone, cfg_obj_assockaddr(obj)));
dns_zone_setxfrsource4(zone, cfg_obj_assockaddr(obj));
obj = NULL;
result = ns_config_get(maps, "transfer-source-v6", &obj);
INSIST(result == ISC_R_SUCCESS);
RETERR(dns_zone_setxfrsource6(zone, cfg_obj_assockaddr(obj)));
dns_zone_setxfrsource6(zone, cfg_obj_assockaddr(obj));
break;

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/11/21 02:19:01 gson Exp $
# $Id: Makefile.in,v 1.15 2001/06/01 00:45:01 bwelling Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -21,29 +21,24 @@ top_srcdir = @top_srcdir@
@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
@BIND9_INCLUDES@
CINCLUDES = ${LWRES_INCLUDES} ${DNS_INCLUDES} ${BIND9_INCLUDES} \
${ISC_INCLUDES}
CINCLUDES = ${LWRES_INCLUDES} ${DNS_INCLUDES} ${ISC_INCLUDES}
CDEFINES =
CWARNINGS =
LWRESLIBS = ../../lib/lwres/liblwres.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_OPENSSL_LIBS@ @DNS_GSSAPI_LIBS@
ISCLIBS = ../../lib/isc/libisc.@A@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
LWRESDEPLIBS = ../../lib/lwres/liblwres.@A@
DNSDEPLIBS = ../../lib/dns/libdns.@A@
BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
ISCDEPLIBS = ../../lib/isc/libisc.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
DEPLIBS = ${DNSDEPLIBS} ${BIND9DEPLIBS} ${ISCDEPLIBS} ${ISCCFGDEPLIBS}
DEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS}
LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} ${ISCLIBS} ${ISCCFGLIBS} @LIBS@
LIBS = ${LWRESLIBS} ${DNSLIBS} ${ISCLIBS} @LIBS@
SUBDIRS =

View File

@@ -52,10 +52,10 @@ made and the replies received from the name server.
.PP
Transaction signatures can be used to authenticate the Dynamic DNS
updates.
These use the TSIG resource record type described in RFC2845 or the
SIG(0) record described in RFC3535 and RFC2931.
TSIG relies on a shared secret that should only be known to
\fBnsupdate\fR and the name server.
These use the TSIG resource record type described in RFC2845.
The signatures rely on a shared secret that should only be known to
\fBnsupdate\fR
and the name server.
Currently, the only supported encryption algorithm for TSIG is
HMAC-MD5, which is defined in RFC 2104.
Once other algorithms are defined for TSIG, applications will need to
@@ -70,8 +70,6 @@ statements would be added to
so that the name server can associate the appropriate secret key
and algorithm with the IP address of the
client application that will be using TSIG authentication.
SIG(0) uses public key cryptography. To use a SIG(0) key, the public
key must be stored in a KEY record in a zone served by the name server.
\fBnsupdate\fR
does not read
\fI/etc/named.conf\fR.
@@ -81,8 +79,8 @@ uses the
\fB-y\fR
or
\fB-k\fR
option (with an HMAC-MD5 key) to provide the shared secret needed to generate
a TSIG record for authenticating Dynamic DNS update requests.
option to provide the shared secret needed to generate a TSIG record
for authenticating Dynamic DNS update requests.
These options are mutually exclusive.
With the
\fB-k\fR
@@ -112,10 +110,6 @@ This may be visible in the output from
\fBps\fR(1)
or in a history file maintained by the user's shell.
.PP
The \fB-k\fR may also be used to specify a SIG(0) key used
to authenticate Dynamic DNS update requests. In this case, the key
specified is not an HMAC-MD5 key.
.PP
By default
\fBnsupdate\fR
uses UDP to send update requests to the name server.
@@ -337,7 +331,6 @@ base-64 encoding of HMAC-MD5 key created by
\fBRFC2845\fR,
\fBRFC1034\fR,
\fBRFC2535\fR,
\fBRFC2931\fR,
\fBnamed\fR(8),
\fBdnssec-keygen\fR(8).
.SH "BUGS"

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