Compare commits
608 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3adb30769d | ||
|
|
9f7fe71599 | ||
|
|
f2a0fbbe37 | ||
|
|
d9b6a420c1 | ||
|
|
12d9d376e1 | ||
|
|
7feb62b017 | ||
|
|
7569cc93fb | ||
|
|
948fe3eebb | ||
|
|
6013d245b0 | ||
|
|
8f3b2d2be1 | ||
|
|
0048316365 | ||
|
|
3ac10b1208 | ||
|
|
04b009def0 | ||
|
|
ba2dd65278 | ||
|
|
2c61102ec3 | ||
|
|
9e4ba1632e | ||
|
|
9b4ea70358 | ||
|
|
833b91c108 | ||
|
|
c373461960 | ||
|
|
ac3822472e | ||
|
|
3b5b0fb66e | ||
|
|
88e8986182 | ||
|
|
47ef0ffe02 | ||
|
|
b53b292810 | ||
|
|
90f179c919 | ||
|
|
5acdf0314c | ||
|
|
e1d5260761 | ||
|
|
1a76506aee | ||
|
|
1d6fba9055 | ||
|
|
43272e05ef | ||
|
|
34d43b2ce5 | ||
|
|
ba853e4f14 | ||
|
|
8acbf11b48 | ||
|
|
b983e4618c | ||
|
|
2a868edaf8 | ||
|
|
3358dfc691 | ||
|
|
1f58d4917d | ||
|
|
2cca217a44 | ||
|
|
7a9dc9bfb0 | ||
|
|
886cd55aa7 | ||
|
|
0456b84736 | ||
|
|
b3007386ec | ||
|
|
884c019c2e | ||
|
|
bfea32015e | ||
|
|
4993d5c500 | ||
|
|
5b5fe6e4d0 | ||
|
|
fc05cc8c17 | ||
|
|
e063de4c1a | ||
|
|
3f0fa07407 | ||
|
|
63643948a3 | ||
|
|
d2bd37b22e | ||
|
|
bef1bfc2fa | ||
|
|
73d6af8f6a | ||
|
|
e2cb5eecb0 | ||
|
|
4b0dcf3782 | ||
|
|
f1a43a3018 | ||
|
|
891c424e56 | ||
|
|
ba01e9117b | ||
|
|
4ba765b5d0 | ||
|
|
42e37225d4 | ||
|
|
b9e380b39d | ||
|
|
1bc4e9229e | ||
|
|
7c357cde37 | ||
|
|
047210c74e | ||
|
|
4016d47cf3 | ||
|
|
b812238e13 | ||
|
|
931daf7a9d | ||
|
|
b0fbeb1884 | ||
|
|
a914318b06 | ||
|
|
47ce2c2150 | ||
|
|
5b116f12fa | ||
|
|
0fb2d00628 | ||
|
|
61adda8648 | ||
|
|
f72fde8b0b | ||
|
|
77fc134355 | ||
|
|
4d16509a5a | ||
|
|
c9dd10607a | ||
|
|
636be34d1e | ||
|
|
8d4036ef7b | ||
|
|
e29fdeea22 | ||
|
|
c7dc80c4d9 | ||
|
|
ae5b8edf7d | ||
|
|
cd85142f73 | ||
|
|
9bdaf58bbc | ||
|
|
dcf1f13abe | ||
|
|
2d67b06198 | ||
|
|
07bf4fd7b6 | ||
|
|
0b2aba2cd2 | ||
|
|
0d4c51dfd6 | ||
|
|
a009918e2f | ||
|
|
2099644f0d | ||
|
|
a2537d9b00 | ||
|
|
0f2442d926 | ||
|
|
e41340e97a | ||
|
|
730dfb9b6a | ||
|
|
c1a634d46b | ||
|
|
d600a66f52 | ||
|
|
e2f5e9a858 | ||
|
|
29a9388fc1 | ||
|
|
96afc32570 | ||
|
|
84805b3216 | ||
|
|
65bbe3a2cb | ||
|
|
2dbeb26f3d | ||
|
|
41df3594b4 | ||
|
|
b839c5abec | ||
|
|
e368e45536 | ||
|
|
ee5bf99761 | ||
|
|
04a4e2f5c0 | ||
|
|
c3cdf325b5 | ||
|
|
c6ce103cf8 | ||
|
|
d322581e16 | ||
|
|
9d352ffc42 | ||
|
|
380a309889 | ||
|
|
a968e6b0b1 | ||
|
|
b33cab0cdc | ||
|
|
90656e32ea | ||
|
|
b6c59ece79 | ||
|
|
db704bac25 | ||
|
|
0034db60ba | ||
|
|
3e99d38a74 | ||
|
|
456813d719 | ||
|
|
35f725a8b6 | ||
|
|
c4610cb161 | ||
|
|
ecb325ac83 | ||
|
|
c3fad928e8 | ||
|
|
2ea0604c6f | ||
|
|
05151ddebe | ||
|
|
8b46b247f8 | ||
|
|
da09780435 | ||
|
|
a2564ceb47 | ||
|
|
b42b4dba28 | ||
|
|
22f851eb69 | ||
|
|
ecf4ee42f5 | ||
|
|
ca4723bccb | ||
|
|
fbf3c04dbf | ||
|
|
611a2d5f0b | ||
|
|
cac1899bda | ||
|
|
385535aed8 | ||
|
|
3e4d38c0b1 | ||
|
|
4cc0046a61 | ||
|
|
ed1ef06526 | ||
|
|
00d14aa383 | ||
|
|
dd6234eb00 | ||
|
|
f324e3cfdf | ||
|
|
7d73f463e2 | ||
|
|
b1a7576009 | ||
|
|
70fc53059f | ||
|
|
84a74fe703 | ||
|
|
b9698bfd48 | ||
|
|
676a907102 | ||
|
|
93168b5719 | ||
|
|
7c6f0c2cf9 | ||
|
|
fd8f9ed031 | ||
|
|
2213d80e03 | ||
|
|
b6cb507ae8 | ||
|
|
b833082a39 | ||
|
|
c073347825 | ||
|
|
b6231164de | ||
|
|
86a55923e2 | ||
|
|
d9fb0422ae | ||
|
|
eeacf1ef3e | ||
|
|
680f795a0f | ||
|
|
51ba5754ca | ||
|
|
a6540ffa21 | ||
|
|
ec5f67b8cf | ||
|
|
0b9f0f114a | ||
|
|
b9b40d5fb7 | ||
|
|
aea5bf41cf | ||
|
|
477d0d1ff9 | ||
|
|
d59f7e6f41 | ||
|
|
2a3e8ec458 | ||
|
|
8bae85ee9b | ||
|
|
2d18f59f88 | ||
|
|
b45ba90e7f | ||
|
|
c1e52e6097 | ||
|
|
eeb2e36c5a | ||
|
|
7b51a5ed05 | ||
|
|
dee7d91a52 | ||
|
|
09fb82a40d | ||
|
|
3855970d74 | ||
|
|
03d58c6ef9 | ||
|
|
a233df373c | ||
|
|
ced2a93ebc | ||
|
|
410b02f399 | ||
|
|
4e67211f74 | ||
|
|
5849e544f6 | ||
|
|
42823e32ea | ||
|
|
253c278b39 | ||
|
|
769c637e95 | ||
|
|
af54b372dc | ||
|
|
ee95e5b2d3 | ||
|
|
c1e109166b | ||
|
|
e88346ed0f | ||
|
|
57a877555a | ||
|
|
b2f3e5c308 | ||
|
|
cd27f76d7b | ||
|
|
8c7d74701d | ||
|
|
d1a95dea1f | ||
|
|
1cf32ab2b3 | ||
|
|
7f855bbeee | ||
|
|
f8656a8bd6 | ||
|
|
93304856f9 | ||
|
|
e5a402d95e | ||
|
|
034804a048 | ||
|
|
9789fdd98b | ||
|
|
1466c8252a | ||
|
|
e4166c0e05 | ||
|
|
356880d58e | ||
|
|
27cd2ff244 | ||
|
|
4da8460d04 | ||
|
|
ba8a105802 | ||
|
|
4dedf7a82e | ||
|
|
a295792f8d | ||
|
|
ede71ed60b | ||
|
|
9e7dfa38b4 | ||
|
|
18a3d3ea3d | ||
|
|
fdae17c884 | ||
|
|
d5d160a7bd | ||
|
|
433695cce3 | ||
|
|
24bc7544b2 | ||
|
|
59f871bf92 | ||
|
|
0924f3b522 | ||
|
|
cbfefc37a3 | ||
|
|
dc57e5e0ca | ||
|
|
1962186055 | ||
|
|
450ffb2f77 | ||
|
|
e7164f3fcd | ||
|
|
991343d9a3 | ||
|
|
4daf63c4b0 | ||
|
|
538bc08bee | ||
|
|
258eca377d | ||
|
|
6bc9a03601 | ||
|
|
ba9a670151 | ||
|
|
9cdcf06d3b | ||
|
|
fd7505872d | ||
|
|
44b8e407b5 | ||
|
|
191fdb73be | ||
|
|
1f40299d87 | ||
|
|
a07532875f | ||
|
|
7fbafdc2d7 | ||
|
|
c3103a0b2d | ||
|
|
b700c2c3d2 | ||
|
|
e6012d7b37 | ||
|
|
751109bdd5 | ||
|
|
5d1e521490 | ||
|
|
e1748302ad | ||
|
|
13db7f40a5 | ||
|
|
eb176d660e | ||
|
|
f2048c5dff | ||
|
|
1d4285b6a3 | ||
|
|
74fd9ace3f | ||
|
|
e52fde1b98 | ||
|
|
63102c64ae | ||
|
|
0d2fb0ac27 | ||
|
|
184f677780 | ||
|
|
b5d00f6ea2 | ||
|
|
7b373263b7 | ||
|
|
773f604c52 | ||
|
|
65ae185312 | ||
|
|
60c0e2944d | ||
|
|
6f9dfd7330 | ||
|
|
1f179c6edd | ||
|
|
ee9dbfb7cd | ||
|
|
a51c70decc | ||
|
|
73d7583d98 | ||
|
|
50b0a27f48 | ||
|
|
97cee754a9 | ||
|
|
8db1db6295 | ||
|
|
323de351b3 | ||
|
|
6b345bc209 | ||
|
|
d3fafb3213 | ||
|
|
c363d0fed8 | ||
|
|
f5e4a39e62 | ||
|
|
e227c896a2 | ||
|
|
0f0e3ffdc1 | ||
|
|
b8c4c3aade | ||
|
|
c2f1d683c9 | ||
|
|
fa85f47357 | ||
|
|
8a044e464b | ||
|
|
5295debde0 | ||
|
|
3e69f0cd72 | ||
|
|
c592760e76 | ||
|
|
f64f89606f | ||
|
|
3f25cb17e3 | ||
|
|
e2352fb8cd | ||
|
|
21b4f15c60 | ||
|
|
417cddb8c1 | ||
|
|
f27e47b5ff | ||
|
|
2a091ec932 | ||
|
|
9445e10377 | ||
|
|
f6bd49ffd0 | ||
|
|
fff1dbdf55 | ||
|
|
69e7554caa | ||
|
|
99df95697c | ||
|
|
d778d61208 | ||
|
|
d0bb045c79 | ||
|
|
3fa36cb79d | ||
|
|
ab92fa0aca | ||
|
|
3a7c194000 | ||
|
|
8a4f85e204 | ||
|
|
622a5774e6 | ||
|
|
feed58ca64 | ||
|
|
eab966fdb3 | ||
|
|
5eeb5ddc67 | ||
|
|
4c7c397275 | ||
|
|
05b8c412f8 | ||
|
|
413463f215 | ||
|
|
bc1268ea83 | ||
|
|
d8f67a1d88 | ||
|
|
b7f8bca629 | ||
|
|
8bb8f9c6c8 | ||
|
|
e6450a5811 | ||
|
|
d8b140ce00 | ||
|
|
e47a6956a1 | ||
|
|
7366e9c47d | ||
|
|
a818127616 | ||
|
|
6e574a8b30 | ||
|
|
a7859ded82 | ||
|
|
d7224e6672 | ||
|
|
2adafac25f | ||
|
|
057fc2ec3f | ||
|
|
80670d2633 | ||
|
|
16a160ea8a | ||
|
|
f132d4023a | ||
|
|
a50304c317 | ||
|
|
8ac220d5cc | ||
|
|
3bc24a3a90 | ||
|
|
5ef63950cf | ||
|
|
4f0ddc4fc1 | ||
|
|
f5ea135066 | ||
|
|
bedd38297c | ||
|
|
2bffec87ac | ||
|
|
f9409b10fd | ||
|
|
f10e90ebb4 | ||
|
|
73442acbe7 | ||
|
|
4099c201ff | ||
|
|
6cb12c44a3 | ||
|
|
b31471255d | ||
|
|
7caf656a15 | ||
|
|
5fc932977a | ||
|
|
fefd6c28ab | ||
|
|
6124a262fa | ||
|
|
21b1491aa2 | ||
|
|
f3cee71ee5 | ||
|
|
d25f6fac98 | ||
|
|
700847b76c | ||
|
|
b90dc3fc6a | ||
|
|
6b53351ce2 | ||
|
|
4463c6f19e | ||
|
|
fa85eab969 | ||
|
|
3a8943b2d2 | ||
|
|
790f33c772 | ||
|
|
c9114f35c0 | ||
|
|
6c8ae8b9ef | ||
|
|
9dfa8979a7 | ||
|
|
d486854a4a | ||
|
|
c14c7e14cd | ||
|
|
ed37e8811a | ||
|
|
eacbf2cc01 | ||
|
|
e8c4b14cde | ||
|
|
72ad976640 | ||
|
|
189dcca2c9 | ||
|
|
e15532f8c6 | ||
|
|
462b062d7f | ||
|
|
0797eebc66 | ||
|
|
8f4ecd4a9e | ||
|
|
402313b3db | ||
|
|
887c9d05c2 | ||
|
|
8733f0d86c | ||
|
|
25fd0feeea | ||
|
|
04999a9c03 | ||
|
|
1e1f1edb7d | ||
|
|
fefab489c7 | ||
|
|
913e3def6d | ||
|
|
5b477dd3b9 | ||
|
|
309979a136 | ||
|
|
fc67f3e0e3 | ||
|
|
abbc8ed09b | ||
|
|
0258aea36c | ||
|
|
2ce3018081 | ||
|
|
b8b17a7732 | ||
|
|
ac81ee4d14 | ||
|
|
63d380e078 | ||
|
|
46879265d7 | ||
|
|
29d7ef1bca | ||
|
|
80c7cf7e5d | ||
|
|
be7d7a6638 | ||
|
|
d0b2beb93d | ||
|
|
6358746e6f | ||
|
|
4a2df0557c | ||
|
|
014f9142bc | ||
|
|
d76ac5ddfd | ||
|
|
b5c8773673 | ||
|
|
3700c88538 | ||
|
|
8b672d6342 | ||
|
|
15491d8b1f | ||
|
|
c529637d60 | ||
|
|
d35b058b31 | ||
|
|
364da4eb0f | ||
|
|
26c8b645f8 | ||
|
|
d8c1b06854 | ||
|
|
98c08f4dbe | ||
|
|
fb17fdbd0e | ||
|
|
19c189b7a3 | ||
|
|
2cd386a02f | ||
|
|
d8389bdac5 | ||
|
|
abe885e016 | ||
|
|
d3d785705a | ||
|
|
ad923a3d6f | ||
|
|
035ef37ffa | ||
|
|
f38324fe6c | ||
|
|
67308c2197 | ||
|
|
93ca4b367d | ||
|
|
bcf3845c01 | ||
|
|
a0e8772150 | ||
|
|
e81b4c677b | ||
|
|
9476a30889 | ||
|
|
639fef047e | ||
|
|
ec5ff01338 | ||
|
|
c5f432d9c2 | ||
|
|
8dda8ff186 | ||
|
|
adcfb59d04 | ||
|
|
75c43836c1 | ||
|
|
7752f1112e | ||
|
|
148fd45777 | ||
|
|
c7443ec439 | ||
|
|
2f65d19e93 | ||
|
|
6cb735c864 | ||
|
|
ad7a535899 | ||
|
|
84189fe5ad | ||
|
|
b15ba3f20d | ||
|
|
a3a89d7c36 | ||
|
|
6c87ddb75d | ||
|
|
aa224791dd | ||
|
|
73865279b1 | ||
|
|
cad0e68589 | ||
|
|
513fe0ca30 | ||
|
|
a7757e30aa | ||
|
|
540f27d8bc | ||
|
|
4e07f65d62 | ||
|
|
c78ef9f491 | ||
|
|
50d93bb5f8 | ||
|
|
e301648774 | ||
|
|
1260bf0573 | ||
|
|
bdbaee5cfc | ||
|
|
8ced0871d2 | ||
|
|
6032e43f38 | ||
|
|
219a694aca | ||
|
|
3c76e82a76 | ||
|
|
6a1e7c8565 | ||
|
|
5e8d4ff0bf | ||
|
|
e169fd331c | ||
|
|
58fbc62a4a | ||
|
|
a504607ef1 | ||
|
|
74ceb7b203 | ||
|
|
449733f214 | ||
|
|
94f960b541 | ||
|
|
381f821556 | ||
|
|
3a0f5543c9 | ||
|
|
8153dde6c8 | ||
|
|
fa52840ac8 | ||
|
|
85939fa773 | ||
|
|
5a78ccdf1f | ||
|
|
7209c50da4 | ||
|
|
0ae6a5f852 | ||
|
|
e94a2fdd30 | ||
|
|
2ef5add037 | ||
|
|
bada421314 | ||
|
|
c65bd9be83 | ||
|
|
7a89c23c2d | ||
|
|
6ca3f52bee | ||
|
|
c535e67633 | ||
|
|
05cd9da1d8 | ||
|
|
ec95dac291 | ||
|
|
3b3d01b318 | ||
|
|
0e71bf20df | ||
|
|
106423c056 | ||
|
|
6812f56fa2 | ||
|
|
f3c187e0c7 | ||
|
|
fe6a60a7c3 | ||
|
|
a1a06d7854 | ||
|
|
7ce9f2dbe8 | ||
|
|
267d8eb613 | ||
|
|
e31320a1d0 | ||
|
|
5cb1e19b03 | ||
|
|
23b81eeddd | ||
|
|
31da643c6a | ||
|
|
dd0319d149 | ||
|
|
315eafec07 | ||
|
|
a4fbe403e4 | ||
|
|
a3ed377607 | ||
|
|
29ca9003a5 | ||
|
|
85532057dc | ||
|
|
86457878fd | ||
|
|
7779b6cbf6 | ||
|
|
ac5c31df78 | ||
|
|
e370391b5e | ||
|
|
329fd2fe75 | ||
|
|
8002894e6e | ||
|
|
890db7ab7d | ||
|
|
9e3fe84689 | ||
|
|
f6bcdffe6d | ||
|
|
55ab8cebff | ||
|
|
ae62248c8a | ||
|
|
96bc10707a | ||
|
|
c7302ffd98 | ||
|
|
1d19dc5411 | ||
|
|
818d9fec02 | ||
|
|
41ea62ace5 | ||
|
|
a325a8cbed | ||
|
|
e17d517a93 | ||
|
|
f5b3693207 | ||
|
|
2616068121 | ||
|
|
4e9291c48b | ||
|
|
07aa5a2c61 | ||
|
|
1550dcfff2 | ||
|
|
b8e65dbc1e | ||
|
|
a1d2958b24 | ||
|
|
de32eba8a8 | ||
|
|
8f534756ca | ||
|
|
2d4f039432 | ||
|
|
23438327a1 | ||
|
|
064fadaa40 | ||
|
|
1ebadd777b | ||
|
|
febc2e8db5 | ||
|
|
90787e192c | ||
|
|
4f3d12c632 | ||
|
|
4748473739 | ||
|
|
d65168b7a7 | ||
|
|
7c91a38c54 | ||
|
|
4b09cca4b9 | ||
|
|
a4e8b19b83 | ||
|
|
041153229d | ||
|
|
c3312fd9d0 | ||
|
|
538bbefb23 | ||
|
|
3f4c95eb98 | ||
|
|
d30fcb907b | ||
|
|
d924384f72 | ||
|
|
4632c084a6 | ||
|
|
43022c8c8f | ||
|
|
1d89523b69 | ||
|
|
4fdcaf0cc7 | ||
|
|
7e470ba93b | ||
|
|
a9617effd0 | ||
|
|
1716d085b1 | ||
|
|
f0f9aa979b | ||
|
|
0617eaff38 | ||
|
|
9cdfffc7ce | ||
|
|
b21236d838 | ||
|
|
7a74126eb8 | ||
|
|
9f89b34f4d | ||
|
|
66ed65d1b7 | ||
|
|
dea6647faa | ||
|
|
a25169ea43 | ||
|
|
99a0822e3c | ||
|
|
5e8c385e64 | ||
|
|
0375d5da0c | ||
|
|
94c8b1aa0f | ||
|
|
2fddd0b746 | ||
|
|
b40cb80704 | ||
|
|
62f58f434c | ||
|
|
b2eeaf6500 | ||
|
|
8be3f42f6b | ||
|
|
63fe5ccb87 | ||
|
|
be2d2c1599 | ||
|
|
f8baa72034 | ||
|
|
5de2109e1c | ||
|
|
67adc92106 | ||
|
|
625aae0fba | ||
|
|
1015c4cdea | ||
|
|
c54833a8e9 | ||
|
|
976dd45973 | ||
|
|
783cf0d73d | ||
|
|
928d42e559 | ||
|
|
deb2c2ffab | ||
|
|
0363b921c9 | ||
|
|
ae35d154ce | ||
|
|
d5dbfd6f17 | ||
|
|
ad8c0c65aa | ||
|
|
42b48b7156 | ||
|
|
c9c55707eb | ||
|
|
2958e100b5 | ||
|
|
aa6e560fbd | ||
|
|
3f538ef15c | ||
|
|
f58f6043ce | ||
|
|
f17bffa68d | ||
|
|
b1436346a0 | ||
|
|
fdd3a3e7fa | ||
|
|
d73ed70241 | ||
|
|
aa8953a586 | ||
|
|
caaa091d76 | ||
|
|
f5c726cbef | ||
|
|
b7d04c63c0 | ||
|
|
7ee450d5f6 | ||
|
|
641e33bdd4 | ||
|
|
faedfb6dce | ||
|
|
89227c76be | ||
|
|
f6fc4b1391 | ||
|
|
44caf20759 | ||
|
|
e5094285ce | ||
|
|
15fd491c85 | ||
|
|
2c141ce0fb | ||
|
|
9113f8b75c | ||
|
|
ac9d955cdd | ||
|
|
54706e9e57 | ||
|
|
6aa1a89bf1 | ||
|
|
31d635e582 | ||
|
|
02da396800 |
@@ -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
118
EXCLUDED
Normal 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
68
FAQ
@@ -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
51
README
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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@ \
|
||||
|
||||
@@ -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, ®ion));
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
>
|
||||
>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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, ®ion);
|
||||
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();
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
>
|
||||
>
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 =
|
||||
|
||||
|
||||
@@ -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),
|
||||
|
||||
215
bin/dig/dig.c
215
bin/dig/dig.c
@@ -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:
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
>
|
||||
>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -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
|
||||
|
||||
188
bin/dig/host.c
188
bin/dig/host.c
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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
|
||||
>
|
||||
>
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 $<
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
>
|
||||
>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
>
|
||||
>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
>
|
||||
>
|
||||
|
||||
@@ -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
@@ -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>
|
||||
|
||||
@@ -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
|
||||
>
|
||||
>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 */
|
||||
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
>
|
||||
>
|
||||
|
||||
121
bin/named/main.c
121
bin/named/main.c
@@ -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();
|
||||
|
||||
@@ -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
|
||||
>
|
||||
>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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 =
|
||||
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user