Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fde8269185 | ||
|
|
53a96ddd53 | ||
|
|
e0bffa6517 | ||
|
|
a51c70decc | ||
|
|
caa8797a00 | ||
|
|
73d7583d98 | ||
|
|
50b0a27f48 | ||
|
|
97cee754a9 | ||
|
|
8db1db6295 | ||
|
|
c42af00541 | ||
|
|
08102bb28c | ||
|
|
9ae90732df | ||
|
|
c1567cb58c | ||
|
|
f3222d48cc | ||
|
|
e95cc59f90 | ||
|
|
64ea670052 | ||
|
|
60e9e70654 | ||
|
|
47db0efda1 | ||
|
|
8839b6acbf | ||
|
|
db462c020e | ||
|
|
32dd66cc5e | ||
|
|
6c62c34a5b | ||
|
|
ecb55f9962 | ||
|
|
c6d29fbd5f | ||
|
|
51693f0bd9 | ||
|
|
18b7133679 | ||
|
|
23e4260821 | ||
|
|
45ddf396e9 | ||
|
|
4ca54c8f3b | ||
|
|
9ecd36e0de | ||
|
|
6383d77950 | ||
|
|
b39e8e9c00 | ||
|
|
1ed8794070 | ||
|
|
5cd1e83a84 | ||
|
|
a9f5be4348 | ||
|
|
41f154b98e | ||
|
|
94b4f2728e | ||
|
|
f29583dca7 | ||
|
|
f1457d6c8c | ||
|
|
cc0a7affe9 | ||
|
|
ec02e04ead | ||
|
|
8fb0f1fa42 | ||
|
|
a20b2c5f53 | ||
|
|
f5cb884c84 | ||
|
|
206c9e7f5d | ||
|
|
0062c1ddfe | ||
|
|
07eee0ceda | ||
|
|
35ae209f35 | ||
|
|
360a56a4a4 | ||
|
|
aa75c92b6b | ||
|
|
bfe7da9c6b | ||
|
|
323de351b3 | ||
|
|
6b345bc209 | ||
|
|
d3fafb3213 | ||
|
|
6fedbb60b2 | ||
|
|
0e84be2c52 | ||
|
|
c363d0fed8 | ||
|
|
f5e4a39e62 | ||
|
|
e227c896a2 | ||
|
|
0f0e3ffdc1 | ||
|
|
b8c4c3aade | ||
|
|
c2f1d683c9 | ||
|
|
fa85f47357 | ||
|
|
efd263562b | ||
|
|
8a044e464b | ||
|
|
d7979cbb6c | ||
|
|
5295debde0 | ||
|
|
3e69f0cd72 | ||
|
|
c592760e76 | ||
|
|
b172c78a9a | ||
|
|
f64f89606f | ||
|
|
3f25cb17e3 | ||
|
|
e2352fb8cd | ||
|
|
21b4f15c60 | ||
|
|
db18d1997e | ||
|
|
b6279d0b4b | ||
|
|
417cddb8c1 | ||
|
|
42e74b77f5 | ||
|
|
f27e47b5ff | ||
|
|
2a091ec932 | ||
|
|
9445e10377 | ||
|
|
c3e0aed7da | ||
|
|
f6bd49ffd0 | ||
|
|
b938d2af61 | ||
|
|
fff1dbdf55 | ||
|
|
69e7554caa | ||
|
|
b2ca6fd3a8 | ||
|
|
99df95697c | ||
|
|
d778d61208 | ||
|
|
d0bb045c79 | ||
|
|
3fa36cb79d | ||
|
|
ab92fa0aca | ||
|
|
7e715a0fc5 | ||
|
|
3a7c194000 | ||
|
|
8a4f85e204 | ||
|
|
622a5774e6 | ||
|
|
feed58ca64 | ||
|
|
eab966fdb3 | ||
|
|
c45ca0b839 | ||
|
|
5eeb5ddc67 | ||
|
|
4c7c397275 | ||
|
|
05b8c412f8 | ||
|
|
023dd2cfe0 | ||
|
|
413463f215 | ||
|
|
bc1268ea83 | ||
|
|
d8f67a1d88 | ||
|
|
b6e20238b6 | ||
|
|
b7f8bca629 | ||
|
|
8bb8f9c6c8 | ||
|
|
de619d1e81 | ||
|
|
e6450a5811 | ||
|
|
d8b140ce00 | ||
|
|
5804bf8118 | ||
|
|
e47a6956a1 | ||
|
|
d83346263d | ||
|
|
93aba2cb04 | ||
|
|
7366e9c47d | ||
|
|
a818127616 | ||
|
|
6e574a8b30 | ||
|
|
a7859ded82 | ||
|
|
d7224e6672 | ||
|
|
2adafac25f | ||
|
|
057fc2ec3f | ||
|
|
80670d2633 | ||
|
|
6430d5b4ef | ||
|
|
473ca0bf8c | ||
|
|
48b0f5ff87 | ||
|
|
0b809e3e23 | ||
|
|
cde7dfea4c | ||
|
|
915c16e8aa | ||
|
|
ec52edeff2 | ||
|
|
47af71b523 | ||
|
|
15033eed4d | ||
|
|
fca9cc33ad | ||
|
|
2ca2e1a1ce | ||
|
|
84185d19c7 | ||
|
|
16a160ea8a | ||
|
|
f132d4023a | ||
|
|
a50304c317 | ||
|
|
8ac220d5cc | ||
|
|
683f10428e | ||
|
|
022e33bfc7 | ||
|
|
3bc24a3a90 | ||
|
|
5ef63950cf | ||
|
|
4f0ddc4fc1 | ||
|
|
f5ea135066 | ||
|
|
bedd38297c | ||
|
|
2bffec87ac | ||
|
|
f9409b10fd | ||
|
|
5da1e589c2 | ||
|
|
852fa3b2e3 | ||
|
|
f10e90ebb4 | ||
|
|
8569ab045a | ||
|
|
a5c077e40c | ||
|
|
2ca556300b | ||
|
|
930ecd3756 | ||
|
|
97527fc03c | ||
|
|
c46f10e4a1 | ||
|
|
e1c2a8b9c1 | ||
|
|
73442acbe7 | ||
|
|
a4f0e6d8d6 | ||
|
|
3a8d4a316e | ||
|
|
b7064914ca | ||
|
|
6e8b843125 | ||
|
|
ef38731b6f | ||
|
|
3e67a87fc6 | ||
|
|
49f62849e5 | ||
|
|
b627356826 | ||
|
|
e9472e9f18 | ||
|
|
9cf6d43887 | ||
|
|
d073663cb4 | ||
|
|
80278e8856 | ||
|
|
7ead8b72ea | ||
|
|
cad61731f8 | ||
|
|
ac69ec1294 | ||
|
|
54469c2b22 | ||
|
|
21143c2afa | ||
|
|
f9ff782e79 | ||
|
|
6646cc41d7 | ||
|
|
ca2ebf900d | ||
|
|
e74100e3f4 | ||
|
|
90e303b114 | ||
|
|
cfbdb5e079 | ||
|
|
9c827a3997 | ||
|
|
adbb11147c | ||
|
|
6a2a7fbfd1 | ||
|
|
669e9657c7 | ||
|
|
b3ebf6f275 | ||
|
|
c58088e3a0 | ||
|
|
60c2c8814f | ||
|
|
9ab461a6ff | ||
|
|
77467267d9 | ||
|
|
b7dca533e0 | ||
|
|
0fa218cc7c | ||
|
|
13ba983cc8 | ||
|
|
3036da0109 | ||
|
|
84d8c0166d | ||
|
|
da5d1cf1b1 | ||
|
|
df1415d1e8 | ||
|
|
82107a8889 | ||
|
|
13f20ab1fa | ||
|
|
4099c201ff | ||
|
|
6cb12c44a3 | ||
|
|
66291de206 | ||
|
|
0118965e19 | ||
|
|
6c06bc591a | ||
|
|
486e212005 | ||
|
|
58d9437115 | ||
|
|
c36f45e354 | ||
|
|
b31471255d | ||
|
|
07caa8f1f9 | ||
|
|
7caf656a15 | ||
|
|
5fc932977a | ||
|
|
9cec4ca6ca | ||
|
|
19f0d00107 | ||
|
|
fefd6c28ab | ||
|
|
23fb770906 | ||
|
|
793711f26e | ||
|
|
1898837a5e | ||
|
|
9af8851b85 | ||
|
|
6124a262fa | ||
|
|
0cb27602e5 | ||
|
|
3e86caf335 | ||
|
|
2c63b97c09 | ||
|
|
21b1491aa2 | ||
|
|
0d6f70f1db | ||
|
|
11dbb6dc6b | ||
|
|
5af6873693 | ||
|
|
ff1b064f5e | ||
|
|
8e40433e34 | ||
|
|
23924b681e | ||
|
|
5157792c8d | ||
|
|
efc01ed4ad | ||
|
|
e57e32e575 | ||
|
|
708f3fd049 | ||
|
|
192cd0c440 | ||
|
|
8740bb8af0 | ||
|
|
68d9a8bddf | ||
|
|
b01b0bb771 | ||
|
|
1b1f3fca3a | ||
|
|
880723fb13 | ||
|
|
e128be1387 | ||
|
|
e23cb8a303 | ||
|
|
ee515ce130 | ||
|
|
f3cee71ee5 | ||
|
|
d25f6fac98 | ||
|
|
dd7c36abb9 | ||
|
|
8f44fd4f8d | ||
|
|
09de14b4e6 | ||
|
|
fefbb64a75 | ||
|
|
772ef7e815 | ||
|
|
41e50ece38 | ||
|
|
4de7f30751 | ||
|
|
ba1549060f | ||
|
|
5d727330e4 | ||
|
|
111e3433d2 | ||
|
|
3acadb07f4 | ||
|
|
cf300e03de | ||
|
|
439a2f855b | ||
|
|
d906600f7d | ||
|
|
06ccdb9fe7 | ||
|
|
2995f8205e | ||
|
|
093823a75c | ||
|
|
bc53aacc6e | ||
|
|
b7415ddd79 | ||
|
|
5e8f2512a6 | ||
|
|
2e4bec457d | ||
|
|
fdba3257ce | ||
|
|
1f1d36a87b | ||
|
|
9ac8796f16 | ||
|
|
700847b76c | ||
|
|
d5cc778a3e | ||
|
|
f2c49862fb | ||
|
|
242bba8991 | ||
|
|
ce78304c4f | ||
|
|
b1e7bb6aef | ||
|
|
45fe575607 | ||
|
|
02bdc23f8e | ||
|
|
b90dc3fc6a | ||
|
|
6b53351ce2 | ||
|
|
54ef87c8c9 | ||
|
|
eba289dabe | ||
|
|
4463c6f19e | ||
|
|
f59d47928e | ||
|
|
ef29912666 | ||
|
|
0cfa2fb26d | ||
|
|
06a949d2ce | ||
|
|
db080b7310 | ||
|
|
9ecb35e7d4 | ||
|
|
6785447aaf | ||
|
|
bfbea562e6 | ||
|
|
af36ecc41a | ||
|
|
fa85eab969 | ||
|
|
3a8943b2d2 | ||
|
|
790f33c772 | ||
|
|
c9114f35c0 | ||
|
|
6c8ae8b9ef | ||
|
|
0b81e99ddf | ||
|
|
bbc985b36e | ||
|
|
9dfa8979a7 | ||
|
|
5c898d95dc | ||
|
|
d486854a4a | ||
|
|
cd801a4ed8 | ||
|
|
3638017bd3 | ||
|
|
c14c7e14cd | ||
|
|
ed37e8811a | ||
|
|
892476530f | ||
|
|
eacbf2cc01 | ||
|
|
6737b6ebf0 | ||
|
|
e8c4b14cde | ||
|
|
72ad976640 | ||
|
|
8bb79fc9b9 | ||
|
|
8771fbe4a2 | ||
|
|
b541c10d04 | ||
|
|
c01237c6bc | ||
|
|
c52806164c | ||
|
|
189dcca2c9 | ||
|
|
5d7c50da51 | ||
|
|
e15532f8c6 | ||
|
|
462b062d7f | ||
|
|
e181d9899b | ||
|
|
06a316a2fe | ||
|
|
559fe25977 | ||
|
|
60213f2815 | ||
|
|
6c8abf481d | ||
|
|
1e4bfff185 | ||
|
|
91cd0f93ad | ||
|
|
b414eb4312 | ||
|
|
db1bdb20a5 | ||
|
|
f1b6872550 | ||
|
|
0797eebc66 | ||
|
|
4d1d37a19d | ||
|
|
751af0ee2f | ||
|
|
6b31d9c568 | ||
|
|
d61bc8ca1c | ||
|
|
d5a0b9c15c | ||
|
|
8f4ecd4a9e | ||
|
|
ee80f45064 | ||
|
|
022dd8775a | ||
|
|
c2cee22ec1 | ||
|
|
7869e8ad05 | ||
|
|
d67b892041 | ||
|
|
acf6bcebf9 | ||
|
|
9a762177e6 | ||
|
|
402313b3db | ||
|
|
27f9274cb4 | ||
|
|
38ba66e41b | ||
|
|
fdf2eaf21b | ||
|
|
887c9d05c2 | ||
|
|
d9d6d2f77f | ||
|
|
9b2c0d2924 | ||
|
|
61cdf27dc2 | ||
|
|
eb2c518a38 | ||
|
|
d5f394f4c4 | ||
|
|
05903e6b3a | ||
|
|
622a594a7c | ||
|
|
3cac42f8db | ||
|
|
3c17c8b945 | ||
|
|
6bbb37a184 | ||
|
|
e4946c508e | ||
|
|
d2e371201c | ||
|
|
4f30395c97 | ||
|
|
e2fd9af691 | ||
|
|
6af3a0d53c | ||
|
|
81f6192a0c | ||
|
|
4072dfb9b8 | ||
|
|
945f7311ca | ||
|
|
17453368fa | ||
|
|
d8720af3a3 | ||
|
|
6cd7bd1fb5 | ||
|
|
459d31fa83 | ||
|
|
10640b2e3e | ||
|
|
b0a1fa9b20 | ||
|
|
e61793f086 | ||
|
|
707b733dc3 | ||
|
|
cff4f731e4 | ||
|
|
33b8775d3a | ||
|
|
0021672451 | ||
|
|
74dfe6155f | ||
|
|
cde2f4dabe | ||
|
|
8733f0d86c | ||
|
|
25fd0feeea | ||
|
|
04999a9c03 | ||
|
|
92094d44a2 | ||
|
|
1e1f1edb7d | ||
|
|
11fe3dcfe2 | ||
|
|
fefab489c7 | ||
|
|
d1abb8bb02 | ||
|
|
db0e722d83 | ||
|
|
09ce736e9a | ||
|
|
d972554740 | ||
|
|
b4aeceec73 | ||
|
|
db40c6bfdf | ||
|
|
a831ffc8fe | ||
|
|
f8aa552edb | ||
|
|
b8f2869bef | ||
|
|
307ba34fa0 | ||
|
|
d9af67ef70 | ||
|
|
36d8518388 | ||
|
|
913e3def6d | ||
|
|
5b477dd3b9 | ||
|
|
3179bab5b8 | ||
|
|
00c8cf21f0 | ||
|
|
309979a136 | ||
|
|
20c21edada | ||
|
|
cef23f1f01 | ||
|
|
06364bcf06 | ||
|
|
a79f12ba46 | ||
|
|
47b4920f08 | ||
|
|
78f0b08d54 | ||
|
|
fc67f3e0e3 | ||
|
|
420e5e1022 | ||
|
|
f547209bf6 | ||
|
|
452606f147 | ||
|
|
ca1ecf38c6 | ||
|
|
3f96cf3e4f | ||
|
|
b6b9d8b843 | ||
|
|
0f1938c982 | ||
|
|
ca50fa0230 | ||
|
|
08e4f1ac94 | ||
|
|
a873540eb6 | ||
|
|
b493dfe8bc | ||
|
|
cab27680d6 | ||
|
|
f109354dce | ||
|
|
31f6e44dca | ||
|
|
77e0ae46ee | ||
|
|
fbdbb3e8fa | ||
|
|
abbc8ed09b | ||
|
|
3c53361901 | ||
|
|
6d6529b5e5 | ||
|
|
0b07b9482c | ||
|
|
c0fe9b0d1b | ||
|
|
10a6442013 | ||
|
|
2869504d83 | ||
|
|
ce6caa0759 | ||
|
|
138cc7f283 | ||
|
|
2edb8bce12 | ||
|
|
0258aea36c | ||
|
|
2ce3018081 | ||
|
|
2053e8c26c | ||
|
|
b8b17a7732 | ||
|
|
ac81ee4d14 | ||
|
|
63d380e078 | ||
|
|
46879265d7 | ||
|
|
5c859d99f0 | ||
|
|
ae29b66fbf | ||
|
|
ac1a59e95c | ||
|
|
aa51fc8106 | ||
|
|
0316cd0c04 | ||
|
|
58930ca980 | ||
|
|
5c4e92b973 | ||
|
|
29d7ef1bca | ||
|
|
80c7cf7e5d | ||
|
|
2612cf1a5e | ||
|
|
be7d7a6638 | ||
|
|
d0b2beb93d | ||
|
|
f3ca27e9fe | ||
|
|
e3e94dd137 | ||
|
|
6358746e6f | ||
|
|
4a2df0557c | ||
|
|
014f9142bc | ||
|
|
c0bf2b179a | ||
|
|
9656a02498 | ||
|
|
d76ac5ddfd | ||
|
|
9fbcea8dba | ||
|
|
7c014c5bf4 | ||
|
|
b5c8773673 | ||
|
|
3e42bdfdc9 | ||
|
|
b20eef7ab0 | ||
|
|
a571ebca8b | ||
|
|
f498427f17 | ||
|
|
eb9945c49a | ||
|
|
727f5b8846 | ||
|
|
7ff4660fa4 | ||
|
|
0a792c72e6 | ||
|
|
bad3251d3f | ||
|
|
ea01b618d9 | ||
|
|
9eec883bf8 | ||
|
|
80dd46d7aa | ||
|
|
993572b249 | ||
|
|
afce5ee1c8 | ||
|
|
3700c88538 | ||
|
|
8b672d6342 | ||
|
|
868c254c18 | ||
|
|
f5385613e2 | ||
|
|
088eaf3878 | ||
|
|
46ba6046bc | ||
|
|
bcf53cf8d0 | ||
|
|
66923d616a | ||
|
|
1c398fd83c | ||
|
|
78bf1ca895 | ||
|
|
c9b0b5d9bf | ||
|
|
c29d36bdf7 | ||
|
|
15491d8b1f | ||
|
|
c529637d60 | ||
|
|
2ffd8b0788 | ||
|
|
b7554e2bc9 | ||
|
|
6b13908f70 | ||
|
|
afeabf9f70 | ||
|
|
3842a051ba | ||
|
|
a89d1aea0c | ||
|
|
773e64ec15 | ||
|
|
e209942448 | ||
|
|
be9932698b | ||
|
|
85477ac281 | ||
|
|
d35b058b31 | ||
|
|
51e66e5dee | ||
|
|
88d64279bb | ||
|
|
364da4eb0f | ||
|
|
f368466f81 | ||
|
|
26c8b645f8 | ||
|
|
8786484edf | ||
|
|
ba45e16a66 | ||
|
|
d8c1b06854 | ||
|
|
98c08f4dbe | ||
|
|
04f158ce9a | ||
|
|
1a1eba30c3 | ||
|
|
0e40083fdd | ||
|
|
d2a23df349 | ||
|
|
78baa4ccb8 | ||
|
|
fb17fdbd0e | ||
|
|
2f93757751 | ||
|
|
3bc4de1f1b | ||
|
|
62c1fe7b45 | ||
|
|
7b5bf4bea4 | ||
|
|
712bf9b0cc | ||
|
|
19c189b7a3 | ||
|
|
2cd386a02f | ||
|
|
d8389bdac5 | ||
|
|
abe885e016 | ||
|
|
d3d785705a | ||
|
|
ad923a3d6f | ||
|
|
035ef37ffa | ||
|
|
f38324fe6c | ||
|
|
67308c2197 | ||
|
|
93ca4b367d | ||
|
|
20d0c8c5bb | ||
|
|
06278dd28a | ||
|
|
bcf3845c01 | ||
|
|
52c5fd5684 | ||
|
|
a0e8772150 | ||
|
|
497514c667 | ||
|
|
ca08f931b9 | ||
|
|
569b52d136 | ||
|
|
e81b4c677b | ||
|
|
9476a30889 | ||
|
|
ff303bcf27 | ||
|
|
67145f44e5 | ||
|
|
7e2f4ceafa | ||
|
|
639fef047e | ||
|
|
ec5ff01338 | ||
|
|
72499be79f | ||
|
|
29406d7aa3 | ||
|
|
22dd55305b | ||
|
|
474acc7dd9 | ||
|
|
c5f432d9c2 | ||
|
|
0902c53969 | ||
|
|
8dda8ff186 | ||
|
|
c8d9ff1fe8 | ||
|
|
50c7ddaa5e | ||
|
|
adcfb59d04 | ||
|
|
7c6f960a20 | ||
|
|
75c43836c1 | ||
|
|
7752f1112e | ||
|
|
148fd45777 | ||
|
|
c7443ec439 | ||
|
|
2f65d19e93 | ||
|
|
6cb735c864 | ||
|
|
ad7a535899 | ||
|
|
84189fe5ad | ||
|
|
b15ba3f20d | ||
|
|
a3a89d7c36 | ||
|
|
6c87ddb75d | ||
|
|
aa224791dd | ||
|
|
73865279b1 | ||
|
|
cad0e68589 | ||
|
|
93c498f0c6 | ||
|
|
e5cba9f559 | ||
|
|
513fe0ca30 | ||
|
|
a7757e30aa | ||
|
|
4e99bcb060 | ||
|
|
90c5477ca1 | ||
|
|
540f27d8bc | ||
|
|
552a117791 | ||
|
|
4e07f65d62 | ||
|
|
c78ef9f491 | ||
|
|
785d1541b6 | ||
|
|
63bdedb251 | ||
|
|
2f330bed30 | ||
|
|
8342523519 | ||
|
|
9f6c66e1b3 | ||
|
|
50d93bb5f8 | ||
|
|
64e9b7eafb | ||
|
|
9d34aaa2bd | ||
|
|
f3e4c3d6c5 | ||
|
|
6fb633bc3f | ||
|
|
ca033e166c | ||
|
|
ca6cee1837 | ||
|
|
c82af3a7f1 | ||
|
|
e82a62f172 | ||
|
|
f9321a16fb | ||
|
|
c8bedec446 | ||
|
|
7a104af70f | ||
|
|
923de3bb9c | ||
|
|
2359261a25 | ||
|
|
769cd7d5dd | ||
|
|
6bad645917 | ||
|
|
11931cc68d | ||
|
|
d91d025def | ||
|
|
985b4f1c86 | ||
|
|
1d556695ef | ||
|
|
e9ca87459a | ||
|
|
4b711da3c2 | ||
|
|
ca690f9802 | ||
|
|
137a1f98e3 | ||
|
|
e301648774 | ||
|
|
1260bf0573 | ||
|
|
bdbaee5cfc | ||
|
|
43c69727ea | ||
|
|
589dce8281 | ||
|
|
5f4804c7e4 | ||
|
|
5cd7e9d4db | ||
|
|
1418d7292d | ||
|
|
cc8e8b59d6 | ||
|
|
3b0c7a322a | ||
|
|
65775fe205 | ||
|
|
30e3e23338 | ||
|
|
8ced0871d2 | ||
|
|
6032e43f38 | ||
|
|
17b687ef36 | ||
|
|
cd60cef97d | ||
|
|
219a694aca | ||
|
|
3c76e82a76 | ||
|
|
998358fa90 | ||
|
|
bc508906db | ||
|
|
6a1e7c8565 | ||
|
|
5e8d4ff0bf | ||
|
|
e169fd331c | ||
|
|
58fbc62a4a | ||
|
|
fde3820de9 | ||
|
|
f33fe250cf | ||
|
|
a504607ef1 | ||
|
|
e8108e60c9 | ||
|
|
479c6fc458 | ||
|
|
8cb2bd68c9 | ||
|
|
b352902413 | ||
|
|
7736b3327e | ||
|
|
a680e06bac | ||
|
|
72e8c079c4 | ||
|
|
74ceb7b203 | ||
|
|
7923de0ddd | ||
|
|
d3f58baf38 | ||
|
|
6b07de6abf | ||
|
|
f2b515e117 | ||
|
|
9615df2e83 | ||
|
|
4785e8e98a | ||
|
|
5fc04b8135 | ||
|
|
c8ab83c08e | ||
|
|
469a5f80ae | ||
|
|
7e7bede4bd | ||
|
|
339335189b | ||
|
|
4e57d3ff7d | ||
|
|
06289aeea8 | ||
|
|
66bea4d912 | ||
|
|
6a4c22bc4d | ||
|
|
081cff0c33 | ||
|
|
2562a84dc5 | ||
|
|
ee3085e9e2 | ||
|
|
d352f188cb | ||
|
|
3d38596530 | ||
|
|
449733f214 | ||
|
|
75063dd6d2 | ||
|
|
c6eac4f169 | ||
|
|
a7cb695600 | ||
|
|
5b4f07a4f3 | ||
|
|
b19619260f | ||
|
|
897f762e3c | ||
|
|
1a32d316dd | ||
|
|
7f800a6b10 | ||
|
|
94f960b541 | ||
|
|
381f821556 | ||
|
|
5d4bffa427 | ||
|
|
f0a464d58a | ||
|
|
3a0f5543c9 | ||
|
|
1ae369c9d2 | ||
|
|
8153dde6c8 | ||
|
|
3476dfe9d7 | ||
|
|
ce3c351d81 | ||
|
|
fa52840ac8 | ||
|
|
e7468041e7 | ||
|
|
b9043a19e2 | ||
|
|
ae0cb2960d | ||
|
|
85939fa773 | ||
|
|
5a78ccdf1f | ||
|
|
b13fa0acde | ||
|
|
2a590fe988 | ||
|
|
fd837244be | ||
|
|
5dcfb7ce2e | ||
|
|
9bbc786bf0 | ||
|
|
c4157085cd | ||
|
|
d904d3c59a | ||
|
|
40a31ba506 | ||
|
|
8bdf7f2972 | ||
|
|
1500a4fe5d | ||
|
|
a9bc22bf37 | ||
|
|
3931325c6d | ||
|
|
7209c50da4 | ||
|
|
d1029cbcf0 | ||
|
|
f04c15adc7 | ||
|
|
0ae6a5f852 | ||
|
|
53c07ca216 | ||
|
|
1255d388f0 | ||
|
|
c615c2ddce | ||
|
|
8a02be5fc2 | ||
|
|
31d3464c0c | ||
|
|
2f6d1483f6 | ||
|
|
ea7b38cd1e | ||
|
|
31e12a627d | ||
|
|
e94a2fdd30 | ||
|
|
32d248107a | ||
|
|
3b19037ccd | ||
|
|
97bb372529 | ||
|
|
e94a3385d6 | ||
|
|
b8685833f1 | ||
|
|
0e27dac042 | ||
|
|
059a29a179 | ||
|
|
2ef5add037 | ||
|
|
bada421314 | ||
|
|
eb7f938194 | ||
|
|
c65bd9be83 | ||
|
|
dfafc36515 | ||
|
|
05a1fd6093 | ||
|
|
4574714ad4 | ||
|
|
8d8c145175 | ||
|
|
07eaf0b8d0 | ||
|
|
cf70df7d0e | ||
|
|
9234d92d4e | ||
|
|
86a292d459 | ||
|
|
937ccb270e | ||
|
|
7d5b9de6c7 | ||
|
|
f6132a5038 | ||
|
|
7a89c23c2d | ||
|
|
5a23b8523d | ||
|
|
0cf9ce19cc | ||
|
|
6ca3f52bee | ||
|
|
42f61e5c46 | ||
|
|
2ba574f329 | ||
|
|
dcfc52bbba | ||
|
|
4c706de3c7 | ||
|
|
3c3fe07225 | ||
|
|
248732d66f | ||
|
|
31f15d225d | ||
|
|
8d2b885018 | ||
|
|
c535e67633 | ||
|
|
05cd9da1d8 | ||
|
|
64ea5fd972 | ||
|
|
35ef866dcc | ||
|
|
ec95dac291 | ||
|
|
05a4a299b5 | ||
|
|
c8b58baa78 | ||
|
|
3b3d01b318 | ||
|
|
0e71bf20df | ||
|
|
106423c056 | ||
|
|
d510e8695e | ||
|
|
c33679b400 | ||
|
|
3ad07fa335 | ||
|
|
6812f56fa2 | ||
|
|
0ebade1fcd | ||
|
|
f3c187e0c7 | ||
|
|
559eecb115 | ||
|
|
fe6a60a7c3 | ||
|
|
5419c0c2d0 | ||
|
|
a1a06d7854 | ||
|
|
1094dec52a | ||
|
|
392b3526d8 | ||
|
|
7ce9f2dbe8 | ||
|
|
267d8eb613 | ||
|
|
b38ab99bdc | ||
|
|
6e93e6ea45 | ||
|
|
01818a424a | ||
|
|
79432444e8 | ||
|
|
0bd2ea544e | ||
|
|
afe5729a33 | ||
|
|
2975d0f819 | ||
|
|
a7e1dcd84a | ||
|
|
fc9acafe15 | ||
|
|
e31320a1d0 | ||
|
|
fa2fb620c7 | ||
|
|
62a3dbe63e | ||
|
|
5cb1e19b03 | ||
|
|
23b81eeddd | ||
|
|
31da643c6a | ||
|
|
3c17010ba5 | ||
|
|
dd0319d149 | ||
|
|
315eafec07 | ||
|
|
cf638fc378 | ||
|
|
9df7cf8ea3 | ||
|
|
9bdb01e6c3 | ||
|
|
ff52c72095 | ||
|
|
417872b98a | ||
|
|
a4fbe403e4 | ||
|
|
a3ed377607 | ||
|
|
e69b9ffb0f | ||
|
|
29ca9003a5 | ||
|
|
d25365515e | ||
|
|
a77ad145d0 | ||
|
|
ce1d4c7aeb | ||
|
|
85532057dc | ||
|
|
86457878fd | ||
|
|
8ba4e82f53 | ||
|
|
7779b6cbf6 | ||
|
|
ac5c31df78 | ||
|
|
e370391b5e | ||
|
|
3c9b2e6250 | ||
|
|
8b57e8fcf6 | ||
|
|
61d5bfc06b | ||
|
|
ada9b8ab20 | ||
|
|
e17f6f7ab6 | ||
|
|
3a92768cad | ||
|
|
329fd2fe75 | ||
|
|
8002894e6e | ||
|
|
bb60abb445 | ||
|
|
890db7ab7d | ||
|
|
9e3fe84689 | ||
|
|
024face21c | ||
|
|
78d811f8fb | ||
|
|
1beaa9e457 | ||
|
|
f953788d75 | ||
|
|
f6bcdffe6d | ||
|
|
e3af4e83dd | ||
|
|
247b6de61b | ||
|
|
13f2c161db | ||
|
|
55ab8cebff | ||
|
|
4fa5d53e75 | ||
|
|
ae62248c8a | ||
|
|
fbdde79262 | ||
|
|
1c31f17f89 | ||
|
|
06365907a0 | ||
|
|
094d1d9a27 | ||
|
|
173a45b43c | ||
|
|
3fc4c1434d | ||
|
|
0aba41458d | ||
|
|
5f7516bee5 | ||
|
|
2e24e82fc3 | ||
|
|
d5169236b7 | ||
|
|
96bc10707a | ||
|
|
6c6ceac1bc | ||
|
|
c7302ffd98 | ||
|
|
df7596a03e | ||
|
|
f3fcde886c | ||
|
|
f08782f092 | ||
|
|
4186249fea | ||
|
|
1d19dc5411 | ||
|
|
5ea492b94d | ||
|
|
8db00cd940 | ||
|
|
fdef562ba7 | ||
|
|
4cef36044c | ||
|
|
49d23a92a9 | ||
|
|
290e1b94e4 | ||
|
|
818d9fec02 | ||
|
|
41ea62ace5 | ||
|
|
94ce9c52fb | ||
|
|
ed2cefaf0e | ||
|
|
a325a8cbed | ||
|
|
e17d517a93 | ||
|
|
edf97be2b5 | ||
|
|
f5b3693207 | ||
|
|
b923e27853 | ||
|
|
2616068121 | ||
|
|
4e9291c48b | ||
|
|
61e30d3194 | ||
|
|
678be98a63 | ||
|
|
f216f79834 | ||
|
|
1e219db778 | ||
|
|
840c7a02b3 | ||
|
|
cddaf5def3 | ||
|
|
07aa5a2c61 | ||
|
|
1550dcfff2 | ||
|
|
b8e65dbc1e | ||
|
|
9e46f410e7 | ||
|
|
c6e0cb8fa6 | ||
|
|
769ef0b7bd | ||
|
|
a1d2958b24 | ||
|
|
3dff229f5d | ||
|
|
3d34454472 | ||
|
|
de32eba8a8 | ||
|
|
dd95699054 | ||
|
|
b09f4e054c | ||
|
|
2ee55879d1 | ||
|
|
66065f71b3 | ||
|
|
40dd9cb8cc | ||
|
|
8f534756ca | ||
|
|
2d4f039432 | ||
|
|
6bebabb376 | ||
|
|
de5247ae16 | ||
|
|
b1dfd324cf | ||
|
|
ff9cad0802 | ||
|
|
6a252184e2 | ||
|
|
5ab25a0ab8 | ||
|
|
dece3a1f7c | ||
|
|
9c9cf3a8d0 | ||
|
|
08bed4d70a | ||
|
|
c54091c8ed | ||
|
|
e1fdebdcc8 | ||
|
|
23438327a1 | ||
|
|
8682b8f7f7 | ||
|
|
064fadaa40 | ||
|
|
a255936e1e | ||
|
|
1b8eaf4143 | ||
|
|
24dd4582a2 | ||
|
|
d9edf3ad42 | ||
|
|
9066d09c3e | ||
|
|
792de65053 | ||
|
|
96ea98af24 | ||
|
|
54c4aa0f62 | ||
|
|
1df69830bd | ||
|
|
37f08fab28 | ||
|
|
3e1f3de348 | ||
|
|
6d7c0fd73b | ||
|
|
27ef660057 | ||
|
|
e83e8e7734 | ||
|
|
93b9133cfa | ||
|
|
3e93426766 | ||
|
|
0f66180e24 | ||
|
|
ea34bcc637 | ||
|
|
09e103cd36 | ||
|
|
a5aca6df16 | ||
|
|
84b0ad0959 | ||
|
|
513dd4a616 | ||
|
|
e5100b1367 | ||
|
|
846474d5a6 | ||
|
|
edaf5b86ce | ||
|
|
7655e78c36 | ||
|
|
6859033d42 | ||
|
|
f558da602e | ||
|
|
ff7b9eede9 | ||
|
|
82c168127c | ||
|
|
29c9e88c6c | ||
|
|
dfcd28cce9 | ||
|
|
8bd6c39d5e | ||
|
|
99f08fc172 | ||
|
|
a6def371e4 | ||
|
|
089ad40b1f | ||
|
|
83515c3462 | ||
|
|
f642eb7b9f | ||
|
|
1123872a47 | ||
|
|
7e22eec300 | ||
|
|
a4701d3b7e | ||
|
|
0d1a72385e | ||
|
|
ff4322d44f | ||
|
|
f2d88ed98c | ||
|
|
c9b3f64262 | ||
|
|
cf38d58b79 | ||
|
|
5044d03efa | ||
|
|
ecd67d8109 | ||
|
|
53b7400731 | ||
|
|
1ebeb6bbf3 | ||
|
|
7e351cd18f | ||
|
|
ecde762a60 | ||
|
|
8d146b6e11 | ||
|
|
f8d86ef2f6 | ||
|
|
589a8a85b3 | ||
|
|
18914183d9 | ||
|
|
ce55c7fc7d | ||
|
|
808b909f27 | ||
|
|
a3ec9e6c3b | ||
|
|
bd08442637 | ||
|
|
47871e33fb | ||
|
|
9b4df1505e | ||
|
|
126095a3e6 | ||
|
|
8296690f17 | ||
|
|
595a14576e | ||
|
|
fe57fad800 | ||
|
|
9cc98b104e | ||
|
|
b73cc0ff07 | ||
|
|
39504d4517 | ||
|
|
8f674b13e8 | ||
|
|
87647e12e9 | ||
|
|
d9e690eb71 | ||
|
|
3bf31a5161 | ||
|
|
1299e93989 | ||
|
|
f1491358ff | ||
|
|
bf097e2a31 | ||
|
|
b32e75f3e1 | ||
|
|
640923da58 | ||
|
|
2e189b0677 | ||
|
|
53fea9cd68 | ||
|
|
3fafd7c0c4 | ||
|
|
858cbfa961 | ||
|
|
4b611cca1d | ||
|
|
897adbe920 | ||
|
|
d6baaf3649 | ||
|
|
c10a62a070 | ||
|
|
c2bc56dc65 | ||
|
|
ae5df22719 | ||
|
|
ad8e6236a4 | ||
|
|
e19a1c3cd9 | ||
|
|
aa30ee42c4 | ||
|
|
0bd1b2fbfe | ||
|
|
822cd79080 | ||
|
|
2f734e0a7e | ||
|
|
33a1b09738 | ||
|
|
0bb3203216 | ||
|
|
01446841be | ||
|
|
b4c38fdd69 | ||
|
|
e4b5f088ca | ||
|
|
97f4d2e8f4 | ||
|
|
1301637cc5 | ||
|
|
19d684e84f | ||
|
|
f8dd2aeebd | ||
|
|
2dee13b8b8 | ||
|
|
21825a8d00 | ||
|
|
b7b9b499f4 | ||
|
|
28cf7340b9 | ||
|
|
1de63e34f1 | ||
|
|
56ae0ccb87 | ||
|
|
d11cc41b2b | ||
|
|
9b009c9f5a | ||
|
|
feb1f6a4ac | ||
|
|
bbece796a9 | ||
|
|
2bb3d8bdfe | ||
|
|
6e1b2ebcd6 | ||
|
|
06f12c290c | ||
|
|
e1e635578d | ||
|
|
66870de523 | ||
|
|
0b3abc3faf | ||
|
|
f6cbc666f5 | ||
|
|
f4f9761c84 | ||
|
|
67298a4b2f | ||
|
|
81b172466c | ||
|
|
206bced36f | ||
|
|
36a91ab163 | ||
|
|
8138bb315d | ||
|
|
9054558fbd | ||
|
|
f0261e88a8 | ||
|
|
7931a483d7 | ||
|
|
d1a6976967 | ||
|
|
fc14ca7a8f | ||
|
|
5e4c83cfec | ||
|
|
8423b244ec | ||
|
|
e6f17474cb | ||
|
|
5fe21da364 | ||
|
|
5fe1a246cf | ||
|
|
43efd9fa56 | ||
|
|
4fb42a8382 | ||
|
|
5c831a1a1b | ||
|
|
36e37042c6 | ||
|
|
967ecc6264 | ||
|
|
4a20a92f4f | ||
|
|
34aa790937 | ||
|
|
9e3c3e4139 | ||
|
|
1b1f63339c | ||
|
|
d4678a75ed | ||
|
|
98e231525f | ||
|
|
da5795a32a | ||
|
|
d4196128b3 | ||
|
|
e49238474c | ||
|
|
56d69016f4 | ||
|
|
48cddfee7c | ||
|
|
41a0c85888 | ||
|
|
4c30c4d572 | ||
|
|
e60b3717f0 | ||
|
|
0262406cea | ||
|
|
72baa6528d | ||
|
|
3d8ab44d14 | ||
|
|
ee3555e8c0 | ||
|
|
db3822841c | ||
|
|
115019ee2c | ||
|
|
da4535c4b4 | ||
|
|
7bfb0145d6 | ||
|
|
db235e6588 | ||
|
|
3426f7118c | ||
|
|
6eeefeb3eb | ||
|
|
36c1674e0a | ||
|
|
588372b853 | ||
|
|
9de04a5713 | ||
|
|
1592bf7349 | ||
|
|
64a5004a66 | ||
|
|
1e9efeeb22 | ||
|
|
b1ae7a591a | ||
|
|
f3352b9bec | ||
|
|
cab0ee644d | ||
|
|
7780a3e5a4 | ||
|
|
699a26726c | ||
|
|
4c692849bc | ||
|
|
7f9bc71eca | ||
|
|
7fca810d87 | ||
|
|
470208d879 | ||
|
|
2341995e2d | ||
|
|
6dbc6fae49 | ||
|
|
99f467f016 | ||
|
|
8cccaeaee1 | ||
|
|
8c4b35bbd5 | ||
|
|
260696e5e3 | ||
|
|
f3bbe7772f | ||
|
|
a91e1db13e | ||
|
|
4b8b883127 | ||
|
|
e0806ab5ed | ||
|
|
d794aac9ca | ||
|
|
7aac53eb69 | ||
|
|
fe6b7ccc8d | ||
|
|
f56cdc894f | ||
|
|
11a4398874 | ||
|
|
b39ad8a69b | ||
|
|
50a8312c9f | ||
|
|
f8dbd659d0 | ||
|
|
6d858e75d4 | ||
|
|
fe5146716e | ||
|
|
18159f6f60 | ||
|
|
201c75e55a | ||
|
|
d472e353c8 | ||
|
|
a24d253a3f | ||
|
|
eb70ba210b | ||
|
|
3f543c371f | ||
|
|
847169dab2 | ||
|
|
ed29aefe31 | ||
|
|
68b62e1c45 | ||
|
|
aba9f3dd7e | ||
|
|
26f327f1f5 | ||
|
|
ff6e834f7d | ||
|
|
33f87146a8 | ||
|
|
e282509475 | ||
|
|
e6e233e73f | ||
|
|
ec495a6ade | ||
|
|
ed03e26c44 | ||
|
|
7f006841fc | ||
|
|
1d32e01f17 | ||
|
|
e78a28ffb5 | ||
|
|
fdacf913e1 | ||
|
|
539cad8f49 | ||
|
|
181232550d | ||
|
|
f1eda76d36 | ||
|
|
76d9120dd6 | ||
|
|
c6b5faa001 | ||
|
|
9aba20edee | ||
|
|
e8d86192fc | ||
|
|
aa7638fce5 | ||
|
|
6f2e507e7e | ||
|
|
7c7b389ae0 | ||
|
|
dcc35bf6a4 | ||
|
|
606e919ae3 | ||
|
|
34b1adb9b3 | ||
|
|
bae5d9fcb4 | ||
|
|
92551304a9 | ||
|
|
a8842a35df | ||
|
|
a9c2c07c96 | ||
|
|
5af0708e7f | ||
|
|
102e532c65 | ||
|
|
a22a4084dd | ||
|
|
ad82fd0a25 | ||
|
|
530ee49d07 | ||
|
|
98a5dc52bf | ||
|
|
687b7ef998 | ||
|
|
847ed3fccf | ||
|
|
0c5233171f | ||
|
|
cb8fd52bbe | ||
|
|
c5b14e2676 | ||
|
|
2f2b076705 | ||
|
|
355cc22e32 | ||
|
|
43f117d5f0 | ||
|
|
b3034d815c | ||
|
|
bdec94477c | ||
|
|
528baec07b | ||
|
|
ff8cd3afa7 | ||
|
|
6184f9fc1e | ||
|
|
c8563aaf86 | ||
|
|
0674850fcb | ||
|
|
130904d648 | ||
|
|
4b87939256 | ||
|
|
6db92bd107 | ||
|
|
cfa3ab7f89 | ||
|
|
7edac4480f | ||
|
|
452b30ddb3 | ||
|
|
39125379e5 | ||
|
|
faa96aba6d | ||
|
|
c2df80e759 | ||
|
|
9ec3c7b42d | ||
|
|
6668eca26b | ||
|
|
06a960c681 | ||
|
|
1eaad22e11 | ||
|
|
90989375ca | ||
|
|
bd3091eb7d | ||
|
|
cc0a5f7142 | ||
|
|
fa59c08f71 | ||
|
|
2c64908ae0 | ||
|
|
53e3724e23 | ||
|
|
0914e94965 | ||
|
|
59251c9e9c | ||
|
|
91579a2424 | ||
|
|
2c839b25ad |
@@ -1,4 +1,246 @@
|
||||
|
||||
--- 9.2.0-P1 released ---
|
||||
|
||||
1243. [bug] It was possible to trigger a REQUIRE() in
|
||||
dns_message_findtype(). [RT #2659]
|
||||
|
||||
--- 9.2.0 released ---
|
||||
|
||||
1134. [bug] Multithreaded servers could deadlock in ferror()
|
||||
when reloading zone files. [RT #1951, #1998]
|
||||
|
||||
1133. [bug] IN6_IS_ADDR_LOOPBACK was not portably defined on
|
||||
platforms without IN6_IS_ADDR_LOOPBACK. [RT #2106]
|
||||
|
||||
--- 9.2.0rc10 released ---
|
||||
|
||||
1131. [bug] The match-destinations view option did not work with
|
||||
IPv6 destinations. [RT #2073, #2074]
|
||||
|
||||
1130. [bug] Log messages reporting an out-of-range serial number
|
||||
did not include the out-of-range number but the
|
||||
following token. [RT #2076]
|
||||
|
||||
1129. [bug] Multithreaded servers could crash under heavy
|
||||
resolution load due to a race condition. [RT #2018]
|
||||
|
||||
1126. [bug] The server could access a freed event if shut
|
||||
down while a client start event was pending
|
||||
delivery. [RT #2061]
|
||||
|
||||
1121. [bug] The server could attempt to access a NULL zone
|
||||
table if shut down while resolving.
|
||||
[RT #1587, #2054]
|
||||
|
||||
1120. [bug] Errors in options were not fatal. [RT #2002]
|
||||
|
||||
1118. [bug] On multithreaded servers, a race condition
|
||||
could cause an assertion failure in resolver.c
|
||||
during resolver shutdown. [RT #2029]
|
||||
|
||||
1117. [port] The configure check for in6addr_loopback incorrectly
|
||||
succeeded on AIX 4.3 when compiling with -O2
|
||||
because the test code was optimized away.
|
||||
[RT #2016]
|
||||
|
||||
1116. [bug] Setting transfers in a server clause, transfers-in,
|
||||
or transfers-per-ns to a value greater than
|
||||
2147483647 disabled transfers. [RT #2002]
|
||||
|
||||
1114. [port] Ignore more accept() errors. [RT #2021]
|
||||
|
||||
1113. [bug] The allow-update-forwarding option was ignored
|
||||
when specified in a view. [RT #2014]
|
||||
|
||||
1111. [bug] Multithreaded servers could deadlock processing
|
||||
recursive queries due to a locking hieararchy
|
||||
violation in adb.c. [RT #2017]
|
||||
|
||||
--- 9.2.0rc9 released ---
|
||||
|
||||
1107. [bug] nsupdate could catch an assertion failure if an
|
||||
invalid domain name was given as the argument to
|
||||
the "zone" command.
|
||||
|
||||
1106. [bug] After seeing an out of range TTL, nsupdate would
|
||||
treat all TTLs as out of range. [RT #2001]
|
||||
|
||||
1104. [bug] Invalid arguments to the transfer-format option
|
||||
could cause an assertion failure. [RT #1995]
|
||||
|
||||
1103. [port] OpenUNIX 8 support (ifconfig.sh). [RT #1970]
|
||||
|
||||
1102. [doc] Note that query logging is enabled by directing the
|
||||
queries category to a channel.
|
||||
|
||||
1101. [bug] Array bounds read error in lwres_gai_strerror.
|
||||
|
||||
1100. [bug] libbind: DNSSEC key ids were computed incorrectly.
|
||||
|
||||
1099. [cleanup] libbind: defining REPORT_ERRORS in lib/bind/dst caused
|
||||
compile time errors.
|
||||
|
||||
1098. [bug] libbind: HMAC-MD5 key files are now mode 0600.
|
||||
|
||||
1093. [doc] libbind: miscellaneous nroff fixes.
|
||||
|
||||
1092. [bug] libbind: get*by*() failed to check if res_init() had
|
||||
been called.
|
||||
|
||||
1091. [bug] libbind: misplaced va_end().
|
||||
|
||||
1090. [bug] libbind: dns_ho.c:add_hostent() was not returning
|
||||
the amount of memory consumed resulting in garbage
|
||||
address being returned. Alignment calculations were
|
||||
wasting space. We weren't suppressing duplicate
|
||||
addresses.
|
||||
|
||||
1088. [port] libbind: MPE/iX C.70 (incomplete)
|
||||
|
||||
1087. [bug] libbind: struct __res_state too large on 64 bit arch.
|
||||
|
||||
1086. [port] libbind: sunos: old sprintf.
|
||||
|
||||
1085. [port] libbind: solaris: sys_nerr and sys_errlist do not
|
||||
exist when compiling in 64 bit mode.
|
||||
|
||||
1084. [cleanup] libbind: gai_strerror() rewritten.
|
||||
|
||||
1083. [bug] The default control channel listened on the
|
||||
wildcard adress, not the loopback as documented.
|
||||
[RT #1975]
|
||||
|
||||
1082. [bug] The -g option to named incorrectly caused logging
|
||||
to be sent to syslog in addition to stderr.
|
||||
[RT #1974]
|
||||
|
||||
1078. [bug] We failed to correct bad tv_usec values in one case.
|
||||
[RT #1966]
|
||||
|
||||
1076. [bug] A badly defined global key could trigger an assertion
|
||||
on load/reload if views were used. [RT #1947]
|
||||
|
||||
1075. [bug] Out-of-range network prefix lengths were not
|
||||
reported. [RT #1954]
|
||||
|
||||
1074. [bug] Running out of memory in dump_rdataset() could
|
||||
cause an assertion failure. [RT #1946]
|
||||
|
||||
--- 9.2.0rc8 released ---
|
||||
|
||||
1068. [bug] errno could be overwritten by catgets(). [RT #1921]
|
||||
|
||||
1066. [bug] Provide a thread safe wrapper for strerror().
|
||||
[RT #1689]
|
||||
|
||||
1064. [bug] Do not shut down active network interfaces if we
|
||||
are unable to scan the interface list. [RT #1921]
|
||||
|
||||
1063. [bug] libbind: "make install" was failing on IRIX.
|
||||
|
||||
1062. [bug] If the control channel listener socket was shut
|
||||
down before server exit, the listener object could
|
||||
be freed twice. [RT #1916]
|
||||
|
||||
1061. [bug] If periodic cache cleaning happened to start
|
||||
while cleaning due to reaching the configured
|
||||
maximum cache size was in progress, the server
|
||||
could catch an assertion failure. [RT #1912]
|
||||
|
||||
1057. [bug] Reloading the server after adding a "file" clause
|
||||
to a zone statement could cause the server to
|
||||
crash due to a typo in change 1016.
|
||||
|
||||
1056. [bug] Rndc could catch an assertion failure on SIGINT due
|
||||
to an uninitialized variable. [RT #1908]
|
||||
|
||||
--- 9.2.0rc7 released ---
|
||||
|
||||
1054. [bug] On Win32, cfg_categories and cfg_modules need to be
|
||||
exported from the libisccfg DLL.
|
||||
|
||||
1053. [bug] Dig did not increase its timeout when receiving
|
||||
AXFRs unless the +time option was used. [RT #1904]
|
||||
|
||||
1052. [bug] Journals were not being created in binary mode
|
||||
resulting in "journal format not recognized" error
|
||||
under Win32. [RT #1889]
|
||||
|
||||
1051. [bug] Do not ignore a network interface completely just
|
||||
because it has a noncontiguous netmask. Instead,
|
||||
omit it from the localnets ACL and issue a warning.
|
||||
[RT #1891]
|
||||
|
||||
1050. [bug] Log messages reporting malformed IP addresses in
|
||||
address lists such as that of the forwarders option
|
||||
failed to include the correct error code, file
|
||||
name, and line number. [RT #1890]
|
||||
|
||||
1048. [bug] Servers built with -DISC_MEM_USE_INTERNAL_MALLOC=1
|
||||
didn't work.
|
||||
|
||||
1047. [bug] named was incorrectly refusing all requests signed
|
||||
with a TSIG key derived from an unsigned TKEY
|
||||
negotiation with a NOERROR response. [RT #1886]
|
||||
|
||||
1046. [bug] The help message for the --with-openssl configure
|
||||
option was inaccurate. [RT #1880]
|
||||
|
||||
1045. [bug] It was possible to skip saving glue for a nameserver
|
||||
for a stub zone.
|
||||
|
||||
1044. [bug] Specifying allow-transfer, notify-source, or
|
||||
notify-source-v6 in a stub zone was not treated
|
||||
as an error.
|
||||
|
||||
1043. [bug] Specifying a transfer-source or transfer-source-v6
|
||||
option in the zone statement for a master zone was
|
||||
not treated as an error. [RT #1876]
|
||||
|
||||
1042. [bug] The "config" logging category did not work properly.
|
||||
[RT #1873]
|
||||
|
||||
1041. [bug] Dig/host/nslookup could catch an assertion failure
|
||||
on SIGINT due to an uninitialized variable. [RT #1867]
|
||||
|
||||
1040. [bug] Multiple listen-on-v6 options with different ports
|
||||
were not accepted. [RT #1875]
|
||||
|
||||
1039. [bug] Negative responses with CNAMEs in the answer section
|
||||
were cached incorrectly. [RT #1862]
|
||||
|
||||
1038. [bug] In servers configured with a tkey-domain option,
|
||||
TKEY queries with an owner name other than the root
|
||||
could cause an assertion failure. [RT #1866, #1869]
|
||||
|
||||
1033. [bug] Always respond to requests with an unsupported opcode
|
||||
with NOTIMP, even if we don't have a matching view
|
||||
or cannot determine the class.
|
||||
|
||||
--- 9.2.0rc6 released ---
|
||||
|
||||
1031. [bug] libbind.a: isc__gettimeofday() infinite recursion.
|
||||
[RT #1858]
|
||||
|
||||
1030. [bug] On systems with no resolv.conf file, nsupdate
|
||||
exited with an error rather than defaulting
|
||||
to using the loopback address. [RT #1836]
|
||||
|
||||
1029. [bug] Some named.conf errors did not cause the loading
|
||||
of the configuration file to return a failure
|
||||
status even though they were logged. [RT #1847]
|
||||
|
||||
1028. [bug] On Win32, dig/host/nslookup looked for resolv.conf
|
||||
in the wrong directory. [RT #1833]
|
||||
|
||||
1027. [bug] RRs having the reserved type 0 should be rejected.
|
||||
[RT #1471]
|
||||
|
||||
1026. [port] Recognize OpenUNIX 8 in config.guess. [RT #1830]
|
||||
|
||||
1022. [bug] Don't report empty root hints as "extra data".
|
||||
[RT #1802]
|
||||
|
||||
--- 9.2.0rc5 released ---
|
||||
|
||||
1021. [bug] On Win32, log message timestamps were one month
|
||||
@@ -16,7 +258,7 @@
|
||||
correctly. [RT #1813]
|
||||
|
||||
1017. [bug] When specifying TSIG keys to dig and nsupdate using
|
||||
the -k option, they must be HMAC-MD5 keys. [RT #1810]
|
||||
the -k option, they must be HMAC-MD5 keys. [RT #1810]
|
||||
|
||||
1016. [bug] Slave zones with no backup file were re-transferred
|
||||
on every server reload.
|
||||
@@ -90,7 +332,7 @@
|
||||
(NOTAUTH)".
|
||||
|
||||
972. [bug] The file modification time code in zone.c was using the
|
||||
wrong epoch. [RT #1667]
|
||||
wrong epoch. [RT #1667]
|
||||
|
||||
968. [bug] On win32, the isc_time_now() function was unnecessarily
|
||||
calling strtime(). [RT #1671]
|
||||
|
||||
@@ -188,3 +188,80 @@ depending on whether they were last received as answers or as glue.
|
||||
You can always look up the addresses with explicit queries like
|
||||
"dig a.root-servers.net A".
|
||||
|
||||
|
||||
Q: Zone transfers from my BIND 9 master to my Windows 2000 slave
|
||||
fail. Why?
|
||||
|
||||
A: This may be caused by a bug in the Windows 2000 DNS server where
|
||||
DNS messages larger than 16K are not handled properly. This can be
|
||||
worked around by setting the option "transfer-format one-answer;".
|
||||
Also check whether your zone contains domain names with embedded
|
||||
spaces or other special characters, like "John\032Doe\213s\032Computer",
|
||||
since such names have been known to cause Windows 2000 slaves to
|
||||
incorrectly reject the zone.
|
||||
|
||||
|
||||
Q: Why don't my zones reload when I do an "rndc reload" or SIGHUP?
|
||||
|
||||
A: A zone can be updated either by editing zone files and reloading
|
||||
the server or by dynamic update, but not both. If you have enabled
|
||||
dynamic update for a zone using the "allow-update" option, you are not
|
||||
supposed to edit the zone file by hand, and the server will not
|
||||
attempt to reload it.
|
||||
|
||||
|
||||
Q: I can query the nameserver from the nameserver but not from other
|
||||
machines. Why?
|
||||
|
||||
A: This is usually the result of the firewall configuration stopping
|
||||
the queries and / or the replies.
|
||||
|
||||
|
||||
Q: How can I make a server a slave for both an internal and
|
||||
an external view at the same time? When I tried, both views
|
||||
on the slave were transfered from the same view on the master.
|
||||
|
||||
A: You will need to give the master and slave multiple IP addresses and
|
||||
use those to make sure you reach the correct view on the other machine.
|
||||
|
||||
e.g.
|
||||
Master: 10.0.1.1 (internal), 10.0.1.2 (external, IP alias)
|
||||
internal:
|
||||
match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
|
||||
notify-source 10.0.1.1;
|
||||
transfer-source 10.0.1.1;
|
||||
query-source 10.0.1.1;
|
||||
external:
|
||||
match-clients { any; };
|
||||
recursion no; // don't offer recursion to the world
|
||||
notify-source 10.0.1.2;
|
||||
transfer-source 10.0.1.2;
|
||||
query-source 10.0.1.2;
|
||||
|
||||
Slave: 10.0.1.3 (internal), 10.0.1.4 (external, IP alias)
|
||||
internal:
|
||||
match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
|
||||
notify-source 10.0.1.3;
|
||||
transfer-source 10.0.1.3;
|
||||
query-source 10.0.1.3;
|
||||
external:
|
||||
match-clients { any; };
|
||||
recursion no; // don't offer recursion to the world
|
||||
notify-source 10.0.1.4;
|
||||
transfer-source 10.0.1.4;
|
||||
query-source 10.0.1.4;
|
||||
|
||||
You put the external address on the alias so that all the other
|
||||
dns clients on these boxes see the internal view by default.
|
||||
|
||||
|
||||
Q: When I try to use rndc, I get the error message "network
|
||||
unreachable" or "connection refused", even though I know named is
|
||||
running.
|
||||
|
||||
A: You probably have "default-server localhost" in /etc/rndc.conf,
|
||||
your /etc/hosts or DNS maps "localhost" to both the IPv4 loopback
|
||||
address 127.0.0.1 and the IPv6 loopback address ::1, and you do not
|
||||
have IPv6 fully operational. Change the "default-server localhost" to
|
||||
"default-server 127.0.0.1" to make sure rdnc does not try to contact
|
||||
the name server using IPv6.
|
||||
|
||||
@@ -44,12 +44,9 @@ BIND 9
|
||||
Nominum, Inc.
|
||||
|
||||
|
||||
BIND 9.2.0rc5
|
||||
BIND 9.2.0
|
||||
|
||||
BIND 9.2.0rc5 is a release candidate for BIND 9.2.0.
|
||||
It fixes a number of bugs in 9.2.0rc4.
|
||||
|
||||
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
|
||||
@@ -149,13 +146,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:
|
||||
|
||||
@@ -163,9 +163,11 @@ Building
|
||||
SuSE Linux 7.0
|
||||
Slackware Linux 7.x, 8.0
|
||||
Red Hat Linux 7.1
|
||||
OpenBSD 2.6, 2.8, -current
|
||||
OpenBSD 2.6, 2.8, 2.9
|
||||
UnixWare 7.1.1
|
||||
HP-UX 10.20
|
||||
BSD/OS 4.2
|
||||
OpenUNIX 8
|
||||
|
||||
To build, just
|
||||
|
||||
|
||||
+10
-1
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: acconfig.h,v 1.35 2001/07/14 01:55:04 gson 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
|
||||
@@ -23,6 +23,9 @@
|
||||
***/
|
||||
@TOP@
|
||||
|
||||
/* define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef ssize_t
|
||||
|
||||
/* define on DEC OSF to enable 4.4BSD style sa_len support */
|
||||
#undef _SOCKADDR_LEN
|
||||
|
||||
@@ -44,6 +47,9 @@
|
||||
/* define if sysconf() is available */
|
||||
#undef HAVE_SYSCONF
|
||||
|
||||
/* define if sysctlbyname() is available */
|
||||
#undef HAVE_SYSCTLBYNAME
|
||||
|
||||
/* define if catgets() is available */
|
||||
#undef HAVE_CATGETS
|
||||
|
||||
@@ -120,3 +126,6 @@ int sigwait(const unsigned int *set, int *sig);
|
||||
|
||||
/* define if pthread_attr_getstacksize() is available */
|
||||
#undef HAVE_PTHREAD_ATTR_GETSTACKSIZE
|
||||
|
||||
/* define if you have strerror in the C library. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
+2
-1
@@ -318,7 +318,8 @@ should be applied to that query.
|
||||
A global set of query options, which should be applied to all queries,
|
||||
can also be supplied. These global query options must precede the
|
||||
first tuple of name, class, type, options, flags, and query options
|
||||
supplied on the command line. Any global query options can be
|
||||
supplied on the command line. Any global query options (except
|
||||
the \fB+[no]cmd\fR option) can be
|
||||
overridden by a query-specific set of query options. For example:
|
||||
.sp
|
||||
.nf
|
||||
|
||||
+3
-26
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dig.c,v 1.157.2.2 2001/09/18 01:04:05 gson Exp $ */
|
||||
/* $Id: dig.c,v 1.157.2.3 2001/11/15 01:24:10 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
@@ -856,32 +856,9 @@ plus_option(char *option, isc_boolean_t is_batchfile,
|
||||
}
|
||||
break;
|
||||
case 'v':
|
||||
#ifdef DNS_OPT_NEWCODES_LIVE
|
||||
switch (cmd[1]) {
|
||||
default:
|
||||
case 'c': /* vc, and default */
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
if (!is_batchfile)
|
||||
lookup->tcp_mode = state;
|
||||
break;
|
||||
#ifdef DNS_OPT_NEWCODES_LIVE
|
||||
case 'i': /* view */
|
||||
if (value == NULL)
|
||||
goto need_value;
|
||||
if (!state)
|
||||
goto invalid_option;
|
||||
strncpy(lookup->viewname, value, MXNAME);
|
||||
break;
|
||||
}
|
||||
if (!is_batchfile)
|
||||
lookup->tcp_mode = state;
|
||||
break;
|
||||
case 'z': /* zone */
|
||||
if (value == NULL)
|
||||
goto need_value;
|
||||
if (!state)
|
||||
goto invalid_option;
|
||||
strncpy(lookup->zonename, value, MXNAME);
|
||||
break;
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
default:
|
||||
invalid_option:
|
||||
need_value:
|
||||
|
||||
+3
-2
@@ -16,7 +16,7 @@
|
||||
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
-->
|
||||
|
||||
<!-- $Id: dig.docbook,v 1.4 2001/07/12 16:29:11 bwelling Exp $ -->
|
||||
<!-- $Id: dig.docbook,v 1.4.2.1 2001/11/08 00:15:23 gson Exp $ -->
|
||||
|
||||
<refentry>
|
||||
|
||||
@@ -480,7 +480,8 @@ should be applied to that query.
|
||||
A global set of query options, which should be applied to all queries,
|
||||
can also be supplied. These global query options must precede the
|
||||
first tuple of name, class, type, options, flags, and query options
|
||||
supplied on the command line. Any global query options can be
|
||||
supplied on the command line. Any global query options (except
|
||||
the <option>+[no]cmd</option> option) can be
|
||||
overridden by a query-specific set of query options. For example:
|
||||
<programlisting>
|
||||
dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
|
||||
|
||||
+8
-4
@@ -997,7 +997,11 @@ should be applied to that query.</P
|
||||
>A global set of query options, which should be applied to all queries,
|
||||
can also be supplied. These global query options must precede the
|
||||
first tuple of name, class, type, options, flags, and query options
|
||||
supplied on the command line. Any global query options can be
|
||||
supplied on the command line. Any global query options (except
|
||||
the <TT
|
||||
CLASS="OPTION"
|
||||
>+[no]cmd</TT
|
||||
> option) can be
|
||||
overridden by a query-specific set of query options. For example:
|
||||
<PRE
|
||||
CLASS="PROGRAMLISTING"
|
||||
@@ -1046,7 +1050,7 @@ CLASS="LITERAL"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN337"
|
||||
NAME="AEN338"
|
||||
></A
|
||||
><H2
|
||||
>FILES</H2
|
||||
@@ -1059,7 +1063,7 @@ CLASS="FILENAME"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN341"
|
||||
NAME="AEN342"
|
||||
></A
|
||||
><H2
|
||||
>SEE ALSO</H2
|
||||
@@ -1093,7 +1097,7 @@ CLASS="CITETITLE"
|
||||
><DIV
|
||||
CLASS="REFSECT1"
|
||||
><A
|
||||
NAME="AEN354"
|
||||
NAME="AEN355"
|
||||
></A
|
||||
><H2
|
||||
>BUGS </H2
|
||||
|
||||
+10
-94
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dighost.c,v 1.221.2.2 2001/09/27 23:30:46 gson Exp $ */
|
||||
/* $Id: dighost.c,v 1.221.2.7 2001/11/15 01:24:12 marka Exp $ */
|
||||
|
||||
/*
|
||||
* Notice to programmers: Do not use this code as an example of how to
|
||||
@@ -36,9 +36,6 @@
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/message.h>
|
||||
#include <dns/name.h>
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
#include <dns/opt.h>
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/rdatalist.h>
|
||||
@@ -376,6 +373,7 @@ make_empty_lookup(void) {
|
||||
looknew->cdflag = ISC_FALSE;
|
||||
looknew->ns_search_only = ISC_FALSE;
|
||||
looknew->origin = NULL;
|
||||
looknew->tsigctx = NULL;
|
||||
looknew->querysig = NULL;
|
||||
looknew->retries = tries;
|
||||
looknew->nsfound = 0;
|
||||
@@ -388,10 +386,6 @@ make_empty_lookup(void) {
|
||||
looknew->section_authority = ISC_TRUE;
|
||||
looknew->section_additional = ISC_TRUE;
|
||||
looknew->new_search = ISC_FALSE;
|
||||
#ifdef DNS_OPT_NEWCODES_LIVE
|
||||
looknew->zonename[0] = 0;
|
||||
looknew->viewname[0] = 0;
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
ISC_LINK_INIT(looknew, link);
|
||||
ISC_LIST_INIT(looknew->q);
|
||||
ISC_LIST_INIT(looknew->my_server_list);
|
||||
@@ -447,10 +441,7 @@ clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers) {
|
||||
looknew->section_authority = lookold->section_authority;
|
||||
looknew->section_additional = lookold->section_additional;
|
||||
looknew->retries = lookold->retries;
|
||||
#ifdef DNS_OPT_NEWCODES_LIVE
|
||||
strncpy(looknew->viewname, lookold->viewname, MXNAME);
|
||||
strncpy(looknew->zonename, lookold->zonename, MXNAME);
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
looknew->tsigctx = NULL;
|
||||
|
||||
if (servers)
|
||||
clone_server_list(lookold->my_server_list,
|
||||
@@ -594,7 +585,7 @@ setup_system(void) {
|
||||
|
||||
free_now = ISC_FALSE;
|
||||
get_servers = ISC_TF(server_list.head == NULL);
|
||||
fp = fopen(RESOLVCONF, "r");
|
||||
fp = fopen(RESOLV_CONF, "r");
|
||||
/* XXX Use lwres resolv.conf reader */
|
||||
if (fp == NULL)
|
||||
goto no_file;
|
||||
@@ -753,20 +744,11 @@ setup_libs(void) {
|
||||
* options are UDP buffer size and the DO bit.
|
||||
*/
|
||||
static void
|
||||
add_opt(dns_message_t *msg, isc_uint16_t udpsize, isc_boolean_t dnssec
|
||||
#ifdef DNS_OPT_NEWCODES_LIVE
|
||||
, dns_optlist_t optlist
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
)
|
||||
{
|
||||
add_opt(dns_message_t *msg, isc_uint16_t udpsize, isc_boolean_t dnssec) {
|
||||
dns_rdataset_t *rdataset = NULL;
|
||||
dns_rdatalist_t *rdatalist = NULL;
|
||||
dns_rdata_t *rdata = NULL;
|
||||
isc_result_t result;
|
||||
#ifdef DNS_OPT_NEWCODES_LIVE
|
||||
isc_buffer_t *rdatabuf = NULL;
|
||||
unsigned int i, optsize = 0;
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
|
||||
debug("add_opt()");
|
||||
result = dns_message_gettemprdataset(msg, &rdataset);
|
||||
@@ -786,15 +768,6 @@ add_opt(dns_message_t *msg, isc_uint16_t udpsize, isc_boolean_t dnssec
|
||||
rdatalist->ttl = DNS_MESSAGEEXTFLAG_DO;
|
||||
rdata->data = NULL;
|
||||
rdata->length = 0;
|
||||
#ifdef DNS_OPT_NEWCODES_LIVE
|
||||
for (i = 0; i < optlist.used; i++)
|
||||
optsize += optlist.attrs[i].value.length + 4;
|
||||
result = isc_buffer_allocate(mctx, &rdatabuf, optsize);
|
||||
check_result(result, "isc_buffer_allocate");
|
||||
result = dns_opt_add(rdata, &optlist, rdatabuf);
|
||||
check_result(result, "dns_opt_add");
|
||||
dns_message_takebuffer(msg, &rdatabuf);
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
ISC_LIST_INIT(rdatalist->rdata);
|
||||
ISC_LIST_APPEND(rdatalist->rdata, rdata, link);
|
||||
dns_rdatalist_tordataset(rdatalist, rdataset);
|
||||
@@ -1052,9 +1025,9 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section)
|
||||
if (!success) {
|
||||
success = ISC_TRUE;
|
||||
lookup_counter++;
|
||||
cancel_lookup(query->lookup);
|
||||
lookup = requeue_lookup(query->lookup,
|
||||
ISC_FALSE);
|
||||
cancel_lookup(query->lookup);
|
||||
lookup->doing_xfr = ISC_FALSE;
|
||||
if (!lookup->trace_root &&
|
||||
section == DNS_SECTION_ANSWER)
|
||||
@@ -1108,9 +1081,9 @@ next_origin(dns_message_t *msg, dig_query_t *query) {
|
||||
* Then we just did rootorg; there's nothing left.
|
||||
*/
|
||||
return (ISC_FALSE);
|
||||
cancel_lookup(query->lookup);
|
||||
lookup = requeue_lookup(query->lookup, ISC_TRUE);
|
||||
lookup->origin = ISC_LIST_NEXT(query->lookup->origin, link);
|
||||
cancel_lookup(query->lookup);
|
||||
return (ISC_TRUE);
|
||||
}
|
||||
|
||||
@@ -1381,67 +1354,10 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
result = dns_message_renderbegin(lookup->sendmsg, &cctx,
|
||||
&lookup->sendbuf);
|
||||
check_result(result, "dns_message_renderbegin");
|
||||
#ifndef DNS_OPT_NEWCODES_LIVE
|
||||
if (lookup->udpsize > 0 || lookup->dnssec) {
|
||||
#else /* DNS_OPT_NEWCODES_LIVE */
|
||||
if (lookup->udpsize > 0 || || lookup->dnssec ||
|
||||
lookup->zonename[0] != 0 || lookup->viewname[0] != 0) {
|
||||
dns_fixedname_t fname;
|
||||
isc_buffer_t namebuf, *wirebuf = NULL;
|
||||
dns_compress_t zcctx;
|
||||
dns_optlist_t optlist;
|
||||
dns_optattr_t optattr[2];
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
|
||||
if (lookup->udpsize == 0)
|
||||
lookup->udpsize = 2048;
|
||||
|
||||
#ifdef DNS_OPT_NEWCODES_LIVE
|
||||
optlist.size = 2;
|
||||
optlist.used = 0;
|
||||
optlist.next = 0;
|
||||
optlist.attrs = optattr;
|
||||
|
||||
if (lookup->zonename[0] != 0) {
|
||||
optattr[optlist.used].code = DNS_OPTCODE_ZONE;
|
||||
dns_fixedname_init(&fname);
|
||||
isc_buffer_init(&namebuf, lookup->zonename,
|
||||
strlen(lookup->zonename));
|
||||
isc_buffer_add(&namebuf, strlen(lookup->zonename));
|
||||
result = dns_name_fromtext(&(fname.name), &namebuf,
|
||||
dns_rootname, ISC_FALSE,
|
||||
NULL);
|
||||
check_result(result, "; illegal zone option");
|
||||
result = dns_compress_init(&zcctx, 0, mctx);
|
||||
check_result(result, "dns_compress_init");
|
||||
result = isc_buffer_allocate(mctx, &wirebuf,
|
||||
MXNAME);
|
||||
check_result(result, "isc_buffer_allocate");
|
||||
result = dns_name_towire(&(fname.name), &zcctx,
|
||||
wirebuf);
|
||||
check_result(result, "dns_name_towire");
|
||||
optattr[optlist.used].value.base =
|
||||
isc_buffer_base(wirebuf);
|
||||
optattr[optlist.used].value.length =
|
||||
isc_buffer_usedlength(wirebuf);
|
||||
optlist.used++;
|
||||
dns_compress_invalidate(&zcctx);
|
||||
}
|
||||
if (lookup->viewname[0] != 0) {
|
||||
optattr[optlist.used].code = DNS_OPTCODE_VIEW;
|
||||
optattr[optlist.used].value.base =
|
||||
lookup->viewname;
|
||||
optattr[optlist.used].value.length =
|
||||
strlen(lookup->viewname);
|
||||
optlist.used++;
|
||||
}
|
||||
add_opt(lookup->sendmsg, lookup->udpsize, lookup->dnssec,
|
||||
optlist);
|
||||
if (wirebuf != NULL)
|
||||
isc_buffer_free(&wirebuf);
|
||||
#else /* DNS_OPT_NEWCODES_LIVE */
|
||||
add_opt(lookup->sendmsg, lookup->udpsize, lookup->dnssec);
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
}
|
||||
|
||||
result = dns_message_rendersection(lookup->sendmsg,
|
||||
@@ -1783,9 +1699,9 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
|
||||
} else {
|
||||
debug("making new TCP request, %d tries left",
|
||||
l->retries);
|
||||
cancel_lookup(l);
|
||||
l->retries--;
|
||||
requeue_lookup(l, ISC_TRUE);
|
||||
cancel_lookup(l);
|
||||
}
|
||||
} else {
|
||||
fputs(l->cmdline, stdout);
|
||||
@@ -2352,9 +2268,9 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
|
||||
if (timeout == 0) {
|
||||
if (l->tcp_mode)
|
||||
local_timeout = TCP_TIMEOUT;
|
||||
local_timeout = TCP_TIMEOUT * 4;
|
||||
else
|
||||
local_timeout = UDP_TIMEOUT;
|
||||
local_timeout = UDP_TIMEOUT * 4;
|
||||
} else {
|
||||
if (timeout < (INT_MAX / 4))
|
||||
local_timeout = timeout * 4;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dig.h,v 1.71 2001/08/08 22:54:15 gson Exp $ */
|
||||
/* $Id: dig.h,v 1.71.2.3 2001/11/15 01:24:13 marka Exp $ */
|
||||
|
||||
#ifndef DIG_H
|
||||
#define DIG_H
|
||||
@@ -40,7 +40,9 @@
|
||||
#define MXRD 32
|
||||
#define BUFSIZE 512
|
||||
#define COMMSIZE 0xffff
|
||||
#define RESOLVCONF "/etc/resolv.conf"
|
||||
#ifndef RESOLV_CONF
|
||||
#define RESOLV_CONF "/etc/resolv.conf"
|
||||
#endif
|
||||
#define OUTPUTBUF 32767
|
||||
#define MAXRRLIMIT 0xffffffff
|
||||
#define MAXTIMEOUT 0xffff
|
||||
@@ -138,10 +140,6 @@ struct dig_lookup {
|
||||
isc_uint32_t ixfr_serial;
|
||||
isc_buffer_t rdatabuf;
|
||||
char rdatastore[MXNAME];
|
||||
#ifdef DNS_OPT_NEWCODES_LIVE
|
||||
char zonename[MXNAME];
|
||||
char viewname[MXNAME];
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
dst_context_t *tsigctx;
|
||||
isc_buffer_t *querysig;
|
||||
isc_uint32_t msgcounter;
|
||||
@@ -191,7 +189,7 @@ void
|
||||
get_address(char *host, in_port_t port, isc_sockaddr_t *sockaddr);
|
||||
|
||||
isc_result_t
|
||||
get_reverse(char reverse[MXNAME], char *value, isc_boolean_t nibble);
|
||||
get_reverse(char *reverse, char *value, isc_boolean_t nibble);
|
||||
|
||||
void
|
||||
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-keygen.c,v 1.48 2001/07/10 18:53:09 bwelling Exp $ */
|
||||
/* $Id: dnssec-keygen.c,v 1.48.2.1 2001/10/05 00:21:44 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
#include <dns/secalg.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
#include <dst/result.h>
|
||||
|
||||
#include "dnssectool.h"
|
||||
|
||||
@@ -342,7 +341,7 @@ main(int argc, char **argv) {
|
||||
dns_name_format(name, namestr, sizeof namestr);
|
||||
alg_format(alg, algstr, sizeof algstr);
|
||||
fatal("failed to generate key %s/%s: %s\n",
|
||||
namestr, algstr, dst_result_totext(ret));
|
||||
namestr, algstr, isc_result_totext(ret));
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-makekeyset.c,v 1.52 2001/05/10 06:04:56 bwelling Exp $ */
|
||||
/* $Id: dnssec-makekeyset.c,v 1.52.2.1 2001/10/05 00:21:45 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -214,7 +214,8 @@ main(int argc, char *argv[]) {
|
||||
eflags |= ISC_ENTROPY_GOODONLY;
|
||||
result = dst_lib_init(mctx, ectx, eflags);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not initialize dst");
|
||||
fatal("could not initialize dst: %s",
|
||||
isc_result_totext(result));
|
||||
|
||||
isc_stdtime_get(&now);
|
||||
|
||||
@@ -252,7 +253,8 @@ main(int argc, char *argv[]) {
|
||||
result = dst_key_fromnamedfile(argv[i], DST_TYPE_PUBLIC,
|
||||
mctx, &key);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("error loading key from %s", argv[i]);
|
||||
fatal("error loading key from %s: %s", argv[i],
|
||||
isc_result_totext(result));
|
||||
if (rdatalist.rdclass == 0)
|
||||
rdatalist.rdclass = dst_key_class(key);
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-signkey.c,v 1.50 2001/05/10 06:04:57 bwelling Exp $ */
|
||||
/* $Id: dnssec-signkey.c,v 1.50.2.1 2001/10/05 00:21:46 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -247,7 +247,8 @@ main(int argc, char *argv[]) {
|
||||
eflags |= ISC_ENTROPY_GOODONLY;
|
||||
result = dst_lib_init(mctx, ectx, eflags);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not initialize dst");
|
||||
fatal("could not initialize dst: %s",
|
||||
isc_result_totext(result));
|
||||
|
||||
isc_stdtime_get(&now);
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-signzone.c,v 1.139 2001/07/22 06:09:41 mayer Exp $ */
|
||||
/* $Id: dnssec-signzone.c,v 1.139.2.1 2001/10/05 00:21:48 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -491,7 +491,8 @@ hasnullkey(dns_rdataset_t *rdataset) {
|
||||
result = dns_dnssec_keyfromrdata(dns_rootname,
|
||||
&rdata, mctx, &key);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not convert KEY into internal format");
|
||||
fatal("could not convert KEY into internal format: %s",
|
||||
isc_result_totext(result));
|
||||
if (dst_key_isnullkey(key))
|
||||
found = ISC_TRUE;
|
||||
dst_key_free(&key);
|
||||
@@ -1684,7 +1685,8 @@ main(int argc, char *argv[]) {
|
||||
DST_TYPE_PRIVATE,
|
||||
mctx, &newkey);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("cannot load key %s", argv[i]);
|
||||
fatal("cannot load key %s: %s", argv[i],
|
||||
isc_result_totext(result));
|
||||
|
||||
key = ISC_LIST_HEAD(keylist);
|
||||
while (key != NULL) {
|
||||
|
||||
+154
-306
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: client.c,v 1.176.2.1 2001/09/19 02:44:00 marka Exp $ */
|
||||
/* $Id: client.c,v 1.176.2.8 2001/11/16 21:21:42 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -33,9 +33,6 @@
|
||||
#include <dns/dispatch.h>
|
||||
#include <dns/events.h>
|
||||
#include <dns/message.h>
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
#include <dns/opt.h>
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/rdatalist.h>
|
||||
@@ -176,113 +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);
|
||||
|
||||
/*
|
||||
* Enter the inactive state.
|
||||
*
|
||||
* Requires:
|
||||
* No requests are outstanding.
|
||||
*/
|
||||
static void
|
||||
client_deactivate(ns_client_t *client) {
|
||||
REQUIRE(NS_CLIENT_VALID(client));
|
||||
|
||||
if (client->interface)
|
||||
ns_interface_detach(&client->interface);
|
||||
|
||||
INSIST(client->naccepts == 0);
|
||||
INSIST(client->recursionquota == NULL);
|
||||
if (client->tcplistener != NULL)
|
||||
isc_socket_detach(&client->tcplistener);
|
||||
|
||||
if (client->udpsocket != NULL)
|
||||
isc_socket_detach(&client->udpsocket);
|
||||
|
||||
if (client->dispatch != NULL)
|
||||
dns_dispatch_detach(&client->dispatch);
|
||||
|
||||
client->attributes = 0;
|
||||
client->mortal = ISC_FALSE;
|
||||
|
||||
LOCK(&client->manager->lock);
|
||||
ISC_LIST_UNLINK(client->manager->active, client, link);
|
||||
ISC_LIST_APPEND(client->manager->inactive, client, link);
|
||||
client->list = &client->manager->inactive;
|
||||
UNLOCK(&client->manager->lock);
|
||||
}
|
||||
|
||||
/*
|
||||
* Clean up a client object and free its memory.
|
||||
* Requires:
|
||||
* The client is in the inactive state.
|
||||
*/
|
||||
|
||||
static void
|
||||
client_free(ns_client_t *client) {
|
||||
isc_boolean_t need_clientmgr_destroy = ISC_FALSE;
|
||||
ns_clientmgr_t *manager = NULL;
|
||||
|
||||
REQUIRE(NS_CLIENT_VALID(client));
|
||||
|
||||
/*
|
||||
* When "shuttingdown" is true, either the task has received
|
||||
* its shutdown event or no shutdown event has ever been
|
||||
* set up. Thus, we have no outstanding shutdown
|
||||
* event at this point.
|
||||
*/
|
||||
REQUIRE(client->state == NS_CLIENTSTATE_INACTIVE);
|
||||
|
||||
INSIST(client->recursionquota == NULL);
|
||||
|
||||
ns_query_free(client);
|
||||
isc_mem_put(client->mctx, client->recvbuf, RECV_BUFFER_SIZE);
|
||||
isc_event_free((isc_event_t **)&client->sendevent);
|
||||
isc_event_free((isc_event_t **)&client->recvevent);
|
||||
isc_timer_detach(&client->timer);
|
||||
|
||||
if (client->tcpbuf != NULL)
|
||||
isc_mem_put(client->mctx, client->tcpbuf, TCP_BUFFER_SIZE);
|
||||
if (client->opt != NULL) {
|
||||
INSIST(dns_rdataset_isassociated(client->opt));
|
||||
dns_rdataset_disassociate(client->opt);
|
||||
dns_message_puttemprdataset(client->message, &client->opt);
|
||||
}
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
if (client->opt_zone != NULL) {
|
||||
isc_mem_put(client->mctx, client->opt_zone,
|
||||
sizeof(*client->opt_zone));
|
||||
client->opt_zone = NULL;
|
||||
}
|
||||
if (client->opt_view != NULL)
|
||||
isc_buffer_free(&client->opt_view);
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
dns_message_destroy(&client->message);
|
||||
if (client->manager != NULL) {
|
||||
manager = client->manager;
|
||||
LOCK(&manager->lock);
|
||||
ISC_LIST_UNLINK(*client->list, client, link);
|
||||
client->list = NULL;
|
||||
if (manager->exiting &&
|
||||
ISC_LIST_EMPTY(manager->active) &&
|
||||
ISC_LIST_EMPTY(manager->inactive))
|
||||
need_clientmgr_destroy = ISC_TRUE;
|
||||
UNLOCK(&manager->lock);
|
||||
}
|
||||
/*
|
||||
* Detaching the task must be done after unlinking from
|
||||
* the manager's lists because the manager accesses
|
||||
* client->task.
|
||||
*/
|
||||
if (client->task != NULL)
|
||||
isc_task_detach(&client->task);
|
||||
|
||||
CTRACE("free");
|
||||
client->magic = 0;
|
||||
isc_mem_put(client->mctx, client, sizeof *client);
|
||||
|
||||
if (need_clientmgr_destroy)
|
||||
clientmgr_destroy(manager);
|
||||
}
|
||||
|
||||
void
|
||||
ns_client_settimeout(ns_client_t *client, unsigned int seconds) {
|
||||
isc_result_t result;
|
||||
@@ -309,6 +199,9 @@ ns_client_settimeout(ns_client_t *client, unsigned int seconds) {
|
||||
*/
|
||||
static isc_boolean_t
|
||||
exit_check(ns_client_t *client) {
|
||||
ns_clientmgr_t *locked_manager = NULL;
|
||||
ns_clientmgr_t *destroy_manager = NULL;
|
||||
|
||||
REQUIRE(NS_CLIENT_VALID(client));
|
||||
|
||||
if (client->state <= client->newstate)
|
||||
@@ -448,12 +341,47 @@ exit_check(ns_client_t *client) {
|
||||
}
|
||||
/* Recv cancel is complete. */
|
||||
|
||||
client_deactivate(client);
|
||||
if (client->nctls > 0) {
|
||||
/* Still waiting for control event to be delivered */
|
||||
return (ISC_TRUE);
|
||||
}
|
||||
|
||||
/* Deactivate the client. */
|
||||
if (client->interface)
|
||||
ns_interface_detach(&client->interface);
|
||||
|
||||
INSIST(client->naccepts == 0);
|
||||
INSIST(client->recursionquota == NULL);
|
||||
if (client->tcplistener != NULL)
|
||||
isc_socket_detach(&client->tcplistener);
|
||||
|
||||
if (client->udpsocket != NULL)
|
||||
isc_socket_detach(&client->udpsocket);
|
||||
|
||||
if (client->dispatch != NULL)
|
||||
dns_dispatch_detach(&client->dispatch);
|
||||
|
||||
client->attributes = 0;
|
||||
client->mortal = ISC_FALSE;
|
||||
|
||||
LOCK(&client->manager->lock);
|
||||
/*
|
||||
* Put the client on the inactive list. If we are aiming for
|
||||
* the "freed" state, it will be removed from the inactive
|
||||
* list shortly, and we need to keep the manager locked until
|
||||
* that has been done, lest the manager decide to reactivate
|
||||
* the dying client inbetween.
|
||||
*/
|
||||
locked_manager = client->manager;
|
||||
ISC_LIST_UNLINK(*client->list, client, link);
|
||||
ISC_LIST_APPEND(client->manager->inactive, client, link);
|
||||
client->list = &client->manager->inactive;
|
||||
client->state = NS_CLIENTSTATE_INACTIVE;
|
||||
INSIST(client->recursionquota == NULL);
|
||||
|
||||
if (client->state == client->newstate) {
|
||||
client->newstate = NS_CLIENTSTATE_MAX;
|
||||
return (ISC_TRUE); /* We're done. */
|
||||
goto unlock;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -461,11 +389,71 @@ exit_check(ns_client_t *client) {
|
||||
INSIST(client->newstate == NS_CLIENTSTATE_FREED);
|
||||
/*
|
||||
* We are trying to free the client.
|
||||
*
|
||||
* When "shuttingdown" is true, either the task has received
|
||||
* its shutdown event or no shutdown event has ever been
|
||||
* set up. Thus, we have no outstanding shutdown
|
||||
* event at this point.
|
||||
*/
|
||||
client_free(client);
|
||||
return (ISC_TRUE);
|
||||
REQUIRE(client->state == NS_CLIENTSTATE_INACTIVE);
|
||||
|
||||
INSIST(client->recursionquota == NULL);
|
||||
|
||||
ns_query_free(client);
|
||||
isc_mem_put(client->mctx, client->recvbuf, RECV_BUFFER_SIZE);
|
||||
isc_event_free((isc_event_t **)&client->sendevent);
|
||||
isc_event_free((isc_event_t **)&client->recvevent);
|
||||
isc_timer_detach(&client->timer);
|
||||
|
||||
if (client->tcpbuf != NULL)
|
||||
isc_mem_put(client->mctx, client->tcpbuf, TCP_BUFFER_SIZE);
|
||||
if (client->opt != NULL) {
|
||||
INSIST(dns_rdataset_isassociated(client->opt));
|
||||
dns_rdataset_disassociate(client->opt);
|
||||
dns_message_puttemprdataset(client->message, &client->opt);
|
||||
}
|
||||
dns_message_destroy(&client->message);
|
||||
if (client->manager != NULL) {
|
||||
ns_clientmgr_t *manager = client->manager;
|
||||
if (locked_manager == NULL) {
|
||||
LOCK(&manager->lock);
|
||||
locked_manager = manager;
|
||||
}
|
||||
ISC_LIST_UNLINK(*client->list, client, link);
|
||||
client->list = NULL;
|
||||
if (manager->exiting &&
|
||||
ISC_LIST_EMPTY(manager->active) &&
|
||||
ISC_LIST_EMPTY(manager->inactive))
|
||||
destroy_manager = manager;
|
||||
}
|
||||
/*
|
||||
* Detaching the task must be done after unlinking from
|
||||
* the manager's lists because the manager accesses
|
||||
* client->task.
|
||||
*/
|
||||
if (client->task != NULL)
|
||||
isc_task_detach(&client->task);
|
||||
|
||||
CTRACE("free");
|
||||
client->magic = 0;
|
||||
isc_mem_put(client->mctx, client, sizeof(*client));
|
||||
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
unlock:
|
||||
if (locked_manager != NULL) {
|
||||
UNLOCK(&locked_manager->lock);
|
||||
locked_manager = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Only now is it safe to destroy the client manager (if needed),
|
||||
* because we have accessed its lock for the last time.
|
||||
*/
|
||||
if (destroy_manager != NULL)
|
||||
clientmgr_destroy(destroy_manager);
|
||||
|
||||
return (ISC_TRUE);
|
||||
}
|
||||
|
||||
@@ -481,6 +469,12 @@ client_start(isc_task_t *task, isc_event_t *event) {
|
||||
|
||||
UNUSED(task);
|
||||
|
||||
INSIST(client->nctls == 1);
|
||||
client->nctls--;
|
||||
|
||||
if (exit_check(client))
|
||||
return;
|
||||
|
||||
if (TCP_CLIENT(client)) {
|
||||
client_accept(client);
|
||||
} else {
|
||||
@@ -986,75 +980,6 @@ ns_client_error(ns_client_t *client, isc_result_t result) {
|
||||
ns_client_send(client);
|
||||
}
|
||||
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
static isc_result_t
|
||||
client_addoptattrs(ns_client_t *client, dns_rdata_t *rdata) {
|
||||
isc_result_t result;
|
||||
isc_buffer_t *zonebuf = NULL, *buf = NULL;
|
||||
dns_optlist_t attrlist;
|
||||
dns_optattr_t attrs[CLIENT_NUMATTRS];
|
||||
dns_compress_t cctx;
|
||||
int i, sizeneeded = 0;
|
||||
|
||||
result = dns_compress_init(&cctx, 0, client->mctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto fail1;
|
||||
dns_compress_setmethods(&cctx, DNS_COMPRESS_NONE);
|
||||
attrlist.size=2;
|
||||
attrlist.used=0;
|
||||
attrlist.attrs=attrs;
|
||||
for (i=0; i<CLIENT_NUMATTRS; i++) {
|
||||
attrs[i].code = 0;
|
||||
attrs[i].value.base = NULL;
|
||||
attrs[i].value.length = 0;
|
||||
}
|
||||
if (client->opt_zone != NULL) {
|
||||
result = isc_buffer_allocate(client->mctx, &zonebuf,
|
||||
DNS_NAME_MAXWIRE);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto fail2;
|
||||
result = dns_name_towire(dns_fixedname_name(client->opt_zone),
|
||||
&cctx, zonebuf);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto fail2;
|
||||
attrs[attrlist.used].code = DNS_OPTCODE_ZONE;
|
||||
attrs[attrlist.used].value.base = isc_buffer_base(zonebuf);
|
||||
attrs[attrlist.used].value.length =
|
||||
isc_buffer_usedlength(zonebuf);
|
||||
attrlist.used++;
|
||||
sizeneeded += 4 + isc_buffer_usedlength(zonebuf);
|
||||
}
|
||||
if (client->opt_view != NULL) {
|
||||
attrs[attrlist.used].code = DNS_OPTCODE_VIEW;
|
||||
attrs[attrlist.used].value.base =
|
||||
isc_buffer_base(client->opt_view);
|
||||
attrs[attrlist.used].value.length =
|
||||
isc_buffer_usedlength(client->opt_view);
|
||||
attrlist.used++;
|
||||
sizeneeded += 4 + isc_buffer_usedlength(client->opt_view);
|
||||
}
|
||||
if (sizeneeded == 0) {
|
||||
result = ISC_R_SUCCESS;
|
||||
goto fail2;
|
||||
}
|
||||
result = isc_buffer_allocate(client->mctx, &buf, sizeneeded+1);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto fail2;
|
||||
result = dns_opt_add(rdata, &attrlist, buf);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto fail2;
|
||||
dns_message_takebuffer(client->message, &buf);
|
||||
fail2:
|
||||
dns_compress_invalidate(&cctx);
|
||||
fail1:
|
||||
if (buf != NULL)
|
||||
isc_buffer_free(&buf);
|
||||
if (zonebuf != NULL)
|
||||
isc_buffer_free(&zonebuf);
|
||||
return (result);
|
||||
}
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
|
||||
static inline isc_result_t
|
||||
client_addopt(ns_client_t *client) {
|
||||
dns_rdataset_t *rdataset;
|
||||
@@ -1100,13 +1025,6 @@ client_addopt(ns_client_t *client) {
|
||||
rdata->type = rdatalist->type;
|
||||
rdata->flags = 0;
|
||||
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
/*
|
||||
* Set the attributes
|
||||
*/
|
||||
client_addoptattrs(client, rdata);
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
|
||||
ISC_LIST_INIT(rdatalist->rdata);
|
||||
ISC_LIST_APPEND(rdatalist->rdata, rdata, link);
|
||||
dns_rdatalist_tordataset(rdatalist, rdataset);
|
||||
@@ -1116,80 +1034,6 @@ client_addopt(ns_client_t *client) {
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
static void
|
||||
client_getoptattrs(ns_client_t *client, dns_rdataset_t *opt) {
|
||||
dns_optlist_t optlist;
|
||||
dns_optattr_t optattr;
|
||||
isc_result_t result, iresult;
|
||||
isc_buffer_t zonebuf;
|
||||
dns_decompress_t dctx;
|
||||
|
||||
/* If an old set of opts are still around, free them. */
|
||||
if (client->opt_zone != NULL) {
|
||||
isc_mem_put(client->mctx, client->opt_zone,
|
||||
sizeof(*client->opt_zone));
|
||||
client->opt_zone = NULL;
|
||||
}
|
||||
if (client->opt_view != NULL)
|
||||
isc_buffer_free(&client->opt_view);
|
||||
|
||||
/*
|
||||
* If there are any options, extract them here
|
||||
*/
|
||||
optlist.size = 1;
|
||||
optlist.used = 0;
|
||||
optlist.next = 0;
|
||||
optlist.attrs = &optattr;
|
||||
do {
|
||||
result = dns_opt_decodeall(&optlist, opt);
|
||||
if (result == ISC_R_SUCCESS ||
|
||||
result == DNS_R_MOREDATA) {
|
||||
switch (optattr.code) {
|
||||
case DNS_OPTCODE_ZONE:
|
||||
dns_decompress_init(&dctx, 0,
|
||||
DNS_DECOMPRESS_NONE);
|
||||
client->opt_zone = isc_mem_get(
|
||||
client->mctx,
|
||||
sizeof(*client->opt_zone));
|
||||
if (client->opt_zone == NULL)
|
||||
goto zonefail1;
|
||||
dns_fixedname_init(client->opt_zone);
|
||||
isc_buffer_init(&zonebuf,
|
||||
optattr.value.base,
|
||||
optattr.value.length);
|
||||
isc_buffer_add(&zonebuf,optattr.value.length);
|
||||
isc_buffer_setactive(&zonebuf,
|
||||
optattr.value.length);
|
||||
iresult = dns_name_fromwire(
|
||||
dns_fixedname_name(
|
||||
client->opt_zone),
|
||||
&zonebuf,
|
||||
&dctx, ISC_FALSE,
|
||||
NULL);
|
||||
if (iresult != ISC_R_SUCCESS) {
|
||||
dns_fixedname_invalidate(
|
||||
client->opt_zone);
|
||||
zonefail1:
|
||||
dns_decompress_invalidate(&dctx);
|
||||
}
|
||||
break;
|
||||
case DNS_OPTCODE_VIEW:
|
||||
iresult = isc_buffer_allocate(client->mctx,
|
||||
&client->opt_view,
|
||||
optattr.value.length);
|
||||
if (iresult != ISC_R_SUCCESS)
|
||||
break;
|
||||
isc_buffer_putmem(client->opt_view,
|
||||
optattr.value.base,
|
||||
optattr.value.length);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while (result == DNS_R_MOREDATA);
|
||||
}
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
|
||||
static inline isc_boolean_t
|
||||
allowed(isc_netaddr_t *addr, dns_acl_t *acl) {
|
||||
int match;
|
||||
@@ -1220,9 +1064,11 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
dns_rdataset_t *opt;
|
||||
isc_boolean_t ra; /* Recursion available. */
|
||||
isc_netaddr_t netaddr;
|
||||
isc_netaddr_t destaddr;
|
||||
int match;
|
||||
dns_messageid_t id;
|
||||
unsigned int flags;
|
||||
isc_boolean_t notimp;
|
||||
|
||||
REQUIRE(event != NULL);
|
||||
client = event->ev_arg;
|
||||
@@ -1370,6 +1216,18 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
switch (client->message->opcode) {
|
||||
case dns_opcode_query:
|
||||
case dns_opcode_update:
|
||||
case dns_opcode_notify:
|
||||
notimp = ISC_FALSE;
|
||||
break;
|
||||
case dns_opcode_iquery:
|
||||
default:
|
||||
notimp = ISC_TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
client->message->rcode = dns_rcode_noerror;
|
||||
|
||||
/*
|
||||
@@ -1391,28 +1249,10 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
if (client->udpsize < 512)
|
||||
client->udpsize = 512;
|
||||
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
/*
|
||||
* Get the flags out of the OPT record.
|
||||
*/
|
||||
client->extflags = DNS_OPT_FLAGS(opt);
|
||||
|
||||
/*
|
||||
* Set up the rest of the opt stuff
|
||||
*/
|
||||
client_getoptattrs(client, opt);
|
||||
/*
|
||||
* If we're using a fixed zone option (opt_zone), set it to
|
||||
* allow glue here.
|
||||
*/
|
||||
if (client->opt_zone != NULL)
|
||||
client->query.dboptions |= DNS_DBFIND_GLUEOK;
|
||||
#else /* DNS_OPT_NEWCODES */
|
||||
/*
|
||||
* Get the flags out of the OPT record.
|
||||
*/
|
||||
client->extflags = (isc_uint16_t)(opt->ttl & 0xFFFF);
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
|
||||
/*
|
||||
* Create an OPT for our reply.
|
||||
@@ -1441,10 +1281,24 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
"message class could not be determined");
|
||||
ns_client_dumpmessage(client,
|
||||
"message class could not be determined");
|
||||
ns_client_error(client, DNS_R_FORMERR);
|
||||
ns_client_error(client, notimp ? DNS_R_NOTIMP : DNS_R_FORMERR);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/*
|
||||
* Determine the destination address. For IPv6, we get this from the
|
||||
* pktinfo structure (if supported). For IPv4, we have to make do with
|
||||
* the address of the interface where the request was received.
|
||||
*/
|
||||
if (client->interface->addr.type.sa.sa_family == AF_INET6) {
|
||||
if ((client->attributes & NS_CLIENTATTR_PKTINFO) != 0)
|
||||
isc_netaddr_fromin6(&destaddr, &client->pktinfo.ipi6_addr);
|
||||
else
|
||||
isc_netaddr_any6(&destaddr);
|
||||
} else {
|
||||
isc_netaddr_fromsockaddr(&destaddr, &client->interface->addr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Find a view that matches the client's source address.
|
||||
*/
|
||||
@@ -1454,10 +1308,6 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
if (client->message->rdclass == view->rdclass ||
|
||||
client->message->rdclass == dns_rdataclass_any)
|
||||
{
|
||||
isc_netaddr_t destaddr;
|
||||
|
||||
isc_netaddr_fromsockaddr(&destaddr,
|
||||
&client->interface->addr);
|
||||
if (allowed(&netaddr, view->matchclients) &&
|
||||
allowed(&destaddr, view->matchdestinations) &&
|
||||
!((flags & DNS_MESSAGEFLAG_RD) == 0 &&
|
||||
@@ -1490,7 +1340,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(1),
|
||||
"no matching view in class '%s'", classname);
|
||||
ns_client_dumpmessage(client, "no matching view in class");
|
||||
ns_client_error(client, DNS_R_REFUSED);
|
||||
ns_client_error(client, notimp ? DNS_R_NOTIMP : DNS_R_REFUSED);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@@ -1521,22 +1371,17 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
||||
ns_client_log(client, DNS_LOGCATEGORY_SECURITY,
|
||||
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3),
|
||||
"request is signed by a nonauthoritative key");
|
||||
/*
|
||||
* Accept update messages signed by unknown keys so that
|
||||
* update forwarding works transparently through slaves
|
||||
* that don't have all the same keys as the master.
|
||||
*/
|
||||
if (!(client->message->tsigstatus == dns_tsigerror_badkey &&
|
||||
client->message->opcode == dns_opcode_update)) {
|
||||
ns_client_error(client, sigresult);
|
||||
goto cleanup;
|
||||
}
|
||||
} else {
|
||||
/* 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",
|
||||
isc_result_totext(result));
|
||||
/*
|
||||
* Accept update messages signed by unknown keys so that
|
||||
* update forwarding works transparently through slaves
|
||||
* that don't have all the same keys as the master.
|
||||
*/
|
||||
if (!(client->message->tsigstatus == dns_tsigerror_badkey &&
|
||||
client->message->opcode == dns_opcode_update)) {
|
||||
ns_client_error(client, sigresult);
|
||||
@@ -1647,9 +1492,6 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_client;
|
||||
isc_task_setname(client->task, "client", client);
|
||||
result = isc_task_onshutdown(client->task, client_shutdown, client);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_task;
|
||||
|
||||
client->timer = NULL;
|
||||
result = isc_timer_create(manager->timermgr, isc_timertype_inactive,
|
||||
@@ -1702,6 +1544,7 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp)
|
||||
client->nreads = 0;
|
||||
client->nsends = 0;
|
||||
client->nrecvs = 0;
|
||||
client->nctls = 0;
|
||||
client->references = 0;
|
||||
client->attributes = 0;
|
||||
client->view = NULL;
|
||||
@@ -1714,10 +1557,6 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp)
|
||||
client->opt = NULL;
|
||||
client->udpsize = 512;
|
||||
client->extflags = 0;
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
client->opt_zone = NULL;
|
||||
client->opt_view = NULL;
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
client->next = NULL;
|
||||
client->shutdown = NULL;
|
||||
client->shutdown_arg = NULL;
|
||||
@@ -1749,12 +1588,19 @@ client_create(ns_clientmgr_t *manager, ns_client_t **clientp)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_recvevent;
|
||||
|
||||
result = isc_task_onshutdown(client->task, client_shutdown, client);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_query;
|
||||
|
||||
CTRACE("create");
|
||||
|
||||
*clientp = client;
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
cleanup_query:
|
||||
ns_query_free(client);
|
||||
|
||||
cleanup_recvevent:
|
||||
isc_event_free((isc_event_t **)&client->recvevent);
|
||||
|
||||
@@ -2169,6 +2015,8 @@ ns_clientmgr_createclients(ns_clientmgr_t *manager, unsigned int n,
|
||||
ISC_LIST_APPEND(manager->active, client, link);
|
||||
client->list = &manager->active;
|
||||
|
||||
INSIST(client->nctls == 0);
|
||||
client->nctls++;
|
||||
ev = &client->ctlevent;
|
||||
isc_task_send(client->task, &ev);
|
||||
}
|
||||
|
||||
+22
-19
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: controlconf.c,v 1.28.2.4 2001/09/21 03:31:17 marka Exp $ */
|
||||
/* $Id: controlconf.c,v 1.28.2.6 2001/10/31 23:00:44 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#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>
|
||||
@@ -178,11 +179,14 @@ maybe_free_connection(controlconnection_t *conn) {
|
||||
|
||||
static void
|
||||
shutdown_listener(controllistener_t *listener) {
|
||||
isc_boolean_t destroy = ISC_TRUE;
|
||||
controlconnection_t *conn;
|
||||
controlconnection_t *next;
|
||||
|
||||
if (!listener->exiting) {
|
||||
char socktext[ISC_SOCKADDR_FORMATSIZE];
|
||||
|
||||
ISC_LIST_UNLINK(listener->controls->listeners, listener, link);
|
||||
|
||||
isc_sockaddr_format(&listener->address, socktext,
|
||||
sizeof(socktext));
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
|
||||
@@ -191,23 +195,19 @@ shutdown_listener(controllistener_t *listener) {
|
||||
listener->exiting = ISC_TRUE;
|
||||
}
|
||||
|
||||
if (!ISC_LIST_EMPTY(listener->connections)) {
|
||||
controlconnection_t *conn;
|
||||
for (conn = ISC_LIST_HEAD(listener->connections);
|
||||
conn != NULL;
|
||||
conn = ISC_LIST_NEXT(conn, link))
|
||||
maybe_free_connection(conn);
|
||||
destroy = ISC_FALSE;
|
||||
for (conn = ISC_LIST_HEAD(listener->connections);
|
||||
conn != NULL;
|
||||
conn = next)
|
||||
{
|
||||
next = ISC_LIST_NEXT(conn, link);
|
||||
maybe_free_connection(conn);
|
||||
}
|
||||
|
||||
if (listener->sock != NULL) {
|
||||
if (listener->listening)
|
||||
isc_socket_cancel(listener->sock, listener->task,
|
||||
ISC_SOCKCANCEL_ACCEPT);
|
||||
destroy = ISC_FALSE;
|
||||
}
|
||||
|
||||
if (destroy)
|
||||
free_listener(listener);
|
||||
maybe_free_listener(listener);
|
||||
}
|
||||
|
||||
static isc_boolean_t
|
||||
@@ -520,10 +520,10 @@ control_newconn(isc_task_t *task, isc_event_t *event) {
|
||||
|
||||
UNUSED(task);
|
||||
|
||||
listener->listening = ISC_FALSE;
|
||||
|
||||
if (nevent->result != ISC_R_SUCCESS) {
|
||||
if (nevent->result == ISC_R_CANCELED) {
|
||||
isc_socket_detach(&listener->sock);
|
||||
listener->listening = ISC_FALSE;
|
||||
shutdown_listener(listener);
|
||||
goto cleanup;
|
||||
}
|
||||
@@ -573,7 +573,6 @@ controls_shutdown(ns_controls_t *controls) {
|
||||
* call their callbacks.
|
||||
*/
|
||||
next = ISC_LIST_NEXT(listener, link);
|
||||
ISC_LIST_UNLINK(controls->listeners, listener, link);
|
||||
shutdown_listener(listener);
|
||||
}
|
||||
}
|
||||
@@ -1170,13 +1169,17 @@ ns_controls_configure(ns_controls_t *cp, cfg_obj_t *config,
|
||||
isc_sockaddr_t addr;
|
||||
|
||||
if (i == 0) {
|
||||
struct in_addr localhost;
|
||||
|
||||
if (isc_net_probeipv4() != ISC_R_SUCCESS)
|
||||
continue;
|
||||
isc_sockaddr_any(&addr);
|
||||
localhost.s_addr = htonl(INADDR_LOOPBACK);
|
||||
isc_sockaddr_fromin(&addr, &localhost, 0);
|
||||
} else {
|
||||
if (isc_net_probeipv6() != ISC_R_SUCCESS)
|
||||
continue;
|
||||
isc_sockaddr_any6(&addr);
|
||||
isc_sockaddr_fromin6(&addr,
|
||||
&in6addr_loopback, 0);
|
||||
}
|
||||
isc_sockaddr_setport(&addr, NS_CONTROL_PORT);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: client.h,v 1.60 2001/08/28 03:57:59 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
|
||||
@@ -72,9 +72,6 @@
|
||||
#include <dns/types.h>
|
||||
#include <dns/tcpmsg.h>
|
||||
#include <dns/fixedname.h>
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
#include <dns/opt.h>
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
#include <named/types.h>
|
||||
#include <named/query.h>
|
||||
|
||||
@@ -94,6 +91,7 @@ struct ns_client {
|
||||
int nreads;
|
||||
int nsends;
|
||||
int nrecvs;
|
||||
int nctls;
|
||||
int references;
|
||||
unsigned int attributes;
|
||||
isc_task_t * task;
|
||||
@@ -114,10 +112,6 @@ struct ns_client {
|
||||
dns_rdataset_t * opt;
|
||||
isc_uint16_t udpsize;
|
||||
isc_uint16_t extflags;
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
dns_fixedname_t * opt_zone;
|
||||
isc_buffer_t * opt_view;
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
void (*next)(ns_client_t *);
|
||||
void (*shutdown)(void *arg, isc_result_t result);
|
||||
void *shutdown_arg;
|
||||
@@ -152,14 +146,6 @@ struct ns_client {
|
||||
client_list_t *list;
|
||||
};
|
||||
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
/*
|
||||
* Number of attr fields (opt_zone, opt_view) in above structure. Used in
|
||||
* client_addoptattrs()
|
||||
*/
|
||||
#define CLIENT_NUMATTRS 2
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
|
||||
#define NS_CLIENT_MAGIC ISC_MAGIC('N','S','C','c')
|
||||
#define NS_CLIENT_VALID(c) ISC_MAGIC_VALID(c, NS_CLIENT_MAGIC)
|
||||
|
||||
|
||||
+72
-60
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: interfacemgr.c,v 1.59 2001/06/15 23:18:04 gson Exp $ */
|
||||
/* $Id: interfacemgr.c,v 1.59.2.3 2001/10/22 17:42:05 gson Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -469,14 +469,14 @@ clearacl(isc_mem_t *mctx, dns_acl_t **aclp) {
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static void
|
||||
static isc_result_t
|
||||
do_ipv4(ns_interfacemgr_t *mgr) {
|
||||
isc_interfaceiter_t *iter = NULL;
|
||||
isc_result_t result;
|
||||
|
||||
result = isc_interfaceiter_create(mgr->mctx, &iter);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return;
|
||||
return (result);
|
||||
|
||||
result = clearacl(mgr->mctx, &mgr->aclenv.localhost);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
@@ -505,23 +505,32 @@ do_ipv4(ns_interfacemgr_t *mgr) {
|
||||
if ((interface.flags & INTERFACE_F_UP) == 0)
|
||||
continue;
|
||||
|
||||
result = isc_netaddr_masktoprefixlen(&interface.netmask,
|
||||
&prefixlen);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto ignore_interface;
|
||||
elt.type = dns_aclelementtype_ipprefix;
|
||||
elt.negative = ISC_FALSE;
|
||||
elt.u.ip_prefix.address = interface.address;
|
||||
elt.u.ip_prefix.prefixlen = prefixlen;
|
||||
/* XXX suppress duplicates */
|
||||
result = dns_acl_appendelement(mgr->aclenv.localnets, &elt);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto ignore_interface;
|
||||
elt.u.ip_prefix.prefixlen = 32;
|
||||
result = dns_acl_appendelement(mgr->aclenv.localhost, &elt);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto ignore_interface;
|
||||
|
||||
result = isc_netaddr_masktoprefixlen(&interface.netmask,
|
||||
&prefixlen);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(IFMGR_COMMON_LOGARGS,
|
||||
ISC_LOG_WARNING,
|
||||
"omitting IPv4 interface %s from "
|
||||
"localnets ACL: %s",
|
||||
interface.name,
|
||||
isc_result_totext(result));
|
||||
} else {
|
||||
elt.u.ip_prefix.prefixlen = prefixlen;
|
||||
/* XXX suppress duplicates */
|
||||
result = dns_acl_appendelement(mgr->aclenv.localnets,
|
||||
&elt);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto ignore_interface;
|
||||
}
|
||||
|
||||
for (le = ISC_LIST_HEAD(mgr->listenon4->elts);
|
||||
le != NULL;
|
||||
le = ISC_LIST_NEXT(le, link))
|
||||
@@ -590,18 +599,15 @@ do_ipv4(ns_interfacemgr_t *mgr) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"IPv4: interface iteration failed: %s",
|
||||
isc_result_totext(result));
|
||||
else
|
||||
result = ISC_R_SUCCESS;
|
||||
cleanup_iter:
|
||||
isc_interfaceiter_destroy(&iter);
|
||||
return (result);
|
||||
}
|
||||
|
||||
static isc_boolean_t
|
||||
listenon_is_ip6_none(ns_listenlist_t *p) {
|
||||
ns_listenelt_t *elt;
|
||||
if (ISC_LIST_EMPTY(p->elts))
|
||||
return (ISC_TRUE); /* No listen-on-v6 statements */
|
||||
elt = ISC_LIST_HEAD(p->elts);
|
||||
if (ISC_LIST_NEXT(elt, link) != NULL)
|
||||
return (ISC_FALSE); /* More than one listen-on-v6 stmt */
|
||||
listenon_is_ip6_none(ns_listenelt_t *elt) {
|
||||
if (elt->acl->length == 0)
|
||||
return (ISC_TRUE); /* listen-on-v6 { } */
|
||||
if (elt->acl->length > 1)
|
||||
@@ -613,69 +619,73 @@ listenon_is_ip6_none(ns_listenlist_t *p) {
|
||||
}
|
||||
|
||||
static isc_boolean_t
|
||||
listenon_is_ip6_any(ns_listenlist_t *p, in_port_t *portp) {
|
||||
ns_listenelt_t *elt;
|
||||
if (ISC_LIST_EMPTY(p->elts))
|
||||
return (ISC_FALSE); /* No listen-on-v6 statements */
|
||||
elt = ISC_LIST_HEAD(p->elts);
|
||||
if (ISC_LIST_NEXT(elt, link) != NULL)
|
||||
return (ISC_FALSE); /* More than one listen-on-v6 stmt */
|
||||
listenon_is_ip6_any(ns_listenelt_t *elt) {
|
||||
if (elt->acl->length != 1)
|
||||
return (ISC_FALSE);
|
||||
if (elt->acl->elements[0].negative == ISC_FALSE &&
|
||||
elt->acl->elements[0].type == dns_aclelementtype_any) {
|
||||
*portp = elt->port;
|
||||
elt->acl->elements[0].type == dns_aclelementtype_any)
|
||||
return (ISC_TRUE); /* listen-on-v6 { any; } */
|
||||
}
|
||||
return (ISC_FALSE); /* All others */
|
||||
}
|
||||
|
||||
static void
|
||||
static isc_result_t
|
||||
do_ipv6(ns_interfacemgr_t *mgr) {
|
||||
isc_result_t result;
|
||||
ns_interface_t *ifp;
|
||||
isc_sockaddr_t listen_addr;
|
||||
struct in6_addr in6a;
|
||||
in_port_t port;
|
||||
ns_listenelt_t *le;
|
||||
|
||||
if (listenon_is_ip6_none(mgr->listenon6))
|
||||
return;
|
||||
|
||||
if (! listenon_is_ip6_any(mgr->listenon6, &port)) {
|
||||
isc_log_write(IFMGR_COMMON_LOGARGS,
|
||||
ISC_LOG_ERROR,
|
||||
"bad IPv6 listen-on list: must be 'any' or 'none'");
|
||||
return;
|
||||
}
|
||||
|
||||
in6a = in6addr_any;
|
||||
isc_sockaddr_fromin6(&listen_addr, &in6a, port);
|
||||
|
||||
ifp = find_matching_interface(mgr, &listen_addr);
|
||||
if (ifp != NULL) {
|
||||
ifp->generation = mgr->generation;
|
||||
} else {
|
||||
isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_INFO,
|
||||
"listening on IPv6 interfaces, port %u", port);
|
||||
result = ns_interface_setup(mgr, &listen_addr, "<any>", &ifp);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
for (le = ISC_LIST_HEAD(mgr->listenon6->elts);
|
||||
le != NULL;
|
||||
le = ISC_LIST_NEXT(le, link))
|
||||
{
|
||||
if (listenon_is_ip6_none(le))
|
||||
continue;
|
||||
if (! listenon_is_ip6_any(le)) {
|
||||
isc_log_write(IFMGR_COMMON_LOGARGS,
|
||||
ISC_LOG_ERROR,
|
||||
"listening on IPv6 interfaces failed");
|
||||
/* Continue. */
|
||||
"bad IPv6 listen-on list: "
|
||||
"must be 'any' or 'none'");
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
in6a = in6addr_any;
|
||||
isc_sockaddr_fromin6(&listen_addr, &in6a, le->port);
|
||||
|
||||
ifp = find_matching_interface(mgr, &listen_addr);
|
||||
if (ifp != NULL) {
|
||||
ifp->generation = mgr->generation;
|
||||
} else {
|
||||
isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_INFO,
|
||||
"listening on IPv6 interfaces, port %u",
|
||||
le->port);
|
||||
result = ns_interface_setup(mgr, &listen_addr,
|
||||
"<any>", &ifp);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(IFMGR_COMMON_LOGARGS,
|
||||
ISC_LOG_ERROR,
|
||||
"listening on IPv6 interfaces "
|
||||
"failed");
|
||||
/* Continue. */
|
||||
}
|
||||
}
|
||||
}
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
void
|
||||
ns_interfacemgr_scan(ns_interfacemgr_t *mgr, isc_boolean_t verbose) {
|
||||
isc_boolean_t purge = ISC_TRUE;
|
||||
|
||||
REQUIRE(NS_INTERFACEMGR_VALID(mgr));
|
||||
|
||||
mgr->generation++; /* Increment the generation count. */
|
||||
|
||||
if (isc_net_probeipv6() == ISC_R_SUCCESS)
|
||||
do_ipv6(mgr);
|
||||
if (isc_net_probeipv6() == ISC_R_SUCCESS) {
|
||||
if (do_ipv6(mgr) != ISC_R_SUCCESS)
|
||||
purge = ISC_FALSE;
|
||||
}
|
||||
#ifdef WANT_IPV6
|
||||
else
|
||||
isc_log_write(IFMGR_COMMON_LOGARGS,
|
||||
@@ -683,9 +693,10 @@ ns_interfacemgr_scan(ns_interfacemgr_t *mgr, isc_boolean_t verbose) {
|
||||
"no IPv6 interfaces found");
|
||||
#endif
|
||||
|
||||
if (isc_net_probeipv4() == ISC_R_SUCCESS)
|
||||
do_ipv4(mgr);
|
||||
else
|
||||
if (isc_net_probeipv4() == ISC_R_SUCCESS) {
|
||||
if (do_ipv4(mgr) != ISC_R_SUCCESS)
|
||||
purge = ISC_FALSE;
|
||||
} else
|
||||
isc_log_write(IFMGR_COMMON_LOGARGS,
|
||||
verbose ? ISC_LOG_INFO : ISC_LOG_DEBUG(1),
|
||||
"no IPv4 interfaces found");
|
||||
@@ -696,7 +707,8 @@ ns_interfacemgr_scan(ns_interfacemgr_t *mgr, isc_boolean_t verbose) {
|
||||
* how we catch interfaces that go away or change their
|
||||
* addresses.
|
||||
*/
|
||||
purge_old_interfaces(mgr);
|
||||
if (purge)
|
||||
purge_old_interfaces(mgr);
|
||||
|
||||
/*
|
||||
* Warn if we are not listening on any interface, unless
|
||||
|
||||
+7
-5
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: log.c,v 1.33 2001/06/14 14:14:17 gson Exp $ */
|
||||
/* $Id: log.c,v 1.33.2.1 2001/10/31 22:44:15 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -168,10 +168,12 @@ isc_result_t
|
||||
ns_log_setdefaultcategory(isc_logconfig_t *lcfg) {
|
||||
isc_result_t result;
|
||||
|
||||
result = isc_log_usechannel(lcfg, "default_syslog",
|
||||
ISC_LOGCATEGORY_DEFAULT, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
if (! ns_g_logstderr) {
|
||||
result = isc_log_usechannel(lcfg, "default_syslog",
|
||||
ISC_LOGCATEGORY_DEFAULT, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
result = isc_log_usechannel(lcfg, "default_debug",
|
||||
ISC_LOGCATEGORY_DEFAULT, NULL);
|
||||
|
||||
+3
-3
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: logconf.c,v 1.30.2.2 2001/09/28 18:35:02 bwelling Exp $ */
|
||||
/* $Id: logconf.c,v 1.30.2.3 2001/10/11 02:03:20 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -74,7 +74,7 @@ category_fromconf(cfg_obj_t *ccat, isc_logconfig_t *lctx) {
|
||||
result = isc_log_usechannel(lctx, channelname, category,
|
||||
module);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(ns_g_lctx, DNS_LOGCATEGORY_CONFIG,
|
||||
isc_log_write(ns_g_lctx, CFG_LOGCATEGORY_CONFIG,
|
||||
NS_LOGMODULE_SERVER, ISC_LOG_ERROR,
|
||||
"logging channel '%s': %s", channelname,
|
||||
isc_result_totext(result));
|
||||
@@ -221,7 +221,7 @@ channel_fromconf(cfg_obj_t *channel, isc_logconfig_t *lctx) {
|
||||
*/
|
||||
result = isc_stdio_open(dest.file.name, "a", &fp);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
isc_log_write(ns_g_lctx, DNS_LOGCATEGORY_CONFIG,
|
||||
isc_log_write(ns_g_lctx, CFG_LOGCATEGORY_CONFIG,
|
||||
NS_LOGMODULE_SERVER, ISC_LOG_ERROR,
|
||||
"logging channel '%s' file '%s': %s",
|
||||
channelname, dest.file.name,
|
||||
|
||||
+1
-44
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: query.c,v 1.198 2001/08/27 17:20:09 gson Exp $ */
|
||||
/* $Id: query.c,v 1.198.2.1 2001/11/15 01:24:17 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -29,9 +29,6 @@
|
||||
#include <dns/db.h>
|
||||
#include <dns/events.h>
|
||||
#include <dns/message.h>
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
#include <dns/opt.h>
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/rdatalist.h>
|
||||
@@ -789,25 +786,6 @@ query_getdb(ns_client_t *client, dns_name_t *name, unsigned int options,
|
||||
{
|
||||
isc_result_t result;
|
||||
|
||||
#ifdef DNS_OPT_NEWCODES_LIVE
|
||||
if (client->opt_zone != NULL) {
|
||||
result = query_getzonedb(client, &(client->opt_zone->name),
|
||||
options, zonep, dbp, versionp);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
*is_zonep = ISC_TRUE;
|
||||
else
|
||||
result = DNS_R_REFUSED;
|
||||
} else {
|
||||
result = query_getzonedb(client, name, options, zonep, dbp,
|
||||
versionp);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
*is_zonep = ISC_TRUE;
|
||||
} else if (result == ISC_R_NOTFOUND) {
|
||||
result = query_getcachedb(client, dbp, options);
|
||||
*is_zonep = ISC_FALSE;
|
||||
}
|
||||
}
|
||||
#else /* DNS_OPT_NEWCODES_LIVE */
|
||||
result = query_getzonedb(client, name, options, zonep, dbp, versionp);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
*is_zonep = ISC_TRUE;
|
||||
@@ -815,7 +793,6 @@ query_getdb(ns_client_t *client, dns_name_t *name, unsigned int options,
|
||||
result = query_getcachedb(client, dbp, options);
|
||||
*is_zonep = ISC_FALSE;
|
||||
}
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
return (result);
|
||||
}
|
||||
|
||||
@@ -2569,11 +2546,6 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
|
||||
*/
|
||||
break;
|
||||
case DNS_R_GLUE:
|
||||
#ifdef DNS_OPT_NEWCODES_LIVE
|
||||
if (client->opt_zone != NULL)
|
||||
break;
|
||||
/* Fallthrough if we don't have opt_zone */
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
case DNS_R_ZONECUT:
|
||||
/*
|
||||
* These cases are handled in the main line below.
|
||||
@@ -2582,13 +2554,6 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
|
||||
authoritative = ISC_FALSE;
|
||||
break;
|
||||
case ISC_R_NOTFOUND:
|
||||
#ifdef DNS_OPT_NEWCODES_LIVE
|
||||
/*
|
||||
* If we've passed in opt_zone, don't try anything more.
|
||||
*/
|
||||
if (client->opt_zone != NULL)
|
||||
break;
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
/*
|
||||
* The cache doesn't even have the root NS. Get them from
|
||||
* the hints DB.
|
||||
@@ -2652,14 +2617,6 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
|
||||
*/
|
||||
/* FALLTHROUGH */
|
||||
case DNS_R_DELEGATION:
|
||||
#ifdef DNS_OPT_NEWCODES_LIVE
|
||||
/*
|
||||
* If we've passed in opt_zone, don't try anything more.
|
||||
*/
|
||||
if (client->opt_zone != NULL) {
|
||||
break;
|
||||
}
|
||||
#endif /* DNS_OPT_NEWCODES_LIVE */
|
||||
authoritative = ISC_FALSE;
|
||||
if (is_zone) {
|
||||
/*
|
||||
|
||||
+57
-26
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: os.c,v 1.46 2001/08/29 18:03:36 gson Exp $ */
|
||||
/* $Id: os.c,v 1.46.2.1 2001/10/22 23:28:12 gson Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdarg.h>
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <isc/file.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/strerror.h>
|
||||
#include <isc/string.h>
|
||||
|
||||
#include <named/main.h>
|
||||
@@ -133,6 +134,7 @@ static void
|
||||
linux_setcaps(unsigned int caps) {
|
||||
struct __user_cap_header_struct caphead;
|
||||
struct __user_cap_data_struct cap;
|
||||
char strbuf[ISC_STRERRORSIZE];
|
||||
|
||||
if ((getuid() != 0 && !non_root_caps) || non_root)
|
||||
return;
|
||||
@@ -144,8 +146,10 @@ linux_setcaps(unsigned int caps) {
|
||||
cap.effective = caps;
|
||||
cap.permitted = caps;
|
||||
cap.inheritable = caps;
|
||||
if (syscall(SYS_capset, &caphead, &cap) < 0)
|
||||
ns_main_earlyfatal("capset failed: %s", strerror(errno));
|
||||
if (syscall(SYS_capset, &caphead, &cap) < 0) {
|
||||
isc__strerror(errno, strbuf, sizeof(strbuf));
|
||||
ns_main_earlyfatal("capset failed: %s", strbuf);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -233,15 +237,17 @@ linux_minprivs(void) {
|
||||
#ifdef HAVE_SYS_PRCTL_H
|
||||
static void
|
||||
linux_keepcaps(void) {
|
||||
char strbuf[ISC_STRERRORSIZE];
|
||||
/*
|
||||
* Ask the kernel to allow us to keep our capabilities after we
|
||||
* setuid().
|
||||
*/
|
||||
|
||||
if (prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0) < 0) {
|
||||
if (errno != EINVAL)
|
||||
ns_main_earlyfatal("prctl() failed: %s",
|
||||
strerror(errno));
|
||||
if (errno != EINVAL) {
|
||||
isc__strerror(errno, strbuf, sizeof(strbuf));
|
||||
ns_main_earlyfatal("prctl() failed: %s", strbuf);
|
||||
}
|
||||
} else {
|
||||
non_root_caps = ISC_TRUE;
|
||||
if (getuid() != 0)
|
||||
@@ -280,10 +286,13 @@ void
|
||||
ns_os_daemonize(void) {
|
||||
pid_t pid;
|
||||
int fd;
|
||||
char strbuf[ISC_STRERRORSIZE];
|
||||
|
||||
pid = fork();
|
||||
if (pid == -1)
|
||||
ns_main_earlyfatal("fork(): %s", strerror(errno));
|
||||
if (pid == -1) {
|
||||
isc__strerror(errno, strbuf, sizeof(strbuf));
|
||||
ns_main_earlyfatal("fork(): %s", strbuf);
|
||||
}
|
||||
if (pid != 0)
|
||||
_exit(0);
|
||||
|
||||
@@ -295,8 +304,10 @@ ns_os_daemonize(void) {
|
||||
mainpid = getpid();
|
||||
#endif
|
||||
|
||||
if (setsid() == -1)
|
||||
ns_main_earlyfatal("setsid(): %s", strerror(errno));
|
||||
if (setsid() == -1) {
|
||||
isc__strerror(errno, strbuf, sizeof(strbuf));
|
||||
ns_main_earlyfatal("setsid(): %s", strbuf);
|
||||
}
|
||||
|
||||
/*
|
||||
* Try to set stdin, stdout, and stderr to /dev/null, but press
|
||||
@@ -337,16 +348,22 @@ all_digits(const char *s) {
|
||||
|
||||
void
|
||||
ns_os_chroot(const char *root) {
|
||||
char strbuf[ISC_STRERRORSIZE];
|
||||
if (root != NULL) {
|
||||
if (chroot(root) < 0)
|
||||
ns_main_earlyfatal("chroot(): %s", strerror(errno));
|
||||
if (chdir("/") < 0)
|
||||
ns_main_earlyfatal("chdir(/): %s", strerror(errno));
|
||||
if (chroot(root) < 0) {
|
||||
isc__strerror(errno, strbuf, sizeof(strbuf));
|
||||
ns_main_earlyfatal("chroot(): %s", strbuf);
|
||||
}
|
||||
if (chdir("/") < 0) {
|
||||
isc__strerror(errno, strbuf, sizeof(strbuf));
|
||||
ns_main_earlyfatal("chdir(/): %s", strbuf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ns_os_inituserinfo(const char *username) {
|
||||
char strbuf[ISC_STRERRORSIZE];
|
||||
if (username == NULL)
|
||||
return;
|
||||
|
||||
@@ -360,14 +377,17 @@ ns_os_inituserinfo(const char *username) {
|
||||
ns_main_earlyfatal("user '%s' unknown", username);
|
||||
|
||||
if (getuid() == 0) {
|
||||
if (initgroups(runas_pw->pw_name, runas_pw->pw_gid) < 0)
|
||||
ns_main_earlyfatal("initgroups(): %s", strerror(errno));
|
||||
if (initgroups(runas_pw->pw_name, runas_pw->pw_gid) < 0) {
|
||||
isc__strerror(errno, strbuf, sizeof(strbuf));
|
||||
ns_main_earlyfatal("initgroups(): %s", strbuf);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
ns_os_changeuser(void) {
|
||||
char strbuf[ISC_STRERRORSIZE];
|
||||
if (runas_pw == NULL || done_setuid)
|
||||
return;
|
||||
|
||||
@@ -382,11 +402,15 @@ ns_os_changeuser(void) {
|
||||
"2.3.99-pre3 or 2.2.18 when using threads");
|
||||
#endif
|
||||
|
||||
if (setgid(runas_pw->pw_gid) < 0)
|
||||
ns_main_earlyfatal("setgid(): %s", strerror(errno));
|
||||
if (setgid(runas_pw->pw_gid) < 0) {
|
||||
isc__strerror(errno, strbuf, sizeof(strbuf));
|
||||
ns_main_earlyfatal("setgid(): %s", strbuf);
|
||||
}
|
||||
|
||||
if (setuid(runas_pw->pw_uid) < 0)
|
||||
ns_main_earlyfatal("setuid(): %s", strerror(errno));
|
||||
if (setuid(runas_pw->pw_uid) < 0) {
|
||||
isc__strerror(errno, strbuf, sizeof(strbuf));
|
||||
ns_main_earlyfatal("setuid(): %s", strbuf);
|
||||
}
|
||||
|
||||
#if defined(HAVE_LINUX_CAPABILITY_H) && !defined(HAVE_LINUXTHREADS)
|
||||
linux_minprivs();
|
||||
@@ -447,6 +471,7 @@ ns_os_writepidfile(const char *filename) {
|
||||
FILE *lockfile;
|
||||
size_t len;
|
||||
pid_t pid;
|
||||
char strbuf[ISC_STRERRORSIZE];
|
||||
|
||||
/*
|
||||
* The caller must ensure any required synchronization.
|
||||
@@ -456,20 +481,26 @@ ns_os_writepidfile(const char *filename) {
|
||||
|
||||
len = strlen(filename);
|
||||
pidfile = malloc(len + 1);
|
||||
if (pidfile == NULL)
|
||||
if (pidfile == NULL) {
|
||||
isc__strerror(errno, strbuf, sizeof(strbuf));
|
||||
ns_main_earlyfatal("couldn't malloc '%s': %s",
|
||||
filename, strerror(errno));
|
||||
filename, strbuf);
|
||||
}
|
||||
/* This is safe. */
|
||||
strcpy(pidfile, filename);
|
||||
|
||||
fd = safe_open(filename, ISC_FALSE);
|
||||
if (fd < 0)
|
||||
if (fd < 0) {
|
||||
isc__strerror(errno, strbuf, sizeof(strbuf));
|
||||
ns_main_earlyfatal("couldn't open pid file '%s': %s",
|
||||
filename, strerror(errno));
|
||||
filename, strbuf);
|
||||
}
|
||||
lockfile = fdopen(fd, "w");
|
||||
if (lockfile == NULL)
|
||||
if (lockfile == NULL) {
|
||||
isc__strerror(errno, strbuf, sizeof(strbuf));
|
||||
ns_main_earlyfatal("could not fdopen() pid file '%s': %s",
|
||||
filename, strerror(errno));
|
||||
filename, strbuf);
|
||||
}
|
||||
#ifdef HAVE_LINUXTHREADS
|
||||
pid = mainpid;
|
||||
#else
|
||||
|
||||
+2
-2
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: xfrout.c,v 1.101.2.2 2001/09/28 22:07:12 bwelling Exp $ */
|
||||
/* $Id: xfrout.c,v 1.101.2.3 2001/10/30 01:28:29 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -1093,6 +1093,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
|
||||
ISC_LOG_DEBUG(4),
|
||||
"IXFR version not in journal, "
|
||||
"falling back to AXFR");
|
||||
mnemonic = "AXFR-style IXFR";
|
||||
goto axfr_fallback;
|
||||
}
|
||||
CHECK(result);
|
||||
@@ -1100,7 +1101,6 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
|
||||
axfr_fallback:
|
||||
CHECK(axfr_rrstream_create(mctx, db, ver,
|
||||
&data_stream));
|
||||
mnemonic = "AXFR-style IXFR";
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+14
-14
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: zoneconf.c,v 1.87.2.1 2001/09/26 03:43:00 marka Exp $ */
|
||||
/* $Id: zoneconf.c,v 1.87.2.4 2001/11/13 01:15:33 gson Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -482,7 +482,7 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
|
||||
*/
|
||||
if (ztype == dns_zone_master) {
|
||||
dns_acl_t *updateacl;
|
||||
RETERR(configure_zone_acl(zconfig, NULL, config,
|
||||
RETERR(configure_zone_acl(zconfig, vconfig, config,
|
||||
"allow-update", ac, zone,
|
||||
dns_zone_setupdateacl,
|
||||
dns_zone_clearupdateacl));
|
||||
@@ -503,22 +503,12 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
|
||||
dns_zone_setsigvalidityinterval(zone,
|
||||
cfg_obj_asuint32(obj) * 86400);
|
||||
} else if (ztype == dns_zone_slave) {
|
||||
RETERR(configure_zone_acl(zconfig, NULL, config,
|
||||
RETERR(configure_zone_acl(zconfig, vconfig, config,
|
||||
"allow-update-forwarding", ac, zone,
|
||||
dns_zone_setforwardacl,
|
||||
dns_zone_clearforwardacl));
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
result = ns_config_get(maps, "transfer-source", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
dns_zone_setxfrsource4(zone, cfg_obj_assockaddr(obj));
|
||||
|
||||
obj = NULL;
|
||||
result = ns_config_get(maps, "transfer-source-v6", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
dns_zone_setxfrsource6(zone, cfg_obj_assockaddr(obj));
|
||||
|
||||
/*
|
||||
* Configure slave functionality.
|
||||
*/
|
||||
@@ -571,6 +561,16 @@ ns_zone_configure(cfg_obj_t *config, cfg_obj_t *vconfig, cfg_obj_t *zconfig,
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
dns_zone_setminretrytime(zone, cfg_obj_asuint32(obj));
|
||||
|
||||
obj = NULL;
|
||||
result = ns_config_get(maps, "transfer-source", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
dns_zone_setxfrsource4(zone, cfg_obj_assockaddr(obj));
|
||||
|
||||
obj = NULL;
|
||||
result = ns_config_get(maps, "transfer-source-v6", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
dns_zone_setxfrsource6(zone, cfg_obj_assockaddr(obj));
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -600,7 +600,7 @@ ns_zone_reusable(dns_zone_t *zone, cfg_obj_t *zconfig) {
|
||||
cfilename = NULL;
|
||||
zfilename = dns_zone_getfile(zone);
|
||||
if (!((cfilename == NULL && zfilename == NULL) ||
|
||||
(cfilename != NULL && cfilename != NULL &&
|
||||
(cfilename != NULL && zfilename != NULL &&
|
||||
strcmp(cfilename, zfilename) == 0)))
|
||||
return (ISC_FALSE);
|
||||
|
||||
|
||||
+33
-23
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: nsupdate.c,v 1.103.2.2 2001/09/27 23:30:49 gson Exp $ */
|
||||
/* $Id: nsupdate.c,v 1.103.2.6 2001/11/06 21:50:35 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -457,29 +457,34 @@ setup_system(void) {
|
||||
if (lwresult != LWRES_R_SUCCESS)
|
||||
fatal("lwres_context_create failed");
|
||||
|
||||
lwresult = lwres_conf_parse(lwctx, RESOLV_CONF);
|
||||
if (lwresult != LWRES_R_SUCCESS)
|
||||
fprintf(stderr,
|
||||
"an error was encountered in %s\n", RESOLV_CONF);
|
||||
|
||||
(void)lwres_conf_parse(lwctx, RESOLV_CONF);
|
||||
lwconf = lwres_conf_get(lwctx);
|
||||
|
||||
ns_total = lwconf->nsnext;
|
||||
if (ns_total <= 0)
|
||||
fatal("no valid servers found");
|
||||
servers = isc_mem_get(mctx, ns_total * sizeof(isc_sockaddr_t));
|
||||
if (servers == NULL)
|
||||
fatal("out of memory");
|
||||
for (i = 0; i < ns_total; i++) {
|
||||
if (lwconf->nameservers[i].family == LWRES_ADDRTYPE_V4) {
|
||||
struct in_addr in4;
|
||||
memcpy(&in4, lwconf->nameservers[i].address, 4);
|
||||
isc_sockaddr_fromin(&servers[i], &in4, DNSDEFAULTPORT);
|
||||
} else {
|
||||
struct in6_addr in6;
|
||||
memcpy(&in6, lwconf->nameservers[i].address, 16);
|
||||
isc_sockaddr_fromin6(&servers[i], &in6,
|
||||
DNSDEFAULTPORT);
|
||||
if (ns_total <= 0) {
|
||||
/* No name servers in resolv.conf; default to loopback. */
|
||||
struct in_addr localhost;
|
||||
ns_total = 1;
|
||||
servers = isc_mem_get(mctx, ns_total * sizeof(isc_sockaddr_t));
|
||||
if (servers == NULL)
|
||||
fatal("out of memory");
|
||||
localhost.s_addr = htonl(INADDR_LOOPBACK);
|
||||
isc_sockaddr_fromin(&servers[0], &localhost, DNSDEFAULTPORT);
|
||||
} else {
|
||||
servers = isc_mem_get(mctx, ns_total * sizeof(isc_sockaddr_t));
|
||||
if (servers == NULL)
|
||||
fatal("out of memory");
|
||||
for (i = 0; i < ns_total; i++) {
|
||||
if (lwconf->nameservers[i].family == LWRES_ADDRTYPE_V4) {
|
||||
struct in_addr in4;
|
||||
memcpy(&in4, lwconf->nameservers[i].address, 4);
|
||||
isc_sockaddr_fromin(&servers[i], &in4, DNSDEFAULTPORT);
|
||||
} else {
|
||||
struct in6_addr in6;
|
||||
memcpy(&in6, lwconf->nameservers[i].address, 16);
|
||||
isc_sockaddr_fromin6(&servers[i], &in6,
|
||||
DNSDEFAULTPORT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -653,7 +658,8 @@ parse_args(int argc, char **argv) {
|
||||
fprintf(stderr, "%s: invalid argument -%c\n",
|
||||
argv[0], ch);
|
||||
fprintf(stderr, "usage: nsupdate [-d] "
|
||||
"[-y keyname:secret | -k keyfile] [-v]\n");
|
||||
"[-y keyname:secret | -k keyfile] [-v] "
|
||||
"[filename]\n");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
@@ -1083,6 +1089,7 @@ evaluate_zone(char *cmdline) {
|
||||
result = dns_name_fromtext(userzone, &b, dns_rootname, ISC_FALSE,
|
||||
NULL);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
userzone = NULL; /* Lest it point to an invalid name */
|
||||
fprintf(stderr, "could not parse zone name\n");
|
||||
return (STATUS_SYNTAX);
|
||||
}
|
||||
@@ -1140,6 +1147,7 @@ update_addordelete(char *cmdline, isc_boolean_t isdelete) {
|
||||
goto doneparsing;
|
||||
}
|
||||
}
|
||||
errno = 0;
|
||||
ttl = strtol(word, &endp, 0);
|
||||
if (*endp != '\0') {
|
||||
if (isdelete) {
|
||||
@@ -1153,7 +1161,9 @@ update_addordelete(char *cmdline, isc_boolean_t isdelete) {
|
||||
|
||||
if (isdelete)
|
||||
ttl = 0;
|
||||
else if (ttl < 0 || ttl > TTL_MAX || errno == ERANGE) {
|
||||
else if (ttl < 0 || ttl > TTL_MAX ||
|
||||
(ttl == LONG_MAX && errno == ERANGE))
|
||||
{
|
||||
/*
|
||||
* The errno test is needed to catch when strtol()
|
||||
* overflows on a platform where sizeof(int) ==
|
||||
|
||||
+3
-5
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rndc.c,v 1.77 2001/08/06 11:40:46 gson Exp $ */
|
||||
/* $Id: rndc.c,v 1.77.2.1 2001/10/17 18:26:01 gson Exp $ */
|
||||
|
||||
/*
|
||||
* Principal Author: DCL
|
||||
@@ -84,6 +84,7 @@ static int sends, recvs, connects;
|
||||
static char *command;
|
||||
static char *args;
|
||||
static char program[256];
|
||||
static isc_socket_t *sock = NULL;
|
||||
|
||||
static void
|
||||
usage(int status) {
|
||||
@@ -189,7 +190,6 @@ rndc_senddone(isc_task_t *task, isc_event_t *event) {
|
||||
|
||||
static void
|
||||
rndc_recvdone(isc_task_t *task, isc_event_t *event) {
|
||||
isc_socket_t *sock = ccmsg.sock;
|
||||
isccc_sexpr_t *response = NULL;
|
||||
isccc_sexpr_t *data;
|
||||
isccc_region_t source;
|
||||
@@ -244,7 +244,6 @@ rndc_recvdone(isc_task_t *task, isc_event_t *event) {
|
||||
static void
|
||||
rndc_connected(isc_task_t *task, isc_event_t *event) {
|
||||
isc_socketevent_t *sevent = (isc_socketevent_t *)event;
|
||||
isc_socket_t *sock = event->ev_sender;
|
||||
isccc_sexpr_t *request = NULL;
|
||||
isccc_sexpr_t *data;
|
||||
isccc_time_t now;
|
||||
@@ -293,7 +292,6 @@ rndc_connected(isc_task_t *task, isc_event_t *event) {
|
||||
static void
|
||||
rndc_start(isc_task_t *task, isc_event_t *event) {
|
||||
isc_sockaddr_t addr;
|
||||
isc_socket_t *sock = NULL;
|
||||
isc_result_t result;
|
||||
char socktext[ISC_SOCKADDR_FORMATSIZE];
|
||||
|
||||
@@ -597,7 +595,7 @@ main(int argc, char **argv) {
|
||||
isc_app_run();
|
||||
|
||||
if (connects > 0 || sends > 0 || recvs > 0)
|
||||
isc_socket_cancel(ccmsg.sock, task, ISC_SOCKCANCEL_ALL);
|
||||
isc_socket_cancel(sock, task, ISC_SOCKCANCEL_ALL);
|
||||
|
||||
isc_task_detach(&task);
|
||||
isc_taskmgr_destroy(&taskmgr);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: cfg_test.c,v 1.11 2001/07/23 18:57:53 gson Exp $ */
|
||||
/* $Id: cfg_test.c,v 1.11.2.1 2001/10/22 23:52:19 gson Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -51,7 +51,7 @@ output(void *closure, const char *text, int textlen) {
|
||||
}
|
||||
|
||||
static void
|
||||
usage() {
|
||||
usage(void) {
|
||||
fprintf(stderr, "usage: cfg_test --rndc|--named "
|
||||
"[--grammar] [--memstats] conffile\n");
|
||||
exit(1);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: ifconfig.sh,v 1.35 2001/06/14 14:10:32 gson Exp $
|
||||
# $Id: ifconfig.sh,v 1.35.2.1 2001/11/05 04:29:35 marka Exp $
|
||||
|
||||
#
|
||||
# Set up interface aliases for bind9 system tests.
|
||||
@@ -62,7 +62,7 @@ case "$1" in
|
||||
*-sgi-irix6.*)
|
||||
ifconfig lo0 alias 10.53.0.$ns
|
||||
;;
|
||||
*-*-sysv5uw7*)
|
||||
*-*-sysv5uw[7-8]*)
|
||||
ifconfig lo0 10.53.0.$ns alias netmask 0xffffffff
|
||||
;;
|
||||
*-ibm-aix4.*)
|
||||
@@ -107,7 +107,7 @@ case "$1" in
|
||||
*-sgi-irix6.*)
|
||||
ifconfig lo0 -alias 10.53.0.$ns
|
||||
;;
|
||||
*-*-sysv5uw7*)
|
||||
*-*-sysv5uw[7-8]*)
|
||||
ifconfig lo0 -alias 10.53.0.$ns
|
||||
;;
|
||||
*-ibm-aix4.*)
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: setup.sh,v 1.2 2001/01/11 20:51:19 bwelling Exp $
|
||||
# $Id: setup.sh,v 1.2.2.2 2001/10/12 20:12:07 gson Exp $
|
||||
|
||||
RANDFILE=../random.data
|
||||
|
||||
keyname=`$KEYGEN -a DH -b 768 -n host -r $RANDFILE server`
|
||||
keyid=`echo $keyname | perl -p -e 's/^.*\+//;'`
|
||||
keyid=`echo $keyname | $PERL -p -e 's/^.*\+0*//;'`
|
||||
rm -f named.conf
|
||||
perl -p -e "s/KEYID/$keyid/;" < named.conf.in > named.conf
|
||||
|
||||
Vendored
+3
-3
@@ -3,7 +3,7 @@
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2001-04-20'
|
||||
timestamp='2001-10-03'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -966,10 +966,10 @@ EOF
|
||||
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
|
||||
fi
|
||||
exit 0 ;;
|
||||
i*86:*:5:7*)
|
||||
i*86:*:5:[78]*)
|
||||
# Fixed at (any) Pentium or better
|
||||
UNAME_MACHINE=i586
|
||||
if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
|
||||
if [ ${UNAME_SYSTEM} = "UnixWare" -o ${UNAME_SYSTEM} = "OpenUNIX" ] ; then
|
||||
echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
|
||||
|
||||
+10
-7
@@ -16,7 +16,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: config.h.in,v 1.47 2001/08/16 06:19:56 marka Exp $ */
|
||||
/* $Id: config.h.in,v 1.47.2.1 2001/10/22 23:28:08 gson Exp $ */
|
||||
|
||||
/***
|
||||
*** This file is not to be included by any public header files, because
|
||||
@@ -32,9 +32,6 @@
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
#undef size_t
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef ssize_t
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
@@ -45,6 +42,9 @@
|
||||
byte first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
#undef WORDS_BIGENDIAN
|
||||
|
||||
/* define to `int' if <sys/types.h> doesn't define. */
|
||||
#undef ssize_t
|
||||
|
||||
/* define on DEC OSF to enable 4.4BSD style sa_len support */
|
||||
#undef _SOCKADDR_LEN
|
||||
|
||||
@@ -138,6 +138,9 @@ int sigwait(const unsigned int *set, int *sig);
|
||||
/* define if pthread_attr_getstacksize() is available */
|
||||
#undef HAVE_PTHREAD_ATTR_GETSTACKSIZE
|
||||
|
||||
/* define if you have strerror in the C library. */
|
||||
#undef HAVE_STRERROR
|
||||
|
||||
/* Define if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
@@ -153,12 +156,12 @@ int sigwait(const unsigned int *set, int *sig);
|
||||
/* Define if you have the <sys/select.h> header file. */
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
|
||||
/* Define if you have the <sys/sysctl.h> header file. */
|
||||
#undef HAVE_SYS_SYSCTL_H
|
||||
|
||||
/* Define if you have the <sys/sockio.h> header file. */
|
||||
#undef HAVE_SYS_SOCKIO_H
|
||||
|
||||
/* Define if you have the <sys/sysctl.h> header file. */
|
||||
#undef HAVE_SYS_SYSCTL_H
|
||||
|
||||
/* Define if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
|
||||
+26
-12
@@ -13,12 +13,7 @@
|
||||
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
dnl
|
||||
AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
||||
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
|
||||
AC_DIVERT_POP()dnl
|
||||
|
||||
AC_REVISION($Revision: 1.294.2.1 $)
|
||||
AC_REVISION($Revision: 1.294.2.6 $)
|
||||
|
||||
AC_INIT(lib/dns/name.c)
|
||||
AC_PREREQ(2.13)
|
||||
@@ -198,7 +193,7 @@ AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h sys/sockio.h sys/select.h sys/sysct
|
||||
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AC_CHECK_FUNC(sysctlbyname, AC_DEFINE(HAVE_SYSCTLBYNAME),)
|
||||
AC_CHECK_FUNC(sysctlbyname, AC_DEFINE(HAVE_SYSCTLBYNAME))
|
||||
|
||||
#
|
||||
# UnixWare 7.1.1 with the feature supplement to the UDK compiler
|
||||
@@ -280,8 +275,8 @@ AC_C_BIGENDIAN
|
||||
#
|
||||
AC_MSG_CHECKING(for OpenSSL library)
|
||||
AC_ARG_WITH(openssl,
|
||||
[ --with-openssl=PATH Specify path for system-supplied openssl
|
||||
(required for DNSSEC)],
|
||||
[ --with-openssl[=PATH] Build with OpenSSL [yes|no|path].
|
||||
(Required for DNSSEC)],
|
||||
use_openssl="$withval", use_openssl="no")
|
||||
|
||||
case "$use_openssl" in
|
||||
@@ -1019,7 +1014,7 @@ $isc_netinetin6_hack
|
||||
$isc_netinet6in6_hack
|
||||
$isc_in_addr6_hack
|
||||
],
|
||||
[struct in6_addr in6; in6 = in6addr_any; return (0);],
|
||||
[struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);],
|
||||
[AC_MSG_RESULT(yes)
|
||||
ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
|
||||
LWRES_PLATFORM_NEEDIN6ADDRANY="#undef LWRES_PLATFORM_NEEDIN6ADDRANY"],
|
||||
@@ -1027,6 +1022,23 @@ $isc_in_addr6_hack
|
||||
ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"
|
||||
LWRES_PLATFORM_NEEDIN6ADDRANY="#define LWRES_PLATFORM_NEEDIN6ADDRANY 1"])
|
||||
|
||||
AC_MSG_CHECKING(for in6addr_loopback)
|
||||
AC_TRY_LINK([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
$isc_netinetin6_hack
|
||||
$isc_netinet6in6_hack
|
||||
$isc_in_addr6_hack
|
||||
],
|
||||
[struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]);],
|
||||
[AC_MSG_RESULT(yes)
|
||||
ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK"
|
||||
LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK"],
|
||||
[AC_MSG_RESULT(no)
|
||||
ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1"
|
||||
LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK="#define LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK 1"])
|
||||
|
||||
AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6)
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
@@ -1080,6 +1092,8 @@ AC_SUBST(ISC_PLATFORM_HAVEINADDR6)
|
||||
AC_SUBST(LWRES_PLATFORM_HAVEINADDR6)
|
||||
AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRANY)
|
||||
AC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRANY)
|
||||
AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
|
||||
AC_SUBST(LWRES_PLATFORM_NEEDIN6ADDRLOOPBACK)
|
||||
AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
|
||||
AC_SUBST(ISC_PLATFORM_FIXIN6ISADDR)
|
||||
AC_SUBST(ISC_IPV6_H)
|
||||
@@ -1223,8 +1237,7 @@ AC_TRY_COMPILE([
|
||||
#include <netdb.h>],
|
||||
[struct rrsetinfo r; return (0);],
|
||||
[AC_MSG_RESULT(yes)
|
||||
ISC_LWRES_NEEDRRSETINFO="#undef ISC_LWRES_NEEDRRSETINFO"
|
||||
AC_DEFINE(HAVE_RRSETINFO)],
|
||||
ISC_LWRES_NEEDRRSETINFO="#undef ISC_LWRES_NEEDRRSETINFO"],
|
||||
[AC_MSG_RESULT(no)
|
||||
ISC_LWRES_NEEDRRSETINFO="#define ISC_LWRES_NEEDRRSETINFO 1"])
|
||||
AC_SUBST(ISC_LWRES_NEEDRRSETINFO)
|
||||
@@ -1345,6 +1358,7 @@ AC_CHECK_FUNC(vsnprintf,
|
||||
ISC_PLATFORM_NEEDVSNPRINTF="#define ISC_PLATFORM_NEEDVSNPRINTF 1"])
|
||||
AC_SUBST(ISC_PLATFORM_NEEDSTRSEP)
|
||||
AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
|
||||
AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR))
|
||||
|
||||
AC_SUBST(ISC_EXTRA_OBJS)
|
||||
AC_SUBST(ISC_EXTRA_SRCS)
|
||||
|
||||
@@ -1,195 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
||||
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
||||
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
|
||||
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dirdb.c,v 1.9 2001/01/09 21:46:22 bwelling Exp $ */
|
||||
|
||||
/*
|
||||
* A simple database driver that returns basic information about
|
||||
* files and directories in the Unix file system as DNS data.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/sysmacros.h>
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/sdb.h>
|
||||
|
||||
#include <named/globals.h>
|
||||
|
||||
#include "dirdb.h"
|
||||
|
||||
static dns_sdbimplementation_t *dirdb = NULL;
|
||||
|
||||
#define CHECK(op) \
|
||||
do { result = (op); \
|
||||
if (result != ISC_R_SUCCESS) return (result); \
|
||||
} while (0)
|
||||
|
||||
#define CHECKN(op) \
|
||||
do { n = (op); \
|
||||
if (n < 0) return (ISC_R_FAILURE); \
|
||||
} while (0)
|
||||
|
||||
|
||||
/*
|
||||
* This database operates on relative names.
|
||||
*
|
||||
* Any name will be interpreted as a pathname offset from the directory
|
||||
* specified in the configuration file.
|
||||
*/
|
||||
static isc_result_t
|
||||
dirdb_lookup(const char *zone, const char *name, void *dbdata,
|
||||
dns_sdblookup_t *lookup)
|
||||
{
|
||||
char filename[255];
|
||||
char filename2[255];
|
||||
char buf[1024];
|
||||
struct stat statbuf;
|
||||
isc_result_t result;
|
||||
int n;
|
||||
|
||||
UNUSED(zone);
|
||||
UNUSED(dbdata);
|
||||
|
||||
if (strcmp(name, "@") == 0)
|
||||
snprintf(filename, sizeof(filename), "%s", (char *)dbdata);
|
||||
else
|
||||
snprintf(filename, sizeof(filename), "%s/%s",
|
||||
(char *)dbdata, name);
|
||||
CHECKN(lstat(filename, &statbuf));
|
||||
|
||||
if (S_ISDIR(statbuf.st_mode))
|
||||
CHECK(dns_sdb_putrr(lookup, "txt", 3600, "dir"));
|
||||
else if (S_ISCHR(statbuf.st_mode) || S_ISBLK(statbuf.st_mode)) {
|
||||
CHECKN(snprintf(buf, sizeof(buf),
|
||||
"\"%sdev\" \"major %d\" \"minor %d\"",
|
||||
S_ISCHR(statbuf.st_mode) ? "chr" : "blk",
|
||||
major(statbuf.st_rdev),
|
||||
minor(statbuf.st_rdev)));
|
||||
CHECK(dns_sdb_putrr(lookup, "txt", 3600, buf));
|
||||
} else if (S_ISFIFO(statbuf.st_mode))
|
||||
CHECK(dns_sdb_putrr(lookup, "txt", 3600, "pipe"));
|
||||
else if (S_ISSOCK(statbuf.st_mode))
|
||||
CHECK(dns_sdb_putrr(lookup, "txt", 3600, "socket"));
|
||||
else if (S_ISLNK(statbuf.st_mode)) {
|
||||
CHECKN(readlink(filename, filename2, sizeof(filename2) - 1));
|
||||
buf[n] = 0;
|
||||
CHECKN(snprintf(buf, sizeof(buf), "\"symlink\" \"%s\"",
|
||||
filename2));
|
||||
CHECK(dns_sdb_putrr(lookup, "txt", 3600, buf));
|
||||
} else if (!S_ISREG(statbuf.st_mode))
|
||||
CHECK(dns_sdb_putrr(lookup, "txt", 3600, "unknown"));
|
||||
else {
|
||||
CHECKN(snprintf(buf, sizeof(buf), "\"file\" \"size = %u\"",
|
||||
(unsigned int)statbuf.st_size));
|
||||
CHECK(dns_sdb_putrr(lookup, "txt", 3600, buf));
|
||||
}
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
* lookup () does not return SOA or NS records, so authority() must be defined.
|
||||
*/
|
||||
static isc_result_t
|
||||
dirdb_authority(const char *zone, void *dbdata, dns_sdblookup_t *lookup) {
|
||||
isc_result_t result;
|
||||
|
||||
UNUSED(zone);
|
||||
UNUSED(dbdata);
|
||||
|
||||
result = dns_sdb_putsoa(lookup, "ns", "hostmaster", 0);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
result = dns_sdb_putrr(lookup, "ns", 86400, "ns1");
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
result = dns_sdb_putrr(lookup, "ns", 86400, "ns2");
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
* Each database stores the top-level directory as the dbdata opaque
|
||||
* object. The create() function allocates it. argv[0] holds the top
|
||||
* level directory.
|
||||
*/
|
||||
static isc_result_t
|
||||
dirdb_create(const char *zone, int argc, char **argv,
|
||||
void *driverdata, void **dbdata)
|
||||
{
|
||||
UNUSED(zone);
|
||||
UNUSED(driverdata);
|
||||
|
||||
if (argc < 1)
|
||||
return (ISC_R_FAILURE);
|
||||
*dbdata = isc_mem_strdup((isc_mem_t *)driverdata, argv[0]);
|
||||
if (*dbdata == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
* The destroy() function frees the memory allocated by create().
|
||||
*/
|
||||
static void
|
||||
dirdb_destroy(const char *zone, void *driverdata, void **dbdata) {
|
||||
UNUSED(zone);
|
||||
UNUSED(driverdata);
|
||||
isc_mem_free((isc_mem_t *)driverdata, *dbdata);
|
||||
}
|
||||
|
||||
/*
|
||||
* This zone does not support zone transfer, so allnodes() is NULL.
|
||||
*/
|
||||
static dns_sdbmethods_t dirdb_methods = {
|
||||
dirdb_lookup,
|
||||
dirdb_authority,
|
||||
NULL, /* allnodes */
|
||||
dirdb_create,
|
||||
dirdb_destroy
|
||||
};
|
||||
|
||||
/*
|
||||
* Wrapper around dns_sdb_register(). Note that the first ns_g_mctx is
|
||||
* being passed as the "driverdata" parameter, so that will it will be
|
||||
* passed to create() and destroy().
|
||||
*/
|
||||
isc_result_t
|
||||
dirdb_init(void) {
|
||||
unsigned int flags;
|
||||
flags = DNS_SDBFLAG_RELATIVEOWNER | DNS_SDBFLAG_RELATIVERDATA |
|
||||
DNS_SDBFLAG_THREADSAFE;
|
||||
return (dns_sdb_register("dir", &dirdb_methods, ns_g_mctx, flags,
|
||||
ns_g_mctx, &dirdb));
|
||||
}
|
||||
|
||||
/*
|
||||
* Wrapper around dns_sdb_unregister().
|
||||
*/
|
||||
void
|
||||
dirdb_clear(void) {
|
||||
if (dirdb != NULL)
|
||||
dns_sdb_unregister(&dirdb);
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
||||
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
||||
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
|
||||
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dirdb.h,v 1.2 2001/01/09 21:46:23 bwelling Exp $ */
|
||||
|
||||
#include <isc/types.h>
|
||||
|
||||
isc_result_t dirdb_init(void);
|
||||
|
||||
void dirdb_clear(void);
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
This is the INSTALL file for 0.4. See
|
||||
http://www.venaas.no/ldap/bind-sdb/ for updates or other information.
|
||||
|
||||
BUILDING
|
||||
|
||||
You need the source for BIND 9.1.0 or newer (for zone transfers you
|
||||
will need at least 9.1.1rc3 due to a bug). Basically you need to follow
|
||||
the instructions in doc/misc/sdb, if my instructions doesn't make sense,
|
||||
please have a look at that as well.
|
||||
|
||||
Copy ldapdb.c to bin/named and ldapdb.h to bin/named/include in the
|
||||
source tree.
|
||||
|
||||
Next alter bin/named/Makefile.in. Add ldapdb.@O@ to DBDRIVER_OBJS and
|
||||
ldapdb.c to DBDRIVER_SRCS. You also need to add something like
|
||||
-I/usr/local/include to DBDRIVER_INCLUDES and
|
||||
-L/usr/local/lib -lldap -llber -lresolv to DBDRIVER_LIBS
|
||||
depending on what LDAP library you have and where you installed it.
|
||||
|
||||
Finally you need to edit bin/named/main.c. Below where it says
|
||||
"#include "xxdb.h"", add the line "#include <ldapdb.h>". Below where
|
||||
it says "xxdb_init();" add the line "ldapdb_init();", and finally
|
||||
below where it says "xxdb_clear();", add "ldapdb_clear();".
|
||||
|
||||
Now you should hopefully be able to build it.
|
||||
|
||||
|
||||
CONFIGURING
|
||||
|
||||
Before you do any configuring of LDAP stuff, please try to configure
|
||||
and start bind as usual to see if things work.
|
||||
|
||||
To do anything useful, you need to store a zone in some LDAP server.
|
||||
From this release on, you must use a schema called dNSZone. Note that
|
||||
it relies on some attribute definitions in the Cosine schema, so that
|
||||
must be included as well. The Cosine schema probably comes with your
|
||||
LDAP server. You can find dNSZone and further details on how to store
|
||||
the data in your LDAP server at
|
||||
http://www.venaas.no/ldap/bind-sdb/
|
||||
|
||||
For an example, have a look at my venaas.com zone. Try a subtree search
|
||||
for objectClass=* at
|
||||
ldap ldap://129.241.20.67/dc=venaas,dc=com,o=DNS,dc=venaas,dc=no
|
||||
|
||||
To use it with BIND, I've added the following to named.conf:
|
||||
zone "venaas.com" {
|
||||
type master;
|
||||
database "ldap ldap://129.241.20.67/dc=venaas,dc=com,o=DNS,dc=venaas,dc=no 172800";
|
||||
};
|
||||
|
||||
When doing lookups BIND will do a sub-tree search below the base in the
|
||||
URL. The number 172800 is the TTL which will be used for all entries that
|
||||
haven't got the dNSTTL attribute.
|
||||
|
||||
Stig Venaas <venaas@uninett.no> 2001-04-12
|
||||
@@ -1,18 +0,0 @@
|
||||
This is an attempt at an LDAP back-end for BIND 9 using the new simplified
|
||||
database interface "sdb". This is the fifth release (0.5) and is not ready
|
||||
for production use yet. Note that this version (and 0.4) uses a new schema
|
||||
and is not backwards compatible with versions before 0.4. The big changes in
|
||||
0.5 are thread support and improved connection handling. Multiple threads
|
||||
can now access the back-end simultaneously, and rather than having one
|
||||
connection per zone, there is now one connection per thread per LDAP server.
|
||||
This should help people with multiple CPUs and people with a huge number of
|
||||
zones. One final change is support for literal IPv6 addresses in LDAP URLs.
|
||||
At least OpenLDAP 2 has IPv6 support, so if you use OpenLDAP 2 libraries and
|
||||
server, you got all you need.
|
||||
|
||||
If you have bug reports, fixes, comments, questions or whatever, please
|
||||
contact me. See also http://www.venaas.no/ldap/bind-sdb/ for information.
|
||||
|
||||
See INSTALL for how to build, install and use.
|
||||
|
||||
Stig Venaas <venaas@uninett.no> 2001-05-06
|
||||
@@ -1,17 +0,0 @@
|
||||
INSTALLATION
|
||||
|
||||
To Compile zone2ldap from contrib/sdb directory:
|
||||
|
||||
gcc -g `../../isc-config.sh --cflags isc dns` -c zone2ldap.c
|
||||
gcc -g -o zone2ldap zone2ldap.o `isc-config.sh --libs isc dns` -lldap -llber -lresolv
|
||||
|
||||
USAGE:
|
||||
|
||||
See zone2ldap.1
|
||||
|
||||
BUGS:
|
||||
|
||||
Jeff McNeil <jeff@snapcase.g-rock.net>
|
||||
|
||||
|
||||
|
||||
@@ -1,466 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2001 Stig Venaas
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/util.h>
|
||||
#include <isc/thread.h>
|
||||
|
||||
#include <dns/sdb.h>
|
||||
|
||||
#include <named/globals.h>
|
||||
|
||||
#include <ldap.h>
|
||||
#include "ldapdb.h"
|
||||
|
||||
/*
|
||||
* A simple database driver for LDAP. Not production quality yet
|
||||
*/
|
||||
|
||||
static dns_sdbimplementation_t *ldapdb = NULL;
|
||||
|
||||
struct ldapdb_data {
|
||||
char *hostport;
|
||||
char *hostname;
|
||||
int portno;
|
||||
char *base;
|
||||
int defaultttl;
|
||||
};
|
||||
|
||||
/* used by ldapdb_getconn */
|
||||
|
||||
struct ldapdb_entry {
|
||||
void *index;
|
||||
size_t size;
|
||||
void *data;
|
||||
struct ldapdb_entry *next;
|
||||
};
|
||||
|
||||
static struct ldapdb_entry *ldapdb_find(struct ldapdb_entry *stack,
|
||||
const void *index, size_t size) {
|
||||
while (stack != NULL) {
|
||||
if (stack->size == size && !memcmp(stack->index, index, size))
|
||||
return stack;
|
||||
stack = stack->next;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void ldapdb_insert(struct ldapdb_entry **stack,
|
||||
struct ldapdb_entry *item) {
|
||||
item->next = *stack;
|
||||
*stack = item;
|
||||
}
|
||||
|
||||
static void ldapdb_lock(int what) {
|
||||
static isc_mutex_t lock;
|
||||
|
||||
switch (what) {
|
||||
case 0:
|
||||
isc_mutex_init(&lock);
|
||||
break;
|
||||
case 1:
|
||||
LOCK(&lock);
|
||||
break;
|
||||
case -1:
|
||||
UNLOCK(&lock);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* data == NULL means cleanup */
|
||||
static LDAP **
|
||||
ldapdb_getconn(struct ldapdb_data *data)
|
||||
{
|
||||
static struct ldapdb_entry *allthreadsdata = NULL;
|
||||
struct ldapdb_entry *threaddata, *conndata;
|
||||
unsigned long threadid;
|
||||
|
||||
if (data == NULL) {
|
||||
/* cleanup */
|
||||
/* lock out other threads */
|
||||
ldapdb_lock(1);
|
||||
while (allthreadsdata != NULL) {
|
||||
threaddata = allthreadsdata;
|
||||
free(threaddata->index);
|
||||
while (threaddata->data != NULL) {
|
||||
conndata = threaddata->data;
|
||||
free(conndata->index);
|
||||
if (conndata->data != NULL)
|
||||
ldap_unbind((LDAP *)conndata->data);
|
||||
threaddata->data = conndata->next;
|
||||
free(conndata);
|
||||
}
|
||||
allthreadsdata = threaddata->next;
|
||||
free(threaddata);
|
||||
}
|
||||
ldapdb_lock(-1);
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/* look for connection data for current thread */
|
||||
threadid = isc_thread_self();
|
||||
threaddata = ldapdb_find(allthreadsdata, &threadid, sizeof(threadid));
|
||||
if (threaddata == NULL) {
|
||||
/* no data for this thread, create empty connection list */
|
||||
threaddata = malloc(sizeof(*threaddata));
|
||||
if (threaddata == NULL)
|
||||
return (NULL);
|
||||
threaddata->index = malloc(sizeof(threadid));
|
||||
if (threaddata->index == NULL) {
|
||||
free(threaddata);
|
||||
return (NULL);
|
||||
}
|
||||
*(unsigned long *)threaddata->index = threadid;
|
||||
threaddata->size = sizeof(threadid);
|
||||
threaddata->data = NULL;
|
||||
|
||||
/* need to lock out other threads here */
|
||||
ldapdb_lock(1);
|
||||
ldapdb_insert(&allthreadsdata, threaddata);
|
||||
ldapdb_lock(-1);
|
||||
}
|
||||
|
||||
/* threaddata points at the connection list for current thread */
|
||||
/* look for existing connection to our server */
|
||||
conndata = ldapdb_find((struct ldapdb_entry *)threaddata->data,
|
||||
data->hostport, strlen(data->hostport));
|
||||
if (conndata == NULL) {
|
||||
/* no connection data structure for this server, create one */
|
||||
conndata = malloc(sizeof(*conndata));
|
||||
if (conndata == NULL)
|
||||
return (NULL);
|
||||
(char *)conndata->index = data->hostport;
|
||||
conndata->size = strlen(data->hostport);
|
||||
conndata->data = NULL;
|
||||
ldapdb_insert((struct ldapdb_entry **)&threaddata->data,
|
||||
conndata);
|
||||
}
|
||||
|
||||
return (LDAP **)&conndata->data;
|
||||
}
|
||||
|
||||
/* callback routines */
|
||||
static isc_result_t
|
||||
ldapdb_create(const char *zone, int argc, char **argv,
|
||||
void *driverdata, void **dbdata)
|
||||
{
|
||||
struct ldapdb_data *data;
|
||||
char *s;
|
||||
int defaultttl;
|
||||
|
||||
UNUSED(zone);
|
||||
UNUSED(driverdata);
|
||||
|
||||
/* we assume that only one thread will call create at a time */
|
||||
/* want to do this only once for all instances */
|
||||
|
||||
if ((argc < 2)
|
||||
|| (argv[0] != strstr( argv[0], "ldap://"))
|
||||
|| ((defaultttl = atoi(argv[1])) < 1))
|
||||
return (ISC_R_FAILURE);
|
||||
data = isc_mem_get(ns_g_mctx, sizeof(struct ldapdb_data));
|
||||
if (data == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
data->hostport = isc_mem_strdup(ns_g_mctx, argv[0] + strlen("ldap://"));
|
||||
if (data->hostport == NULL) {
|
||||
isc_mem_put(ns_g_mctx, data, sizeof(struct ldapdb_data));
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
data->defaultttl = defaultttl;
|
||||
s = strchr(data->hostport, '/');
|
||||
if (s != NULL) {
|
||||
*s++ = '\0';
|
||||
data->base = *s != '\0' ? s : NULL;
|
||||
}
|
||||
|
||||
/* support URLs with literal IPv6 addresses */
|
||||
data->hostname = isc_mem_strdup(ns_g_mctx, data->hostport +
|
||||
(*data->hostport == '[' ? 1 : 0));
|
||||
if (data->hostname == NULL) {
|
||||
isc_mem_free(ns_g_mctx, data->hostport);
|
||||
isc_mem_put(ns_g_mctx, data, sizeof(struct ldapdb_data));
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
|
||||
if (*data->hostport == '[' &&
|
||||
(s = strchr(data->hostname, ']')) != NULL )
|
||||
*s++ = '\0';
|
||||
else
|
||||
s = data->hostname;
|
||||
s = strchr(s, ':');
|
||||
if (s != NULL) {
|
||||
*s++ = '\0';
|
||||
data->portno = atoi(s);
|
||||
} else
|
||||
data->portno = LDAP_PORT;
|
||||
|
||||
*dbdata = data;
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static void
|
||||
ldapdb_destroy(const char *zone, void *driverdata, void **dbdata) {
|
||||
struct ldapdb_data *data = *dbdata;
|
||||
|
||||
UNUSED(zone);
|
||||
UNUSED(driverdata);
|
||||
|
||||
if (data->hostport != NULL)
|
||||
isc_mem_free(ns_g_mctx, data->hostport);
|
||||
if (data->hostname != NULL)
|
||||
isc_mem_free(ns_g_mctx, data->hostname);
|
||||
isc_mem_put(ns_g_mctx, data, sizeof(struct ldapdb_data));
|
||||
}
|
||||
|
||||
static void
|
||||
ldapdb_bind(struct ldapdb_data *data, LDAP **ldp)
|
||||
{
|
||||
if (*ldp != NULL)
|
||||
ldap_unbind(*ldp);
|
||||
*ldp = ldap_open(data->hostname, data->portno);
|
||||
if (*ldp == NULL)
|
||||
return;
|
||||
if (ldap_simple_bind_s(*ldp, NULL, NULL) != LDAP_SUCCESS) {
|
||||
ldap_unbind(*ldp);
|
||||
*ldp = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
ldapdb_lookup(const char *zone, const char *name, void *dbdata,
|
||||
dns_sdblookup_t *lookup)
|
||||
{
|
||||
isc_result_t result = ISC_R_NOTFOUND;
|
||||
struct ldapdb_data *data = dbdata;
|
||||
LDAP **ldp;
|
||||
LDAPMessage *res, *e;
|
||||
char *fltr, *a, **vals;
|
||||
char type[64];
|
||||
BerElement *ptr;
|
||||
int i;
|
||||
|
||||
ldp = ldapdb_getconn(data);
|
||||
if (ldp == NULL)
|
||||
return (ISC_R_FAILURE);
|
||||
if (*ldp == NULL) {
|
||||
ldapdb_bind(data, ldp);
|
||||
if (*ldp == NULL)
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
fltr = isc_mem_get(ns_g_mctx, strlen(zone) + strlen(name) +
|
||||
strlen("(&(zoneName=)(relativeDomainName=))") + 1);
|
||||
if (fltr == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
strcpy(fltr, "(&(zoneName=");
|
||||
strcat(fltr, zone);
|
||||
strcat(fltr, ")(relativeDomainName=");
|
||||
strcat(fltr, name);
|
||||
strcat(fltr, "))");
|
||||
|
||||
if (ldap_search_s(*ldp, data->base, LDAP_SCOPE_SUBTREE, fltr, NULL, 0,
|
||||
&res) != LDAP_SUCCESS) {
|
||||
ldapdb_bind(data, ldp);
|
||||
if (*ldp != NULL)
|
||||
ldap_search_s(*ldp, data->base, LDAP_SCOPE_SUBTREE,
|
||||
fltr, NULL, 0, &res);
|
||||
}
|
||||
|
||||
isc_mem_put(ns_g_mctx, fltr, strlen(fltr) + 1);
|
||||
|
||||
if (*ldp == NULL)
|
||||
goto exit;
|
||||
|
||||
for (e = ldap_first_entry(*ldp, res); e != NULL;
|
||||
e = ldap_next_entry(*ldp, e)) {
|
||||
LDAP *ld = *ldp;
|
||||
int ttl = data->defaultttl;
|
||||
|
||||
for (a = ldap_first_attribute(ld, e, &ptr); a != NULL;
|
||||
a = ldap_next_attribute(ld, e, ptr)) {
|
||||
if (!strcmp(a, "dNSTTL")) {
|
||||
vals = ldap_get_values(ld, e, a);
|
||||
ttl = atoi(vals[0]);
|
||||
ldap_value_free(vals);
|
||||
ldap_memfree(a);
|
||||
break;
|
||||
}
|
||||
ldap_memfree(a);
|
||||
}
|
||||
for (a = ldap_first_attribute(ld, e, &ptr); a != NULL;
|
||||
a = ldap_next_attribute(ld, e, ptr)) {
|
||||
char *s;
|
||||
|
||||
for (s = a; *s; s++)
|
||||
*s = toupper(*s);
|
||||
s = strstr(a, "RECORD");
|
||||
if ((s == NULL) || (s == a)
|
||||
|| (s - a >= (signed int)sizeof(type))) {
|
||||
ldap_memfree(a);
|
||||
continue;
|
||||
}
|
||||
strncpy(type, a, s - a);
|
||||
type[s - a] = '\0';
|
||||
vals = ldap_get_values(ld, e, a);
|
||||
for (i=0; vals[i] != NULL; i++) {
|
||||
result = dns_sdb_putrr(lookup, type, ttl,
|
||||
vals[i]);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
ldap_value_free(vals);
|
||||
ldap_memfree(a);
|
||||
result = ISC_R_FAILURE;
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
ldap_value_free(vals);
|
||||
ldap_memfree(a);
|
||||
}
|
||||
}
|
||||
exit:
|
||||
ldap_msgfree(res);
|
||||
return (result);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
ldapdb_allnodes(const char *zone, void *dbdata,
|
||||
dns_sdballnodes_t *allnodes) {
|
||||
isc_result_t result = ISC_R_NOTFOUND;
|
||||
struct ldapdb_data *data = dbdata;
|
||||
LDAP **ldp;
|
||||
LDAPMessage *res, *e;
|
||||
char type[64];
|
||||
char *fltr, *a, **vals;
|
||||
BerElement *ptr;
|
||||
int i;
|
||||
|
||||
ldp = ldapdb_getconn(data);
|
||||
if (ldp == NULL)
|
||||
return (ISC_R_FAILURE);
|
||||
if (*ldp == NULL) {
|
||||
ldapdb_bind(data, ldp);
|
||||
if (*ldp == NULL)
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
fltr = isc_mem_get(ns_g_mctx, strlen(zone) + strlen("(zoneName=)") + 1);
|
||||
if (fltr == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
strcpy(fltr, "(zoneName=");
|
||||
strcat(fltr, zone);
|
||||
strcat(fltr, ")");
|
||||
|
||||
if (ldap_search_s(*ldp, data->base, LDAP_SCOPE_SUBTREE, fltr, NULL, 0,
|
||||
&res) != LDAP_SUCCESS) {
|
||||
ldapdb_bind(data, ldp);
|
||||
if (*ldp != NULL)
|
||||
ldap_search_s(*ldp, data->base, LDAP_SCOPE_SUBTREE,
|
||||
fltr, NULL, 0, &res);
|
||||
}
|
||||
|
||||
isc_mem_put(ns_g_mctx, fltr, strlen(fltr) + 1);
|
||||
|
||||
for (e = ldap_first_entry(*ldp, res); e != NULL;
|
||||
e = ldap_next_entry(*ldp, e)) {
|
||||
LDAP *ld = *ldp;
|
||||
char *name = NULL;
|
||||
int ttl = data->defaultttl;
|
||||
|
||||
for (a = ldap_first_attribute(ld, e, &ptr); a != NULL;
|
||||
a = ldap_next_attribute(ld, e, ptr)) {
|
||||
if (!strcmp(a, "dNSTTL")) {
|
||||
vals = ldap_get_values(ld, e, a);
|
||||
ttl = atoi(vals[0]);
|
||||
ldap_value_free(vals);
|
||||
} else if (!strcmp(a, "relativeDomainName")) {
|
||||
vals = ldap_get_values(ld, e, a);
|
||||
name = isc_mem_strdup(ns_g_mctx, vals[0]);
|
||||
ldap_value_free(vals);
|
||||
}
|
||||
ldap_memfree(a);
|
||||
}
|
||||
|
||||
if (name == NULL)
|
||||
continue;
|
||||
|
||||
for (a = ldap_first_attribute(ld, e, &ptr); a != NULL;
|
||||
a = ldap_next_attribute(ld, e, ptr)) {
|
||||
char *s;
|
||||
|
||||
for (s = a; *s; s++)
|
||||
*s = toupper(*s);
|
||||
s = strstr(a, "RECORD");
|
||||
if ((s == NULL) || (s == a)
|
||||
|| (s - a >= (signed int)sizeof(type))) {
|
||||
ldap_memfree(a);
|
||||
continue;
|
||||
}
|
||||
strncpy(type, a, s - a);
|
||||
type[s - a] = '\0';
|
||||
vals = ldap_get_values(ld, e, a);
|
||||
for (i=0; vals[i] != NULL; i++) {
|
||||
result = dns_sdb_putnamedrr(allnodes, name,
|
||||
type, ttl, vals[i]);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
ldap_value_free(vals);
|
||||
ldap_memfree(a);
|
||||
isc_mem_free(ns_g_mctx, name);
|
||||
result = ISC_R_FAILURE;
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
ldap_value_free(vals);
|
||||
ldap_memfree(a);
|
||||
}
|
||||
isc_mem_free(ns_g_mctx, name);
|
||||
}
|
||||
|
||||
exit:
|
||||
ldap_msgfree(res);
|
||||
return (result);
|
||||
}
|
||||
|
||||
static dns_sdbmethods_t ldapdb_methods = {
|
||||
ldapdb_lookup,
|
||||
NULL, /* authority */
|
||||
ldapdb_allnodes,
|
||||
ldapdb_create,
|
||||
ldapdb_destroy
|
||||
};
|
||||
|
||||
/* Wrapper around dns_sdb_register() */
|
||||
isc_result_t
|
||||
ldapdb_init(void) {
|
||||
unsigned int flags =
|
||||
DNS_SDBFLAG_RELATIVEOWNER |
|
||||
DNS_SDBFLAG_RELATIVERDATA |
|
||||
DNS_SDBFLAG_THREADSAFE;
|
||||
|
||||
ldapdb_lock(0);
|
||||
return (dns_sdb_register("ldap", &ldapdb_methods, NULL, flags,
|
||||
ns_g_mctx, &ldapdb));
|
||||
}
|
||||
|
||||
/* Wrapper around dns_sdb_unregister() */
|
||||
void
|
||||
ldapdb_clear(void) {
|
||||
if (ldapdb != NULL) {
|
||||
/* clean up thread data */
|
||||
ldapdb_getconn(NULL);
|
||||
dns_sdb_unregister(&ldapdb);
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
#include <isc/types.h>
|
||||
|
||||
isc_result_t ldapdb_init(void);
|
||||
|
||||
void ldapdb_clear(void);
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
.TH zone2ldap 1 "8 March 2001"
|
||||
.SH NAME
|
||||
zone2ldap /- Load BIND 9 Zone files into LDAP Directory
|
||||
.SH SYNOPSIS
|
||||
zone2ldap [-D Bind DN] [-w Bind Password] [-b Base DN] [-z Zone] [-f Zone File ] [-h Ldap Host] [-cd] [-v]
|
||||
.SH DESCRIPTION
|
||||
zone2ldap will parse a complete BIND 9 format DNS zone file, and load
|
||||
the contents into an LDAP directory, for use with the LDAP sdb back-end.
|
||||
|
||||
If the zone already exists, zone2ldap will exit succesfully. If the zone does not exists, or
|
||||
partially exists, zone2ldap will attempt to add all/missing zone data.
|
||||
|
||||
.SS Options
|
||||
.TP
|
||||
-b
|
||||
LDAP Base DN. LDAP systems require a "base dn", which is generally considered the LDAP Directory root.
|
||||
If the zone you are loading is different from the base, then you will need to tell zone2ldap what your LDAP
|
||||
base is.
|
||||
.TP
|
||||
-v
|
||||
Print version information, and immediatly exit.
|
||||
.TP
|
||||
-f
|
||||
Zone file. Bind 9.1 compatible zone file, from which zone information will be read.
|
||||
.TP
|
||||
-d
|
||||
Dump debug information to standard out.
|
||||
.TP
|
||||
-w
|
||||
LDAP Bind password, corresponding the the value of "-b".
|
||||
.TP
|
||||
-h
|
||||
LDAP Directory host. This is the hostname of the LDAP system you wish to store zone information on.
|
||||
An LDAP server should be listening on port 389 of the target system. This may be ommited, and will default
|
||||
to "localhost".
|
||||
.TP
|
||||
-c
|
||||
This will create the zone portion of the DN you are importing. For instance, if you are creating a domain.com zone,
|
||||
zone2ldap should first create "dc=domain,dc=com". This is useful if you are creating multiple domains.
|
||||
.TP
|
||||
-z
|
||||
This is the name of the zone specified in the SOA record.
|
||||
.SH EXAMPLES
|
||||
Following are brief examples of how to import a zone file into your LDAP DIT.
|
||||
.SS Loading zone domain.com, with an LDAP Base DN of dc=domain,dc=com
|
||||
zone2ldap -D dc=root -w secret -h localhost -z domain.com -f domain.com.zone
|
||||
|
||||
This will add Resource Records into an ALREADY EXISTING dc=domain,dc=com. The final SOA DN in this case, will be
|
||||
dc=@,dc=domain,dc=com
|
||||
|
||||
.SS Loading customer.com, if your LDAP Base DN is dc=provider,dc=net.
|
||||
zone2ldap -D dc=root -w secret -h localhost -z customer.com -b dc=provider,dc=net -f customer.com.zone -c
|
||||
|
||||
This will create dc=customer,dc=com under dc=provider,dc=net, and add all necessary Resource Records. The final
|
||||
root DN to the SOA will be dc=@,dc=customer,dc=com,dc=provider,dc=net.
|
||||
|
||||
.SH "SEE ALSO"
|
||||
named(8) ldap(3)
|
||||
http://www.venaas.no/ldap/bind-sdb/
|
||||
.SH "BUGS"
|
||||
Send all bug reports to Jeff McNeil <jeff@snapcase.g-rock.net>
|
||||
.SH AUTHOR
|
||||
Jeff McNeil <jeff@snapcase.g-rock.net>
|
||||
|
||||
@@ -1,721 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2001 Jeff McNeil <jeff@snapcase.g-rock.net>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Change Log
|
||||
*
|
||||
* Tue May 1 19:19:54 EDT 2001 - Jeff McNeil
|
||||
* Update to objectClass code, and add_to_rr_list function
|
||||
* (I need to rename that) to support the dNSZone schema,
|
||||
* ditched dNSDomain2 schema support. Version 0.3-ALPHA
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <getopt.h>
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
|
||||
#include <dns/db.h>
|
||||
#include <dns/dbiterator.h>
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/rdatatype.h>
|
||||
|
||||
#include <ldap.h>
|
||||
|
||||
#define DNS_OBJECT 6
|
||||
#define DNS_TOP 2
|
||||
|
||||
#define VERSION "0.4-ALPHA"
|
||||
|
||||
#define NO_SPEC 0
|
||||
#define WI_SPEC 1
|
||||
|
||||
/* Global Zone Pointer */
|
||||
char *gbl_zone = NULL;
|
||||
|
||||
typedef struct LDAP_INFO
|
||||
{
|
||||
char *dn;
|
||||
LDAPMod **attrs;
|
||||
struct LDAP_INFO *next;
|
||||
int attrcnt;
|
||||
}
|
||||
ldap_info;
|
||||
|
||||
/* usage Info */
|
||||
void usage ();
|
||||
|
||||
/* Add to the ldap dit */
|
||||
void add_ldap_values (ldap_info * ldinfo);
|
||||
|
||||
/* Init an ldap connection */
|
||||
void init_ldap_conn ();
|
||||
|
||||
/* Ldap error checking */
|
||||
void ldap_result_check (char *msg, char *dn, int err);
|
||||
|
||||
/* Put a hostname into a char ** array */
|
||||
char **hostname_to_dn_list (char *hostname, char *zone, unsigned int flags);
|
||||
|
||||
/* Find out how many items are in a char ** array */
|
||||
int get_attr_list_size (char **tmp);
|
||||
|
||||
/* Get a DN */
|
||||
char *build_dn_from_dc_list (char **dc_list, unsigned int ttl, int flag);
|
||||
|
||||
/* Add to RR list */
|
||||
void add_to_rr_list (char *dn, char *name, char *type, char *data,
|
||||
unsigned int ttl, unsigned int flags);
|
||||
|
||||
/* Error checking */
|
||||
void isc_result_check (isc_result_t res, char *errorstr);
|
||||
|
||||
/* Generate LDIF Format files */
|
||||
void generate_ldap (dns_name_t * dnsname, dns_rdata_t * rdata,
|
||||
unsigned int ttl);
|
||||
|
||||
/* head pointer to the list */
|
||||
ldap_info *ldap_info_base = NULL;
|
||||
|
||||
char *argzone, *ldapbase, *binddn, *bindpw = NULL;
|
||||
char *ldapsystem = "localhost";
|
||||
static char *objectClasses[] =
|
||||
{ "top", "dNSZone", NULL };
|
||||
static char *topObjectClasses[] = { "top", NULL };
|
||||
LDAP *conn;
|
||||
unsigned int debug = 0;
|
||||
|
||||
#ifdef DEBUG
|
||||
debug = 1;
|
||||
#endif
|
||||
|
||||
int
|
||||
main (int *argc, char **argv)
|
||||
{
|
||||
isc_mem_t *isc_ctx = NULL;
|
||||
isc_result_t result;
|
||||
char *basedn;
|
||||
ldap_info *tmp;
|
||||
LDAPMod *base_attrs[2];
|
||||
LDAPMod base;
|
||||
isc_buffer_t buff;
|
||||
char *zonefile;
|
||||
char fullbasedn[1024];
|
||||
char *ctmp;
|
||||
dns_fixedname_t fixedzone, fixedname;
|
||||
dns_rdataset_t rdataset;
|
||||
char **dc_list;
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
dns_rdatasetiter_t *riter;
|
||||
dns_name_t *zone, *name;
|
||||
dns_db_t *db = NULL;
|
||||
dns_dbiterator_t *dbit = NULL;
|
||||
dns_dbnode_t *node;
|
||||
extern char *optarg;
|
||||
extern int optind, opterr, optopt;
|
||||
int create_base = 0;
|
||||
int topt;
|
||||
|
||||
if ((int) argc < 2)
|
||||
{
|
||||
usage ();
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
while ((topt = getopt ((int) argc, argv, "D:w:b:z:f:h:?dcv")) != -1)
|
||||
{
|
||||
switch (topt)
|
||||
{
|
||||
case 'v':
|
||||
printf("%s\n", VERSION);
|
||||
exit(0);
|
||||
case 'c':
|
||||
create_base++;
|
||||
break;
|
||||
case 'd':
|
||||
debug++;
|
||||
break;
|
||||
case 'D':
|
||||
binddn = strdup (optarg);
|
||||
break;
|
||||
case 'w':
|
||||
bindpw = strdup (optarg);
|
||||
break;
|
||||
case 'b':
|
||||
ldapbase = strdup (optarg);
|
||||
break;
|
||||
case 'z':
|
||||
argzone = strdup (optarg);
|
||||
// We wipe argzone all to hell when we parse it for the DN */
|
||||
gbl_zone = strdup(argzone);
|
||||
break;
|
||||
case 'f':
|
||||
zonefile = strdup (optarg);
|
||||
break;
|
||||
case 'h':
|
||||
ldapsystem = strdup (optarg);
|
||||
break;
|
||||
case '?':
|
||||
default:
|
||||
usage ();
|
||||
exit (0);
|
||||
}
|
||||
}
|
||||
|
||||
if ((argzone == NULL) || (zonefile == NULL))
|
||||
{
|
||||
usage ();
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
if (debug)
|
||||
printf ("Initializing ISC Routines, parsing zone file\n");
|
||||
|
||||
result = isc_mem_create (0, 0, &isc_ctx);
|
||||
isc_result_check (result, "isc_mem_create");
|
||||
|
||||
isc_buffer_init (&buff, argzone, strlen (argzone));
|
||||
isc_buffer_add (&buff, strlen (argzone));
|
||||
dns_fixedname_init (&fixedzone);
|
||||
zone = dns_fixedname_name (&fixedzone);
|
||||
result = dns_name_fromtext (zone, &buff, dns_rootname, ISC_FALSE, NULL);
|
||||
isc_result_check (result, "dns_name_fromtext");
|
||||
|
||||
result =
|
||||
dns_db_create (isc_ctx, "rbt", zone, dns_dbtype_zone, dns_rdataclass_in,
|
||||
0, NULL, &db);
|
||||
isc_result_check (result, "dns_db_create");
|
||||
|
||||
result = dns_db_load (db, zonefile);
|
||||
isc_result_check (result, "Check Zone Syntax: dns_db_load");
|
||||
|
||||
result = dns_db_createiterator (db, ISC_FALSE, &dbit);
|
||||
isc_result_check (result, "dns_db_createiterator");
|
||||
|
||||
result = dns_dbiterator_first (dbit);
|
||||
isc_result_check (result, "dns_dbiterator_first");
|
||||
|
||||
dns_fixedname_init (&fixedname);
|
||||
name = dns_fixedname_name (&fixedname);
|
||||
dns_rdataset_init (&rdataset);
|
||||
dns_rdata_init (&rdata);
|
||||
|
||||
while (result == ISC_R_SUCCESS)
|
||||
{
|
||||
node = NULL;
|
||||
result = dns_dbiterator_current (dbit, &node, name);
|
||||
|
||||
if (result == ISC_R_NOMORE)
|
||||
break;
|
||||
|
||||
isc_result_check (result, "dns_dbiterator_current");
|
||||
|
||||
riter = NULL;
|
||||
result = dns_db_allrdatasets (db, node, NULL, 0, &riter);
|
||||
isc_result_check (result, "dns_db_allrdatasets");
|
||||
|
||||
result = dns_rdatasetiter_first (riter);
|
||||
//isc_result_check(result, "dns_rdatasetiter_first");
|
||||
|
||||
while (result == ISC_R_SUCCESS)
|
||||
{
|
||||
dns_rdatasetiter_current (riter, &rdataset);
|
||||
result = dns_rdataset_first (&rdataset);
|
||||
isc_result_check (result, "dns_rdatasetiter_current");
|
||||
|
||||
while (result == ISC_R_SUCCESS)
|
||||
{
|
||||
dns_rdataset_current (&rdataset, &rdata);
|
||||
generate_ldap (name, &rdata, rdataset.ttl);
|
||||
dns_rdata_reset (&rdata);
|
||||
result = dns_rdataset_next (&rdataset);
|
||||
}
|
||||
dns_rdataset_disassociate (&rdataset);
|
||||
result = dns_rdatasetiter_next (riter);
|
||||
|
||||
}
|
||||
dns_rdatasetiter_destroy (&riter);
|
||||
result = dns_dbiterator_next (dbit);
|
||||
|
||||
}
|
||||
|
||||
/* Initialize the LDAP Connection */
|
||||
if (debug)
|
||||
printf ("Initializing LDAP Connection to %s as %s\n", ldapsystem, binddn);
|
||||
|
||||
init_ldap_conn ();
|
||||
|
||||
if (create_base)
|
||||
{
|
||||
if (debug)
|
||||
printf ("Creating base zone DN %s\n", argzone);
|
||||
|
||||
dc_list = hostname_to_dn_list (argzone, argzone, DNS_TOP);
|
||||
basedn = build_dn_from_dc_list (dc_list, 0, NO_SPEC);
|
||||
|
||||
for (ctmp = &basedn[strlen (basedn)]; ctmp >= &basedn[0]; ctmp--)
|
||||
{
|
||||
if ((*ctmp == ',') || (ctmp == &basedn[0]))
|
||||
{
|
||||
base.mod_op = LDAP_MOD_ADD;
|
||||
base.mod_type = "objectClass";
|
||||
base.mod_values = topObjectClasses;
|
||||
base_attrs[0] = &base;
|
||||
base_attrs[1] = NULL;
|
||||
|
||||
if (ldapbase)
|
||||
{
|
||||
if (ctmp != &basedn[0])
|
||||
sprintf (fullbasedn, "%s,%s", ctmp + 1, ldapbase);
|
||||
else
|
||||
sprintf (fullbasedn, "%s,%s", ctmp, ldapbase);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ctmp != &basedn[0])
|
||||
sprintf (fullbasedn, "%s", ctmp + 1);
|
||||
else
|
||||
sprintf (fullbasedn, "%s", ctmp);
|
||||
}
|
||||
result = ldap_add_s (conn, fullbasedn, base_attrs);
|
||||
ldap_result_check ("intial ldap_add_s", fullbasedn, result);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (debug)
|
||||
printf ("Skipping zone base dn creation for %s\n", argzone);
|
||||
}
|
||||
|
||||
for (tmp = ldap_info_base; tmp != NULL; tmp = tmp->next)
|
||||
{
|
||||
|
||||
if (debug)
|
||||
printf ("Adding DN: %s\n", tmp->dn);
|
||||
|
||||
add_ldap_values (tmp);
|
||||
}
|
||||
|
||||
if (debug)
|
||||
printf("Operation Complete.\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Check the status of an isc_result_t after any isc routines.
|
||||
* I should probably rename this function, as not to cause any
|
||||
* confusion with the isc* routines. Will exit on error. */
|
||||
void
|
||||
isc_result_check (isc_result_t res, char *errorstr)
|
||||
{
|
||||
if (res != ISC_R_SUCCESS)
|
||||
{
|
||||
fprintf (stderr, " %s: %s\n", errorstr, isc_result_totext (res));
|
||||
exit (-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Takes DNS information, in bind data structure format, and adds textual
|
||||
* zone information to the LDAP run queue. */
|
||||
void
|
||||
generate_ldap (dns_name_t * dnsname, dns_rdata_t * rdata, unsigned int ttl)
|
||||
{
|
||||
unsigned char name[DNS_NAME_MAXTEXT + 1];
|
||||
unsigned int len;
|
||||
unsigned char type[20];
|
||||
unsigned char data[2048];
|
||||
char **dc_list;
|
||||
char *dn;
|
||||
|
||||
isc_buffer_t buff;
|
||||
isc_result_t result;
|
||||
|
||||
isc_buffer_init (&buff, name, sizeof (name));
|
||||
result = dns_name_totext (dnsname, ISC_TRUE, &buff);
|
||||
isc_result_check (result, "dns_name_totext");
|
||||
name[isc_buffer_usedlength (&buff)] = 0;
|
||||
|
||||
isc_buffer_init (&buff, type, sizeof (type));
|
||||
result = dns_rdatatype_totext (rdata->type, &buff);
|
||||
isc_result_check (result, "dns_rdatatype_totext");
|
||||
type[isc_buffer_usedlength (&buff)] = 0;
|
||||
|
||||
isc_buffer_init (&buff, data, sizeof (data));
|
||||
result = dns_rdata_totext (rdata, NULL, &buff);
|
||||
isc_result_check (result, "dns_rdata_totext");
|
||||
data[isc_buffer_usedlength (&buff)] = 0;
|
||||
|
||||
dc_list = hostname_to_dn_list (name, argzone, DNS_OBJECT);
|
||||
len = (get_attr_list_size (dc_list) - 2);
|
||||
dn = build_dn_from_dc_list (dc_list, ttl, WI_SPEC);
|
||||
|
||||
if (debug)
|
||||
printf ("Adding %s (%s %s) to run queue list.\n", dn, type, data);
|
||||
|
||||
add_to_rr_list (dn, dc_list[len], type, data, ttl, DNS_OBJECT);
|
||||
}
|
||||
|
||||
|
||||
/* Locate an item in the Run queue linked list, by DN. Used by functions
|
||||
* which add items to the run queue.
|
||||
*/
|
||||
ldap_info *
|
||||
locate_by_dn (char *dn)
|
||||
{
|
||||
ldap_info *tmp;
|
||||
for (tmp = ldap_info_base; tmp != (ldap_info *) NULL; tmp = tmp->next)
|
||||
{
|
||||
if (!strncmp (tmp->dn, dn, strlen (dn)))
|
||||
return tmp;
|
||||
}
|
||||
return (ldap_info *) NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Take textual zone data, and add to the LDAP Run queue. This works like so:
|
||||
* If locate_by_dn does not return, alloc a new ldap_info structure, and then
|
||||
* calloc a LDAPMod array, fill in the default "everyone needs this" information,
|
||||
* including object classes and dc's. If it locate_by_dn does return, then we'll
|
||||
* realloc for more LDAPMod structs, and appened the new data. If an LDAPMod exists
|
||||
* for the parameter we're adding, then we'll realloc the mod_values array, and
|
||||
* add the new value to the existing LDAPMod. Finnaly, it assures linkage exists
|
||||
* within the Run queue linked ilst*/
|
||||
|
||||
void
|
||||
add_to_rr_list (char *dn, char *name, char *type,
|
||||
char *data, unsigned int ttl, unsigned int flags)
|
||||
{
|
||||
int i;
|
||||
int x;
|
||||
ldap_info *tmp;
|
||||
int attrlist;
|
||||
char ldap_type_buffer[128];
|
||||
char charttl[64];
|
||||
|
||||
|
||||
if ((tmp = locate_by_dn (dn)) == NULL)
|
||||
{
|
||||
|
||||
/* There wasn't one already there, so we need to allocate a new one,
|
||||
* and stick it on the list */
|
||||
|
||||
tmp = (ldap_info *) malloc (sizeof (ldap_info));
|
||||
if (tmp == (ldap_info *) NULL)
|
||||
{
|
||||
fprintf (stderr, "malloc: %s\n", strerror (errno));
|
||||
ldap_unbind_s (conn);
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
tmp->dn = strdup (dn);
|
||||
tmp->attrs = (LDAPMod **) calloc (sizeof (LDAPMod *), flags);
|
||||
if (tmp->attrs == (LDAPMod **) NULL)
|
||||
{
|
||||
fprintf (stderr, "calloc: %s\n", strerror (errno));
|
||||
ldap_unbind_s (conn);
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
for (i = 0; i < flags; i++)
|
||||
{
|
||||
tmp->attrs[i] = (LDAPMod *) malloc (sizeof (LDAPMod));
|
||||
if (tmp->attrs[i] == (LDAPMod *) NULL)
|
||||
{
|
||||
fprintf (stderr, "malloc: %s\n", strerror (errno));
|
||||
exit (-1);
|
||||
}
|
||||
}
|
||||
tmp->attrs[0]->mod_op = LDAP_MOD_ADD;
|
||||
tmp->attrs[0]->mod_type = "objectClass";
|
||||
|
||||
if (flags == DNS_OBJECT)
|
||||
tmp->attrs[0]->mod_values = objectClasses;
|
||||
else
|
||||
{
|
||||
tmp->attrs[0]->mod_values = topObjectClasses;
|
||||
tmp->attrs[1] = NULL;
|
||||
tmp->attrcnt = 2;
|
||||
tmp->next = ldap_info_base;
|
||||
ldap_info_base = tmp;
|
||||
return;
|
||||
}
|
||||
|
||||
tmp->attrs[1]->mod_op = LDAP_MOD_ADD;
|
||||
tmp->attrs[1]->mod_type = "relativeDomainName";
|
||||
tmp->attrs[1]->mod_values = (char **) calloc (sizeof (char *), 2);
|
||||
|
||||
if (tmp->attrs[1]->mod_values == (char **)NULL)
|
||||
exit(-1);
|
||||
|
||||
tmp->attrs[1]->mod_values[0] = strdup (name);
|
||||
tmp->attrs[1]->mod_values[2] = NULL;
|
||||
|
||||
sprintf (ldap_type_buffer, "%sRecord", type);
|
||||
|
||||
tmp->attrs[2]->mod_op = LDAP_MOD_ADD;
|
||||
tmp->attrs[2]->mod_type = strdup (ldap_type_buffer);
|
||||
tmp->attrs[2]->mod_values = (char **) calloc (sizeof (char *), 2);
|
||||
|
||||
if (tmp->attrs[2]->mod_values == (char **)NULL)
|
||||
exit(-1);
|
||||
|
||||
tmp->attrs[2]->mod_values[0] = strdup (data);
|
||||
tmp->attrs[2]->mod_values[1] = NULL;
|
||||
|
||||
tmp->attrs[3]->mod_op = LDAP_MOD_ADD;
|
||||
tmp->attrs[3]->mod_type = "dNSTTL";
|
||||
tmp->attrs[3]->mod_values = (char **) calloc (sizeof (char *), 2);
|
||||
|
||||
if (tmp->attrs[3]->mod_values == (char **)NULL)
|
||||
exit(-1);
|
||||
|
||||
sprintf (charttl, "%d", ttl);
|
||||
tmp->attrs[3]->mod_values[0] = strdup (charttl);
|
||||
tmp->attrs[3]->mod_values[1] = NULL;
|
||||
|
||||
tmp->attrs[4]->mod_op = LDAP_MOD_ADD;
|
||||
tmp->attrs[4]->mod_type = "zoneName";
|
||||
tmp->attrs[4]->mod_values = (char **)calloc(sizeof(char *), 2);
|
||||
tmp->attrs[4]->mod_values[0] = gbl_zone;
|
||||
tmp->attrs[4]->mod_values[1] = NULL;
|
||||
|
||||
tmp->attrs[5] = NULL;
|
||||
tmp->attrcnt = flags;
|
||||
tmp->next = ldap_info_base;
|
||||
ldap_info_base = tmp;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
for (i = 0; tmp->attrs[i] != NULL; i++)
|
||||
{
|
||||
sprintf (ldap_type_buffer, "%sRecord", type);
|
||||
if (!strncmp
|
||||
(ldap_type_buffer, tmp->attrs[i]->mod_type,
|
||||
strlen (tmp->attrs[i]->mod_type)))
|
||||
{
|
||||
attrlist = get_attr_list_size (tmp->attrs[i]->mod_values);
|
||||
tmp->attrs[i]->mod_values =
|
||||
(char **) realloc (tmp->attrs[i]->mod_values,
|
||||
sizeof (char *) * (attrlist + 1));
|
||||
|
||||
if (tmp->attrs[i]->mod_values == (char **) NULL)
|
||||
{
|
||||
fprintf (stderr, "realloc: %s\n", strerror (errno));
|
||||
ldap_unbind_s (conn);
|
||||
exit (-1);
|
||||
}
|
||||
for (x = 0; tmp->attrs[i]->mod_values[x] != NULL; x++);
|
||||
|
||||
tmp->attrs[i]->mod_values[x] = strdup (data);
|
||||
tmp->attrs[i]->mod_values[x + 1] = NULL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
tmp->attrs =
|
||||
(LDAPMod **) realloc (tmp->attrs,
|
||||
sizeof (LDAPMod) * ++(tmp->attrcnt));
|
||||
if (tmp->attrs == NULL)
|
||||
{
|
||||
fprintf (stderr, "realloc: %s\n", strerror (errno));
|
||||
ldap_unbind_s (conn);
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
for (x = 0; tmp->attrs[x] != NULL; x++);
|
||||
tmp->attrs[x] = (LDAPMod *) malloc (sizeof (LDAPMod));
|
||||
tmp->attrs[x]->mod_op = LDAP_MOD_ADD;
|
||||
tmp->attrs[x]->mod_type = strdup (ldap_type_buffer);
|
||||
tmp->attrs[x]->mod_values = (char **) calloc (sizeof (char *), 2);
|
||||
tmp->attrs[x]->mod_values[0] = strdup (data);
|
||||
tmp->attrs[x]->mod_values[1] = NULL;
|
||||
tmp->attrs[x + 1] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* Size of a mod_values list, plus the terminating NULL field. */
|
||||
int
|
||||
get_attr_list_size (char **tmp)
|
||||
{
|
||||
int i = 0;
|
||||
char **ftmp = tmp;
|
||||
while (*ftmp != NULL)
|
||||
{
|
||||
i++;
|
||||
ftmp++;
|
||||
}
|
||||
return ++i;
|
||||
}
|
||||
|
||||
|
||||
/* take a hostname, and split it into a char ** of the dc parts,
|
||||
* example, we have www.domain.com, this function will return:
|
||||
* array[0] = com, array[1] = domain, array[2] = www. */
|
||||
|
||||
char **
|
||||
hostname_to_dn_list (char *hostname, char *zone, unsigned int flags)
|
||||
{
|
||||
char *tmp;
|
||||
static char *dn_buffer[64];
|
||||
int i = 0;
|
||||
char *zname;
|
||||
char *hnamebuff;
|
||||
|
||||
zname = strdup (hostname);
|
||||
|
||||
if (flags == DNS_OBJECT)
|
||||
{
|
||||
|
||||
if (strlen (zname) != strlen (zone))
|
||||
{
|
||||
tmp = &zname[strlen (zname) - strlen (zone)];
|
||||
*--tmp = '\0';
|
||||
hnamebuff = strdup (zname);
|
||||
zname = ++tmp;
|
||||
}
|
||||
else
|
||||
hnamebuff = "@";
|
||||
}
|
||||
else
|
||||
{
|
||||
zname = zone;
|
||||
hnamebuff = NULL;
|
||||
}
|
||||
|
||||
for (tmp = strrchr (zname, '.'); tmp != (char *) 0;
|
||||
tmp = strrchr (zname, '.'))
|
||||
{
|
||||
*tmp++ = '\0';
|
||||
dn_buffer[i++] = tmp;
|
||||
}
|
||||
dn_buffer[i++] = zname;
|
||||
dn_buffer[i++] = hnamebuff;
|
||||
dn_buffer[i] = NULL;
|
||||
|
||||
return dn_buffer;
|
||||
}
|
||||
|
||||
|
||||
/* build an sdb compatible LDAP DN from a "dc_list" (char **).
|
||||
* will append dNSTTL information to each RR Record, with the
|
||||
* exception of "@"/SOA. */
|
||||
|
||||
char *
|
||||
build_dn_from_dc_list (char **dc_list, unsigned int ttl, int flag)
|
||||
{
|
||||
int size;
|
||||
int x;
|
||||
static char dn[1024];
|
||||
char tmp[128];
|
||||
|
||||
bzero (tmp, sizeof (tmp));
|
||||
bzero (dn, sizeof (dn));
|
||||
size = get_attr_list_size (dc_list);
|
||||
for (x = size - 2; x > 0; x--)
|
||||
{
|
||||
if (flag == WI_SPEC)
|
||||
{
|
||||
if (x == (size - 2) && (strncmp (dc_list[x], "@", 1) == 0) && (ttl))
|
||||
sprintf (tmp, "relativeDomainName=%s + dNSTTL=%d,", dc_list[x], ttl);
|
||||
else if (x == (size - 2))
|
||||
sprintf(tmp, "relativeDomainName=%s,",dc_list[x]);
|
||||
else
|
||||
sprintf(tmp,"dc=%s,", dc_list[x]);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(tmp, "dc=%s,", dc_list[x]);
|
||||
}
|
||||
|
||||
|
||||
strncat (dn, tmp, sizeof (dn) - strlen (dn));
|
||||
}
|
||||
|
||||
sprintf (tmp, "dc=%s", dc_list[0]);
|
||||
strncat (dn, tmp, sizeof (dn) - strlen (dn));
|
||||
|
||||
fflush(NULL);
|
||||
return dn;
|
||||
}
|
||||
|
||||
|
||||
/* Initialize LDAP Conn */
|
||||
void
|
||||
init_ldap_conn ()
|
||||
{
|
||||
int result;
|
||||
conn = ldap_open (ldapsystem, LDAP_PORT);
|
||||
if (conn == NULL)
|
||||
{
|
||||
fprintf (stderr, "Error opening Ldap connection: %s\n",
|
||||
strerror (errno));
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
result = ldap_simple_bind_s (conn, binddn, bindpw);
|
||||
ldap_result_check ("ldap_simple_bind_s", "LDAP Bind", result);
|
||||
}
|
||||
|
||||
/* Like isc_result_check, only for LDAP */
|
||||
void
|
||||
ldap_result_check (char *msg, char *dn, int err)
|
||||
{
|
||||
if ((err != LDAP_SUCCESS) && (err != LDAP_ALREADY_EXISTS))
|
||||
{
|
||||
fprintf(stderr, "Error while adding %s (%s):\n",
|
||||
dn, msg);
|
||||
ldap_perror (conn, dn);
|
||||
ldap_unbind_s (conn);
|
||||
exit (-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* For running the ldap_info run queue. */
|
||||
void
|
||||
add_ldap_values (ldap_info * ldinfo)
|
||||
{
|
||||
int result;
|
||||
char dnbuffer[1024];
|
||||
|
||||
|
||||
if (ldapbase != NULL)
|
||||
sprintf (dnbuffer, "%s,%s", ldinfo->dn, ldapbase);
|
||||
else
|
||||
sprintf (dnbuffer, "%s", ldinfo->dn);
|
||||
|
||||
result = ldap_add_s (conn, dnbuffer, ldinfo->attrs);
|
||||
ldap_result_check ("ldap_add_s", dnbuffer, result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* name says it all */
|
||||
void
|
||||
usage ()
|
||||
{
|
||||
fprintf (stderr,
|
||||
"zone2ldap -D [BIND DN] -w [BIND PASSWORD] -b [BASE DN] -z [ZONE] -f [ZONE FILE] -h [LDAP HOST]
|
||||
[-c Create LDAP Base structure][-d Debug Output (lots !)] \n ");}
|
||||
@@ -1,348 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
||||
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
||||
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
|
||||
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: pgsqldb.c,v 1.12 2001/02/28 23:42:37 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <pgsql/libpq-fe.h>
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/sdb.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <named/globals.h>
|
||||
|
||||
#include "pgsqldb.h"
|
||||
|
||||
/*
|
||||
* A simple database driver that interfaces to a PostgreSQL database. This
|
||||
* is not complete, and not designed for general use. It opens one
|
||||
* connection to the database per zone, which is inefficient. It also may
|
||||
* not handle quoting correctly.
|
||||
*
|
||||
* The table must contain the fields "name", "rdtype", and "rdata", and
|
||||
* is expected to contain a properly constructed zone. The program "zonetodb"
|
||||
* creates such a table.
|
||||
*/
|
||||
|
||||
static dns_sdbimplementation_t *pgsqldb = NULL;
|
||||
|
||||
struct dbinfo {
|
||||
PGconn *conn;
|
||||
char *database;
|
||||
char *table;
|
||||
char *host;
|
||||
char *user;
|
||||
char *passwd;
|
||||
};
|
||||
|
||||
static void
|
||||
pgsqldb_destroy(const char *zone, void *driverdata, void **dbdata);
|
||||
|
||||
/*
|
||||
* Canonicalize a string before writing it to the database.
|
||||
* "dest" must be an array of at least size 2*strlen(source) + 1.
|
||||
*/
|
||||
static void
|
||||
quotestring(const char *source, char *dest) {
|
||||
while (*source != 0) {
|
||||
if (*source == '\'')
|
||||
*dest++ = '\'';
|
||||
/* SQL doesn't treat \ as special, but PostgreSQL does */
|
||||
else if (*source == '\\')
|
||||
*dest++ = '\\';
|
||||
*dest++ = *source++;
|
||||
}
|
||||
*dest++ = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Connect to the database.
|
||||
*/
|
||||
static isc_result_t
|
||||
db_connect(struct dbinfo *dbi) {
|
||||
dbi->conn = PQsetdbLogin(dbi->host, NULL, NULL, NULL, dbi->database,
|
||||
dbi->user, dbi->passwd);
|
||||
|
||||
if (PQstatus(dbi->conn) == CONNECTION_OK)
|
||||
return (ISC_R_SUCCESS);
|
||||
else
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Check to see if the connection is still valid. If not, attempt to
|
||||
* reconnect.
|
||||
*/
|
||||
static isc_result_t
|
||||
maybe_reconnect(struct dbinfo *dbi) {
|
||||
if (PQstatus(dbi->conn) == CONNECTION_OK)
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
return (db_connect(dbi));
|
||||
}
|
||||
|
||||
/*
|
||||
* This database operates on absolute names.
|
||||
*
|
||||
* Queries are converted into SQL queries and issued synchronously. Errors
|
||||
* are handled really badly.
|
||||
*/
|
||||
static isc_result_t
|
||||
pgsqldb_lookup(const char *zone, const char *name, void *dbdata,
|
||||
dns_sdblookup_t *lookup)
|
||||
{
|
||||
isc_result_t result;
|
||||
struct dbinfo *dbi = dbdata;
|
||||
PGresult *res;
|
||||
char str[1500];
|
||||
char *canonname;
|
||||
int i;
|
||||
|
||||
UNUSED(zone);
|
||||
|
||||
canonname = isc_mem_get(ns_g_mctx, strlen(name) * 2 + 1);
|
||||
if (canonname == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
quotestring(name, canonname);
|
||||
snprintf(str, sizeof(str),
|
||||
"SELECT TTL,RDTYPE,RDATA FROM \"%s\" WHERE "
|
||||
"lower(NAME) = lower('%s')", dbi->table, canonname);
|
||||
isc_mem_put(ns_g_mctx, canonname, strlen(name) * 2 + 1);
|
||||
|
||||
result = maybe_reconnect(dbi);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
res = PQexec(dbi->conn, str);
|
||||
if (!res || PQresultStatus(res) != PGRES_TUPLES_OK) {
|
||||
PQclear(res);
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
if (PQntuples(res) == 0) {
|
||||
PQclear(res);
|
||||
return (ISC_R_NOTFOUND);
|
||||
}
|
||||
|
||||
for (i = 0; i < PQntuples(res); i++) {
|
||||
char *ttlstr = PQgetvalue(res, i, 0);
|
||||
char *type = PQgetvalue(res, i, 1);
|
||||
char *data = PQgetvalue(res, i, 2);
|
||||
dns_ttl_t ttl;
|
||||
char *endp;
|
||||
ttl = strtol(ttlstr, &endp, 10);
|
||||
if (*endp != '\0') {
|
||||
PQclear(res);
|
||||
return (DNS_R_BADTTL);
|
||||
}
|
||||
result = dns_sdb_putrr(lookup, type, ttl, data);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
PQclear(res);
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
PQclear(res);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
* Issue an SQL query to return all nodes in the database and fill the
|
||||
* allnodes structure.
|
||||
*/
|
||||
static isc_result_t
|
||||
pgsqldb_allnodes(const char *zone, void *dbdata, dns_sdballnodes_t *allnodes) {
|
||||
struct dbinfo *dbi = dbdata;
|
||||
PGresult *res;
|
||||
isc_result_t result;
|
||||
char str[1500];
|
||||
int i;
|
||||
|
||||
UNUSED(zone);
|
||||
|
||||
snprintf(str, sizeof(str),
|
||||
"SELECT TTL,NAME,RDTYPE,RDATA FROM \"%s\" ORDER BY NAME",
|
||||
dbi->table);
|
||||
|
||||
result = maybe_reconnect(dbi);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
res = PQexec(dbi->conn, str);
|
||||
if (!res || PQresultStatus(res) != PGRES_TUPLES_OK ) {
|
||||
PQclear(res);
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
if (PQntuples(res) == 0) {
|
||||
PQclear(res);
|
||||
return (ISC_R_NOTFOUND);
|
||||
}
|
||||
|
||||
for (i = 0; i < PQntuples(res); i++) {
|
||||
char *ttlstr = PQgetvalue(res, i, 0);
|
||||
char *name = PQgetvalue(res, i, 1);
|
||||
char *type = PQgetvalue(res, i, 2);
|
||||
char *data = PQgetvalue(res, i, 3);
|
||||
dns_ttl_t ttl;
|
||||
char *endp;
|
||||
ttl = strtol(ttlstr, &endp, 10);
|
||||
if (*endp != '\0') {
|
||||
PQclear(res);
|
||||
return (DNS_R_BADTTL);
|
||||
}
|
||||
result = dns_sdb_putnamedrr(allnodes, name, type, ttl, data);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
PQclear(res);
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
PQclear(res);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
* Create a connection to the database and save any necessary information
|
||||
* in dbdata.
|
||||
*
|
||||
* argv[0] is the name of the database
|
||||
* argv[1] is the name of the table
|
||||
* argv[2] (if present) is the name of the host to connect to
|
||||
* argv[3] (if present) is the name of the user to connect as
|
||||
* argv[4] (if present) is the name of the password to connect with
|
||||
*/
|
||||
static isc_result_t
|
||||
pgsqldb_create(const char *zone, int argc, char **argv,
|
||||
void *driverdata, void **dbdata)
|
||||
{
|
||||
struct dbinfo *dbi;
|
||||
isc_result_t result;
|
||||
|
||||
UNUSED(zone);
|
||||
UNUSED(driverdata);
|
||||
|
||||
if (argc < 2)
|
||||
return (ISC_R_FAILURE);
|
||||
|
||||
dbi = isc_mem_get(ns_g_mctx, sizeof(struct dbinfo));
|
||||
if (dbi == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
dbi->conn = NULL;
|
||||
dbi->database = NULL;
|
||||
dbi->table = NULL;
|
||||
dbi->host = NULL;
|
||||
dbi->user = NULL;
|
||||
dbi->passwd = NULL;
|
||||
|
||||
#define STRDUP_OR_FAIL(target, source) \
|
||||
do { \
|
||||
target = isc_mem_strdup(ns_g_mctx, source); \
|
||||
if (target == NULL) { \
|
||||
result = ISC_R_NOMEMORY; \
|
||||
goto cleanup; \
|
||||
} \
|
||||
} while (0);
|
||||
|
||||
STRDUP_OR_FAIL(dbi->database, argv[0]);
|
||||
STRDUP_OR_FAIL(dbi->table, argv[1]);
|
||||
if (argc > 2)
|
||||
STRDUP_OR_FAIL(dbi->host, argv[2]);
|
||||
if (argc > 3)
|
||||
STRDUP_OR_FAIL(dbi->user, argv[3]);
|
||||
if (argc > 4)
|
||||
STRDUP_OR_FAIL(dbi->passwd, argv[4]);
|
||||
|
||||
result = db_connect(dbi);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
|
||||
*dbdata = dbi;
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
cleanup:
|
||||
pgsqldb_destroy(zone, driverdata, (void **)&dbi);
|
||||
return (result);
|
||||
}
|
||||
|
||||
/*
|
||||
* Close the connection to the database.
|
||||
*/
|
||||
static void
|
||||
pgsqldb_destroy(const char *zone, void *driverdata, void **dbdata) {
|
||||
struct dbinfo *dbi = *dbdata;
|
||||
|
||||
UNUSED(zone);
|
||||
UNUSED(driverdata);
|
||||
|
||||
if (dbi->conn != NULL)
|
||||
PQfinish(dbi->conn);
|
||||
if (dbi->database != NULL)
|
||||
isc_mem_free(ns_g_mctx, dbi->database);
|
||||
if (dbi->table != NULL)
|
||||
isc_mem_free(ns_g_mctx, dbi->table);
|
||||
if (dbi->host != NULL)
|
||||
isc_mem_free(ns_g_mctx, dbi->host);
|
||||
if (dbi->user != NULL)
|
||||
isc_mem_free(ns_g_mctx, dbi->user);
|
||||
if (dbi->passwd != NULL)
|
||||
isc_mem_free(ns_g_mctx, dbi->passwd);
|
||||
if (dbi->database != NULL)
|
||||
isc_mem_free(ns_g_mctx, dbi->database);
|
||||
isc_mem_put(ns_g_mctx, dbi, sizeof(struct dbinfo));
|
||||
}
|
||||
|
||||
/*
|
||||
* Since the SQL database corresponds to a zone, the authority data should
|
||||
* be returned by the lookup() function. Therefore the authority() function
|
||||
* is NULL.
|
||||
*/
|
||||
static dns_sdbmethods_t pgsqldb_methods = {
|
||||
pgsqldb_lookup,
|
||||
NULL, /* authority */
|
||||
pgsqldb_allnodes,
|
||||
pgsqldb_create,
|
||||
pgsqldb_destroy
|
||||
};
|
||||
|
||||
/*
|
||||
* Wrapper around dns_sdb_register().
|
||||
*/
|
||||
isc_result_t
|
||||
pgsqldb_init(void) {
|
||||
unsigned int flags;
|
||||
flags = 0;
|
||||
return (dns_sdb_register("pgsql", &pgsqldb_methods, NULL, flags,
|
||||
ns_g_mctx, &pgsqldb));
|
||||
}
|
||||
|
||||
/*
|
||||
* Wrapper around dns_sdb_unregister().
|
||||
*/
|
||||
void
|
||||
pgsqldb_clear(void) {
|
||||
if (pgsqldb != NULL)
|
||||
dns_sdb_unregister(&pgsqldb);
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
||||
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
||||
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
|
||||
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: pgsqldb.h,v 1.2 2001/01/09 21:46:27 bwelling Exp $ */
|
||||
|
||||
#include <isc/types.h>
|
||||
|
||||
isc_result_t pgsqldb_init(void);
|
||||
|
||||
void pgsqldb_clear(void);
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
# Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
#
|
||||
# Permission to use, copy, modify, and distribute this software for any
|
||||
# purpose with or without fee is hereby granted, provided that the above
|
||||
# copyright notice and this permission notice appear in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
||||
# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
||||
# INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
|
||||
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: lookup.tcl,v 1.7 2001/01/09 21:46:24 bwelling Exp $
|
||||
|
||||
#
|
||||
# Sample lookup procedure for tcldb
|
||||
#
|
||||
# This lookup procedure defines zones with identical SOA, NS, and MX
|
||||
# records at the apex and a single A record that varies from zone to
|
||||
# zone at the name "www".
|
||||
#
|
||||
# Something like this could be used by a web hosting company to serve
|
||||
# a number of domains without needing to create a separate master file
|
||||
# for each domain. Instead, all per-zone data (in this case, a single
|
||||
# IP address) specified in the named.conf file like this:
|
||||
#
|
||||
# zone "a.com." { type master; database "tcl 10.0.0.42"; };
|
||||
# zone "b.com." { type master; database "tcl 10.0.0.99"; };
|
||||
#
|
||||
# Since the tcldb driver doesn't support zone transfers, there should
|
||||
# be at least two identically configured master servers. In the
|
||||
# example below, they are assumed to be called ns1.isp.nil and
|
||||
# ns2.isp.nil.
|
||||
#
|
||||
|
||||
proc lookup {zone name} {
|
||||
global dbargs
|
||||
switch -- $name {
|
||||
@ { return [list \
|
||||
{SOA 86400 "ns1.isp.nil. hostmaster.isp.nil. \
|
||||
1 3600 1800 1814400 3600"} \
|
||||
{NS 86400 "ns1.isp.nil."} \
|
||||
{NS 86400 "ns2.isp.nil."} \
|
||||
{MX 86400 "10 mail.isp.nil."} ] }
|
||||
www { return [list [list A 3600 $dbargs($zone)] ] }
|
||||
}
|
||||
return NXDOMAIN
|
||||
}
|
||||
@@ -1,232 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
||||
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
||||
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
|
||||
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: tcldb.c,v 1.7 2001/01/09 21:46:28 bwelling Exp $ */
|
||||
|
||||
/*
|
||||
* A simple database driver that calls a Tcl procedure to define
|
||||
* the contents of the DNS namespace. The procedure is loaded
|
||||
* from the file lookup.tcl; look at the comments there for
|
||||
* more information.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/log.h>
|
||||
#include <dns/sdb.h>
|
||||
|
||||
#include <named/globals.h>
|
||||
|
||||
#include <tcl.h>
|
||||
|
||||
#include <tcldb.h>
|
||||
|
||||
#define CHECK(op) \
|
||||
do { result = (op); \
|
||||
if (result != ISC_R_SUCCESS) return (result); \
|
||||
} while (0)
|
||||
|
||||
typedef struct tcldb_driver {
|
||||
isc_mem_t *mctx;
|
||||
Tcl_Interp *interp;
|
||||
} tcldb_driver_t;
|
||||
|
||||
static tcldb_driver_t *the_driver = NULL;
|
||||
|
||||
static dns_sdbimplementation_t *tcldb = NULL;
|
||||
|
||||
static isc_result_t
|
||||
tcldb_driver_create(isc_mem_t *mctx, tcldb_driver_t **driverp) {
|
||||
int tclres;
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
tcldb_driver_t *driver = isc_mem_get(mctx, sizeof(tcldb_driver_t));
|
||||
if (driver == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
driver->mctx = mctx;
|
||||
driver->interp = Tcl_CreateInterp();
|
||||
|
||||
tclres = Tcl_EvalFile(driver->interp, (char *) "lookup.tcl");
|
||||
if (tclres != TCL_OK) {
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
|
||||
DNS_LOGMODULE_SDB, ISC_LOG_ERROR,
|
||||
"initializing tcldb: "
|
||||
"loading 'lookup.tcl' failed: %s",
|
||||
driver->interp->result);
|
||||
result = ISC_R_FAILURE;
|
||||
goto cleanup;
|
||||
}
|
||||
*driverp = driver;
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
cleanup:
|
||||
isc_mem_put(mctx, driver, sizeof(tcldb_driver_t));
|
||||
return (result);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
tcldb_driver_destroy(tcldb_driver_t **driverp) {
|
||||
tcldb_driver_t *driver = *driverp;
|
||||
Tcl_DeleteInterp(driver->interp);
|
||||
isc_mem_put(driver->mctx, driver, sizeof(tcldb_driver_t));
|
||||
}
|
||||
|
||||
/*
|
||||
* Perform a lookup, by invoking the Tcl procedure "lookup".
|
||||
*/
|
||||
static isc_result_t
|
||||
tcldb_lookup(const char *zone, const char *name, void *dbdata,
|
||||
dns_sdblookup_t *lookup)
|
||||
{
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
int tclres;
|
||||
int rrc; /* RR count */
|
||||
char **rrv; /* RR vector */
|
||||
int i;
|
||||
char *cmdv[3];
|
||||
char *cmd;
|
||||
|
||||
tcldb_driver_t *driver = (tcldb_driver_t *) dbdata;
|
||||
|
||||
cmdv[0] = "lookup";
|
||||
cmdv[1] = zone;
|
||||
cmdv[2] = name;
|
||||
cmd = Tcl_Merge(3, cmdv);
|
||||
tclres = Tcl_Eval(driver->interp, cmd);
|
||||
Tcl_Free(cmd);
|
||||
|
||||
if (tclres != TCL_OK) {
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
|
||||
DNS_LOGMODULE_SDB, ISC_LOG_ERROR,
|
||||
"zone '%s': tcl lookup function failed: %s",
|
||||
zone, driver->interp->result);
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
if (strcmp(driver->interp->result, "NXDOMAIN") == 0) {
|
||||
result = ISC_R_NOTFOUND;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
tclres = Tcl_SplitList(driver->interp, driver->interp->result,
|
||||
&rrc, &rrv);
|
||||
if (tclres != TCL_OK)
|
||||
goto malformed;
|
||||
|
||||
for (i = 0; i < rrc; i++) {
|
||||
isc_result_t tmpres;
|
||||
int fieldc; /* Field count */
|
||||
char **fieldv; /* Field vector */
|
||||
tclres = Tcl_SplitList(driver->interp, rrv[i],
|
||||
&fieldc, &fieldv);
|
||||
if (tclres != TCL_OK) {
|
||||
tmpres = ISC_R_FAILURE;
|
||||
goto failrr;
|
||||
}
|
||||
if (fieldc != 3)
|
||||
goto malformed;
|
||||
tmpres = dns_sdb_putrr(lookup, fieldv[0], atoi(fieldv[1]),
|
||||
fieldv[2]);
|
||||
Tcl_Free((char *) fieldv);
|
||||
failrr:
|
||||
if (tmpres != ISC_R_SUCCESS)
|
||||
result = tmpres;
|
||||
}
|
||||
Tcl_Free((char *) rrv);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
malformed:
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
|
||||
DNS_LOGMODULE_SDB, ISC_LOG_ERROR,
|
||||
"zone '%s': "
|
||||
"malformed return value from tcl lookup function: %s",
|
||||
zone, driver->interp->result);
|
||||
result = ISC_R_FAILURE;
|
||||
fail:
|
||||
return (result);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set up per-zone state. In our case, the database arguments of the
|
||||
* zone are collected into a Tcl list and assigned to an element of
|
||||
* the global array "dbargs".
|
||||
*/
|
||||
static isc_result_t
|
||||
tcldb_create(const char *zone, int argc, char **argv,
|
||||
void *driverdata, void **dbdata)
|
||||
{
|
||||
tcldb_driver_t *driver = (tcldb_driver_t *) driverdata;
|
||||
|
||||
char *list = Tcl_Merge(argc, argv);
|
||||
|
||||
Tcl_SetVar2(driver->interp, (char *) "dbargs", (char *) zone, list, 0);
|
||||
|
||||
Tcl_Free(list);
|
||||
|
||||
*dbdata = driverdata;
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
* This driver does not support zone transfer, so allnodes() is NULL.
|
||||
*/
|
||||
static dns_sdbmethods_t tcldb_methods = {
|
||||
tcldb_lookup,
|
||||
NULL, /* authority */
|
||||
NULL, /* allnodes */
|
||||
tcldb_create,
|
||||
NULL /* destroy */
|
||||
};
|
||||
|
||||
/*
|
||||
* Initialize the tcldb driver.
|
||||
*/
|
||||
isc_result_t
|
||||
tcldb_init(void) {
|
||||
isc_result_t result;
|
||||
int flags = DNS_SDBFLAG_RELATIVEOWNER | DNS_SDBFLAG_RELATIVERDATA;
|
||||
|
||||
result = tcldb_driver_create(ns_g_mctx, &the_driver);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
return (dns_sdb_register("tcl", &tcldb_methods, the_driver, flags,
|
||||
ns_g_mctx, &tcldb));
|
||||
}
|
||||
|
||||
/*
|
||||
* Wrapper around dns_sdb_unregister().
|
||||
*/
|
||||
void
|
||||
tcldb_clear(void) {
|
||||
if (tcldb != NULL)
|
||||
dns_sdb_unregister(&tcldb);
|
||||
if (the_driver != NULL)
|
||||
tcldb_driver_destroy(&the_driver);
|
||||
}
|
||||
@@ -1,143 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
||||
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
||||
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
|
||||
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: timedb.c,v 1.7 2001/01/09 21:46:30 bwelling Exp $ */
|
||||
|
||||
/*
|
||||
* A simple database driver that enables the server to return the
|
||||
* current time in a DNS record.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/sdb.h>
|
||||
|
||||
#include <named/globals.h>
|
||||
|
||||
#include "timedb.h"
|
||||
|
||||
static dns_sdbimplementation_t *timedb = NULL;
|
||||
|
||||
/*
|
||||
* This database operates on relative names.
|
||||
*
|
||||
* "time" and "@" return the time in a TXT record.
|
||||
* "clock" is a CNAME to "time"
|
||||
* "current" is a DNAME to "@" (try time.current.time)
|
||||
*/
|
||||
static isc_result_t
|
||||
timedb_lookup(const char *zone, const char *name, void *dbdata,
|
||||
dns_sdblookup_t *lookup)
|
||||
{
|
||||
isc_result_t result;
|
||||
|
||||
UNUSED(zone);
|
||||
UNUSED(dbdata);
|
||||
|
||||
if (strcmp(name, "@") == 0 || strcmp(name, "time") == 0) {
|
||||
time_t now = time(NULL);
|
||||
char buf[100];
|
||||
int n;
|
||||
|
||||
/*
|
||||
* Call ctime to create the string, put it in quotes, and
|
||||
* remove the trailing newline.
|
||||
*/
|
||||
n = snprintf(buf, sizeof(buf), "\"%s", ctime(&now));
|
||||
if (n < 0)
|
||||
return (ISC_R_FAILURE);
|
||||
buf[n - 1] = '\"';
|
||||
result = dns_sdb_putrr(lookup, "txt", 1, buf);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (ISC_R_FAILURE);
|
||||
} else if (strcmp(name, "clock") == 0) {
|
||||
result = dns_sdb_putrr(lookup, "cname", 1, "time");
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (ISC_R_FAILURE);
|
||||
} else if (strcmp(name, "current") == 0) {
|
||||
result = dns_sdb_putrr(lookup, "dname", 1, "@");
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (ISC_R_FAILURE);
|
||||
} else
|
||||
return (ISC_R_NOTFOUND);
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
* lookup() does not return SOA or NS records, so authority() must be defined.
|
||||
*/
|
||||
static isc_result_t
|
||||
timedb_authority(const char *zone, void *dbdata, dns_sdblookup_t *lookup) {
|
||||
isc_result_t result;
|
||||
|
||||
UNUSED(zone);
|
||||
UNUSED(dbdata);
|
||||
|
||||
result = dns_sdb_putsoa(lookup, "localhost.", "root.localhost.", 0);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (ISC_R_FAILURE);
|
||||
|
||||
result = dns_sdb_putrr(lookup, "ns", 86400, "ns1.localdomain.");
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (ISC_R_FAILURE);
|
||||
result = dns_sdb_putrr(lookup, "ns", 86400, "ns2.localdomain.");
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (ISC_R_FAILURE);
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
* This zone does not support zone transfer, so allnodes() is NULL. There
|
||||
* is no database specific data, so create() and destroy() are NULL.
|
||||
*/
|
||||
static dns_sdbmethods_t timedb_methods = {
|
||||
timedb_lookup,
|
||||
timedb_authority,
|
||||
NULL, /* allnodes */
|
||||
NULL, /* create */
|
||||
NULL /* destroy */
|
||||
};
|
||||
|
||||
/*
|
||||
* Wrapper around dns_sdb_register().
|
||||
*/
|
||||
isc_result_t
|
||||
timedb_init(void) {
|
||||
unsigned int flags;
|
||||
flags = DNS_SDBFLAG_RELATIVEOWNER | DNS_SDBFLAG_RELATIVERDATA;
|
||||
return (dns_sdb_register("time", &timedb_methods, NULL, flags,
|
||||
ns_g_mctx, &timedb));
|
||||
}
|
||||
|
||||
/*
|
||||
* Wrapper around dns_sdb_unregister().
|
||||
*/
|
||||
void
|
||||
timedb_clear(void) {
|
||||
if (timedb != NULL)
|
||||
dns_sdb_unregister(&timedb);
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
||||
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
||||
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
|
||||
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: timedb.h,v 1.2 2001/01/09 21:46:31 bwelling Exp $ */
|
||||
|
||||
#include <isc/types.h>
|
||||
|
||||
isc_result_t timedb_init(void);
|
||||
|
||||
void timedb_clear(void);
|
||||
|
||||
+47
-38
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd">
|
||||
|
||||
<!-- File: $Id: Bv9ARM-book.xml,v 1.155.2.1 2001/09/19 22:16:57 gson Exp $ -->
|
||||
<!-- File: $Id: Bv9ARM-book.xml,v 1.155.2.10 2001/11/07 19:07:29 gson Exp $ -->
|
||||
|
||||
<book>
|
||||
<title>BIND 9 Administrator Reference Manual</title>
|
||||
@@ -158,8 +158,8 @@ domain.</para>
|
||||
|
||||
<para>For example, a domain name for a host at the
|
||||
company <emphasis>Example, Inc.</emphasis> could be
|
||||
<literal>mail.example.net</literal>,
|
||||
were <literal>com</literal> is the
|
||||
<literal>mail.example.com</literal>,
|
||||
where <literal>com</literal> is the
|
||||
top level domain to which
|
||||
<literal>ourhost.example.com</literal> belongs,
|
||||
<literal>example</literal> is
|
||||
@@ -705,7 +705,7 @@ of a server.</para>
|
||||
<para>The <command>named-checkzone</command> program checks a master file for
|
||||
syntax and consistency.</para>
|
||||
<cmdsynopsis label="Usage">
|
||||
<command>check-zone</command>
|
||||
<command>named-checkzone</command>
|
||||
<arg>-dq</arg>
|
||||
<arg>-c <replaceable>class</replaceable></arg>
|
||||
<arg choice="plain"><replaceable>zone</replaceable></arg>
|
||||
@@ -764,7 +764,11 @@ of a server.</para>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry><term><userinput>querylog</userinput></term>
|
||||
<listitem><para>Toggle query logging.</para></listitem></varlistentry>
|
||||
<listitem><para>Toggle query logging. Query logging can also be enabled
|
||||
by explictly directing the <command>queries</command>
|
||||
<command>category</command> to a <command>channel</command> in the
|
||||
<command>logging</command> section of
|
||||
<filename>named.conf</filename>.</para></listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><userinput>dumpdb</userinput></term>
|
||||
<listitem><para>Dump the server's caches to the dump file. </para></listitem></varlistentry>
|
||||
@@ -1140,7 +1144,7 @@ options {
|
||||
...
|
||||
};
|
||||
|
||||
zone "site1.example.com" { // sample slave zone
|
||||
zone "site1.example.com" { // sample master zone
|
||||
type master;
|
||||
file "m/site1.example.com";
|
||||
forwarders { }; // do normal iterative
|
||||
@@ -1428,9 +1432,10 @@ allow-update { key host1-host2. ;};
|
||||
the zone keys of any secure delegated zones. Zone keys must
|
||||
have the same name as the zone, a name type of
|
||||
<command>ZONE</command>, and must be usable for authentication.
|
||||
It is recommended that zone keys be mandatory to implement a
|
||||
cryptographic algorithm; currently the only key mandatory to
|
||||
implement an algorithm is DSA.</para>
|
||||
It is recommended that zone keys use a cryptographic algorithm
|
||||
designated as "mandatory to implement" by the IETF; currently
|
||||
these are RSASHA1 (which is not yet supported in BIND 9.2)
|
||||
and DSA.</para>
|
||||
|
||||
<para>The following command will generate a 768 bit DSA key for
|
||||
the <filename>child.example</filename> zone:</para>
|
||||
@@ -1789,7 +1794,7 @@ that is distinct from and simpler than the full DNS protocol.</para></sect1>
|
||||
run the resolver daemon <command>lwresd</command>.</para>
|
||||
<para>By default, applications using the lightweight resolver library will make
|
||||
UDP requests to the IPv4 loopback address (127.0.0.1) on port 921. The
|
||||
address can be overriden by <command>lwserver</command> lines in
|
||||
address can be overridden by <command>lwserver</command> lines in
|
||||
<filename>/etc/resolv.conf</filename>.
|
||||
The daemon will try to find the answer to the questions "what are the
|
||||
addresses for host
|
||||
@@ -1894,9 +1899,9 @@ separated by semicolons and ending with a semicolon.</para></entry>
|
||||
</row>
|
||||
<row rowsep = "0">
|
||||
<entry colname = "1"><para><varname>number</varname></para></entry>
|
||||
<entry colname = "2"><para>A non-negative integer with an entire
|
||||
range limited by the range of a C language signed integer (2,147,483,647
|
||||
on a machine with 32 bit integers). Its acceptable value might further
|
||||
<entry colname = "2"><para>A non-negative 32 bit unsigned integer
|
||||
(i.e., a number between 0 and 4294967295, inclusive).
|
||||
Its acceptable value might further
|
||||
be limited by the context in which it is used.</para></entry>
|
||||
</row>
|
||||
<row rowsep = "0">
|
||||
@@ -1907,18 +1912,17 @@ a pathname, such as <filename>zones/master/my.test.domain</filename>.</para></en
|
||||
<row rowsep = "0">
|
||||
<entry colname = "1"><para><varname>size_spec</varname></para></entry>
|
||||
<entry colname = "2"><para>A number, the word <userinput>unlimited</userinput>,
|
||||
or the word <userinput>default</userinput>.</para><para>The maximum
|
||||
value of <varname>size_spec</varname> is that of unsigned long integers
|
||||
on the machine. An <varname>unlimited</varname> <varname>size_spec</varname> requests unlimited
|
||||
or the word <userinput>default</userinput>.</para><para>
|
||||
An <varname>unlimited</varname> <varname>size_spec</varname> requests unlimited
|
||||
use, or the maximum available amount. A <varname>default size_spec</varname> uses
|
||||
the limit that was in force when the server was started.</para><para>A <varname>number</varname> can
|
||||
optionally be followed by a scaling factor: <userinput>K</userinput> or <userinput>k</userinput> for
|
||||
kilobytes, <userinput>M</userinput> or <userinput>m</userinput> for
|
||||
megabytes, and <userinput>G</userinput> or <userinput>g</userinput> for gigabytes,
|
||||
which scale by 1024, 1024*1024, and 1024*1024*1024 respectively.</para><para>Integer
|
||||
storage overflow is currently silently ignored during conversion
|
||||
of scaled values, resulting in values less than intended, possibly
|
||||
even negative. Using <varname>unlimited</varname> is the best way
|
||||
which scale by 1024, 1024*1024, and 1024*1024*1024 respectively.</para>
|
||||
<para>The value must be representable as a 64-bit unsigned integer
|
||||
(0 to 18446744073709551615, inclusive).
|
||||
Using <varname>unlimited</varname> is the best way
|
||||
to safely set a really large number.</para></entry>
|
||||
</row>
|
||||
<row rowsep = "0">
|
||||
@@ -2151,7 +2155,7 @@ Usage</title>
|
||||
|
||||
<para>The following ACLs are built-in:</para>
|
||||
|
||||
<informaltable colsep = "0" rowsep = "0"><tgroup cols = "2"
|
||||
<informaltable colsep = "0" rowsep = "0"><tgroup cols = "2"
|
||||
colsep = "0" rowsep = "0" tgroupstyle = "3Level-table">
|
||||
<colspec colname = "1" colnum = "1" colsep = "0" colwidth = "1.130in"/>
|
||||
<colspec colname = "2" colnum = "2" colsep = "0" colwidth = "4.000in"/>
|
||||
@@ -2166,18 +2170,27 @@ Usage</title>
|
||||
</row>
|
||||
<row rowsep = "0">
|
||||
<entry colname = "1"><para><command>localhost</command></para></entry>
|
||||
<entry colname = "2"><para>Matches the IP addresses of all interfaces
|
||||
on the system.</para></entry>
|
||||
<entry colname = "2"><para>Matches the IPv4 addresses of all network
|
||||
interfaces on the system.</para></entry>
|
||||
</row>
|
||||
<row rowsep = "0">
|
||||
<entry colname = "1"><para><command>localnets</command></para></entry>
|
||||
<entry colname = "2"><para>Matches any host on a network for which
|
||||
<entry colname = "2"><para>Matches any host on an IPv4 network for which
|
||||
the system has an interface.</para></entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup></informaltable>
|
||||
</sect2>
|
||||
<sect2>
|
||||
|
||||
<para>The <command>localhost</command> and <command>localnets</command>
|
||||
ACLs do not currently support IPv6 (that is,
|
||||
<command>localhost</command> does not match the host's IPv6 addresses,
|
||||
and <command>localnets</command> does not match the host's attached
|
||||
IPv6 networks) due to the lack of a standard method of determining the
|
||||
complete set of local IPv6 addresses for a host.
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
<sect2>
|
||||
<title><command>controls</command> Statement Grammar</title>
|
||||
<programlisting><command>controls</command> {
|
||||
inet ( ip_addr | * ) <optional> port ip_port </optional> allow { <replaceable> address_match_list </replaceable> }
|
||||
@@ -2503,7 +2516,7 @@ used is described in <xref linkend="the_category_phrase"/>.
|
||||
</para>
|
||||
|
||||
<programlisting>channel "default_syslog" {
|
||||
syslog daemon; // end to syslog's daemon
|
||||
syslog daemon; // send to syslog's daemon
|
||||
// facility
|
||||
severity info; // only send priority info
|
||||
// and higher
|
||||
@@ -2648,7 +2661,7 @@ the <command>null</command> channel.</para></entry>
|
||||
</row>
|
||||
<row rowsep = "0">
|
||||
<entry colname = "1"><para><command>queries</command></para></entry>
|
||||
<entry colname = "2"><para>Queries.</para></entry>
|
||||
<entry colname = "2"><para>Queries. Using the category <command>queries</command> will enable query logging.</para></entry>
|
||||
</row>
|
||||
<row rowsep = "0">
|
||||
<entry colname = "1"><para><command>dispatch</command></para></entry>
|
||||
@@ -2909,11 +2922,7 @@ receiving and sending DNS protocol traffic.
|
||||
The default is 53. This option is mainly intended for server testing;
|
||||
a server using a port other than 53 will not be able to communicate with
|
||||
the global DNS.
|
||||
The <command>port</command> option should be placed at
|
||||
the beginning of the options block, before
|
||||
any other options that take port numbers or IP addresses,
|
||||
to ensure that the port value takes effect for all addresses
|
||||
used by the server.</para>
|
||||
</para>
|
||||
</listitem></varlistentry>
|
||||
|
||||
<varlistentry><term><command>random-device</command></term>
|
||||
@@ -3398,7 +3407,7 @@ hour).</para>
|
||||
<listitem><para>Slave servers will periodically query master servers
|
||||
to find out if zone serial numbers have changed. Each such query uses
|
||||
a minute amount of the slave server's network bandwidth. To limit the
|
||||
amount of bandwith used, BIND 9 limits the rate at which queries are
|
||||
amount of bandwidth used, BIND 9 limits the rate at which queries are
|
||||
sent. The value of the <command>serial-query-rate</command> option,
|
||||
an integer, is the maximum number of queries sent per second.
|
||||
The default is 20.
|
||||
@@ -3578,7 +3587,7 @@ and ignored for BIND 8 compatibility.</para>
|
||||
<varlistentry><term><command>recursive-clients</command></term>
|
||||
<listitem><para>The maximum number of simultaneous recursive lookups
|
||||
the server will perform on behalf of clients. The default is
|
||||
<literal>1000</literal>. Because each recursing clients uses a fair
|
||||
<literal>1000</literal>. Because each recursing client uses a fair
|
||||
bit of memory, on the order of 20 kilobytes, the value of the
|
||||
<command>recursive-clients</command> option may have to be decreased
|
||||
on hosts with limited memory.
|
||||
@@ -3832,7 +3841,7 @@ PTR records.</para>
|
||||
basis by adding a
|
||||
<command>allow-v6-synthesis { <replaceable>address_match_list</replaceable> };</command>
|
||||
clause to the <command>options</command> or <command>view</command> statement.
|
||||
When it is enabled, recursive
|
||||
When it is enabled, recursive
|
||||
AAAA queries cause the server to first try an A6 lookup and if that
|
||||
fails, an AAAA lookups. No matter which one succeeds, the results are
|
||||
returned as a set of synthetic AAAA records. Similarly, recursive PTR
|
||||
@@ -4294,7 +4303,7 @@ of type <command>forward</command> can contain a <command>forward</command> and/
|
||||
which will apply to queries within the domain given by the zone
|
||||
name. If no <command>forwarders</command> statement is present or
|
||||
an empty list for <command>forwarders</command> is given, then no
|
||||
forwarding will be done for the domain, cancelling the effects of
|
||||
forwarding will be done for the domain, canceling the effects of
|
||||
any forwarders in the <command>options</command> statement. Thus
|
||||
if you want to use this type of zone to change the behavior of the
|
||||
global <command>forward</command> option (that is, "forward first
|
||||
@@ -4392,7 +4401,7 @@ The default is the empty list.</para>
|
||||
<listitem><para>
|
||||
This option was used in BIND 8 to restrict the character set of
|
||||
domain names in master files and/or DNS responses received from the
|
||||
netowrk. BIND 9 does not restrict the character set of domain names
|
||||
network. BIND 9 does not restrict the character set of domain names
|
||||
and does not implement the <command>check-names</command> option.
|
||||
</para>
|
||||
</listitem></varlistentry>
|
||||
|
||||
@@ -529,9 +529,9 @@ CLASS="emphasis"
|
||||
> could be
|
||||
<TT
|
||||
CLASS="literal"
|
||||
>mail.example.net</TT
|
||||
>mail.example.com</TT
|
||||
>,
|
||||
were <TT
|
||||
where <TT
|
||||
CLASS="literal"
|
||||
>com</TT
|
||||
> is the
|
||||
|
||||
@@ -782,7 +782,7 @@ CLASS="command"
|
||||
><P
|
||||
><B
|
||||
CLASS="command"
|
||||
>check-zone</B
|
||||
>named-checkzone</B
|
||||
> [-dq] [-c <TT
|
||||
CLASS="replaceable"
|
||||
><I
|
||||
@@ -984,7 +984,26 @@ CLASS="userinput"
|
||||
></DT
|
||||
><DD
|
||||
><P
|
||||
>Toggle query logging.</P
|
||||
>Toggle query logging. Query logging can also be enabled
|
||||
by explictly directing the <B
|
||||
CLASS="command"
|
||||
>queries</B
|
||||
>
|
||||
<B
|
||||
CLASS="command"
|
||||
>category</B
|
||||
> to a <B
|
||||
CLASS="command"
|
||||
>channel</B
|
||||
> in the
|
||||
<B
|
||||
CLASS="command"
|
||||
>logging</B
|
||||
> section of
|
||||
<TT
|
||||
CLASS="filename"
|
||||
>named.conf</TT
|
||||
>.</P
|
||||
></DD
|
||||
><DT
|
||||
><TT
|
||||
@@ -1372,7 +1391,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN656"
|
||||
NAME="AEN661"
|
||||
>3.4.2. Signals</A
|
||||
></H2
|
||||
><P
|
||||
@@ -1385,7 +1404,7 @@ CLASS="command"
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN660"
|
||||
NAME="AEN665"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
|
||||
+33
-32
@@ -88,7 +88,7 @@ HREF="Bv9ARM.ch04.html#incremental_zone_transfers"
|
||||
></DT
|
||||
><DT
|
||||
>4.3. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN720"
|
||||
HREF="Bv9ARM.ch04.html#AEN725"
|
||||
>Split DNS</A
|
||||
></DT
|
||||
><DT
|
||||
@@ -98,12 +98,12 @@ HREF="Bv9ARM.ch04.html#tsig"
|
||||
></DT
|
||||
><DT
|
||||
>4.5. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN880"
|
||||
HREF="Bv9ARM.ch04.html#AEN885"
|
||||
>TKEY</A
|
||||
></DT
|
||||
><DT
|
||||
>4.6. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN895"
|
||||
HREF="Bv9ARM.ch04.html#AEN900"
|
||||
>SIG(0)</A
|
||||
></DT
|
||||
><DT
|
||||
@@ -113,7 +113,7 @@ HREF="Bv9ARM.ch04.html#DNSSEC"
|
||||
></DT
|
||||
><DT
|
||||
>4.8. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN980"
|
||||
HREF="Bv9ARM.ch04.html#AEN985"
|
||||
>IPv6 Support in <SPAN
|
||||
CLASS="acronym"
|
||||
>BIND</SPAN
|
||||
@@ -274,7 +274,7 @@ CLASS="sect1"
|
||||
><H1
|
||||
CLASS="sect1"
|
||||
><A
|
||||
NAME="AEN720"
|
||||
NAME="AEN725"
|
||||
>4.3. Split DNS</A
|
||||
></H1
|
||||
><P
|
||||
@@ -535,7 +535,7 @@ CLASS="varname"
|
||||
...
|
||||
};
|
||||
|
||||
zone "site1.example.com" { // sample slave zone
|
||||
zone "site1.example.com" { // sample master zone
|
||||
type master;
|
||||
file "m/site1.example.com";
|
||||
forwarders { }; // do normal iterative
|
||||
@@ -672,7 +672,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN811"
|
||||
NAME="AEN816"
|
||||
>4.4.1. Generate Shared Keys for Each Pair of Hosts</A
|
||||
></H2
|
||||
><P
|
||||
@@ -690,7 +690,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN816"
|
||||
NAME="AEN821"
|
||||
>4.4.1.1. Automatic Generation</A
|
||||
></H3
|
||||
><P
|
||||
@@ -732,7 +732,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN827"
|
||||
NAME="AEN832"
|
||||
>4.4.1.2. Manual Generation</A
|
||||
></H3
|
||||
><P
|
||||
@@ -753,7 +753,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN832"
|
||||
NAME="AEN837"
|
||||
>4.4.2. Copying the Shared Secret to Both Machines</A
|
||||
></H2
|
||||
><P
|
||||
@@ -765,7 +765,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN835"
|
||||
NAME="AEN840"
|
||||
>4.4.3. Informing the Servers of the Key's Existence</A
|
||||
></H2
|
||||
><P
|
||||
@@ -813,7 +813,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN847"
|
||||
NAME="AEN852"
|
||||
>4.4.4. Instructing the Server to Use the Key</A
|
||||
></H2
|
||||
><P
|
||||
@@ -873,7 +873,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN863"
|
||||
NAME="AEN868"
|
||||
>4.4.5. TSIG Key Based Access Control</A
|
||||
></H2
|
||||
><P
|
||||
@@ -919,7 +919,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN876"
|
||||
NAME="AEN881"
|
||||
>4.4.6. Errors</A
|
||||
></H2
|
||||
><P
|
||||
@@ -948,7 +948,7 @@ CLASS="sect1"
|
||||
><H1
|
||||
CLASS="sect1"
|
||||
><A
|
||||
NAME="AEN880"
|
||||
NAME="AEN885"
|
||||
>4.5. TKEY</A
|
||||
></H1
|
||||
><P
|
||||
@@ -1014,7 +1014,7 @@ CLASS="sect1"
|
||||
><H1
|
||||
CLASS="sect1"
|
||||
><A
|
||||
NAME="AEN895"
|
||||
NAME="AEN900"
|
||||
>4.6. SIG(0)</A
|
||||
></H1
|
||||
><P
|
||||
@@ -1086,7 +1086,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN912"
|
||||
NAME="AEN917"
|
||||
>4.7.1. Generating Keys</A
|
||||
></H2
|
||||
><P
|
||||
@@ -1104,9 +1104,10 @@ CLASS="command"
|
||||
CLASS="command"
|
||||
>ZONE</B
|
||||
>, and must be usable for authentication.
|
||||
It is recommended that zone keys be mandatory to implement a
|
||||
cryptographic algorithm; currently the only key mandatory to
|
||||
implement an algorithm is DSA.</P
|
||||
It is recommended that zone keys use a cryptographic algorithm
|
||||
designated as "mandatory to implement" by the IETF; currently
|
||||
these are RSASHA1 (which is not yet supported in BIND 9.2)
|
||||
and DSA.</P
|
||||
><P
|
||||
>The following command will generate a 768 bit DSA key for
|
||||
the <TT
|
||||
@@ -1165,7 +1166,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN932"
|
||||
NAME="AEN937"
|
||||
>4.7.2. Creating a Keyset</A
|
||||
></H2
|
||||
><P
|
||||
@@ -1218,7 +1219,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN944"
|
||||
NAME="AEN949"
|
||||
>4.7.3. Signing the Child's Keyset</A
|
||||
></H2
|
||||
><P
|
||||
@@ -1268,7 +1269,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN957"
|
||||
NAME="AEN962"
|
||||
>4.7.4. Signing the Zone</A
|
||||
></H2
|
||||
><P
|
||||
@@ -1330,7 +1331,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN973"
|
||||
NAME="AEN978"
|
||||
>4.7.5. Configuring Servers</A
|
||||
></H2
|
||||
><P
|
||||
@@ -1358,7 +1359,7 @@ CLASS="sect1"
|
||||
><H1
|
||||
CLASS="sect1"
|
||||
><A
|
||||
NAME="AEN980"
|
||||
NAME="AEN985"
|
||||
>4.8. IPv6 Support in <SPAN
|
||||
CLASS="acronym"
|
||||
>BIND</SPAN
|
||||
@@ -1418,7 +1419,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN996"
|
||||
NAME="AEN1001"
|
||||
>4.8.1. Address Lookups Using AAAA Records</A
|
||||
></H2
|
||||
><P
|
||||
@@ -1440,7 +1441,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN1001"
|
||||
NAME="AEN1006"
|
||||
>4.8.2. Address Lookups Using A6 Records</A
|
||||
></H2
|
||||
><P
|
||||
@@ -1460,7 +1461,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN1005"
|
||||
NAME="AEN1010"
|
||||
>4.8.2.1. A6 Chains</A
|
||||
></H3
|
||||
><P
|
||||
@@ -1506,7 +1507,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN1016"
|
||||
NAME="AEN1021"
|
||||
>4.8.2.2. A6 Records for DNS Servers</A
|
||||
></H3
|
||||
><P
|
||||
@@ -1536,7 +1537,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN1022"
|
||||
NAME="AEN1027"
|
||||
>4.8.3. Address to Name Lookups Using Nibble Format</A
|
||||
></H2
|
||||
><P
|
||||
@@ -1567,7 +1568,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN1029"
|
||||
NAME="AEN1034"
|
||||
>4.8.4. Address to Name Lookups Using Bitstring Format</A
|
||||
></H2
|
||||
><P
|
||||
@@ -1594,7 +1595,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN1036"
|
||||
NAME="AEN1041"
|
||||
>4.8.5. Using DNAME for Delegation of IPv6 Reverse Addresses</A
|
||||
></H2
|
||||
><P
|
||||
|
||||
@@ -81,7 +81,7 @@ CLASS="TOC"
|
||||
></DT
|
||||
><DT
|
||||
>5.1. <A
|
||||
HREF="Bv9ARM.ch05.html#AEN1056"
|
||||
HREF="Bv9ARM.ch05.html#AEN1061"
|
||||
>The Lightweight Resolver Library</A
|
||||
></DT
|
||||
><DT
|
||||
@@ -96,7 +96,7 @@ CLASS="sect1"
|
||||
><H1
|
||||
CLASS="sect1"
|
||||
><A
|
||||
NAME="AEN1056"
|
||||
NAME="AEN1061"
|
||||
>5.1. The Lightweight Resolver Library</A
|
||||
></H1
|
||||
><P
|
||||
@@ -135,7 +135,7 @@ CLASS="command"
|
||||
><P
|
||||
>By default, applications using the lightweight resolver library will make
|
||||
UDP requests to the IPv4 loopback address (127.0.0.1) on port 921. The
|
||||
address can be overriden by <B
|
||||
address can be overridden by <B
|
||||
CLASS="command"
|
||||
>lwserver</B
|
||||
> lines in
|
||||
|
||||
+104
-93
@@ -91,7 +91,7 @@ HREF="Bv9ARM.ch06.html#Configuration_File_Grammar"
|
||||
></DT
|
||||
><DT
|
||||
>6.3. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN3515"
|
||||
HREF="Bv9ARM.ch06.html#AEN3524"
|
||||
>Zone File</A
|
||||
></DT
|
||||
></DL
|
||||
@@ -145,7 +145,7 @@ file documentation:</P
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN1098"
|
||||
NAME="AEN1103"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -476,9 +476,9 @@ WIDTH="362"
|
||||
ALIGN="LEFT"
|
||||
VALIGN="MIDDLE"
|
||||
><P
|
||||
>A non-negative integer with an entire
|
||||
range limited by the range of a C language signed integer (2,147,483,647
|
||||
on a machine with 32 bit integers). Its acceptable value might further
|
||||
>A non-negative 32 bit unsigned integer
|
||||
(i.e., a number between 0 and 4294967295, inclusive).
|
||||
Its acceptable value might further
|
||||
be limited by the context in which it is used.</P
|
||||
></TD
|
||||
></TR
|
||||
@@ -534,12 +534,7 @@ CLASS="userinput"
|
||||
></TT
|
||||
>.</P
|
||||
><P
|
||||
>The maximum
|
||||
value of <TT
|
||||
CLASS="varname"
|
||||
>size_spec</TT
|
||||
> is that of unsigned long integers
|
||||
on the machine. An <TT
|
||||
> An <TT
|
||||
CLASS="varname"
|
||||
>unlimited</TT
|
||||
> <TT
|
||||
@@ -590,11 +585,11 @@ CLASS="userinput"
|
||||
></TT
|
||||
> for gigabytes,
|
||||
which scale by 1024, 1024*1024, and 1024*1024*1024 respectively.</P
|
||||
><P
|
||||
>Integer
|
||||
storage overflow is currently silently ignored during conversion
|
||||
of scaled values, resulting in values less than intended, possibly
|
||||
even negative. Using <TT
|
||||
>
|
||||
<P
|
||||
>The value must be representable as a 64-bit unsigned integer
|
||||
(0 to 18446744073709551615, inclusive).
|
||||
Using <TT
|
||||
CLASS="varname"
|
||||
>unlimited</TT
|
||||
> is the best way
|
||||
@@ -740,7 +735,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN1261"
|
||||
NAME="AEN1265"
|
||||
>6.1.1.1. Syntax</A
|
||||
></H3
|
||||
><PRE
|
||||
@@ -771,7 +766,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN1269"
|
||||
NAME="AEN1273"
|
||||
>6.1.1.2. Definition and Usage</A
|
||||
></H3
|
||||
><P
|
||||
@@ -882,7 +877,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN1298"
|
||||
NAME="AEN1302"
|
||||
>6.1.2. Comment Syntax</A
|
||||
></H2
|
||||
><P
|
||||
@@ -901,7 +896,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN1303"
|
||||
NAME="AEN1307"
|
||||
>6.1.2.1. Syntax</A
|
||||
></H3
|
||||
><P
|
||||
@@ -933,7 +928,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN1312"
|
||||
NAME="AEN1316"
|
||||
>6.1.2.2. Definition and Usage</A
|
||||
></H3
|
||||
><P
|
||||
@@ -1043,7 +1038,7 @@ CLASS="acronym"
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN1336"
|
||||
NAME="AEN1340"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -1271,7 +1266,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN1405"
|
||||
NAME="AEN1409"
|
||||
>6.2.1. <B
|
||||
CLASS="command"
|
||||
>acl</B
|
||||
@@ -1318,7 +1313,7 @@ CLASS="command"
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN1418"
|
||||
NAME="AEN1422"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -1381,8 +1376,8 @@ WIDTH="384"
|
||||
ALIGN="LEFT"
|
||||
VALIGN="MIDDLE"
|
||||
><P
|
||||
>Matches the IP addresses of all interfaces
|
||||
on the system.</P
|
||||
>Matches the IPv4 addresses of all network
|
||||
interfaces on the system.</P
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
@@ -1401,7 +1396,7 @@ WIDTH="384"
|
||||
ALIGN="LEFT"
|
||||
VALIGN="MIDDLE"
|
||||
><P
|
||||
>Matches any host on a network for which
|
||||
>Matches any host on an IPv4 network for which
|
||||
the system has an interface.</P
|
||||
></TD
|
||||
></TR
|
||||
@@ -1410,13 +1405,33 @@ the system has an interface.</P
|
||||
><P
|
||||
></P
|
||||
></DIV
|
||||
><P
|
||||
>The <B
|
||||
CLASS="command"
|
||||
>localhost</B
|
||||
> and <B
|
||||
CLASS="command"
|
||||
>localnets</B
|
||||
>
|
||||
ACLs do not currently support IPv6 (that is,
|
||||
<B
|
||||
CLASS="command"
|
||||
>localhost</B
|
||||
> does not match the host's IPv6 addresses,
|
||||
and <B
|
||||
CLASS="command"
|
||||
>localnets</B
|
||||
> does not match the host's attached
|
||||
IPv6 networks) due to the lack of a standard method of determining the
|
||||
complete set of local IPv6 addresses for a host.
|
||||
</P
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN1447"
|
||||
NAME="AEN1456"
|
||||
>6.2.3. <B
|
||||
CLASS="command"
|
||||
>controls</B
|
||||
@@ -1683,7 +1698,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN1511"
|
||||
NAME="AEN1520"
|
||||
>6.2.5. <B
|
||||
CLASS="command"
|
||||
>include</B
|
||||
@@ -1703,7 +1718,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN1516"
|
||||
NAME="AEN1525"
|
||||
>6.2.6. <B
|
||||
CLASS="command"
|
||||
>include</B
|
||||
@@ -1732,7 +1747,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN1523"
|
||||
NAME="AEN1532"
|
||||
>6.2.7. <B
|
||||
CLASS="command"
|
||||
>key</B
|
||||
@@ -1766,7 +1781,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN1530"
|
||||
NAME="AEN1539"
|
||||
>6.2.8. <B
|
||||
CLASS="command"
|
||||
>key</B
|
||||
@@ -1844,7 +1859,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN1548"
|
||||
NAME="AEN1557"
|
||||
>6.2.9. <B
|
||||
CLASS="command"
|
||||
>logging</B
|
||||
@@ -2004,7 +2019,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN1588"
|
||||
NAME="AEN1597"
|
||||
>6.2.10. <B
|
||||
CLASS="command"
|
||||
>logging</B
|
||||
@@ -2067,7 +2082,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN1604"
|
||||
NAME="AEN1613"
|
||||
>6.2.10.1. The <B
|
||||
CLASS="command"
|
||||
>channel</B
|
||||
@@ -2382,7 +2397,7 @@ HREF="Bv9ARM.ch06.html#the_category_phrase"
|
||||
><PRE
|
||||
CLASS="programlisting"
|
||||
>channel "default_syslog" {
|
||||
syslog daemon; // end to syslog's daemon
|
||||
syslog daemon; // send to syslog's daemon
|
||||
// facility
|
||||
severity info; // only send priority info
|
||||
// and higher
|
||||
@@ -2509,7 +2524,7 @@ CLASS="acronym"
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN1708"
|
||||
NAME="AEN1717"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -2799,7 +2814,10 @@ WIDTH="322"
|
||||
ALIGN="LEFT"
|
||||
VALIGN="MIDDLE"
|
||||
><P
|
||||
>Queries.</P
|
||||
>Queries. Using the category <B
|
||||
CLASS="command"
|
||||
>queries</B
|
||||
> will enable query logging.</P
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
@@ -2877,7 +2895,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN1818"
|
||||
NAME="AEN1828"
|
||||
>6.2.11. <B
|
||||
CLASS="command"
|
||||
>lwres</B
|
||||
@@ -2974,7 +2992,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN1842"
|
||||
NAME="AEN1852"
|
||||
>6.2.12. <B
|
||||
CLASS="command"
|
||||
>lwres</B
|
||||
@@ -3048,7 +3066,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN1861"
|
||||
NAME="AEN1871"
|
||||
>6.2.13. <B
|
||||
CLASS="command"
|
||||
>options</B
|
||||
@@ -4007,7 +4025,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN2079"
|
||||
NAME="AEN2089"
|
||||
>6.2.14. <B
|
||||
CLASS="command"
|
||||
>options</B
|
||||
@@ -4251,14 +4269,7 @@ receiving and sending DNS protocol traffic.
|
||||
The default is 53. This option is mainly intended for server testing;
|
||||
a server using a port other than 53 will not be able to communicate with
|
||||
the global DNS.
|
||||
The <B
|
||||
CLASS="command"
|
||||
>port</B
|
||||
> option should be placed at
|
||||
the beginning of the options block, before
|
||||
any other options that take port numbers or IP addresses,
|
||||
to ensure that the port value takes effect for all addresses
|
||||
used by the server.</P
|
||||
</P
|
||||
></DD
|
||||
><DT
|
||||
><B
|
||||
@@ -4997,7 +5008,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN2380"
|
||||
NAME="AEN2389"
|
||||
>6.2.14.2. Forwarding</A
|
||||
></H3
|
||||
><P
|
||||
@@ -5201,7 +5212,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN2445"
|
||||
NAME="AEN2454"
|
||||
>6.2.14.4. Interfaces</A
|
||||
></H3
|
||||
><P
|
||||
@@ -5296,7 +5307,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN2471"
|
||||
NAME="AEN2480"
|
||||
>6.2.14.5. Query Address</A
|
||||
></H3
|
||||
><P
|
||||
@@ -5461,7 +5472,7 @@ CLASS="command"
|
||||
>Slave servers will periodically query master servers
|
||||
to find out if zone serial numbers have changed. Each such query uses
|
||||
a minute amount of the slave server's network bandwidth. To limit the
|
||||
amount of bandwith used, BIND 9 limits the rate at which queries are
|
||||
amount of bandwidth used, BIND 9 limits the rate at which queries are
|
||||
sent. The value of the <B
|
||||
CLASS="command"
|
||||
>serial-query-rate</B
|
||||
@@ -5728,7 +5739,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN2610"
|
||||
NAME="AEN2619"
|
||||
>6.2.14.7. Operating System Resource Limits</A
|
||||
></H3
|
||||
><P
|
||||
@@ -5848,7 +5859,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN2647"
|
||||
NAME="AEN2656"
|
||||
>6.2.14.8. Server Resource Limits</A
|
||||
></H3
|
||||
><P
|
||||
@@ -5882,7 +5893,7 @@ the server will perform on behalf of clients. The default is
|
||||
<TT
|
||||
CLASS="literal"
|
||||
>1000</TT
|
||||
>. Because each recursing clients uses a fair
|
||||
>. Because each recursing client uses a fair
|
||||
bit of memory, on the order of 20 kilobytes, the value of the
|
||||
<B
|
||||
CLASS="command"
|
||||
@@ -5932,7 +5943,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN2675"
|
||||
NAME="AEN2684"
|
||||
>6.2.14.9. Periodic Task Intervals</A
|
||||
></H3
|
||||
><P
|
||||
@@ -6299,7 +6310,7 @@ CLASS="command"
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN2763"
|
||||
NAME="AEN2772"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -6462,7 +6473,7 @@ CLASS="command"
|
||||
CLASS="command"
|
||||
>view</B
|
||||
> statement.
|
||||
When it is enabled, recursive
|
||||
When it is enabled, recursive
|
||||
AAAA queries cause the server to first try an A6 lookup and if that
|
||||
fails, an AAAA lookups. No matter which one succeeds, the results are
|
||||
returned as a set of synthetic AAAA records. Similarly, recursive PTR
|
||||
@@ -6686,7 +6697,7 @@ number is identical to the number in the beginning line.</P
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN2875"
|
||||
NAME="AEN2884"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -7122,7 +7133,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN2990"
|
||||
NAME="AEN2999"
|
||||
>6.2.17. <B
|
||||
CLASS="command"
|
||||
>trusted-keys</B
|
||||
@@ -7197,7 +7208,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN3006"
|
||||
NAME="AEN3015"
|
||||
>6.2.18. <B
|
||||
CLASS="command"
|
||||
>trusted-keys</B
|
||||
@@ -7232,7 +7243,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN3014"
|
||||
NAME="AEN3023"
|
||||
>6.2.19. <B
|
||||
CLASS="command"
|
||||
>view</B
|
||||
@@ -7307,7 +7318,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN3030"
|
||||
NAME="AEN3039"
|
||||
>6.2.20. <B
|
||||
CLASS="command"
|
||||
>view</B
|
||||
@@ -7958,7 +7969,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN3181"
|
||||
NAME="AEN3190"
|
||||
>6.2.22. <B
|
||||
CLASS="command"
|
||||
>zone</B
|
||||
@@ -7969,13 +7980,13 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN3184"
|
||||
NAME="AEN3193"
|
||||
>6.2.22.1. Zone Types</A
|
||||
></H3
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN3186"
|
||||
NAME="AEN3195"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -8163,7 +8174,7 @@ an empty list for <B
|
||||
CLASS="command"
|
||||
>forwarders</B
|
||||
> is given, then no
|
||||
forwarding will be done for the domain, cancelling the effects of
|
||||
forwarding will be done for the domain, canceling the effects of
|
||||
any forwarders in the <B
|
||||
CLASS="command"
|
||||
>options</B
|
||||
@@ -8213,7 +8224,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN3241"
|
||||
NAME="AEN3250"
|
||||
>6.2.22.2. Class</A
|
||||
></H3
|
||||
><P
|
||||
@@ -8251,7 +8262,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN3251"
|
||||
NAME="AEN3260"
|
||||
>6.2.22.3. Zone Options</A
|
||||
></H3
|
||||
><P
|
||||
@@ -8419,7 +8430,7 @@ CLASS="command"
|
||||
><P
|
||||
> This option was used in BIND 8 to restrict the character set of
|
||||
domain names in master files and/or DNS responses received from the
|
||||
netowrk. BIND 9 does not restrict the character set of domain names
|
||||
network. BIND 9 does not restrict the character set of domain names
|
||||
and does not implement the <B
|
||||
CLASS="command"
|
||||
>check-names</B
|
||||
@@ -8892,7 +8903,7 @@ CLASS="varname"
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN3485"
|
||||
NAME="AEN3494"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -8999,7 +9010,7 @@ CLASS="sect1"
|
||||
><H1
|
||||
CLASS="sect1"
|
||||
><A
|
||||
NAME="AEN3515"
|
||||
NAME="AEN3524"
|
||||
>6.3. Zone File</A
|
||||
></H1
|
||||
><DIV
|
||||
@@ -9020,7 +9031,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN3520"
|
||||
NAME="AEN3529"
|
||||
>6.3.1.1. Resource Records</A
|
||||
></H3
|
||||
><P
|
||||
@@ -9043,7 +9054,7 @@ HREF="Bv9ARM.ch06.html#rrset_ordering"
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN3526"
|
||||
NAME="AEN3535"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -9154,7 +9165,7 @@ or historical (h) and no longer in general use):</P
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN3558"
|
||||
NAME="AEN3567"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -9531,7 +9542,7 @@ are currently valid in the DNS:</P
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN3670"
|
||||
NAME="AEN3679"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -9583,7 +9594,7 @@ data that describes the resource:</P
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN3686"
|
||||
NAME="AEN3695"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -9760,7 +9771,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN3734"
|
||||
NAME="AEN3743"
|
||||
>6.3.1.2. Textual expression of RRs</A
|
||||
></H3
|
||||
><P
|
||||
@@ -9790,7 +9801,7 @@ knowledge of the typical representation for the data.</P
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN3741"
|
||||
NAME="AEN3750"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -9999,7 +10010,7 @@ domain names.</P
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN3807"
|
||||
NAME="AEN3816"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -10090,7 +10101,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN3835"
|
||||
NAME="AEN3844"
|
||||
>6.3.2. Discussion of MX Records</A
|
||||
></H2
|
||||
><P
|
||||
@@ -10123,7 +10134,7 @@ pointed to by the CNAME.</P
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN3841"
|
||||
NAME="AEN3850"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -10419,7 +10430,7 @@ used in a zone file.</P
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN3933"
|
||||
NAME="AEN3942"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -10502,7 +10513,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN3956"
|
||||
NAME="AEN3965"
|
||||
>6.3.4. Inverse Mapping in IPv4</A
|
||||
></H2
|
||||
><P
|
||||
@@ -10526,7 +10537,7 @@ CLASS="optional"
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN3961"
|
||||
NAME="AEN3970"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -10606,7 +10617,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN3983"
|
||||
NAME="AEN3992"
|
||||
>6.3.5. Other Zone File Directives</A
|
||||
></H2
|
||||
><P
|
||||
@@ -10631,7 +10642,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN3990"
|
||||
NAME="AEN3999"
|
||||
>6.3.5.1. The <B
|
||||
CLASS="command"
|
||||
>$ORIGIN</B
|
||||
@@ -10701,7 +10712,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN4010"
|
||||
NAME="AEN4019"
|
||||
>6.3.5.2. The <B
|
||||
CLASS="command"
|
||||
>$INCLUDE</B
|
||||
@@ -10783,7 +10794,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN4030"
|
||||
NAME="AEN4039"
|
||||
>6.3.5.3. The <B
|
||||
CLASS="command"
|
||||
>$TTL</B
|
||||
@@ -10823,7 +10834,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN4041"
|
||||
NAME="AEN4050"
|
||||
>6.3.6. <SPAN
|
||||
CLASS="acronym"
|
||||
>BIND</SPAN
|
||||
@@ -10902,7 +10913,7 @@ CLASS="literal"
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN4061"
|
||||
NAME="AEN4070"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
|
||||
@@ -86,7 +86,7 @@ HREF="Bv9ARM.ch07.html#Access_Control_Lists"
|
||||
></DT
|
||||
><DT
|
||||
>7.2. <A
|
||||
HREF="Bv9ARM.ch07.html#AEN4133"
|
||||
HREF="Bv9ARM.ch07.html#AEN4142"
|
||||
><B
|
||||
CLASS="command"
|
||||
>chroot</B
|
||||
@@ -188,7 +188,7 @@ CLASS="sect1"
|
||||
><H1
|
||||
CLASS="sect1"
|
||||
><A
|
||||
NAME="AEN4133"
|
||||
NAME="AEN4142"
|
||||
>7.2. <B
|
||||
CLASS="command"
|
||||
>chroot</B
|
||||
@@ -267,7 +267,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN4156"
|
||||
NAME="AEN4165"
|
||||
>7.2.1. The <B
|
||||
CLASS="command"
|
||||
>chroot</B
|
||||
@@ -340,7 +340,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN4174"
|
||||
NAME="AEN4183"
|
||||
>7.2.2. Using the <B
|
||||
CLASS="command"
|
||||
>setuid</B
|
||||
|
||||
@@ -78,17 +78,17 @@ CLASS="TOC"
|
||||
></DT
|
||||
><DT
|
||||
>8.1. <A
|
||||
HREF="Bv9ARM.ch08.html#AEN4195"
|
||||
HREF="Bv9ARM.ch08.html#AEN4204"
|
||||
>Common Problems</A
|
||||
></DT
|
||||
><DT
|
||||
>8.2. <A
|
||||
HREF="Bv9ARM.ch08.html#AEN4200"
|
||||
HREF="Bv9ARM.ch08.html#AEN4209"
|
||||
>Incrementing and Changing the Serial Number</A
|
||||
></DT
|
||||
><DT
|
||||
>8.3. <A
|
||||
HREF="Bv9ARM.ch08.html#AEN4205"
|
||||
HREF="Bv9ARM.ch08.html#AEN4214"
|
||||
>Where Can I Get Help?</A
|
||||
></DT
|
||||
></DL
|
||||
@@ -98,7 +98,7 @@ CLASS="sect1"
|
||||
><H1
|
||||
CLASS="sect1"
|
||||
><A
|
||||
NAME="AEN4195"
|
||||
NAME="AEN4204"
|
||||
>8.1. Common Problems</A
|
||||
></H1
|
||||
><DIV
|
||||
@@ -106,7 +106,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN4197"
|
||||
NAME="AEN4206"
|
||||
>8.1.1. It's not working; how can I figure out what's wrong?</A
|
||||
></H2
|
||||
><P
|
||||
@@ -122,7 +122,7 @@ CLASS="sect1"
|
||||
><H1
|
||||
CLASS="sect1"
|
||||
><A
|
||||
NAME="AEN4200"
|
||||
NAME="AEN4209"
|
||||
>8.2. Incrementing and Changing the Serial Number</A
|
||||
></H1
|
||||
><P
|
||||
@@ -151,7 +151,7 @@ CLASS="sect1"
|
||||
><H1
|
||||
CLASS="sect1"
|
||||
><A
|
||||
NAME="AEN4205"
|
||||
NAME="AEN4214"
|
||||
>8.3. Where Can I Get Help?</A
|
||||
></H1
|
||||
><P
|
||||
|
||||
+60
-60
@@ -72,7 +72,7 @@ CLASS="TOC"
|
||||
></DT
|
||||
><DT
|
||||
>A.1. <A
|
||||
HREF="Bv9ARM.ch09.html#AEN4221"
|
||||
HREF="Bv9ARM.ch09.html#AEN4230"
|
||||
>Acknowledgements</A
|
||||
></DT
|
||||
><DT
|
||||
@@ -85,7 +85,7 @@ CLASS="acronym"
|
||||
></DT
|
||||
><DT
|
||||
>A.3. <A
|
||||
HREF="Bv9ARM.ch09.html#AEN4262"
|
||||
HREF="Bv9ARM.ch09.html#AEN4271"
|
||||
>General <SPAN
|
||||
CLASS="acronym"
|
||||
>DNS</SPAN
|
||||
@@ -103,7 +103,7 @@ CLASS="sect1"
|
||||
><H1
|
||||
CLASS="sect1"
|
||||
><A
|
||||
NAME="AEN4221"
|
||||
NAME="AEN4230"
|
||||
>A.1. Acknowledgements</A
|
||||
></H1
|
||||
><DIV
|
||||
@@ -111,7 +111,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN4223"
|
||||
NAME="AEN4232"
|
||||
>A.1.1. A Brief History of the <SPAN
|
||||
CLASS="acronym"
|
||||
>DNS</SPAN
|
||||
@@ -246,7 +246,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN4253"
|
||||
NAME="AEN4262"
|
||||
>A.2.1.1. HS = hesiod</A
|
||||
></H3
|
||||
><P
|
||||
@@ -267,7 +267,7 @@ CLASS="sect3"
|
||||
><H3
|
||||
CLASS="sect3"
|
||||
><A
|
||||
NAME="AEN4258"
|
||||
NAME="AEN4267"
|
||||
>A.2.1.2. CH = chaos</A
|
||||
></H3
|
||||
><P
|
||||
@@ -285,7 +285,7 @@ CLASS="sect1"
|
||||
><H1
|
||||
CLASS="sect1"
|
||||
><A
|
||||
NAME="AEN4262"
|
||||
NAME="AEN4271"
|
||||
>A.3. General <SPAN
|
||||
CLASS="acronym"
|
||||
>DNS</SPAN
|
||||
@@ -324,7 +324,7 @@ Unicast address scheme. For more information, see RFC 2374.</P
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN4273"
|
||||
NAME="AEN4282"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -543,7 +543,7 @@ VALIGN="MIDDLE"
|
||||
<DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN4342"
|
||||
NAME="AEN4351"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -726,7 +726,7 @@ unicast address consists of:</P
|
||||
><DIV
|
||||
CLASS="informaltable"
|
||||
><A
|
||||
NAME="AEN4397"
|
||||
NAME="AEN4406"
|
||||
></A
|
||||
><P
|
||||
></P
|
||||
@@ -886,19 +886,19 @@ TARGET="_top"
|
||||
</P
|
||||
><H3
|
||||
><A
|
||||
NAME="AEN4441"
|
||||
NAME="AEN4450"
|
||||
>Bibliography</A
|
||||
></H3
|
||||
><H1
|
||||
CLASS="bibliodiv"
|
||||
><A
|
||||
NAME="AEN4442"
|
||||
NAME="AEN4451"
|
||||
>Standards</A
|
||||
></H1
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4444"
|
||||
NAME="AEN4453"
|
||||
></A
|
||||
><P
|
||||
>[RFC974] <SPAN
|
||||
@@ -915,7 +915,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4451"
|
||||
NAME="AEN4460"
|
||||
></A
|
||||
><P
|
||||
>[RFC1034] <SPAN
|
||||
@@ -932,7 +932,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4458"
|
||||
NAME="AEN4467"
|
||||
></A
|
||||
><P
|
||||
>[RFC1035] <SPAN
|
||||
@@ -956,7 +956,7 @@ NAME="proposed_standards"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4467"
|
||||
NAME="AEN4476"
|
||||
></A
|
||||
><P
|
||||
>[RFC2181] <SPAN
|
||||
@@ -976,7 +976,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4475"
|
||||
NAME="AEN4484"
|
||||
></A
|
||||
><P
|
||||
>[RFC2308] <SPAN
|
||||
@@ -996,7 +996,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4483"
|
||||
NAME="AEN4492"
|
||||
></A
|
||||
><P
|
||||
>[RFC1995] <SPAN
|
||||
@@ -1016,7 +1016,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4491"
|
||||
NAME="AEN4500"
|
||||
></A
|
||||
><P
|
||||
>[RFC1996] <SPAN
|
||||
@@ -1033,7 +1033,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4498"
|
||||
NAME="AEN4507"
|
||||
></A
|
||||
><P
|
||||
>[RFC2136] <SPAN
|
||||
@@ -1059,7 +1059,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4515"
|
||||
NAME="AEN4524"
|
||||
></A
|
||||
><P
|
||||
>[RFC2845] <SPAN
|
||||
@@ -1088,13 +1088,13 @@ STYLE="margin-left=0.5in"
|
||||
><H1
|
||||
CLASS="bibliodiv"
|
||||
><A
|
||||
NAME="AEN4534"
|
||||
NAME="AEN4543"
|
||||
>Proposed Standards Still Under Development</A
|
||||
></H1
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4539"
|
||||
NAME="AEN4548"
|
||||
></A
|
||||
><P
|
||||
>[RFC1886] <SPAN
|
||||
@@ -1117,7 +1117,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4551"
|
||||
NAME="AEN4560"
|
||||
></A
|
||||
><P
|
||||
>[RFC2065] <SPAN
|
||||
@@ -1137,7 +1137,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4563"
|
||||
NAME="AEN4572"
|
||||
></A
|
||||
><P
|
||||
>[RFC2137] <SPAN
|
||||
@@ -1154,7 +1154,7 @@ STYLE="margin-left=0.5in"
|
||||
><H1
|
||||
CLASS="bibliodiv"
|
||||
><A
|
||||
NAME="AEN4571"
|
||||
NAME="AEN4580"
|
||||
>Other Important RFCs About <SPAN
|
||||
CLASS="acronym"
|
||||
>DNS</SPAN
|
||||
@@ -1163,7 +1163,7 @@ CLASS="acronym"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4574"
|
||||
NAME="AEN4583"
|
||||
></A
|
||||
><P
|
||||
>[RFC1535] <SPAN
|
||||
@@ -1183,7 +1183,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4582"
|
||||
NAME="AEN4591"
|
||||
></A
|
||||
><P
|
||||
>[RFC1536] <SPAN
|
||||
@@ -1215,7 +1215,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4603"
|
||||
NAME="AEN4612"
|
||||
></A
|
||||
><P
|
||||
>[RFC1982] <SPAN
|
||||
@@ -1235,13 +1235,13 @@ STYLE="margin-left=0.5in"
|
||||
><H1
|
||||
CLASS="bibliodiv"
|
||||
><A
|
||||
NAME="AEN4614"
|
||||
NAME="AEN4623"
|
||||
>Resource Record Types</A
|
||||
></H1
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4616"
|
||||
NAME="AEN4625"
|
||||
></A
|
||||
><P
|
||||
>[RFC1183] <SPAN
|
||||
@@ -1270,7 +1270,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4634"
|
||||
NAME="AEN4643"
|
||||
></A
|
||||
><P
|
||||
>[RFC1706] <SPAN
|
||||
@@ -1293,7 +1293,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4646"
|
||||
NAME="AEN4655"
|
||||
></A
|
||||
><P
|
||||
>[RFC2168] <SPAN
|
||||
@@ -1314,7 +1314,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4657"
|
||||
NAME="AEN4666"
|
||||
></A
|
||||
><P
|
||||
>[RFC1876] <SPAN
|
||||
@@ -1341,7 +1341,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4674"
|
||||
NAME="AEN4683"
|
||||
></A
|
||||
><P
|
||||
>[RFC2052] <SPAN
|
||||
@@ -1365,7 +1365,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4686"
|
||||
NAME="AEN4695"
|
||||
></A
|
||||
><P
|
||||
>[RFC2163] <SPAN
|
||||
@@ -1386,7 +1386,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4694"
|
||||
NAME="AEN4703"
|
||||
></A
|
||||
><P
|
||||
>[RFC2230] <SPAN
|
||||
@@ -1406,7 +1406,7 @@ STYLE="margin-left=0.5in"
|
||||
><H1
|
||||
CLASS="bibliodiv"
|
||||
><A
|
||||
NAME="AEN4702"
|
||||
NAME="AEN4711"
|
||||
><SPAN
|
||||
CLASS="acronym"
|
||||
>DNS</SPAN
|
||||
@@ -1415,7 +1415,7 @@ CLASS="acronym"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4705"
|
||||
NAME="AEN4714"
|
||||
></A
|
||||
><P
|
||||
>[RFC1101] <SPAN
|
||||
@@ -1435,7 +1435,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4713"
|
||||
NAME="AEN4722"
|
||||
></A
|
||||
><P
|
||||
>[RFC1123] <SPAN
|
||||
@@ -1452,7 +1452,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4720"
|
||||
NAME="AEN4729"
|
||||
></A
|
||||
><P
|
||||
>[RFC1591] <SPAN
|
||||
@@ -1469,7 +1469,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4727"
|
||||
NAME="AEN4736"
|
||||
></A
|
||||
><P
|
||||
>[RFC2317] <SPAN
|
||||
@@ -1492,7 +1492,7 @@ STYLE="margin-left=0.5in"
|
||||
><H1
|
||||
CLASS="bibliodiv"
|
||||
><A
|
||||
NAME="AEN4741"
|
||||
NAME="AEN4750"
|
||||
><SPAN
|
||||
CLASS="acronym"
|
||||
>DNS</SPAN
|
||||
@@ -1501,7 +1501,7 @@ CLASS="acronym"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4744"
|
||||
NAME="AEN4753"
|
||||
></A
|
||||
><P
|
||||
>[RFC1537] <SPAN
|
||||
@@ -1521,7 +1521,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4752"
|
||||
NAME="AEN4761"
|
||||
></A
|
||||
><P
|
||||
>[RFC1912] <SPAN
|
||||
@@ -1541,7 +1541,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4760"
|
||||
NAME="AEN4769"
|
||||
></A
|
||||
><P
|
||||
>[RFC1912] <SPAN
|
||||
@@ -1561,7 +1561,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4768"
|
||||
NAME="AEN4777"
|
||||
></A
|
||||
><P
|
||||
>[RFC2010] <SPAN
|
||||
@@ -1581,7 +1581,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4779"
|
||||
NAME="AEN4788"
|
||||
></A
|
||||
><P
|
||||
>[RFC2219] <SPAN
|
||||
@@ -1604,7 +1604,7 @@ STYLE="margin-left=0.5in"
|
||||
><H1
|
||||
CLASS="bibliodiv"
|
||||
><A
|
||||
NAME="AEN4791"
|
||||
NAME="AEN4800"
|
||||
>Other <SPAN
|
||||
CLASS="acronym"
|
||||
>DNS</SPAN
|
||||
@@ -1613,7 +1613,7 @@ CLASS="acronym"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4797"
|
||||
NAME="AEN4806"
|
||||
></A
|
||||
><P
|
||||
>[RFC1464] <SPAN
|
||||
@@ -1630,7 +1630,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4804"
|
||||
NAME="AEN4813"
|
||||
></A
|
||||
><P
|
||||
>[RFC1713] <SPAN
|
||||
@@ -1650,7 +1650,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4812"
|
||||
NAME="AEN4821"
|
||||
></A
|
||||
><P
|
||||
>[RFC1794] <SPAN
|
||||
@@ -1670,7 +1670,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4820"
|
||||
NAME="AEN4829"
|
||||
></A
|
||||
><P
|
||||
>[RFC2240] <SPAN
|
||||
@@ -1687,7 +1687,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4827"
|
||||
NAME="AEN4836"
|
||||
></A
|
||||
><P
|
||||
>[RFC2345] <SPAN
|
||||
@@ -1710,7 +1710,7 @@ STYLE="margin-left=0.5in"
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4841"
|
||||
NAME="AEN4850"
|
||||
></A
|
||||
><P
|
||||
>[RFC2352] <SPAN
|
||||
@@ -1727,13 +1727,13 @@ STYLE="margin-left=0.5in"
|
||||
><H1
|
||||
CLASS="bibliodiv"
|
||||
><A
|
||||
NAME="AEN4848"
|
||||
NAME="AEN4857"
|
||||
>Obsolete and Unimplemented Experimental RRs</A
|
||||
></H1
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4850"
|
||||
NAME="AEN4859"
|
||||
></A
|
||||
><P
|
||||
>[RFC1712] <SPAN
|
||||
@@ -1784,7 +1784,7 @@ CLASS="sect2"
|
||||
><H2
|
||||
CLASS="sect2"
|
||||
><A
|
||||
NAME="AEN4871"
|
||||
NAME="AEN4880"
|
||||
>A.4.3. Other Documents About <SPAN
|
||||
CLASS="acronym"
|
||||
>BIND</SPAN
|
||||
@@ -1794,13 +1794,13 @@ CLASS="acronym"
|
||||
></P
|
||||
><H3
|
||||
><A
|
||||
NAME="AEN4875"
|
||||
NAME="AEN4884"
|
||||
>Bibliography</A
|
||||
></H3
|
||||
><DIV
|
||||
CLASS="biblioentry"
|
||||
><A
|
||||
NAME="AEN4876"
|
||||
NAME="AEN4885"
|
||||
></A
|
||||
><P
|
||||
><SPAN
|
||||
|
||||
+56
-56
@@ -193,7 +193,7 @@ HREF="Bv9ARM.ch03.html#AEN371"
|
||||
></DT
|
||||
><DT
|
||||
>3.4.2. <A
|
||||
HREF="Bv9ARM.ch03.html#AEN656"
|
||||
HREF="Bv9ARM.ch03.html#AEN661"
|
||||
>Signals</A
|
||||
></DT
|
||||
></DL
|
||||
@@ -228,7 +228,7 @@ HREF="Bv9ARM.ch04.html#incremental_zone_transfers"
|
||||
></DT
|
||||
><DT
|
||||
>4.3. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN720"
|
||||
HREF="Bv9ARM.ch04.html#AEN725"
|
||||
>Split DNS</A
|
||||
></DT
|
||||
><DT
|
||||
@@ -240,44 +240,44 @@ HREF="Bv9ARM.ch04.html#tsig"
|
||||
><DL
|
||||
><DT
|
||||
>4.4.1. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN811"
|
||||
HREF="Bv9ARM.ch04.html#AEN816"
|
||||
>Generate Shared Keys for Each Pair of Hosts</A
|
||||
></DT
|
||||
><DT
|
||||
>4.4.2. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN832"
|
||||
HREF="Bv9ARM.ch04.html#AEN837"
|
||||
>Copying the Shared Secret to Both Machines</A
|
||||
></DT
|
||||
><DT
|
||||
>4.4.3. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN835"
|
||||
HREF="Bv9ARM.ch04.html#AEN840"
|
||||
>Informing the Servers of the Key's Existence</A
|
||||
></DT
|
||||
><DT
|
||||
>4.4.4. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN847"
|
||||
HREF="Bv9ARM.ch04.html#AEN852"
|
||||
>Instructing the Server to Use the Key</A
|
||||
></DT
|
||||
><DT
|
||||
>4.4.5. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN863"
|
||||
HREF="Bv9ARM.ch04.html#AEN868"
|
||||
>TSIG Key Based Access Control</A
|
||||
></DT
|
||||
><DT
|
||||
>4.4.6. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN876"
|
||||
HREF="Bv9ARM.ch04.html#AEN881"
|
||||
>Errors</A
|
||||
></DT
|
||||
></DL
|
||||
></DD
|
||||
><DT
|
||||
>4.5. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN880"
|
||||
HREF="Bv9ARM.ch04.html#AEN885"
|
||||
>TKEY</A
|
||||
></DT
|
||||
><DT
|
||||
>4.6. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN895"
|
||||
HREF="Bv9ARM.ch04.html#AEN900"
|
||||
>SIG(0)</A
|
||||
></DT
|
||||
><DT
|
||||
@@ -289,34 +289,34 @@ HREF="Bv9ARM.ch04.html#DNSSEC"
|
||||
><DL
|
||||
><DT
|
||||
>4.7.1. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN912"
|
||||
HREF="Bv9ARM.ch04.html#AEN917"
|
||||
>Generating Keys</A
|
||||
></DT
|
||||
><DT
|
||||
>4.7.2. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN932"
|
||||
HREF="Bv9ARM.ch04.html#AEN937"
|
||||
>Creating a Keyset</A
|
||||
></DT
|
||||
><DT
|
||||
>4.7.3. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN944"
|
||||
HREF="Bv9ARM.ch04.html#AEN949"
|
||||
>Signing the Child's Keyset</A
|
||||
></DT
|
||||
><DT
|
||||
>4.7.4. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN957"
|
||||
HREF="Bv9ARM.ch04.html#AEN962"
|
||||
>Signing the Zone</A
|
||||
></DT
|
||||
><DT
|
||||
>4.7.5. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN973"
|
||||
HREF="Bv9ARM.ch04.html#AEN978"
|
||||
>Configuring Servers</A
|
||||
></DT
|
||||
></DL
|
||||
></DD
|
||||
><DT
|
||||
>4.8. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN980"
|
||||
HREF="Bv9ARM.ch04.html#AEN985"
|
||||
>IPv6 Support in <SPAN
|
||||
CLASS="acronym"
|
||||
>BIND</SPAN
|
||||
@@ -326,27 +326,27 @@ CLASS="acronym"
|
||||
><DL
|
||||
><DT
|
||||
>4.8.1. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN996"
|
||||
HREF="Bv9ARM.ch04.html#AEN1001"
|
||||
>Address Lookups Using AAAA Records</A
|
||||
></DT
|
||||
><DT
|
||||
>4.8.2. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN1001"
|
||||
HREF="Bv9ARM.ch04.html#AEN1006"
|
||||
>Address Lookups Using A6 Records</A
|
||||
></DT
|
||||
><DT
|
||||
>4.8.3. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN1022"
|
||||
HREF="Bv9ARM.ch04.html#AEN1027"
|
||||
>Address to Name Lookups Using Nibble Format</A
|
||||
></DT
|
||||
><DT
|
||||
>4.8.4. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN1029"
|
||||
HREF="Bv9ARM.ch04.html#AEN1034"
|
||||
>Address to Name Lookups Using Bitstring Format</A
|
||||
></DT
|
||||
><DT
|
||||
>4.8.5. <A
|
||||
HREF="Bv9ARM.ch04.html#AEN1036"
|
||||
HREF="Bv9ARM.ch04.html#AEN1041"
|
||||
>Using DNAME for Delegation of IPv6 Reverse Addresses</A
|
||||
></DT
|
||||
></DL
|
||||
@@ -365,7 +365,7 @@ CLASS="acronym"
|
||||
><DL
|
||||
><DT
|
||||
>5.1. <A
|
||||
HREF="Bv9ARM.ch05.html#AEN1056"
|
||||
HREF="Bv9ARM.ch05.html#AEN1061"
|
||||
>The Lightweight Resolver Library</A
|
||||
></DT
|
||||
><DT
|
||||
@@ -399,7 +399,7 @@ HREF="Bv9ARM.ch06.html#address_match_lists"
|
||||
></DT
|
||||
><DT
|
||||
>6.1.2. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN1298"
|
||||
HREF="Bv9ARM.ch06.html#AEN1302"
|
||||
>Comment Syntax</A
|
||||
></DT
|
||||
></DL
|
||||
@@ -413,7 +413,7 @@ HREF="Bv9ARM.ch06.html#Configuration_File_Grammar"
|
||||
><DL
|
||||
><DT
|
||||
>6.2.1. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN1405"
|
||||
HREF="Bv9ARM.ch06.html#AEN1409"
|
||||
><B
|
||||
CLASS="command"
|
||||
>acl</B
|
||||
@@ -430,7 +430,7 @@ Usage</A
|
||||
></DT
|
||||
><DT
|
||||
>6.2.3. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN1447"
|
||||
HREF="Bv9ARM.ch06.html#AEN1456"
|
||||
><B
|
||||
CLASS="command"
|
||||
>controls</B
|
||||
@@ -446,7 +446,7 @@ CLASS="command"
|
||||
></DT
|
||||
><DT
|
||||
>6.2.5. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN1511"
|
||||
HREF="Bv9ARM.ch06.html#AEN1520"
|
||||
><B
|
||||
CLASS="command"
|
||||
>include</B
|
||||
@@ -454,7 +454,7 @@ CLASS="command"
|
||||
></DT
|
||||
><DT
|
||||
>6.2.6. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN1516"
|
||||
HREF="Bv9ARM.ch06.html#AEN1525"
|
||||
><B
|
||||
CLASS="command"
|
||||
>include</B
|
||||
@@ -462,7 +462,7 @@ CLASS="command"
|
||||
></DT
|
||||
><DT
|
||||
>6.2.7. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN1523"
|
||||
HREF="Bv9ARM.ch06.html#AEN1532"
|
||||
><B
|
||||
CLASS="command"
|
||||
>key</B
|
||||
@@ -470,7 +470,7 @@ CLASS="command"
|
||||
></DT
|
||||
><DT
|
||||
>6.2.8. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN1530"
|
||||
HREF="Bv9ARM.ch06.html#AEN1539"
|
||||
><B
|
||||
CLASS="command"
|
||||
>key</B
|
||||
@@ -478,7 +478,7 @@ CLASS="command"
|
||||
></DT
|
||||
><DT
|
||||
>6.2.9. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN1548"
|
||||
HREF="Bv9ARM.ch06.html#AEN1557"
|
||||
><B
|
||||
CLASS="command"
|
||||
>logging</B
|
||||
@@ -486,7 +486,7 @@ CLASS="command"
|
||||
></DT
|
||||
><DT
|
||||
>6.2.10. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN1588"
|
||||
HREF="Bv9ARM.ch06.html#AEN1597"
|
||||
><B
|
||||
CLASS="command"
|
||||
>logging</B
|
||||
@@ -494,7 +494,7 @@ CLASS="command"
|
||||
></DT
|
||||
><DT
|
||||
>6.2.11. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN1818"
|
||||
HREF="Bv9ARM.ch06.html#AEN1828"
|
||||
><B
|
||||
CLASS="command"
|
||||
>lwres</B
|
||||
@@ -502,7 +502,7 @@ CLASS="command"
|
||||
></DT
|
||||
><DT
|
||||
>6.2.12. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN1842"
|
||||
HREF="Bv9ARM.ch06.html#AEN1852"
|
||||
><B
|
||||
CLASS="command"
|
||||
>lwres</B
|
||||
@@ -510,7 +510,7 @@ CLASS="command"
|
||||
></DT
|
||||
><DT
|
||||
>6.2.13. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN1861"
|
||||
HREF="Bv9ARM.ch06.html#AEN1871"
|
||||
><B
|
||||
CLASS="command"
|
||||
>options</B
|
||||
@@ -518,7 +518,7 @@ CLASS="command"
|
||||
></DT
|
||||
><DT
|
||||
>6.2.14. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN2079"
|
||||
HREF="Bv9ARM.ch06.html#AEN2089"
|
||||
><B
|
||||
CLASS="command"
|
||||
>options</B
|
||||
@@ -542,7 +542,7 @@ CLASS="command"
|
||||
></DT
|
||||
><DT
|
||||
>6.2.17. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN2990"
|
||||
HREF="Bv9ARM.ch06.html#AEN2999"
|
||||
><B
|
||||
CLASS="command"
|
||||
>trusted-keys</B
|
||||
@@ -550,7 +550,7 @@ CLASS="command"
|
||||
></DT
|
||||
><DT
|
||||
>6.2.18. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN3006"
|
||||
HREF="Bv9ARM.ch06.html#AEN3015"
|
||||
><B
|
||||
CLASS="command"
|
||||
>trusted-keys</B
|
||||
@@ -559,7 +559,7 @@ and Usage</A
|
||||
></DT
|
||||
><DT
|
||||
>6.2.19. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN3014"
|
||||
HREF="Bv9ARM.ch06.html#AEN3023"
|
||||
><B
|
||||
CLASS="command"
|
||||
>view</B
|
||||
@@ -567,7 +567,7 @@ CLASS="command"
|
||||
></DT
|
||||
><DT
|
||||
>6.2.20. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN3030"
|
||||
HREF="Bv9ARM.ch06.html#AEN3039"
|
||||
><B
|
||||
CLASS="command"
|
||||
>view</B
|
||||
@@ -584,7 +584,7 @@ Statement Grammar</A
|
||||
></DT
|
||||
><DT
|
||||
>6.2.22. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN3181"
|
||||
HREF="Bv9ARM.ch06.html#AEN3190"
|
||||
><B
|
||||
CLASS="command"
|
||||
>zone</B
|
||||
@@ -594,7 +594,7 @@ CLASS="command"
|
||||
></DD
|
||||
><DT
|
||||
>6.3. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN3515"
|
||||
HREF="Bv9ARM.ch06.html#AEN3524"
|
||||
>Zone File</A
|
||||
></DT
|
||||
><DD
|
||||
@@ -606,7 +606,7 @@ HREF="Bv9ARM.ch06.html#types_of_resource_records_and_when_to_use_them"
|
||||
></DT
|
||||
><DT
|
||||
>6.3.2. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN3835"
|
||||
HREF="Bv9ARM.ch06.html#AEN3844"
|
||||
>Discussion of MX Records</A
|
||||
></DT
|
||||
><DT
|
||||
@@ -616,17 +616,17 @@ HREF="Bv9ARM.ch06.html#Setting_TTLs"
|
||||
></DT
|
||||
><DT
|
||||
>6.3.4. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN3956"
|
||||
HREF="Bv9ARM.ch06.html#AEN3965"
|
||||
>Inverse Mapping in IPv4</A
|
||||
></DT
|
||||
><DT
|
||||
>6.3.5. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN3983"
|
||||
HREF="Bv9ARM.ch06.html#AEN3992"
|
||||
>Other Zone File Directives</A
|
||||
></DT
|
||||
><DT
|
||||
>6.3.6. <A
|
||||
HREF="Bv9ARM.ch06.html#AEN4041"
|
||||
HREF="Bv9ARM.ch06.html#AEN4050"
|
||||
><SPAN
|
||||
CLASS="acronym"
|
||||
>BIND</SPAN
|
||||
@@ -656,7 +656,7 @@ HREF="Bv9ARM.ch07.html#Access_Control_Lists"
|
||||
></DT
|
||||
><DT
|
||||
>7.2. <A
|
||||
HREF="Bv9ARM.ch07.html#AEN4133"
|
||||
HREF="Bv9ARM.ch07.html#AEN4142"
|
||||
><B
|
||||
CLASS="command"
|
||||
>chroot</B
|
||||
@@ -670,7 +670,7 @@ UNIX servers)</A
|
||||
><DL
|
||||
><DT
|
||||
>7.2.1. <A
|
||||
HREF="Bv9ARM.ch07.html#AEN4156"
|
||||
HREF="Bv9ARM.ch07.html#AEN4165"
|
||||
>The <B
|
||||
CLASS="command"
|
||||
>chroot</B
|
||||
@@ -678,7 +678,7 @@ CLASS="command"
|
||||
></DT
|
||||
><DT
|
||||
>7.2.2. <A
|
||||
HREF="Bv9ARM.ch07.html#AEN4174"
|
||||
HREF="Bv9ARM.ch07.html#AEN4183"
|
||||
>Using the <B
|
||||
CLASS="command"
|
||||
>setuid</B
|
||||
@@ -702,26 +702,26 @@ HREF="Bv9ARM.ch08.html"
|
||||
><DL
|
||||
><DT
|
||||
>8.1. <A
|
||||
HREF="Bv9ARM.ch08.html#AEN4195"
|
||||
HREF="Bv9ARM.ch08.html#AEN4204"
|
||||
>Common Problems</A
|
||||
></DT
|
||||
><DD
|
||||
><DL
|
||||
><DT
|
||||
>8.1.1. <A
|
||||
HREF="Bv9ARM.ch08.html#AEN4197"
|
||||
HREF="Bv9ARM.ch08.html#AEN4206"
|
||||
>It's not working; how can I figure out what's wrong?</A
|
||||
></DT
|
||||
></DL
|
||||
></DD
|
||||
><DT
|
||||
>8.2. <A
|
||||
HREF="Bv9ARM.ch08.html#AEN4200"
|
||||
HREF="Bv9ARM.ch08.html#AEN4209"
|
||||
>Incrementing and Changing the Serial Number</A
|
||||
></DT
|
||||
><DT
|
||||
>8.3. <A
|
||||
HREF="Bv9ARM.ch08.html#AEN4205"
|
||||
HREF="Bv9ARM.ch08.html#AEN4214"
|
||||
>Where Can I Get Help?</A
|
||||
></DT
|
||||
></DL
|
||||
@@ -735,14 +735,14 @@ HREF="Bv9ARM.ch09.html"
|
||||
><DL
|
||||
><DT
|
||||
>A.1. <A
|
||||
HREF="Bv9ARM.ch09.html#AEN4221"
|
||||
HREF="Bv9ARM.ch09.html#AEN4230"
|
||||
>Acknowledgements</A
|
||||
></DT
|
||||
><DD
|
||||
><DL
|
||||
><DT
|
||||
>A.1.1. <A
|
||||
HREF="Bv9ARM.ch09.html#AEN4223"
|
||||
HREF="Bv9ARM.ch09.html#AEN4232"
|
||||
>A Brief History of the <SPAN
|
||||
CLASS="acronym"
|
||||
>DNS</SPAN
|
||||
@@ -772,7 +772,7 @@ HREF="Bv9ARM.ch09.html#classes_of_resource_records"
|
||||
></DD
|
||||
><DT
|
||||
>A.3. <A
|
||||
HREF="Bv9ARM.ch09.html#AEN4262"
|
||||
HREF="Bv9ARM.ch09.html#AEN4271"
|
||||
>General <SPAN
|
||||
CLASS="acronym"
|
||||
>DNS</SPAN
|
||||
@@ -806,7 +806,7 @@ HREF="Bv9ARM.ch09.html#internet_drafts"
|
||||
></DT
|
||||
><DT
|
||||
>A.4.3. <A
|
||||
HREF="Bv9ARM.ch09.html#AEN4871"
|
||||
HREF="Bv9ARM.ch09.html#AEN4880"
|
||||
>Other Documents About <SPAN
|
||||
CLASS="acronym"
|
||||
>BIND</SPAN
|
||||
|
||||
+18
-18
@@ -13,12 +13,12 @@ options {
|
||||
files <size>;
|
||||
has-old-clients <boolean>; // obsolete
|
||||
heartbeat-interval <integer>;
|
||||
host-statistics <boolean>;
|
||||
host-statistics <boolean>; // not implemented
|
||||
interface-interval <integer>;
|
||||
listen-on [ port <integer> ] { <address_match_element>; ... };
|
||||
listen-on-v6 [ port <integer> ] { <address_match_element>; ... };
|
||||
match-mapped-addresses <boolean>;
|
||||
memstatistics-file <quoted_string>;
|
||||
memstatistics-file <quoted_string>; // not implemented
|
||||
multiple-cnames <boolean>; // obsolete
|
||||
named-xfer <quoted_string>; // obsolete
|
||||
pid-file <quoted_string>;
|
||||
@@ -26,7 +26,7 @@ options {
|
||||
random-device <quoted_string>;
|
||||
recursive-clients <integer>;
|
||||
rrset-order { [ class <string> ] [ type <string> ] [ name
|
||||
<quoted_string> ] <string> <string>; ... };
|
||||
<quoted_string> ] <string> <string>; ... }; // not implemented
|
||||
serial-queries <integer>; // obsolete
|
||||
serial-query-rate <integer>;
|
||||
stacksize <size>;
|
||||
@@ -44,7 +44,6 @@ options {
|
||||
use-ixfr <boolean>;
|
||||
version <quoted_string>;
|
||||
allow-notify { <address_match_element>; ... };
|
||||
allow-update-forwarding { <address_match_element>; ... };
|
||||
allow-recursion { <address_match_element>; ... };
|
||||
allow-v6-synthesis { <address_match_element>; ... };
|
||||
sortlist { <address_match_element>; ... };
|
||||
@@ -67,12 +66,13 @@ options {
|
||||
lame-ttl <integer>;
|
||||
max-ncache-ttl <integer>;
|
||||
max-cache-ttl <integer>;
|
||||
transfer-format <string>;
|
||||
max-cache-size <size>;
|
||||
transfer-format ( many-answers | one-answer );
|
||||
max-cache-size <size_no_default>;
|
||||
check-names <string> <string>; // not implemented
|
||||
cache-file <quoted_string>;
|
||||
allow-query { <address_match_element>; ... };
|
||||
allow-transfer { <address_match_element>; ... };
|
||||
allow-update-forwarding { <address_match_element>; ... };
|
||||
notify <notifytype>;
|
||||
also-notify [ port <integer> ] { ( <ipv4_address> | <ipv6_address>
|
||||
) [ port <integer> ]; ... };
|
||||
@@ -80,7 +80,7 @@ options {
|
||||
forward ( first | only );
|
||||
forwarders [ port <integer> ] { ( <ipv4_address> | <ipv6_address> )
|
||||
[ port <integer> ]; ... };
|
||||
maintain-ixfr-base <boolean>;
|
||||
maintain-ixfr-base <boolean>; // obsolete
|
||||
max-ixfr-log-size <size>; // obsolete
|
||||
transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
|
||||
transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
|
||||
@@ -105,7 +105,7 @@ controls {
|
||||
acl <string> { <address_match_element>; ... };
|
||||
|
||||
logging {
|
||||
channel {
|
||||
channel <string> {
|
||||
file <logfile>;
|
||||
syslog <optional_facility>;
|
||||
null;
|
||||
@@ -122,14 +122,13 @@ view <string> <optional_class> {
|
||||
match-clients { <address_match_element>; ... };
|
||||
match-destinations { <address_match_element>; ... };
|
||||
match-recursive-only <boolean>;
|
||||
key {
|
||||
key <string> {
|
||||
algorithm <string>;
|
||||
secret <string>;
|
||||
};
|
||||
zone <string> <optional_class> {
|
||||
type ( master | slave | stub | hint | forward );
|
||||
allow-update { <address_match_element>; ... };
|
||||
allow-update-forwarding { <address_match_element>; ... };
|
||||
file <quoted_string>;
|
||||
ixfr-base <quoted_string>; // obsolete
|
||||
ixfr-tmp-file <quoted_string>; // obsolete
|
||||
@@ -143,6 +142,7 @@ view <string> <optional_class> {
|
||||
check-names <string>; // not implemented
|
||||
allow-query { <address_match_element>; ... };
|
||||
allow-transfer { <address_match_element>; ... };
|
||||
allow-update-forwarding { <address_match_element>; ... };
|
||||
notify <notifytype>;
|
||||
also-notify [ port <integer> ] { ( <ipv4_address> |
|
||||
<ipv6_address> ) [ port <integer> ]; ... };
|
||||
@@ -150,7 +150,7 @@ view <string> <optional_class> {
|
||||
forward ( first | only );
|
||||
forwarders [ port <integer> ] { ( <ipv4_address> |
|
||||
<ipv6_address> ) [ port <integer> ]; ... };
|
||||
maintain-ixfr-base <boolean>;
|
||||
maintain-ixfr-base <boolean>; // obsolete
|
||||
max-ixfr-log-size <size>; // obsolete
|
||||
transfer-source ( <ipv4_address> | * ) [ port ( <integer> |
|
||||
* ) ];
|
||||
@@ -180,7 +180,6 @@ view <string> <optional_class> {
|
||||
trusted-keys { <string> <integer> <integer> <integer>
|
||||
<quoted_string>; ... };
|
||||
allow-notify { <address_match_element>; ... };
|
||||
allow-update-forwarding { <address_match_element>; ... };
|
||||
allow-recursion { <address_match_element>; ... };
|
||||
allow-v6-synthesis { <address_match_element>; ... };
|
||||
sortlist { <address_match_element>; ... };
|
||||
@@ -203,12 +202,13 @@ view <string> <optional_class> {
|
||||
lame-ttl <integer>;
|
||||
max-ncache-ttl <integer>;
|
||||
max-cache-ttl <integer>;
|
||||
transfer-format <string>;
|
||||
max-cache-size <size>;
|
||||
transfer-format ( many-answers | one-answer );
|
||||
max-cache-size <size_no_default>;
|
||||
check-names <string> <string>; // not implemented
|
||||
cache-file <quoted_string>;
|
||||
allow-query { <address_match_element>; ... };
|
||||
allow-transfer { <address_match_element>; ... };
|
||||
allow-update-forwarding { <address_match_element>; ... };
|
||||
notify <notifytype>;
|
||||
also-notify [ port <integer> ] { ( <ipv4_address> | <ipv6_address>
|
||||
) [ port <integer> ]; ... };
|
||||
@@ -216,7 +216,7 @@ view <string> <optional_class> {
|
||||
forward ( first | only );
|
||||
forwarders [ port <integer> ] { ( <ipv4_address> | <ipv6_address> )
|
||||
[ port <integer> ]; ... };
|
||||
maintain-ixfr-base <boolean>;
|
||||
maintain-ixfr-base <boolean>; // obsolete
|
||||
max-ixfr-log-size <size>; // obsolete
|
||||
transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
|
||||
transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
|
||||
@@ -240,7 +240,7 @@ lwres {
|
||||
ndots <integer>;
|
||||
};
|
||||
|
||||
key {
|
||||
key <string> {
|
||||
algorithm <string>;
|
||||
secret <string>;
|
||||
};
|
||||
@@ -248,7 +248,6 @@ key {
|
||||
zone <string> <optional_class> {
|
||||
type ( master | slave | stub | hint | forward );
|
||||
allow-update { <address_match_element>; ... };
|
||||
allow-update-forwarding { <address_match_element>; ... };
|
||||
file <quoted_string>;
|
||||
ixfr-base <quoted_string>; // obsolete
|
||||
ixfr-tmp-file <quoted_string>; // obsolete
|
||||
@@ -261,6 +260,7 @@ zone <string> <optional_class> {
|
||||
check-names <string>; // not implemented
|
||||
allow-query { <address_match_element>; ... };
|
||||
allow-transfer { <address_match_element>; ... };
|
||||
allow-update-forwarding { <address_match_element>; ... };
|
||||
notify <notifytype>;
|
||||
also-notify [ port <integer> ] { ( <ipv4_address> | <ipv6_address>
|
||||
) [ port <integer> ]; ... };
|
||||
@@ -268,7 +268,7 @@ zone <string> <optional_class> {
|
||||
forward ( first | only );
|
||||
forwarders [ port <integer> ] { ( <ipv4_address> | <ipv6_address> )
|
||||
[ port <integer> ]; ... };
|
||||
maintain-ixfr-base <boolean>;
|
||||
maintain-ixfr-base <boolean>; // obsolete
|
||||
max-ixfr-log-size <size>; // obsolete
|
||||
transfer-source ( <ipv4_address> | * ) [ port ( <integer> | * ) ];
|
||||
transfer-source-v6 ( <ipv6_address> | * ) [ port ( <integer> | * ) ];
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#ifndef LINT
|
||||
static const char rcsid[] = "$Id: gettimeofday.c,v 1.1 2001/03/29 06:30:32 marka Exp $";
|
||||
static const char rcsid[] = "$Id: gettimeofday.c,v 1.1.2.1 2001/10/08 18:10:57 gson Exp $";
|
||||
#endif
|
||||
|
||||
#include "port_before.h"
|
||||
#undef gettimeofday
|
||||
#include <stdio.h>
|
||||
#include <syslog.h>
|
||||
#include <sys/time.h>
|
||||
@@ -21,6 +20,7 @@ int
|
||||
isc__gettimeofday(struct timeval *tp, struct timezone *tzp) {
|
||||
int res;
|
||||
|
||||
#undef gettimeofday
|
||||
res = gettimeofday(tp, tzp);
|
||||
if (res < 0)
|
||||
return (res);
|
||||
|
||||
+13
-3
@@ -1,6 +1,6 @@
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static const char sccsid[] = "@(#)strerror.c 8.1 (Berkeley) 6/4/93";
|
||||
static const char rcsid[] = "$Id: strerror.c,v 1.3 2001/06/21 08:25:59 marka Exp $";
|
||||
static const char rcsid[] = "$Id: strerror.c,v 1.3.2.1 2001/11/02 17:45:31 gson Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/*
|
||||
@@ -49,6 +49,11 @@ static const char rcsid[] = "$Id: strerror.c,v 1.3 2001/06/21 08:25:59 marka Exp
|
||||
int __strerror_unneeded__;
|
||||
#else
|
||||
|
||||
#ifdef USE_SYSERROR_LIST
|
||||
extern int sys_nerr;
|
||||
extern char *sys_errlist[];
|
||||
#endif
|
||||
|
||||
const char *
|
||||
isc_strerror(int num) {
|
||||
#define UPREFIX "Unknown error: "
|
||||
@@ -58,12 +63,17 @@ isc_strerror(int num) {
|
||||
const char *ret;
|
||||
char tmp[40];
|
||||
|
||||
errnum = num; /* convert to unsigned */
|
||||
#ifdef USE_SYSERROR_LIST
|
||||
if (errnum < sys_nerr)
|
||||
return (sys_errlist[errnum]);
|
||||
#else
|
||||
#undef strerror
|
||||
ret = strerror(num); /* call strerror() in libc */
|
||||
if (ret != NULL)
|
||||
return(ret);
|
||||
|
||||
errnum = num; /* convert to unsigned */
|
||||
#endif
|
||||
|
||||
/* Do this by hand, so we don't include stdio(3). */
|
||||
t = tmp;
|
||||
do {
|
||||
|
||||
Vendored
+234
-183
File diff suppressed because it is too large
Load Diff
@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
||||
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
|
||||
AC_DIVERT_POP()dnl
|
||||
|
||||
AC_REVISION($Revision: 1.83 $)
|
||||
AC_REVISION($Revision: 1.83.2.1 $)
|
||||
|
||||
AC_INIT(resolv/herror.c)
|
||||
AC_PREREQ(2.13)
|
||||
@@ -1265,6 +1265,10 @@ AC_SUBST(ISC_PLATFORM_NEEDVSNPRINTF)
|
||||
|
||||
AC_SUBST(ISC_EXTRA_OBJS)
|
||||
AC_SUBST(ISC_EXTRA_SRCS)
|
||||
AC_CHECK_FUNC(strerror,
|
||||
[USE_SYSERROR_LIST="#undef USE_SYSERROR_LIST"],
|
||||
[USE_SYSERROR_LIST="#define USE_SYSERROR_LIST 1"])
|
||||
AC_SUBST(USE_SYSERROR_LIST)
|
||||
|
||||
#
|
||||
# Determine the printf format characters to use when printing
|
||||
|
||||
+38
-15
@@ -1,5 +1,5 @@
|
||||
#ifndef LINT
|
||||
static const char rcsid[] = "$Header: /u0/home/explorer/proj/ISC/git-conversion/cvsroot/bind9/lib/bind/dst/Attic/dst_api.c,v 1.4 2001/04/03 06:42:17 marka Exp $";
|
||||
static const char rcsid[] = "$Header: /u0/home/explorer/proj/ISC/git-conversion/cvsroot/bind9/lib/bind/dst/Attic/dst_api.c,v 1.4.2.5 2001/11/02 22:31:14 gson Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -213,7 +213,6 @@ dst_compare_keys(const DST_KEY *key1, const DST_KEY *key2)
|
||||
* Then data is hashed (SIG_MODE_UPDATE). Finally the signature
|
||||
* itself is created (SIG_MODE_FINAL). This function can be called
|
||||
* once with INIT, UPDATE and FINAL modes all set, or it can be
|
||||
|
||||
* called separately with a different mode set for each step. The
|
||||
* UPDATE step can be repeated.
|
||||
* Parameters
|
||||
@@ -431,7 +430,7 @@ dst_s_write_private_key(const DST_KEY *key)
|
||||
int nn;
|
||||
if ((nn = fwrite(encoded_block, 1, len, fp)) != len) {
|
||||
EREPORT(("dst_write_private_key(): Write failure on %s %d != %d errno=%d\n",
|
||||
file, out_len, nn, errno));
|
||||
file, len, nn, errno));
|
||||
return (-5);
|
||||
}
|
||||
fclose(fp);
|
||||
@@ -553,7 +552,7 @@ dst_s_read_public_key(const char *in_name, const u_int16_t in_id, int in_alg)
|
||||
enckey[--len] = '\0';
|
||||
|
||||
/* remove leading spaces */
|
||||
for (notspace = (char *) enckey; isspace((unsigned char)*notspace); len--)
|
||||
for (notspace = (char *) enckey; isspace((*notspace)&0xff); len--)
|
||||
notspace++;
|
||||
|
||||
dlen = b64_pton(notspace, deckey, sizeof(deckey));
|
||||
@@ -587,6 +586,7 @@ dst_s_write_public_key(const DST_KEY *key)
|
||||
u_char out_key[RAW_KEY_SIZE];
|
||||
char enc_key[RAW_KEY_SIZE];
|
||||
int len = 0;
|
||||
int mode;
|
||||
|
||||
memset(out_key, 0, sizeof(out_key));
|
||||
if (key == NULL) {
|
||||
@@ -602,8 +602,10 @@ dst_s_write_public_key(const DST_KEY *key)
|
||||
key->dk_key_name, key->dk_id, PUBLIC_KEY));
|
||||
return (0);
|
||||
}
|
||||
/* XXX in general this should be a check for symmetric keys */
|
||||
mode = (key->dk_alg == KEY_HMAC_MD5) ? 0600 : 0644;
|
||||
/* create public key file */
|
||||
if ((fp = dst_s_fopen(filename, "w+", 0644)) == NULL) {
|
||||
if ((fp = dst_s_fopen(filename, "w+", mode)) == NULL) {
|
||||
EREPORT(("DST_write_public_key: open of file:%s failed (errno=%d)\n",
|
||||
filename, errno));
|
||||
return (0);
|
||||
@@ -655,6 +657,7 @@ dst_dnskey_to_key(const char *in_name, const u_char *rdata, const int len)
|
||||
|
||||
if (in_name == NULL)
|
||||
return (NULL);
|
||||
key_st->dk_id = dst_s_dns_key_id(rdata, len);
|
||||
key_st->dk_flags = dst_s_get_int16(rdata);
|
||||
key_st->dk_proto = (u_int16_t) rdata[DST_KEY_PROT];
|
||||
if (key_st->dk_flags & DST_EXTEND_FLAG) {
|
||||
@@ -758,6 +761,8 @@ dst_buffer_to_key(const char *key_name, /* name of the key */
|
||||
{
|
||||
|
||||
DST_KEY *dkey = NULL;
|
||||
int dnslen;
|
||||
u_char dns[2048];
|
||||
|
||||
if (!dst_check_algorithm(alg)) { /* make sure alg is available */
|
||||
EREPORT(("dst_buffer_to_key(): Algorithm %d not suppored\n", alg));
|
||||
@@ -769,14 +774,17 @@ dst_buffer_to_key(const char *key_name, /* name of the key */
|
||||
|
||||
if (dkey == NULL)
|
||||
return (NULL);
|
||||
if (dkey->dk_func != NULL && dkey->dk_func->from_dns_key != NULL) {
|
||||
if (dkey->dk_func->from_dns_key(dkey, key_buf, key_len) < 0) {
|
||||
EREPORT(("dst_buffer_to_key(): dst_buffer_to_hmac failed\n"));
|
||||
return (dst_free_key(dkey));
|
||||
}
|
||||
return (dkey);
|
||||
if (dkey->dk_func == NULL || dkey->dk_func->from_dns_key == NULL)
|
||||
return NULL;
|
||||
|
||||
if (dkey->dk_func->from_dns_key(dkey, key_buf, key_len) < 0) {
|
||||
EREPORT(("dst_buffer_to_key(): dst_buffer_to_hmac failed\n"));
|
||||
return (dst_free_key(dkey));
|
||||
}
|
||||
return (NULL);
|
||||
|
||||
dnslen = dst_key_to_dnskey(dkey, dns, sizeof(dns));
|
||||
dkey->dk_id = dst_s_dns_key_id(dns, dnslen);
|
||||
return (dkey);
|
||||
}
|
||||
|
||||
int
|
||||
@@ -814,10 +822,12 @@ dst_s_read_private_key_file(char *name, DST_KEY *pk_key, u_int16_t in_id,
|
||||
int in_alg)
|
||||
{
|
||||
int cnt, alg, len, major, minor, file_major, file_minor;
|
||||
int id;
|
||||
int ret, id;
|
||||
char filename[PATH_MAX];
|
||||
u_char in_buff[RAW_KEY_SIZE], *p;
|
||||
FILE *fp;
|
||||
int dnslen;
|
||||
u_char dns[2048];
|
||||
|
||||
if (name == NULL || pk_key == NULL) {
|
||||
EREPORT(("dst_read_private_key_file(): No key name given\n"));
|
||||
@@ -884,10 +894,13 @@ dst_s_read_private_key_file(char *name, DST_KEY *pk_key, u_int16_t in_id,
|
||||
if (pk_key->dk_func == NULL || pk_key->dk_func->from_file_fmt == NULL)
|
||||
goto fail;
|
||||
|
||||
id = pk_key->dk_func->from_file_fmt(pk_key, (char *)p, &in_buff[len] - p);
|
||||
if (id < 0)
|
||||
ret = pk_key->dk_func->from_file_fmt(pk_key, (char *)p, &in_buff[len] - p);
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
|
||||
dnslen = dst_key_to_dnskey(pk_key, dns, sizeof(dns));
|
||||
id = dst_s_dns_key_id(dns, dnslen);
|
||||
|
||||
/* Make sure the actual key tag matches the input tag used in the filename
|
||||
*/
|
||||
if (id != in_id) {
|
||||
@@ -940,6 +953,9 @@ dst_generate_key(const char *name, const int bits, const int exp,
|
||||
{
|
||||
DST_KEY *new_key = NULL;
|
||||
int res;
|
||||
int dnslen;
|
||||
u_char dns[2048];
|
||||
|
||||
if (name == NULL)
|
||||
return (NULL);
|
||||
|
||||
@@ -964,6 +980,13 @@ dst_generate_key(const char *name, const int bits, const int exp,
|
||||
new_key->dk_key_size, exp));
|
||||
return (dst_free_key(new_key));
|
||||
}
|
||||
|
||||
dnslen = dst_key_to_dnskey(new_key, dns, sizeof(dns));
|
||||
if (dnslen != UNSUPPORTED_KEYALG)
|
||||
new_key->dk_id = dst_s_dns_key_id(dns, dnslen);
|
||||
else
|
||||
new_key->dk_id = 0;
|
||||
|
||||
return (new_key);
|
||||
}
|
||||
|
||||
|
||||
+10
-14
@@ -1,4 +1,4 @@
|
||||
static const char rcsid[] = "$Header: /u0/home/explorer/proj/ISC/git-conversion/cvsroot/bind9/lib/bind/dst/Attic/support.c,v 1.2 2001/04/03 00:48:09 bwelling Exp $";
|
||||
static const char rcsid[] = "$Header: /u0/home/explorer/proj/ISC/git-conversion/cvsroot/bind9/lib/bind/dst/Attic/support.c,v 1.2.2.1 2001/11/02 22:25:29 gson Exp $";
|
||||
|
||||
|
||||
/*
|
||||
@@ -91,7 +91,7 @@ dst_s_calculate_bits(const u_char *str, const int max_bits)
|
||||
|
||||
|
||||
/*
|
||||
* calculates a checksum used in kmt for a id.
|
||||
* calculates a checksum used in dst for an id.
|
||||
* takes an array of bytes and a length.
|
||||
* returns a 16 bit checksum.
|
||||
*/
|
||||
@@ -116,34 +116,30 @@ dst_s_id_calc(const u_char *key, const int keysize)
|
||||
}
|
||||
|
||||
/*
|
||||
* dst_s_dns_key_id() Function to calculated DNSSEC footprint from KEY reocrd
|
||||
* rdata (all of record)
|
||||
* dst_s_dns_key_id() Function to calculate DNSSEC footprint from KEY record
|
||||
* rdata
|
||||
* Input:
|
||||
* dns_key_rdata: the raw data in wire format
|
||||
* rdata_len: the size of the input data
|
||||
* Output:
|
||||
* the key footprint/id calcuated from the key data
|
||||
* the key footprint/id calculated from the key data
|
||||
*/
|
||||
u_int16_t
|
||||
dst_s_dns_key_id(const u_char *dns_key_rdata, const int rdata_len)
|
||||
{
|
||||
int key_data = 4;
|
||||
|
||||
if (!dns_key_rdata || (rdata_len < key_data))
|
||||
if (!dns_key_rdata)
|
||||
return 0;
|
||||
|
||||
/* check the extended parameters bit in the DNS Key RR flags */
|
||||
if (dst_s_get_int16(dns_key_rdata) & DST_EXTEND_FLAG)
|
||||
key_data += 2;
|
||||
|
||||
/* compute id */
|
||||
if (dns_key_rdata[3] == KEY_RSA) /* Algorithm RSA */
|
||||
return dst_s_get_int16((const u_char *)
|
||||
&dns_key_rdata[rdata_len - 3]);
|
||||
else if (dns_key_rdata[3] == KEY_HMAC_MD5)
|
||||
/* compatibility */
|
||||
return 0;
|
||||
else
|
||||
/* compute a checksum on the key part of the key rr */
|
||||
return dst_s_id_calc(&dns_key_rdata[key_data],
|
||||
(rdata_len - key_data));
|
||||
return dst_s_id_calc(dns_key_rdata, rdata_len);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
/*
|
||||
* from nameser.h 8.1 (Berkeley) 6/2/93
|
||||
* $Id: nameser_compat.h,v 1.1 2001/03/29 06:31:35 marka Exp $
|
||||
* $Id: nameser_compat.h,v 1.1.2.1 2001/11/02 20:12:58 gson Exp $
|
||||
*/
|
||||
|
||||
#ifndef _ARPA_NAMESER_COMPAT_
|
||||
@@ -64,6 +64,7 @@
|
||||
defined(apollo) || defined(__convex__) || defined(_CRAY) || \
|
||||
defined(__hppa) || defined(__hp9000) || \
|
||||
defined(__hp9000s300) || defined(__hp9000s700) || \
|
||||
defined(__hp3000s900) || defined(MPE) || \
|
||||
defined (BIT_ZERO_ON_LEFT) || defined(m68k) || \
|
||||
(defined(__Lynx__) && \
|
||||
(defined(__68k__) || defined(__sparc__) || defined(__powerpc__)))
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
/*
|
||||
* @(#)resolv.h 8.1 (Berkeley) 6/2/93
|
||||
* $Id: resolv.h,v 1.7 2001/06/25 00:30:46 marka Exp $
|
||||
* $Id: resolv.h,v 1.7.2.2 2001/11/03 00:21:34 gson Exp $
|
||||
*/
|
||||
|
||||
#ifndef _RESOLV_H_
|
||||
@@ -178,7 +178,8 @@ struct __res_state {
|
||||
int _vcsock; /* PRIVATE: for res_send VC i/o */
|
||||
u_int _flags; /* PRIVATE: see below */
|
||||
union {
|
||||
char pad[52]; /* On an i386 this means 512b total. */
|
||||
/* On an 32-bit arch this means 512b total. */
|
||||
char pad[72 - 3*sizeof (int) - 2*sizeof (void *)];
|
||||
struct {
|
||||
u_int16_t nscount;
|
||||
u_int16_t nstimes[MAXNS]; /* ms. */
|
||||
@@ -235,11 +236,11 @@ union res_sockaddr_union {
|
||||
#define RES_KEEPTSIG 0x00010000 /* do not strip TSIG records */
|
||||
#define RES_BLAST 0x00020000 /* blast all recursive servers */
|
||||
#define RES_NO_NIBBLE 0x00040000 /* disable IPv6 nibble mode reverse */
|
||||
#define RES_NO_BITSTRING 0x00080000 /* disable IPv6 bits tring mode reverse */
|
||||
#define RES_NO_BITSTRING 0x00080000 /* disable IPv6 bit string mode reverse */
|
||||
/* KAME extensions: use higher bit to avoid conflict with ISC use */
|
||||
#define RES_USE_EDNS0 0x40000000 /* use EDNS0 if configured */
|
||||
#define RES_USE_A6 0x20000000 /* use A6 */
|
||||
#define RES_USE_DNAME 0x10000000 /* use DNAME */
|
||||
#define RES_USE_A6 0x20000000 /* use A6 */
|
||||
#define RES_USE_EDNS0 0x40000000 /* use EDNS0 if configured */
|
||||
|
||||
#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
|
||||
|
||||
|
||||
+21
-13
@@ -52,7 +52,7 @@
|
||||
/* BIND Id: gethnamaddr.c,v 8.15 1996/05/22 04:56:30 vixie Exp $ */
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static const char rcsid[] = "$Id: dns_ho.c,v 1.5 2001/07/02 00:44:50 marka Exp $";
|
||||
static const char rcsid[] = "$Id: dns_ho.c,v 1.5.2.1 2001/11/02 20:35:28 gson Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
/* Imports. */
|
||||
@@ -1400,7 +1400,8 @@ gethostans(struct irs_ho *this,
|
||||
buflen -= nn;
|
||||
}
|
||||
/* Ensure alignment. */
|
||||
bp += sizeof(align) - ((u_long)bp % sizeof(align));
|
||||
bp = (char *)(((u_long)bp + (sizeof(align) - 1)) &
|
||||
~(sizeof(align) - 1));
|
||||
/* Avoid overflows. */
|
||||
if (bp + n >= &pvt->hostbuf[sizeof pvt->hostbuf]) {
|
||||
had_error++;
|
||||
@@ -1421,6 +1422,8 @@ gethostans(struct irs_ho *this,
|
||||
had_error++;
|
||||
break;
|
||||
}
|
||||
if (m == 0)
|
||||
continue;
|
||||
if (hap < &pvt->h_addr_ptrs[MAXADDRS-1])
|
||||
hap++;
|
||||
|
||||
@@ -1491,6 +1494,8 @@ add_hostent(struct pvt *pvt, char *bp, char **hap, struct addrinfo *ai)
|
||||
{
|
||||
int addrlen;
|
||||
char *addrp;
|
||||
const char **tap;
|
||||
char *obp = bp;
|
||||
|
||||
switch(ai->ai_addr->sa_family) {
|
||||
case AF_INET6:
|
||||
@@ -1505,26 +1510,26 @@ add_hostent(struct pvt *pvt, char *bp, char **hap, struct addrinfo *ai)
|
||||
return(-1); /* abort? */
|
||||
}
|
||||
|
||||
bp += sizeof(align) - ((u_long)bp % sizeof(align));
|
||||
/* Ensure alignment. */
|
||||
bp = (char *)(((u_long)bp + (sizeof(align) - 1)) &
|
||||
~(sizeof(align) - 1));
|
||||
/* Avoid overflows. */
|
||||
if (bp + addrlen >= &pvt->hostbuf[sizeof pvt->hostbuf])
|
||||
return(-1);
|
||||
if (hap >= &pvt->h_addr_ptrs[MAXADDRS-1])
|
||||
return(addrlen); /* fail, but not treat it as an error. */
|
||||
#if 0
|
||||
return(0); /* fail, but not treat it as an error. */
|
||||
|
||||
/* Suppress duplicates. */
|
||||
for (tap = (const char **)pvt->h_addr_ptrs;
|
||||
*tap != NULL;
|
||||
tap++)
|
||||
if (memcmp(*tap, cp, n) == 0)
|
||||
if (memcmp(*tap, addrp, addrlen) == 0)
|
||||
break;
|
||||
if (*tap != NULL) {
|
||||
cp += n;
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (*tap != NULL)
|
||||
return (0);
|
||||
|
||||
memcpy(*hap = bp, addrp, addrlen);
|
||||
return(addrlen);
|
||||
return((bp + addrlen) - obp);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1536,7 +1541,10 @@ map_v4v6_hostent(struct hostent *hp, char **bpp, int *lenp) {
|
||||
hp->h_addrtype = AF_INET6;
|
||||
hp->h_length = IN6ADDRSZ;
|
||||
for (ap = hp->h_addr_list; *ap; ap++) {
|
||||
int i = sizeof(align) - ((u_long)*bpp % sizeof(align));
|
||||
int i = (u_long)*bpp % sizeof(align);
|
||||
|
||||
if (i != 0)
|
||||
i = sizeof(align) - i;
|
||||
|
||||
if (*lenp < (i + IN6ADDRSZ)) {
|
||||
/* Out of memory. Truncate address list here. */
|
||||
|
||||
+78
-36
@@ -1,44 +1,86 @@
|
||||
/*
|
||||
%%% copyright-cmetz-97
|
||||
This software is Copyright 1997-1998 by Craig Metz, All Rights Reserved.
|
||||
The Inner Net License Version 2 applies to this software.
|
||||
You should have received a copy of the license with this software. If
|
||||
you didn't get a copy, you may request one from <license@inner.net>.
|
||||
|
||||
*/
|
||||
* Copyright (c) 2001 by 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.
|
||||
*/
|
||||
|
||||
#include <port_before.h>
|
||||
#include <netdb.h>
|
||||
#include <port_after.h>
|
||||
|
||||
#ifdef DO_PTHREADS
|
||||
#include <pthread.h>
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
static const char *gai_errlist[] = {
|
||||
"no error",
|
||||
"address family not supported for name",/* EAI_ADDRFAMILY */
|
||||
"temporary failure", /* EAI_AGAIN */
|
||||
"invalid flags", /* EAI_BADFLAGS */
|
||||
"permanent failure", /* EAI_FAIL */
|
||||
"address family not supported", /* EAI_FAMILY */
|
||||
"memory failure", /* EAI_MEMORY */
|
||||
"no address", /* EAI_NODATA */
|
||||
"unknown name or service", /* EAI_NONAME */
|
||||
"service not supported for socktype", /* EAI_SERVICE */
|
||||
"socktype not supported", /* EAI_SOCKTYPE */
|
||||
"system failure", /* EAI_SYSTEM */
|
||||
"bad hints", /* EAI_BADHINTS */
|
||||
"bad protocol", /* EAI_PROTOCOL */
|
||||
|
||||
"unknown error" /* Must be last. */
|
||||
};
|
||||
|
||||
static const int gai_nerr = (sizeof(gai_errlist)/sizeof(*gai_errlist));
|
||||
|
||||
#define EAI_BUFSIZE 128
|
||||
|
||||
const char *
|
||||
gai_strerror(int errnum) {
|
||||
switch(errnum) {
|
||||
case 0:
|
||||
return "no error";
|
||||
case EAI_BADFLAGS:
|
||||
return "invalid value for ai_flags";
|
||||
case EAI_NONAME:
|
||||
return "name or service is not known";
|
||||
case EAI_AGAIN:
|
||||
return "temporary failure in name resolution";
|
||||
case EAI_FAIL:
|
||||
return "non-recoverable failure in name resolution";
|
||||
case EAI_NODATA:
|
||||
return "no address associated with name";
|
||||
case EAI_FAMILY:
|
||||
return "ai_family not supported";
|
||||
case EAI_SOCKTYPE:
|
||||
return "ai_socktype not supported";
|
||||
case EAI_SERVICE:
|
||||
return "service not supported for ai_socktype";
|
||||
case EAI_ADDRFAMILY:
|
||||
return "address family for name not supported";
|
||||
case EAI_MEMORY:
|
||||
return "memory allocation failure";
|
||||
case EAI_SYSTEM:
|
||||
return "system error";
|
||||
default:
|
||||
return "unknown error";
|
||||
};
|
||||
gai_strerror(int ecode) {
|
||||
#ifndef DO_PTHREADS
|
||||
static char buf[EAI_BUFSIZE];
|
||||
#else /* DO_PTHREADS */
|
||||
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
static pthread_key_t key;
|
||||
static int once = 0;
|
||||
char *buf;
|
||||
#endif
|
||||
|
||||
if (ecode >= 0 && ecode < (gai_nerr - 1))
|
||||
return (gai_errlist[ecode]);
|
||||
|
||||
#ifdef DO_PTHREADS
|
||||
if (!once) {
|
||||
pthread_mutex_lock(&lock);
|
||||
if (!once++)
|
||||
pthread_key_create(&key, free);
|
||||
pthread_mutex_unlock(&lock);
|
||||
}
|
||||
|
||||
buf = pthread_getspecific(key);
|
||||
if (buf == NULL) {
|
||||
buf = malloc(EAI_BUFSIZE);
|
||||
if (buf == NULL)
|
||||
return ("unknown error");
|
||||
pthread_setspecific(key, buf);
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* XXX This really should be snprintf(buf, EAI_BUFSIZE, ...).
|
||||
* It is safe until message catalogs are used.
|
||||
*/
|
||||
sprintf(buf, "%s: %d", gai_errlist[gai_nerr - 1], ecode);
|
||||
return (buf);
|
||||
}
|
||||
|
||||
+2
-2
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
static const char rcsid[] = "$Id: irp.c,v 1.3 2001/04/03 06:42:27 marka Exp $";
|
||||
static const char rcsid[] = "$Id: irp.c,v 1.3.2.1 2001/11/02 20:45:32 gson Exp $";
|
||||
#endif
|
||||
|
||||
/* Imports */
|
||||
@@ -539,6 +539,7 @@ irs_irp_send_command(struct irp_p *pvt, const char *fmt, ...) {
|
||||
|
||||
va_start(ap, fmt);
|
||||
todo = vsprintf(buffer, fmt, ap);
|
||||
va_end(ap);
|
||||
if (todo > (int)sizeof(buffer) - 3) {
|
||||
syslog(LOG_CRIT, "memory overrun in irs_irp_send_command()");
|
||||
exit(1);
|
||||
@@ -561,7 +562,6 @@ irs_irp_send_command(struct irp_p *pvt, const char *fmt, ...) {
|
||||
}
|
||||
todo -= i;
|
||||
}
|
||||
va_end(ap);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
static const char rcsid[] = "$Id: irs_data.c,v 1.3 2001/07/04 08:10:23 marka Exp $";
|
||||
static const char rcsid[] = "$Id: irs_data.c,v 1.3.2.1 2001/11/02 20:55:24 gson Exp $";
|
||||
#endif
|
||||
|
||||
#include "port_before.h"
|
||||
@@ -153,7 +153,8 @@ net_data_create(const char *conf_file) {
|
||||
if (net_data->res == NULL)
|
||||
return (NULL);
|
||||
|
||||
if (res_ninit(net_data->res) == -1)
|
||||
if ((net_data->res->options & RES_INIT) == 0 &&
|
||||
res_ninit(net_data->res) == -1)
|
||||
return (NULL);
|
||||
|
||||
return (net_data);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" $Id: assertions.mdoc,v 1.1 2001/03/29 06:31:53 marka Exp $
|
||||
.\" $Id: assertions.mdoc,v 1.1.2.1 2001/11/02 21:05:58 gson Exp $
|
||||
.\"
|
||||
.\"Copyright (c) 1997,1999 by Internet Software Consortium.
|
||||
.\"
|
||||
@@ -75,9 +75,9 @@ macro. If this macro's value is
|
||||
when
|
||||
.Dq "<isc/assertions.h>"
|
||||
is included, then assertions of that type will not be checked. E.g.
|
||||
|
||||
.Pp
|
||||
.Dl #define CHECK_ENSURE 0
|
||||
|
||||
.Pp
|
||||
will disable checking of
|
||||
.Fn ENSURE
|
||||
and
|
||||
@@ -93,8 +93,7 @@ assertion types should be checked.
|
||||
specifies the function to call when an assertion fails.
|
||||
.Pp
|
||||
When an
|
||||
.li
|
||||
assertion_failure_callback
|
||||
.Fn assertion_failure_callback
|
||||
is called, the
|
||||
.Fa filename
|
||||
and
|
||||
@@ -109,7 +108,7 @@ assert_ensure
|
||||
assert_insist
|
||||
assert_invariant
|
||||
.Ed
|
||||
|
||||
.Pp
|
||||
and may be used by the callback to determine the type of the failing
|
||||
assertion.
|
||||
.Fa condition
|
||||
@@ -127,8 +126,13 @@ For example,
|
||||
returns the string
|
||||
.Dq REQUIRE .
|
||||
.Sh SEE ALSO
|
||||
Bertrand Meyer,
|
||||
.Sy Object-Oriented Software Construction,
|
||||
2nd edition, Prentice\-Hall, 1997, ISBN 0\-13\-629155\-4, chapter 11.
|
||||
.Rs
|
||||
.%A Bertrand Meyer
|
||||
.%B Object-Oriented Software Construction, 2nd edition
|
||||
.%Q Prentice\-Hall
|
||||
.%D 1997
|
||||
.%O ISBN 0\-13\-629155\-4
|
||||
.%P chapter 11
|
||||
.Re
|
||||
.Sh AUTHOR
|
||||
Bob Halley (ISC).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" $Id: bitncmp.mdoc,v 1.1 2001/03/29 06:31:53 marka Exp $
|
||||
.\" $Id: bitncmp.mdoc,v 1.1.2.1 2001/11/02 21:05:59 gson Exp $
|
||||
.\"
|
||||
.\"Copyright (c) 1996,1999 by Internet Software Consortium.
|
||||
.\"
|
||||
@@ -41,7 +41,7 @@ is lexicographically less than, equal to, or greater than
|
||||
when taken to be unsigned characters (this behaviour is just like that of
|
||||
.Xr memcmp 3 ) .
|
||||
.Pp
|
||||
.Sy NOTE:
|
||||
.Sy NOTE :
|
||||
.Fn Bitncmp
|
||||
assumes
|
||||
.Sy network byte order ;
|
||||
@@ -52,7 +52,7 @@ this means that the fourth octet of
|
||||
.Fn Bitncmp
|
||||
returns values in the manner of
|
||||
.Xr memcmp 3 :
|
||||
.Bd -filled -offset indent
|
||||
.Bd -ragged -offset indent
|
||||
+1 if
|
||||
.Dq Fa 1
|
||||
is greater than
|
||||
@@ -75,7 +75,7 @@ where
|
||||
and
|
||||
.Dq Fa r
|
||||
are both interpreted as strings of unsigned characters (through bit
|
||||
.Dq Fa n .)
|
||||
.Dq Fa n . )
|
||||
.Sh SEE ALSO
|
||||
.Xr memcmp 3 .
|
||||
.Sh AUTHOR
|
||||
|
||||
+14
-14
@@ -1,4 +1,4 @@
|
||||
.\" $Id: eventlib.mdoc,v 1.1 2001/03/29 06:31:54 marka Exp $
|
||||
.\" $Id: eventlib.mdoc,v 1.1.2.1 2001/11/02 21:06:00 gson Exp $
|
||||
.\"
|
||||
.\"Copyright (c) 1995-1999 by Internet Software Consortium
|
||||
.\"
|
||||
@@ -70,17 +70,17 @@
|
||||
.Sh SYNOPSIS
|
||||
.Fd #include <isc/eventlib.h>
|
||||
.Ft typedef void
|
||||
.Fn (*evConnFunc) "evContext ctx" "void *uap" "int fd" \
|
||||
.Fn \*(lp*evConnFunc\*(rp "evContext ctx" "void *uap" "int fd" \
|
||||
"const void *la" "int lalen" "const void *ra" "int ralen"
|
||||
.Ft typedef void
|
||||
.Fn (*evTimerFunc) "evContext ctx" "void *uap" \
|
||||
.Fn \*(lp*evTimerFunc\*(rp "evContext ctx" "void *uap" \
|
||||
"struct timespec due" "struct timespec inter"
|
||||
.Ft typedef void
|
||||
.Fn (*evFileFunc) "evContext ctx" "void *uap" "int fd" "int eventmask"
|
||||
.Fn \*(lp*evFileFunc\*(rp "evContext ctx" "void *uap" "int fd" "int eventmask"
|
||||
.Ft typedef void
|
||||
.Fn (*evStreamFunc) "evContext ctx" "void *uap" "int fd" "int bytes"
|
||||
.Fn \*(lp*evStreamFunc\*(rp "evContext ctx" "void *uap" "int fd" "int bytes"
|
||||
.Ft typedef void
|
||||
.Fn (*evWaitFunc) "evContext ctx" "void *uap" "const void *tag"
|
||||
.Fn \*(lp*evWaitFunc\*(rp "evContext ctx" "void *uap" "const void *tag"
|
||||
.Ft int
|
||||
.Fn evCreate "evContext *ctx"
|
||||
.Ft int
|
||||
@@ -197,7 +197,7 @@ The function
|
||||
creates an event context which is needed by all the other functions in this
|
||||
library. All information used internally by this library is bound to this
|
||||
context, rather than to static storage. This makes the library
|
||||
.Dq thread safe,
|
||||
.Dq thread safe ,
|
||||
and permits other library functions to use events without
|
||||
disrupting the application's use of events.
|
||||
.Pp
|
||||
@@ -325,7 +325,7 @@ The function
|
||||
adds two
|
||||
.Dq Fa struct timespec
|
||||
values and returns the result as a
|
||||
.Dq Fa struct timespec.
|
||||
.Dq Fa struct timespec .
|
||||
.Pp
|
||||
The function
|
||||
.Fn evSubTime
|
||||
@@ -334,7 +334,7 @@ subtracts its second
|
||||
argument from its first
|
||||
.Dq Fa struct timespec
|
||||
argument and returns the result as a
|
||||
.Dq Fa struct timespec.
|
||||
.Dq Fa struct timespec .
|
||||
.Pp
|
||||
The function
|
||||
.Fn evCmpTime
|
||||
@@ -384,15 +384,15 @@ argument. The event will be delivered at absolute time
|
||||
and then if time
|
||||
.Fa inter
|
||||
is not equal to
|
||||
.Dq Fa evConsTime(0,0) ,
|
||||
.Dq Fn evConsTime 0 0 ,
|
||||
subsequently at intervals equal to time
|
||||
.Fa inter .
|
||||
As a special case, specifying a
|
||||
.Fa due
|
||||
argument equal to
|
||||
.Dq Fa evConsTime(0,0)
|
||||
.Dq Fn evConsTime 0 0
|
||||
means
|
||||
.Dq due immediately.
|
||||
.Dq due immediately .
|
||||
The
|
||||
.Fa opaqueID
|
||||
argument, if specified as a value other than
|
||||
@@ -711,7 +711,7 @@ initiates an outgoing connection on
|
||||
to destination address
|
||||
.Fa ra
|
||||
(whose length is
|
||||
.Fa ralen ).
|
||||
.Fa ralen ) .
|
||||
When the connection is complete,
|
||||
.Fa func
|
||||
will be called with
|
||||
@@ -719,7 +719,7 @@ will be called with
|
||||
as one of its arguments. The argument
|
||||
.Fa fd
|
||||
to
|
||||
.Fn (*func)()
|
||||
.Fn \*(lp*func\*(rp
|
||||
will be
|
||||
.Fa -1
|
||||
if an error occurred that prevented this connection from completing
|
||||
|
||||
+28
-18
@@ -1,4 +1,4 @@
|
||||
.\" $Id: heap.mdoc,v 1.1 2001/03/29 06:31:55 marka Exp $
|
||||
.\" $Id: heap.mdoc,v 1.1.2.1 2001/11/02 21:06:01 gson Exp $
|
||||
.\"
|
||||
.\"Copyright (c) 1997,1999 by Internet Software Consortium.
|
||||
.\"
|
||||
@@ -15,7 +15,7 @@
|
||||
.\"ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
.\"SOFTWARE.
|
||||
.\"
|
||||
.Dd Jan 1, 1997
|
||||
.Dd January 1, 1997
|
||||
.\"Os OPERATING_SYSTEM [version/release]
|
||||
.Os BSD 4
|
||||
.Dt HEAP @SYSCALL_EXT@
|
||||
@@ -52,10 +52,9 @@
|
||||
These functions implement heap\-based priority queues. The user defines a
|
||||
priority scheme, and provides a function for comparison of the priority
|
||||
of heap elements
|
||||
.Po see the description of the
|
||||
(see the description of the
|
||||
.Ft heap_higher_priority_func
|
||||
function pointer, below
|
||||
.Pc .
|
||||
function pointer, below).
|
||||
.Pp
|
||||
Each of the functions depends upon the
|
||||
.Ft heap_context
|
||||
@@ -163,9 +162,8 @@ into the appropriate place (priority\-wise) in the
|
||||
.Ft heap
|
||||
indicated by
|
||||
.Fa ctx
|
||||
.Po a pointer to a
|
||||
.Ft heap_context
|
||||
.Pc .
|
||||
(a pointer to a
|
||||
.Ft heap_context ) .
|
||||
If
|
||||
.No non\- Ns Dv NULL ,
|
||||
the user-defined
|
||||
@@ -189,7 +187,9 @@ element onward via the priority as determined by the user function
|
||||
pointed to by
|
||||
.Ft higher_priority
|
||||
function pointer
|
||||
.Pq see description of Fn heap_new, No above .
|
||||
(see description of
|
||||
.Fn heap_new ,
|
||||
above).
|
||||
.Pp
|
||||
.Fn heap_increased
|
||||
.Pp
|
||||
@@ -233,7 +233,7 @@ a
|
||||
or if the
|
||||
.Fa higher_priority
|
||||
function pointer is
|
||||
.Dv NULL;
|
||||
.Dv NULL ;
|
||||
otherwise, a valid
|
||||
.Ft heap_context
|
||||
.Ns .
|
||||
@@ -347,14 +347,24 @@ please refer to
|
||||
.Sh SEE ALSO
|
||||
.Xr malloc 3 ,
|
||||
.Xr realloc 3 .
|
||||
.Pp
|
||||
Cormen, Leiserson, and Rivest,
|
||||
.Sy Introduction to Algorithms,
|
||||
MIT Press / McGraw Hill, 1990, ISBN 0\-262\-03141\-8, chapter 7.
|
||||
.Pp
|
||||
Sedgewick,
|
||||
.Sy Algorithms,
|
||||
2nd ed'n, Addison\-Wesley, 1988, ISBN 0\-201\-06673\-4, chapter 11.
|
||||
.Rs
|
||||
.%A Cormen
|
||||
.%A Leiserson
|
||||
.%A Rivest
|
||||
.%B Introduction to Algorithms
|
||||
.%Q "MIT Press / McGraw Hill"
|
||||
.%D 1990
|
||||
.%O ISBN 0\-262\-03141\-8
|
||||
.%P chapter 7
|
||||
.Re
|
||||
.Rs
|
||||
.%A Sedgewick
|
||||
.%B Algorithms, 2nd ed'n
|
||||
.%Q Addison\-Wesley
|
||||
.%D 1988
|
||||
.%O ISBN 0\-201\-06673\-4
|
||||
.%P chapter 11
|
||||
.Re
|
||||
.\" .Sh STANDARDS
|
||||
.\" .Sh HISTORY
|
||||
.Sh AUTHORS
|
||||
|
||||
+18
-14
@@ -1,4 +1,4 @@
|
||||
.\" $Id: logging.mdoc,v 1.1 2001/03/29 06:31:55 marka Exp $
|
||||
.\" $Id: logging.mdoc,v 1.1.2.1 2001/11/02 21:06:02 gson Exp $
|
||||
.\"
|
||||
.\"Copyright (c) 1995-1999 by Internet Software Consortium
|
||||
.\"
|
||||
@@ -212,7 +212,7 @@ Each category can have its own list of
|
||||
associated with it; we say that such a channel is
|
||||
.Dq in
|
||||
the particular category.
|
||||
.Sy NOTE:
|
||||
.Sy NOTE :
|
||||
Individual logging channels can appear in more than one category.
|
||||
.Pp
|
||||
A
|
||||
@@ -220,12 +220,12 @@ A
|
||||
is the set of all
|
||||
.Nm logging channels
|
||||
associated with the context's
|
||||
.Nm categories;
|
||||
.Nm categories ;
|
||||
thus, a particular
|
||||
.Nm category
|
||||
scheme is associated with a particular
|
||||
.Nm logging context.
|
||||
.Sy NOTE:
|
||||
.Nm logging context .
|
||||
.Sy NOTE :
|
||||
A logging channel may appear in more than one logging context, and in
|
||||
multiple categories within each logging context.
|
||||
.Pp
|
||||
@@ -370,8 +370,8 @@ bit of the
|
||||
field of the logging channel structure is set), then any file with the
|
||||
.Dq current
|
||||
filename for the stream is
|
||||
.X4 unlink 2 Ns -d .
|
||||
.Sy NOTE:
|
||||
.Xr unlink 2 Ns -d .
|
||||
.Sy NOTE :
|
||||
If the logging file is
|
||||
.Em not
|
||||
a regular file, and either of the above operations (version numbering
|
||||
@@ -477,7 +477,7 @@ set and the message is not a debugging message (i.e., has a level greater
|
||||
than 0), then it will not be logged.
|
||||
Finally, if the message's priority is less important than the
|
||||
channel's logging level (the priority threshold), will not be logged.
|
||||
.Sy NOTE:
|
||||
.Sy NOTE :
|
||||
If a logging channel's flag has
|
||||
.Dv LOG_USE_CONTEXT_LEVEL
|
||||
set, it will use the logging context's priority, rather than its own.
|
||||
@@ -572,7 +572,7 @@ and
|
||||
.Dq Fa category_names
|
||||
which are supplied; the latter can be
|
||||
.Dv NULL .
|
||||
.Sy NOTE:
|
||||
.Sy NOTE :
|
||||
Since
|
||||
.Dq Fa category_names
|
||||
is used directly, it
|
||||
@@ -586,7 +586,7 @@ The
|
||||
function is used to free the opaque structure
|
||||
.Dq Va lc.opaque
|
||||
and its components.
|
||||
.Sy NOTE:
|
||||
.Sy NOTE :
|
||||
The
|
||||
.Dq Va opaque
|
||||
field of
|
||||
@@ -614,7 +614,7 @@ and
|
||||
is set to
|
||||
.Dv NULL .
|
||||
.Pp
|
||||
.Sy NOTE:
|
||||
.Sy NOTE :
|
||||
The function
|
||||
.Fn log_free_context
|
||||
does
|
||||
@@ -704,7 +704,9 @@ create a new channel of the type specified (thus, the difference in arguments);
|
||||
the
|
||||
.Dq Va type
|
||||
field of the new
|
||||
.Dq Ft struct log_channel
|
||||
.Do
|
||||
.Ft struct log_channel
|
||||
.Dc
|
||||
is always set to the appropriate value.
|
||||
.Pp
|
||||
The
|
||||
@@ -807,7 +809,8 @@ c) if any of
|
||||
or
|
||||
.Xr fdopen 3
|
||||
fails
|
||||
.Po Va errno
|
||||
.Po
|
||||
.Va errno
|
||||
is set by the call which failed
|
||||
.Pc .
|
||||
If some value other than
|
||||
@@ -862,7 +865,8 @@ is
|
||||
or
|
||||
.Fa category
|
||||
is invalid (negative or greater than or equal to
|
||||
.Va lcp->num_categories ), with
|
||||
.Va lcp->num_categories ) ,
|
||||
with
|
||||
.Va errno
|
||||
set to
|
||||
.Dv EINVAL ;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" $Id: memcluster.mdoc,v 1.1 2001/03/29 06:31:55 marka Exp $
|
||||
.\" $Id: memcluster.mdoc,v 1.1.2.1 2001/11/02 21:06:03 gson Exp $
|
||||
.\"
|
||||
.\"Copyright (c) 1995-1999 by Internet Software Consortium
|
||||
.\"
|
||||
@@ -20,7 +20,7 @@
|
||||
.\"Os OPERATING_SYSTEM [version/release]
|
||||
.Os BSD 4
|
||||
.\"Dt DOCUMENT_TITLE [section number] [volume]
|
||||
.Dt memcluster 3
|
||||
.Dt MEMCLUSTER 3
|
||||
.Sh NAME
|
||||
.Nm meminit ,
|
||||
.Nm memget ,
|
||||
@@ -192,7 +192,8 @@ the the value
|
||||
as mentioned in the
|
||||
.Sx INTERNALS
|
||||
subsection, above, the block is placed at the head of the free list of
|
||||
.Va new_size Ns No -sized blocks.
|
||||
.Va new_size Ns -sized
|
||||
blocks.
|
||||
If the given
|
||||
.Fa size
|
||||
is zero or negative, then
|
||||
@@ -276,7 +277,7 @@ is generally
|
||||
equal to
|
||||
.Fa size ,
|
||||
which has these implications:
|
||||
.Bl -enum -offset -indent means that, for
|
||||
.Bl -enum -offset indent
|
||||
.It
|
||||
For
|
||||
.Fa size
|
||||
|
||||
+12
-12
@@ -1,4 +1,4 @@
|
||||
.\" $Id: tree.mdoc,v 1.1 2001/03/29 06:31:55 marka Exp $
|
||||
.\" $Id: tree.mdoc,v 1.1.2.1 2001/11/02 21:06:04 gson Exp $
|
||||
.\"
|
||||
.\"Copyright (c) 1995-1999 by Internet Software Consortium
|
||||
.\"
|
||||
@@ -32,15 +32,15 @@
|
||||
.Ft void *
|
||||
.Fn tree_srch "void **tree" "int (*compare)()" "void *data"
|
||||
.Ft void
|
||||
.Fn tree_add(tree, compare, data, del_uar) "void **tree" "int (*compare)()" \
|
||||
.Fn tree_add "void **tree" "int (*compare)()" \
|
||||
"void *data" "void (*del_uar)()"
|
||||
.Ft int
|
||||
.Fn tree_delete(tree, compare, data, del_uar) "void **tree" "int (*compare)()" \
|
||||
.Fn tree_delete "void **tree" "int (*compare)()" \
|
||||
"void *data" "void (*del_uar)()"
|
||||
.Ft int
|
||||
.Fn tree_trav(tree, trav_uar) "void **tree" "int (*trav_uar)()"
|
||||
.Fn tree_trav "void **tree" "int (*trav_uar)()"
|
||||
.Ft void
|
||||
.Fn tree_mung(tree, del_uar) "void **tree" "void (*del_uar)()"
|
||||
.Fn tree_mung "void **tree" "void (*del_uar)()"
|
||||
.Sh DESCRIPTION
|
||||
These functions create and manipulate a balanced binary (AVL) tree. Each node
|
||||
of the tree contains the expected left & right subtree pointers, a short int
|
||||
@@ -88,19 +88,19 @@ returns 0.
|
||||
inserts or replaces a node in the specified tree. The tree specified by
|
||||
.Dq Fa tree
|
||||
is searched as in
|
||||
.Fn tree_srch,
|
||||
.Fn tree_srch ,
|
||||
and if a node is found to match
|
||||
.Dq Fa data,
|
||||
.Dq Fa data ,
|
||||
then the
|
||||
.Fn del_uar
|
||||
function, if non\-\s-2NULL\s+2, is called with the address of the user data
|
||||
block for the node (this routine should deallocate any dynamic memory which
|
||||
is referenced exclusively by the node); the user data pointer for the node
|
||||
is then replaced by the value of
|
||||
.Dq Fa data.
|
||||
.Dq Fa data .
|
||||
If no node is found to match, a new node is added (which may or may not
|
||||
cause a transparent rebalance operation), with a user data pointer equal to
|
||||
.Dq Fa data.
|
||||
.Dq Fa data .
|
||||
A rebalance may or may not occur, depending on where the node is added
|
||||
and what the rest of the tree looks like.
|
||||
.Fn Tree_add
|
||||
@@ -110,7 +110,7 @@ pointer unless catastrophe occurs in which case it will return \s-2NULL\s+2.
|
||||
.Pp
|
||||
.Fn Tree_delete
|
||||
deletes a node from
|
||||
.Dq Fa tree.
|
||||
.Dq Fa tree .
|
||||
A rebalance may or may not occur, depending on where the node is removed from
|
||||
and what the rest of the tree looks like.
|
||||
.Fn Tree_delete
|
||||
@@ -118,7 +118,7 @@ returns TRUE if a node was deleted, FALSE otherwise.
|
||||
.Pp
|
||||
.Fn Tree_trav
|
||||
traverses all of
|
||||
.Dq Fa tree,
|
||||
.Dq Fa tree ,
|
||||
calling
|
||||
.Fn trav_uar
|
||||
with the address of each user data block. If
|
||||
@@ -132,7 +132,7 @@ will return TRUE.
|
||||
.Pp
|
||||
.Fn Tree_mung
|
||||
deletes every node in
|
||||
.Dq Fa tree,
|
||||
.Dq Fa tree ,
|
||||
calling
|
||||
.Fn del_uar
|
||||
(if it is not \s-2NULL\s+2) with the user data address from each node (see
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] = "$Id: ns_name.c,v 1.3 2001/05/07 06:07:44 marka Exp $";
|
||||
static const char rcsid[] = "$Id: ns_name.c,v 1.3.2.1 2001/11/02 17:56:07 gson Exp $";
|
||||
#endif
|
||||
|
||||
#include "port_before.h"
|
||||
@@ -35,6 +35,12 @@ static const char rcsid[] = "$Id: ns_name.c,v 1.3 2001/05/07 06:07:44 marka Exp
|
||||
|
||||
#include "port_after.h"
|
||||
|
||||
#ifdef SPRINTF_CHAR
|
||||
# define SPRINTF(x) strlen(sprintf/**/x)
|
||||
#else
|
||||
# define SPRINTF(x) ((size_t)sprintf x)
|
||||
#endif
|
||||
|
||||
#define NS_TYPE_ELT 0x40 /* EDNS0 extended label type */
|
||||
#define DNS_LABELTYPE_BITSTRING 0x41
|
||||
|
||||
@@ -790,17 +796,18 @@ decode_bitstring(const char **cpp, char *dn, const char *eom)
|
||||
return(-1);
|
||||
|
||||
cp++;
|
||||
dn += sprintf(dn, "\\[x");
|
||||
dn += SPRINTF((dn, "\\[x"));
|
||||
for (b = blen; b > 7; b -= 8, cp++)
|
||||
dn += sprintf(dn, "%02x", *cp & 0xff);
|
||||
dn += SPRINTF((dn, "%02x", *cp & 0xff));
|
||||
if (b > 4) {
|
||||
tc = *cp++;
|
||||
dn += sprintf(dn, "%02x", tc & (0xff << (8 - b)));
|
||||
dn += SPRINTF((dn, "%02x", tc & (0xff << (8 - b))));
|
||||
} else if (b > 0) {
|
||||
tc = *cp++;
|
||||
dn += sprintf(dn, "%1x", ((tc >> 4) & 0x0f) & (0x0f << (4 - b)));
|
||||
dn += SPRINTF((dn, "%1x",
|
||||
((tc >> 4) & 0x0f) & (0x0f << (4 - b))));
|
||||
}
|
||||
dn += sprintf(dn, "/%d]", blen);
|
||||
dn += SPRINTF((dn, "/%d]", blen));
|
||||
|
||||
*cpp = cp;
|
||||
return(dn - beg);
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# $Id: Makefile.in,v 1.1 2001/06/29 15:25:20 marka Exp $
|
||||
# $Id: Makefile.in,v 1.1.2.1 2001/10/22 17:00:49 gson Exp $
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
HEADERS= paths.h
|
||||
SHEADER= sys/bitypes.h sys/cdefs.h
|
||||
SHEADERS= sys/bitypes.h sys/cdefs.h
|
||||
|
||||
all:
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
#define _PATH_DEVNULL "/dev/null"
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
@NEED_GETTIMEOFDAY@
|
||||
@HAVE_STRNDUP@
|
||||
@USE_FIONBIO_IOCTL@
|
||||
@USE_SYSERROR_LIST@
|
||||
|
||||
/* XXX sunos and cygwin needs O_NDELAY */
|
||||
#define PORT_NONBLOCK O_NONBLOCK
|
||||
@@ -335,7 +336,11 @@ int setpassent(int stayopen);
|
||||
#endif
|
||||
|
||||
#define gettimeofday isc__gettimeofday
|
||||
#ifdef NEED_GETTIMEOFDAY
|
||||
int isc__gettimeofday(struct timeval *tvp, struct _TIMEZONE *tzp);
|
||||
#else
|
||||
int isc__gettimeofday(struct timeval *tp, struct timezone *tzp);
|
||||
#endif
|
||||
|
||||
int getnetgrent(const char **machinep, const char **userp,
|
||||
const char **domainp);
|
||||
|
||||
+1
-6
@@ -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.126 2001/07/10 21:37:55 bwelling Exp $
|
||||
# $Id: Makefile.in,v 1.126.2.1 2001/11/15 01:24:06 marka Exp $
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
@@ -32,11 +32,6 @@ CWARNINGS =
|
||||
|
||||
LIBS = @LIBS@
|
||||
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
OTHEROBJS = opt.@O@
|
||||
OTHERSRCS = opt.c
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
|
||||
# Alphabetically
|
||||
|
||||
DSTOBJS = sec/dst/dst_api.@O@ \
|
||||
|
||||
+34
-50
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: adb.c,v 1.181 2001/08/08 22:54:36 gson Exp $ */
|
||||
/* $Id: adb.c,v 1.181.2.2 2001/11/15 00:35:17 marka Exp $ */
|
||||
|
||||
/*
|
||||
* Implementation notes
|
||||
@@ -113,7 +113,7 @@ struct dns_adb {
|
||||
unsigned int magic;
|
||||
|
||||
isc_mutex_t lock;
|
||||
isc_mutex_t ilock;
|
||||
isc_mutex_t reflock; /* Covers irefcnt, erefcnt */
|
||||
isc_mem_t *mctx;
|
||||
dns_view_t *view;
|
||||
isc_timermgr_t *timermgr;
|
||||
@@ -299,8 +299,7 @@ static void print_namehook_list(FILE *, const char *legend,
|
||||
static void print_find_list(FILE *, dns_adbname_t *);
|
||||
static void print_fetch_list(FILE *, dns_adbname_t *);
|
||||
static inline void dec_adb_irefcnt(dns_adb_t *);
|
||||
static inline void inc_adb_erefcnt(dns_adb_t *, isc_boolean_t);
|
||||
static inline void dec_adb_erefcnt(dns_adb_t *, isc_boolean_t);
|
||||
static inline void inc_adb_erefcnt(dns_adb_t *);
|
||||
static inline void inc_entry_refcnt(dns_adb_t *, dns_adbentry_t *,
|
||||
isc_boolean_t);
|
||||
static inline void dec_entry_refcnt(dns_adb_t *, dns_adbentry_t *,
|
||||
@@ -1165,18 +1164,16 @@ static inline void
|
||||
check_exit(dns_adb_t *adb) {
|
||||
isc_event_t *event;
|
||||
isc_task_t *etask;
|
||||
isc_boolean_t zeroirefcnt;
|
||||
isc_boolean_t zeroirefcnt, zeroerefcnt;
|
||||
|
||||
/*
|
||||
* The caller must be holding the adb lock.
|
||||
*/
|
||||
|
||||
LOCK(&adb->ilock);
|
||||
if (adb->irefcnt == 0)
|
||||
zeroirefcnt = ISC_TRUE;
|
||||
else
|
||||
zeroirefcnt = ISC_FALSE;
|
||||
UNLOCK(&adb->ilock);
|
||||
LOCK(&adb->reflock);
|
||||
zeroirefcnt = ISC_TF(adb->irefcnt == 0);
|
||||
zeroerefcnt = ISC_TF(adb->erefcnt == 0);
|
||||
UNLOCK(&adb->reflock);
|
||||
|
||||
if (adb->shutting_down && zeroirefcnt &&
|
||||
isc_mempool_getallocated(adb->ahmp) == 0) {
|
||||
@@ -1196,7 +1193,7 @@ check_exit(dns_adb_t *adb) {
|
||||
* If there aren't any external references either, we're
|
||||
* done. Send the control event to initiate shutdown.
|
||||
*/
|
||||
if (adb->erefcnt == 0) {
|
||||
if (zeroerefcnt) {
|
||||
INSIST(!adb->cevent_sent); /* Sanity check. */
|
||||
event = &adb->cevent;
|
||||
isc_task_send(adb->task, &event);
|
||||
@@ -1207,38 +1204,19 @@ check_exit(dns_adb_t *adb) {
|
||||
|
||||
static inline void
|
||||
dec_adb_irefcnt(dns_adb_t *adb) {
|
||||
LOCK(&adb->ilock);
|
||||
LOCK(&adb->reflock);
|
||||
|
||||
INSIST(adb->irefcnt > 0);
|
||||
adb->irefcnt--;
|
||||
|
||||
UNLOCK(&adb->ilock);
|
||||
UNLOCK(&adb->reflock);
|
||||
}
|
||||
|
||||
static inline void
|
||||
inc_adb_erefcnt(dns_adb_t *adb, isc_boolean_t lock) {
|
||||
if (lock)
|
||||
LOCK(&adb->lock);
|
||||
|
||||
inc_adb_erefcnt(dns_adb_t *adb) {
|
||||
LOCK(&adb->reflock);
|
||||
adb->erefcnt++;
|
||||
|
||||
if (lock)
|
||||
UNLOCK(&adb->lock);
|
||||
}
|
||||
|
||||
static inline void
|
||||
dec_adb_erefcnt(dns_adb_t *adb, isc_boolean_t lock) {
|
||||
if (lock)
|
||||
LOCK(&adb->lock);
|
||||
|
||||
INSIST(adb->erefcnt > 0);
|
||||
adb->erefcnt--;
|
||||
|
||||
if (adb->erefcnt == 0)
|
||||
check_exit(adb);
|
||||
|
||||
if (lock)
|
||||
UNLOCK(&adb->lock);
|
||||
UNLOCK(&adb->reflock);
|
||||
}
|
||||
|
||||
static inline void
|
||||
@@ -2131,7 +2109,7 @@ destroy(dns_adb_t *adb) {
|
||||
isc_mutexblock_destroy(adb->entrylocks, NBUCKETS);
|
||||
isc_mutexblock_destroy(adb->namelocks, NBUCKETS);
|
||||
|
||||
DESTROYLOCK(&adb->ilock);
|
||||
DESTROYLOCK(&adb->reflock);
|
||||
DESTROYLOCK(&adb->lock);
|
||||
DESTROYLOCK(&adb->mplock);
|
||||
|
||||
@@ -2198,7 +2176,7 @@ dns_adb_create(isc_mem_t *mem, dns_view_t *view, isc_timermgr_t *timermgr,
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto fail0c;
|
||||
|
||||
result = isc_mutex_init(&adb->ilock);
|
||||
result = isc_mutex_init(&adb->reflock);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto fail0d;
|
||||
|
||||
@@ -2308,7 +2286,7 @@ dns_adb_create(isc_mem_t *mem, dns_view_t *view, isc_timermgr_t *timermgr,
|
||||
if (adb->af6mp != NULL)
|
||||
isc_mempool_destroy(&adb->af6mp);
|
||||
|
||||
DESTROYLOCK(&adb->ilock);
|
||||
DESTROYLOCK(&adb->reflock);
|
||||
fail0d:
|
||||
DESTROYLOCK(&adb->mplock);
|
||||
fail0c:
|
||||
@@ -2325,24 +2303,33 @@ dns_adb_attach(dns_adb_t *adb, dns_adb_t **adbx) {
|
||||
REQUIRE(DNS_ADB_VALID(adb));
|
||||
REQUIRE(adbx != NULL && *adbx == NULL);
|
||||
|
||||
inc_adb_erefcnt(adb, ISC_TRUE);
|
||||
inc_adb_erefcnt(adb);
|
||||
*adbx = adb;
|
||||
}
|
||||
|
||||
void
|
||||
dns_adb_detach(dns_adb_t **adbx) {
|
||||
dns_adb_t *adb;
|
||||
isc_boolean_t zeroerefcnt;
|
||||
|
||||
REQUIRE(adbx != NULL && DNS_ADB_VALID(*adbx));
|
||||
|
||||
adb = *adbx;
|
||||
*adbx = NULL;
|
||||
|
||||
LOCK(&adb->lock);
|
||||
dec_adb_erefcnt(adb, ISC_FALSE);
|
||||
if (adb->erefcnt == 0)
|
||||
INSIST(adb->erefcnt > 0);
|
||||
|
||||
LOCK(&adb->reflock);
|
||||
adb->erefcnt--;
|
||||
zeroerefcnt = ISC_TF(adb->erefcnt == 0);
|
||||
UNLOCK(&adb->reflock);
|
||||
|
||||
if (zeroerefcnt) {
|
||||
LOCK(&adb->lock);
|
||||
check_exit(adb);
|
||||
INSIST(adb->shutting_down);
|
||||
UNLOCK(&adb->lock);
|
||||
UNLOCK(&adb->lock);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2363,12 +2350,9 @@ dns_adb_whenshutdown(dns_adb_t *adb, isc_task_t *task, isc_event_t **eventp) {
|
||||
|
||||
LOCK(&adb->lock);
|
||||
|
||||
LOCK(&adb->ilock);
|
||||
if (adb->irefcnt == 0)
|
||||
zeroirefcnt = ISC_TRUE;
|
||||
else
|
||||
zeroirefcnt = ISC_FALSE;
|
||||
UNLOCK(&adb->ilock);
|
||||
LOCK(&adb->reflock);
|
||||
zeroirefcnt = ISC_TF(adb->irefcnt == 0);
|
||||
UNLOCK(&adb->reflock);
|
||||
|
||||
if (adb->shutting_down && zeroirefcnt &&
|
||||
isc_mempool_getallocated(adb->ahmp) == 0) {
|
||||
|
||||
+38
-13
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: cache.c,v 1.45 2001/07/02 20:44:30 gson Exp $ */
|
||||
/* $Id: cache.c,v 1.45.2.2 2001/10/23 01:31:08 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -76,6 +76,14 @@ typedef enum {
|
||||
* task/event serialization, or locked from the cache object.
|
||||
*/
|
||||
struct cache_cleaner {
|
||||
isc_mutex_t lock;
|
||||
/*
|
||||
* Locks overmem_event, overmem. Note: never allocate memory
|
||||
* while holding this lock - that could lead to deadlock since
|
||||
* the lock is take by water() which is called from the memory
|
||||
* allocator.
|
||||
*/
|
||||
|
||||
dns_cache_t *cache;
|
||||
isc_task_t *task;
|
||||
unsigned int cleaning_interval; /* The cleaning-interval from
|
||||
@@ -272,6 +280,8 @@ cache_free(dns_cache_t *cache) {
|
||||
if (cache->cleaner.iterator != NULL)
|
||||
dns_dbiterator_destroy(&cache->cleaner.iterator);
|
||||
|
||||
DESTROYLOCK(&cache->cleaner.lock);
|
||||
|
||||
if (cache->filename) {
|
||||
isc_mem_free(cache->mctx, cache->filename);
|
||||
cache->filename = NULL;
|
||||
@@ -459,6 +469,15 @@ cache_cleaner_init(dns_cache_t *cache, isc_taskmgr_t *taskmgr,
|
||||
{
|
||||
isc_result_t result;
|
||||
|
||||
result = isc_mutex_init(&cleaner->lock);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_mutex_init() failed: %s",
|
||||
dns_result_totext(result));
|
||||
result = ISC_R_UNEXPECTED;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
cleaner->increment = DNS_CACHE_CLEANERINCREMENT;
|
||||
cleaner->state = cleaner_s_idle;
|
||||
cleaner->cache = cache;
|
||||
@@ -536,7 +555,8 @@ cache_cleaner_init(dns_cache_t *cache, isc_taskmgr_t *taskmgr,
|
||||
isc_timer_detach(&cleaner->cleaning_timer);
|
||||
if (cleaner->task != NULL)
|
||||
isc_task_detach(&cleaner->task);
|
||||
|
||||
DESTROYLOCK(&cleaner->lock);
|
||||
fail:
|
||||
return (result);
|
||||
}
|
||||
|
||||
@@ -622,16 +642,10 @@ cleaning_timer_action(isc_task_t *task, isc_event_t *event) {
|
||||
INSIST(task == cleaner->task);
|
||||
INSIST(event->ev_type == ISC_TIMEREVENT_TICK);
|
||||
|
||||
if (cleaner->state == cleaner_s_idle) {
|
||||
if (cleaner->state == cleaner_s_idle)
|
||||
begin_cleaning(cleaner);
|
||||
|
||||
isc_event_free(&event);
|
||||
} else
|
||||
/*
|
||||
* incremental_cleaning_action() takes responsibility
|
||||
* for freeing or preserving the event.
|
||||
*/
|
||||
incremental_cleaning_action(task, event);
|
||||
isc_event_free(&event);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -641,6 +655,7 @@ cleaning_timer_action(isc_task_t *task, isc_event_t *event) {
|
||||
static void
|
||||
overmem_cleaning_action(isc_task_t *task, isc_event_t *event) {
|
||||
cache_cleaner_t *cleaner = event->ev_arg;
|
||||
isc_boolean_t want_cleaning = ISC_FALSE;
|
||||
|
||||
UNUSED(task);
|
||||
|
||||
@@ -648,9 +663,11 @@ overmem_cleaning_action(isc_task_t *task, isc_event_t *event) {
|
||||
INSIST(event->ev_type == DNS_EVENT_CACHEOVERMEM);
|
||||
INSIST(cleaner->overmem_event == NULL);
|
||||
|
||||
LOCK(&cleaner->lock);
|
||||
|
||||
if (cleaner->overmem) {
|
||||
if (cleaner->state == cleaner_s_idle)
|
||||
begin_cleaning(cleaner);
|
||||
want_cleaning = ISC_TRUE;
|
||||
} else {
|
||||
if (cleaner->state == cleaner_s_busy)
|
||||
/*
|
||||
@@ -665,6 +682,11 @@ overmem_cleaning_action(isc_task_t *task, isc_event_t *event) {
|
||||
}
|
||||
|
||||
cleaner->overmem_event = event;
|
||||
|
||||
UNLOCK(&cleaner->lock);
|
||||
|
||||
if (want_cleaning)
|
||||
begin_cleaning(cleaner);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -679,8 +701,7 @@ incremental_cleaning_action(isc_task_t *task, isc_event_t *event) {
|
||||
UNUSED(task);
|
||||
|
||||
INSIST(task == cleaner->task);
|
||||
INSIST(event->ev_type == DNS_EVENT_CACHECLEAN ||
|
||||
event->ev_type == ISC_TIMEREVENT_TICK);
|
||||
INSIST(event->ev_type == DNS_EVENT_CACHECLEAN);
|
||||
|
||||
if (cleaner->state == cleaner_s_done) {
|
||||
cleaner->state = cleaner_s_busy;
|
||||
@@ -831,12 +852,16 @@ water(void *arg, int mark) {
|
||||
|
||||
REQUIRE(VALID_CACHE(cache));
|
||||
|
||||
LOCK(&cache->cleaner.lock);
|
||||
|
||||
dns_db_overmem(cache->db, overmem);
|
||||
cache->cleaner.overmem = overmem;
|
||||
|
||||
if (cache->cleaner.overmem_event != NULL)
|
||||
isc_task_send(cache->cleaner.task,
|
||||
&cache->cleaner.overmem_event);
|
||||
|
||||
UNLOCK(&cache->cleaner.lock);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -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.43 2001/05/04 17:08:43 gson Exp $
|
||||
# $Id: Makefile.in,v 1.43.2.1 2001/11/09 23:17:17 gson Exp $
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
@@ -30,7 +30,7 @@ HEADERS = a6.h acl.h adb.h byaddr.h cache.h callbacks.h \
|
||||
nxt.h peer.h rbt.h rcode.h \
|
||||
rdata.h rdataclass.h rdatalist.h rdataset.h rdatasetiter.h \
|
||||
rdataslab.h rdatatype.h request.h resolver.h result.h \
|
||||
rootns.h sdb.h secalg.h secproto.h ssu.h \
|
||||
rootns.h sdb.h secalg.h secproto.h soa.h ssu.h \
|
||||
tcpmsg.h time.h tkey.h \
|
||||
tsig.h ttl.h types.h validator.h view.h xfrin.h \
|
||||
zone.h zonekey.h zt.h
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: log.h,v 1.30 2001/08/27 03:36:00 marka Exp $ */
|
||||
/* $Id: log.h,v 1.30.2.1 2001/10/11 02:03:23 marka Exp $ */
|
||||
|
||||
/* Principal Authors: DCL */
|
||||
|
||||
@@ -32,7 +32,7 @@ LIBDNS_EXTERNAL_DATA extern isc_logmodule_t dns_modules[];
|
||||
#define DNS_LOGCATEGORY_NOTIFY (&dns_categories[0])
|
||||
#define DNS_LOGCATEGORY_DATABASE (&dns_categories[1])
|
||||
#define DNS_LOGCATEGORY_SECURITY (&dns_categories[2])
|
||||
#define DNS_LOGCATEGORY_CONFIG (&dns_categories[3])
|
||||
/* DNS_LOGCATEGORY_CONFIG superseded by CFG_LOGCATEGORY_CONFIG */
|
||||
#define DNS_LOGCATEGORY_DNSSEC (&dns_categories[4])
|
||||
#define DNS_LOGCATEGORY_RESOLVER (&dns_categories[5])
|
||||
#define DNS_LOGCATEGORY_XFER_IN (&dns_categories[6])
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
||||
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
||||
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
|
||||
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: opt.h,v 1.8 2001/03/12 22:27:15 bwelling Exp $ */
|
||||
|
||||
/* DNS_OPT_NEWCODES_KEEP */
|
||||
|
||||
#ifndef DNS_OPT_H
|
||||
#define DNS_OPT_H 1
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/types.h>
|
||||
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/message.h>
|
||||
|
||||
/*
|
||||
* XXX WARNING XXX These codes have not yet been assigned by IANA.
|
||||
* These are here as placekeepers ONLY.
|
||||
* Hide these definitions and anything that uses them behind a #define
|
||||
* which happens only in internal debugging code.
|
||||
* This #ifdef will go away once these are defined by IANA.
|
||||
*/
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
#define DNS_OPTCODE_ZONE 0xfff0
|
||||
#define DNS_OPTCODE_VIEW 0xfff1
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
|
||||
#define DNS_OPT_FLAGS(opt) ((isc_uint16_t)((opt)->ttl & 0xFFFF))
|
||||
|
||||
/*
|
||||
* OPT records contain a series of attributes which contain different types.
|
||||
* These structures are used for holding the individual attribute
|
||||
* records.
|
||||
*/
|
||||
typedef struct dns_optattr {
|
||||
isc_uint16_t code;
|
||||
isc_region_t value;
|
||||
} dns_optattr_t;
|
||||
|
||||
typedef struct dns_optlist {
|
||||
unsigned int size;
|
||||
unsigned int used;
|
||||
unsigned int next;
|
||||
dns_optattr_t *attrs;
|
||||
} dns_optlist_t;
|
||||
|
||||
isc_result_t
|
||||
dns_opt_decode(dns_optlist_t *optlist, dns_rdataset_t *optset,
|
||||
isc_uint16_t code);
|
||||
|
||||
isc_result_t
|
||||
dns_opt_decodeall(dns_optlist_t *optlist, dns_rdataset_t *optset);
|
||||
|
||||
isc_result_t
|
||||
dns_opt_add(dns_rdata_t *rdata, dns_optlist_t *optlist,
|
||||
isc_buffer_t *target);
|
||||
|
||||
isc_result_t
|
||||
dns_opt_attrtotext(dns_optattr_t *attr, isc_buffer_t *target,
|
||||
dns_messagetextflag_t flags);
|
||||
|
||||
isc_result_t
|
||||
dns_opt_totext(dns_rdataset_t *opt, isc_buffer_t *target,
|
||||
dns_messagetextflag_t flags);
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_OPT_H */
|
||||
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: peer.h,v 1.16 2001/08/28 03:58:20 marka Exp $ */
|
||||
/* $Id: peer.h,v 1.16.2.1 2001/11/13 18:57:12 gson Exp $ */
|
||||
|
||||
#ifndef DNS_PEER_H
|
||||
#define DNS_PEER_H 1
|
||||
@@ -66,7 +66,7 @@ struct dns_peer {
|
||||
isc_netaddr_t address;
|
||||
isc_boolean_t bogus;
|
||||
dns_transfer_format_t transfer_format;
|
||||
int transfers;
|
||||
isc_uint32_t transfers;
|
||||
isc_boolean_t support_ixfr;
|
||||
isc_boolean_t provide_ixfr;
|
||||
isc_boolean_t request_ixfr;
|
||||
@@ -145,10 +145,10 @@ isc_result_t
|
||||
dns_peer_getsupportedns(dns_peer_t *peer, isc_boolean_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_settransfers(dns_peer_t *peer, isc_int32_t newval);
|
||||
dns_peer_settransfers(dns_peer_t *peer, isc_uint32_t newval);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_gettransfers(dns_peer_t *peer, isc_int32_t *retval);
|
||||
dns_peer_gettransfers(dns_peer_t *peer, isc_uint32_t *retval);
|
||||
|
||||
isc_result_t
|
||||
dns_peer_settransferformat(dns_peer_t *peer, dns_transfer_format_t newval);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: zone.h,v 1.106 2001/08/27 21:47:00 gson Exp $ */
|
||||
/* $Id: zone.h,v 1.106.2.1 2001/11/13 18:57:14 gson Exp $ */
|
||||
|
||||
#ifndef DNS_ZONE_H
|
||||
#define DNS_ZONE_H 1
|
||||
@@ -1175,7 +1175,7 @@ dns_zonemgr_releasezone(dns_zonemgr_t *zmgr, dns_zone_t *zone);
|
||||
*/
|
||||
|
||||
void
|
||||
dns_zonemgr_settransfersin(dns_zonemgr_t *zmgr, int value);
|
||||
dns_zonemgr_settransfersin(dns_zonemgr_t *zmgr, isc_uint32_t value);
|
||||
/*
|
||||
* Set the maximum number of simultanious transfers in allowed by
|
||||
* the zone manager.
|
||||
@@ -1184,7 +1184,7 @@ dns_zonemgr_settransfersin(dns_zonemgr_t *zmgr, int value);
|
||||
* 'zmgr' to be a valid zone manager.
|
||||
*/
|
||||
|
||||
int
|
||||
isc_uint32_t
|
||||
dns_zonemgr_getttransfersin(dns_zonemgr_t *zmgr);
|
||||
/*
|
||||
* Return the the maximum number of simultanious transfers in allowed.
|
||||
@@ -1194,7 +1194,7 @@ dns_zonemgr_getttransfersin(dns_zonemgr_t *zmgr);
|
||||
*/
|
||||
|
||||
void
|
||||
dns_zonemgr_settransfersperns(dns_zonemgr_t *zmgr, int value);
|
||||
dns_zonemgr_settransfersperns(dns_zonemgr_t *zmgr, isc_uint32_t value);
|
||||
/*
|
||||
* Set the number of zone transfers allowed per nameserver.
|
||||
*
|
||||
@@ -1202,7 +1202,7 @@ dns_zonemgr_settransfersperns(dns_zonemgr_t *zmgr, int value);
|
||||
* 'zmgr' to be a valid zone manager
|
||||
*/
|
||||
|
||||
int
|
||||
isc_uint32_t
|
||||
dns_zonemgr_getttransfersperns(dns_zonemgr_t *zmgr);
|
||||
/*
|
||||
* Return the number of transfers allowed per nameserver.
|
||||
|
||||
+2
-2
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: journal.c,v 1.77 2001/08/06 02:10:59 marka Exp $ */
|
||||
/* $Id: journal.c,v 1.77.2.1 2001/10/15 04:57:51 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -490,7 +490,7 @@ journal_file_create(isc_mem_t *mctx, const char *filename) {
|
||||
|
||||
INSIST(sizeof(journal_rawheader_t) == JOURNAL_HEADER_SIZE);
|
||||
|
||||
result = isc_stdio_open(filename, "w", &fp);
|
||||
result = isc_stdio_open(filename, "wb", &fp);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
|
||||
"%s: create: %s",
|
||||
|
||||
+2
-2
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: log.c,v 1.33 2001/08/27 03:35:58 marka Exp $ */
|
||||
/* $Id: log.c,v 1.33.2.2 2001/10/11 23:07:00 gson Exp $ */
|
||||
|
||||
/* Principal Authors: DCL */
|
||||
|
||||
@@ -33,7 +33,7 @@ LIBDNS_EXTERNAL_DATA isc_logcategory_t dns_categories[] = {
|
||||
{ "notify", 0 },
|
||||
{ "database", 0 },
|
||||
{ "security", 0 },
|
||||
{ "config", 0 },
|
||||
{ "oldconfig", 0 }, /* Placeholder */
|
||||
{ "dnssec", 0 },
|
||||
{ "resolver", 0 },
|
||||
{ "xfer-in", 0 },
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: masterdump.c,v 1.56 2001/08/29 05:52:49 marka Exp $ */
|
||||
/* $Id: masterdump.c,v 1.56.2.2 2001/10/30 01:53:24 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -689,11 +689,11 @@ dump_rdataset(isc_mem_t *mctx, dns_name_t *name, dns_rdataset_t *rdataset,
|
||||
if (result != ISC_R_NOSPACE)
|
||||
break;
|
||||
|
||||
isc_mem_put(mctx, buffer->base, buffer->length);
|
||||
newlength = buffer->length * 2;
|
||||
newmem = isc_mem_get(mctx, newlength);
|
||||
if (newmem == NULL)
|
||||
return (ISC_R_NOMEMORY);
|
||||
isc_mem_put(mctx, buffer->base, buffer->length);
|
||||
isc_buffer_init(buffer, newmem, newlength);
|
||||
}
|
||||
if (result != ISC_R_SUCCESS)
|
||||
@@ -767,7 +767,7 @@ dump_order_compare(const void *a, const void *b) {
|
||||
|
||||
#define MAXSORT 64
|
||||
|
||||
const char *trustnames[] = {
|
||||
static const char *trustnames[] = {
|
||||
"none",
|
||||
"pending",
|
||||
"additional",
|
||||
|
||||
+2
-12
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: message.c,v 1.194 2001/07/10 20:09:24 gson Exp $ */
|
||||
/* $Id: message.c,v 1.194.2.1 2001/11/15 01:24:07 marka Exp $ */
|
||||
|
||||
/***
|
||||
*** Imports
|
||||
@@ -33,9 +33,6 @@
|
||||
#include <dns/log.h>
|
||||
#include <dns/masterdump.h>
|
||||
#include <dns/message.h>
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
#include <dns/opt.h>
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdatalist.h>
|
||||
#include <dns/rdataset.h>
|
||||
@@ -2892,9 +2889,7 @@ dns_message_pseudosectiontotext(dns_message_t *msg,
|
||||
dns_rdataset_t *ps = NULL;
|
||||
dns_name_t *name = NULL;
|
||||
isc_result_t result;
|
||||
#ifndef DNS_OPT_NEWCODES
|
||||
char buf[sizeof("1234567890")];
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
|
||||
REQUIRE(DNS_MESSAGE_VALID(msg));
|
||||
REQUIRE(target != NULL);
|
||||
@@ -2905,9 +2900,6 @@ dns_message_pseudosectiontotext(dns_message_t *msg,
|
||||
ps = dns_message_getopt(msg);
|
||||
if (ps == NULL)
|
||||
return (ISC_R_SUCCESS);
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
result = dns_opt_totext(ps, target, flags);
|
||||
#else /* DNS_OPT_NEWCODES */
|
||||
if ((flags & DNS_MESSAGETEXTFLAG_NOCOMMENTS) == 0)
|
||||
ADD_STRING(target, ";; OPT PSEUDOSECTION:\n");
|
||||
ADD_STRING(target, "; EDNS: version: ");
|
||||
@@ -2919,9 +2911,7 @@ dns_message_pseudosectiontotext(dns_message_t *msg,
|
||||
sprintf(buf, "%7u\n",
|
||||
(unsigned int)ps->rdclass);
|
||||
ADD_STRING(target, buf);
|
||||
result = ISC_R_SUCCESS;
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
return (result);
|
||||
return (ISC_R_SUCCESS);
|
||||
case DNS_PSEUDOSECTION_TSIG:
|
||||
ps = dns_message_gettsig(msg, &name);
|
||||
if (ps == NULL)
|
||||
|
||||
-256
@@ -1,256 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2000, 2001 Internet Software Consortium.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
|
||||
* DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
|
||||
* INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
|
||||
* FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
* NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: opt.c,v 1.14 2001/05/06 02:24:08 mayer Exp $ */
|
||||
|
||||
/* DNS_OPT_NEWCODES_KEEP */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/compress.h>
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/message.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/ncache.h>
|
||||
#include <dns/opt.h>
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdatalist.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#define ADD_STRING(b, s, g) {if (strlen(s) >= \
|
||||
isc_buffer_availablelength(b)) \
|
||||
{ result = ISC_R_NOSPACE; \
|
||||
goto g; } else \
|
||||
isc_buffer_putstr(b, s);}
|
||||
static isc_result_t
|
||||
optget(dns_optlist_t *optlist, dns_rdataset_t *optset,
|
||||
isc_uint16_t code, isc_boolean_t getall)
|
||||
{
|
||||
isc_result_t result;
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
unsigned int location;
|
||||
isc_region_t rdataregion;
|
||||
isc_buffer_t rdatabuf;
|
||||
isc_uint16_t thiscode, thislength;
|
||||
|
||||
REQUIRE(DNS_RDATASET_VALID(optset));
|
||||
REQUIRE(optset->type == dns_rdatatype_opt);
|
||||
|
||||
result = dns_rdataset_first(optset);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return(result);
|
||||
dns_rdataset_current(optset, &rdata);
|
||||
|
||||
dns_rdata_toregion(&rdata, &rdataregion);
|
||||
isc_buffer_init(&rdatabuf, rdataregion.base, rdataregion.length);
|
||||
isc_buffer_add(&rdatabuf, rdataregion.length);
|
||||
|
||||
optlist->used = 0;
|
||||
location = 0;
|
||||
/*
|
||||
* We don't do the test in the while loop, since I want to
|
||||
* actually keep searching the list for more data until I reach
|
||||
* the first one I *can't* fit in. This way, I can correctly
|
||||
* decide between MOREDATA and SUCCESS.
|
||||
*/
|
||||
while (1) {
|
||||
if (isc_buffer_remaininglength(&rdatabuf) == 0) {
|
||||
optlist->next = 0;
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
if (isc_buffer_remaininglength(&rdatabuf) < 4)
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
thiscode = isc_buffer_getuint16(&rdatabuf);
|
||||
thislength = isc_buffer_getuint16(&rdatabuf);
|
||||
if (isc_buffer_remaininglength(&rdatabuf) < thislength)
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
if ((thiscode == code || getall) &&
|
||||
(location >= optlist->next)) {
|
||||
if (optlist->used >= optlist->size) {
|
||||
optlist->next = location;
|
||||
return (DNS_R_MOREDATA);
|
||||
}
|
||||
optlist->attrs[optlist->used].code = thiscode;
|
||||
optlist->attrs[optlist->used].value.base =
|
||||
isc_buffer_current(&rdatabuf);
|
||||
optlist->attrs[optlist->used].value.length =
|
||||
thislength;
|
||||
optlist->used++;
|
||||
}
|
||||
isc_buffer_forward(&rdatabuf, thislength);
|
||||
location++;
|
||||
}
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dns_opt_decode(dns_optlist_t *optlist, dns_rdataset_t *optset,
|
||||
isc_uint16_t code)
|
||||
{
|
||||
return (optget(optlist, optset, code, ISC_FALSE));
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dns_opt_decodeall(dns_optlist_t *optlist, dns_rdataset_t *optset) {
|
||||
return (optget(optlist, optset, 0, ISC_TRUE));
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dns_opt_add(dns_rdata_t *rdata, dns_optlist_t *optlist,
|
||||
isc_buffer_t *target)
|
||||
{
|
||||
unsigned char *base;
|
||||
unsigned int i;
|
||||
|
||||
REQUIRE(rdata->length == 0);
|
||||
|
||||
base = isc_buffer_current(target);
|
||||
if (optlist != NULL) {
|
||||
for (i = 0; i < optlist->used; i++) {
|
||||
rdata->length += optlist->attrs[i].value.length;
|
||||
rdata->length += 4;
|
||||
}
|
||||
if (isc_buffer_availablelength(target) < rdata->length) {
|
||||
rdata->length = 0;
|
||||
return (ISC_R_NOSPACE);
|
||||
}
|
||||
for (i = 0; i < optlist->used; i++) {
|
||||
isc_buffer_putuint16(target, optlist->attrs[i].code);
|
||||
isc_buffer_putuint16(target,
|
||||
(isc_uint16_t) optlist->attrs[i].value.length);
|
||||
isc_buffer_putmem(target,
|
||||
optlist->attrs[i].value.base,
|
||||
optlist->attrs[i].value.length);
|
||||
}
|
||||
rdata->data = base;
|
||||
}
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dns_opt_attrtotext(dns_optattr_t *attr, isc_buffer_t *target,
|
||||
dns_messagetextflag_t flags) {
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
char store[sizeof("012345678")];
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
dns_decompress_t dctx;
|
||||
dns_fixedname_t fname;
|
||||
isc_buffer_t source;
|
||||
|
||||
#else /* DNS_OPT_NEWCODES */
|
||||
UNUSED (flags);
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
|
||||
switch (attr->code) {
|
||||
#ifdef DNS_OPT_NEWCODES
|
||||
case DNS_OPTCODE_ZONE:
|
||||
ADD_STRING(target, "; ZONE attribute: ", zonefail0);
|
||||
dns_fixedname_init(&fname);
|
||||
dns_decompress_init(&dctx, 0, DNS_DECOMPRESS_NONE);
|
||||
isc_buffer_init(&source, attr->value.base, attr->value.length);
|
||||
isc_buffer_add(&source, attr->value.length);
|
||||
isc_buffer_setactive(&source, attr->value.length);
|
||||
result = dns_name_fromwire(&fname.name, &source, &dctx,
|
||||
ISC_FALSE, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto zonefail1;
|
||||
result = dns_name_totext(&fname.name, ISC_FALSE,
|
||||
target);
|
||||
ADD_STRING(target, "\n", zonefail1);
|
||||
zonefail1:
|
||||
dns_decompress_invalidate(&dctx);
|
||||
dns_fixedname_invalidate(&fname);
|
||||
zonefail0:
|
||||
return (result);
|
||||
case DNS_OPTCODE_VIEW:
|
||||
ADD_STRING(target, "; VIEW attribute: ", viewfail0);
|
||||
if (attr->value.length >= isc_buffer_availablelength(target))
|
||||
return(ISC_R_NOSPACE);
|
||||
else
|
||||
isc_buffer_putmem(target, attr->value.base,
|
||||
attr->value.length);
|
||||
ADD_STRING(target, "\n", viewfail0);
|
||||
viewfail0:
|
||||
return (result);
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
/*
|
||||
* This routine is a placekeeper, awaiting assignment of
|
||||
* OPT attribute values from IANA.
|
||||
*/
|
||||
default:
|
||||
ADD_STRING(target, "; Unknown EDNS attribute ", deffail);
|
||||
sprintf(store,"%d",attr->code);
|
||||
ADD_STRING(target, store, deffail);
|
||||
ADD_STRING(target, "\n", deffail);
|
||||
result = DNS_R_UNKNOWNOPT;
|
||||
deffail:
|
||||
return (result);
|
||||
}
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dns_opt_totext(dns_rdataset_t *opt, isc_buffer_t *target,
|
||||
dns_messagetextflag_t flags) {
|
||||
isc_result_t result, iresult;
|
||||
char buf[sizeof("1234567890")];
|
||||
dns_optattr_t attr;
|
||||
dns_optlist_t list;
|
||||
|
||||
REQUIRE(DNS_RDATASET_VALID(opt));
|
||||
REQUIRE(target != NULL);
|
||||
|
||||
if ((flags & DNS_MESSAGETEXTFLAG_NOCOMMENTS) == 0)
|
||||
ADD_STRING(target, ";; OPT PSEUDOSECTION:\n", fail);
|
||||
ADD_STRING(target, "; EDNS: version: ", fail);
|
||||
sprintf(buf, "%4u",
|
||||
(unsigned int)((opt->ttl &
|
||||
0x00ff0000 >> 16)));
|
||||
ADD_STRING(target, buf, fail);
|
||||
ADD_STRING(target, ", udp=", fail);
|
||||
sprintf(buf, "%7u",
|
||||
(unsigned int)opt->rdclass);
|
||||
ADD_STRING(target, buf, fail);
|
||||
ADD_STRING(target, ", flags:", fail);
|
||||
if ((DNS_OPT_FLAGS(opt) & DNS_MESSAGEEXTFLAG_DO) != 0)
|
||||
ADD_STRING(target, " do", fail);
|
||||
ADD_STRING(target, "\n", fail);
|
||||
|
||||
list.attrs = &attr;
|
||||
list.size = 1;
|
||||
list.used = 0;
|
||||
list.next = 0;
|
||||
do {
|
||||
result = dns_opt_decodeall(&list, opt);
|
||||
if ((result == ISC_R_SUCCESS || result == DNS_R_MOREDATA)
|
||||
&& list.used != 0) {
|
||||
iresult = dns_opt_attrtotext(list.attrs, target,
|
||||
flags);
|
||||
if (iresult != ISC_R_SUCCESS &&
|
||||
iresult != DNS_R_UNKNOWNOPT)
|
||||
result = iresult;
|
||||
}
|
||||
} while (result == DNS_R_MOREDATA);
|
||||
fail:
|
||||
return (result);
|
||||
}
|
||||
+3
-3
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: peer.c,v 1.14 2001/03/06 23:54:33 bwelling Exp $ */
|
||||
/* $Id: peer.c,v 1.14.2.1 2001/11/13 18:57:09 gson Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -386,7 +386,7 @@ dns_peer_getsupportedns(dns_peer_t *peer, isc_boolean_t *retval) {
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dns_peer_settransfers(dns_peer_t *peer, isc_int32_t newval) {
|
||||
dns_peer_settransfers(dns_peer_t *peer, isc_uint32_t newval) {
|
||||
isc_boolean_t existed;
|
||||
|
||||
REQUIRE(DNS_PEER_VALID(peer));
|
||||
@@ -400,7 +400,7 @@ dns_peer_settransfers(dns_peer_t *peer, isc_int32_t newval) {
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dns_peer_gettransfers(dns_peer_t *peer, isc_int32_t *retval) {
|
||||
dns_peer_gettransfers(dns_peer_t *peer, isc_uint32_t *retval) {
|
||||
REQUIRE(DNS_PEER_VALID(peer));
|
||||
REQUIRE(retval != NULL);
|
||||
|
||||
|
||||
+4
-15
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rbtdb.c,v 1.168 2001/08/27 03:58:44 marka Exp $ */
|
||||
/* $Id: rbtdb.c,v 1.168.2.1 2001/11/16 11:04:38 marka Exp $ */
|
||||
|
||||
/*
|
||||
* Principal Author: Bob Halley
|
||||
@@ -746,7 +746,6 @@ no_references(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
|
||||
{
|
||||
isc_result_t result;
|
||||
isc_boolean_t write_locked;
|
||||
isc_boolean_t reacquire;
|
||||
unsigned int locknum;
|
||||
|
||||
/*
|
||||
@@ -786,15 +785,12 @@ no_references(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
|
||||
/*
|
||||
* XXXDCL need to add a deferred delete method for ISC_R_LOCKBUSY.
|
||||
*/
|
||||
reacquire = ISC_FALSE;
|
||||
if (lock != isc_rwlocktype_write) {
|
||||
/*
|
||||
* Free the node lock before acquiring a tree write lock, per
|
||||
* the lock hierarchy rules stated at the start of this file.
|
||||
* Locking hierarchy notwithstanding, we don't need to free
|
||||
* the node lock before acquiring the tree write lock because
|
||||
* we only do a trylock.
|
||||
*/
|
||||
UNLOCK(&rbtdb->node_locks[locknum].lock);
|
||||
reacquire = ISC_TRUE;
|
||||
|
||||
if (lock == isc_rwlocktype_read)
|
||||
RWUNLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
|
||||
|
||||
@@ -804,7 +800,6 @@ no_references(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
|
||||
result == ISC_R_LOCKBUSY);
|
||||
|
||||
write_locked = ISC_TF(result == ISC_R_SUCCESS);
|
||||
|
||||
} else
|
||||
write_locked = ISC_TRUE;
|
||||
|
||||
@@ -837,12 +832,6 @@ no_references(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
|
||||
|
||||
if (lock == isc_rwlocktype_read)
|
||||
RWLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
|
||||
|
||||
/*
|
||||
* Reacquire the node lock that the caller held if necessary.
|
||||
*/
|
||||
if (reacquire)
|
||||
LOCK(&rbtdb->node_locks[locknum].lock);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
||||
+5
-2
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rdata.c,v 1.147.2.1 2001/09/21 20:46:35 gson Exp $ */
|
||||
/* $Id: rdata.c,v 1.147.2.3 2001/10/03 02:07:34 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
#include <ctype.h>
|
||||
@@ -502,6 +502,9 @@ dns_rdata_fromwire(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
|
||||
REQUIRE(DNS_RDATA_VALIDFLAGS(rdata));
|
||||
}
|
||||
|
||||
if (type == 0)
|
||||
return (DNS_R_FORMERR);
|
||||
|
||||
ss = *source;
|
||||
st = *target;
|
||||
|
||||
@@ -611,7 +614,7 @@ unknown_fromtext(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
||||
isc_buffer_t *buf = NULL;
|
||||
isc_token_t token;
|
||||
|
||||
if (dns_rdatatype_ismeta(type))
|
||||
if (type == 0 || dns_rdatatype_ismeta(type))
|
||||
return (DNS_R_METATYPE);
|
||||
|
||||
result = isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
|
||||
|
||||
+11
-5
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: resolver.c,v 1.218.2.3 2001/09/21 20:40:06 gson Exp $ */
|
||||
/* $Id: resolver.c,v 1.218.2.7.2.1 2002/06/01 02:05:24 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -1651,7 +1651,7 @@ possibly_mark(fetchctx_t *fctx, dns_adbaddrinfo_t *addr)
|
||||
|
||||
if (aborted) {
|
||||
addr->flags |= FCTX_ADDRINFO_MARK;
|
||||
msg = "ignoring backholed / bogus server: ";
|
||||
msg = "ignoring blackholed / bogus server: ";
|
||||
} else if (sa->type.sa.sa_family != AF_INET6) {
|
||||
return;
|
||||
} else if (IN6_IS_ADDR_V4MAPPED(&sa->type.sin6.sin6_addr)) {
|
||||
@@ -1924,8 +1924,6 @@ fctx_doshutdown(isc_task_t *task, isc_event_t *event) {
|
||||
|
||||
FCTXTRACE("doshutdown");
|
||||
|
||||
fctx->attributes |= FCTX_ATTR_SHUTTINGDOWN;
|
||||
|
||||
/*
|
||||
* An fctx that is shutting down is no longer in ADDRWAIT mode.
|
||||
*/
|
||||
@@ -1950,6 +1948,8 @@ fctx_doshutdown(isc_task_t *task, isc_event_t *event) {
|
||||
|
||||
LOCK(&res->buckets[bucketnum].lock);
|
||||
|
||||
fctx->attributes |= FCTX_ATTR_SHUTTINGDOWN;
|
||||
|
||||
INSIST(fctx->state == fetchstate_active ||
|
||||
fctx->state == fetchstate_done);
|
||||
INSIST(fctx->want_shutdown);
|
||||
@@ -3297,6 +3297,7 @@ check_related(void *arg, dns_name_t *addname, dns_rdatatype_t type) {
|
||||
/*
|
||||
* Do we have its SIG too?
|
||||
*/
|
||||
rdataset = NULL;
|
||||
result = dns_message_findtype(name,
|
||||
dns_rdatatype_sig,
|
||||
type, &rdataset);
|
||||
@@ -3609,7 +3610,7 @@ noanswer_response(fetchctx_t *fctx, dns_name_t *oqname) {
|
||||
if (ns_name != NULL)
|
||||
ns_name->attributes &= ~DNS_NAMEATTR_CACHE;
|
||||
|
||||
if (negative_response)
|
||||
if (negative_response && oqname == NULL)
|
||||
fctx->attributes |= FCTX_ATTR_WANTNCACHE;
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
@@ -4029,6 +4030,11 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
|
||||
truncated = ISC_FALSE;
|
||||
finish = NULL;
|
||||
|
||||
if (fctx->res->exiting) {
|
||||
result = ISC_R_SHUTTINGDOWN;
|
||||
goto done;
|
||||
}
|
||||
|
||||
fctx->timeouts = 0;
|
||||
|
||||
/*
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user