Compare commits
454
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be16142ea5 | ||
|
|
191341af50 | ||
|
|
10dd0b3efe | ||
|
|
4283f9552f | ||
|
|
29b3a7d842 | ||
|
|
1c1a02d244 | ||
|
|
7ee8a7e69f | ||
|
|
9b6b11f02a | ||
|
|
67e573d718 | ||
|
|
6327c54c4b | ||
|
|
78f6c1d71f | ||
|
|
c4a38bd127 | ||
|
|
9bde348ae8 | ||
|
|
88631dad8f | ||
|
|
f6c213c87d | ||
|
|
999e3233f3 | ||
|
|
fb8b3ad23d | ||
|
|
9536688b37 | ||
|
|
df4df8e0d5 | ||
|
|
5f5fac6b92 | ||
|
|
bfafcf89b8 | ||
|
|
1092590ef4 | ||
|
|
4b67376e42 | ||
|
|
46bb4dd124 | ||
|
|
391fac1fc8 | ||
|
|
e8dd921ef9 | ||
|
|
6bff1768cf | ||
|
|
ac9d87e325 | ||
|
|
aabd651ae8 | ||
|
|
bb4bfb9ae6 | ||
|
|
975afc508d | ||
|
|
5a75f5bc91 | ||
|
|
074f247926 | ||
|
|
7a8f04b826 | ||
|
|
adbdedda7a | ||
|
|
174cd00290 | ||
|
|
5296ecb946 | ||
|
|
e61082015d | ||
|
|
087eab022f | ||
|
|
b890abb4f3 | ||
|
|
b4d6541fe8 | ||
|
|
f872cfcb45 | ||
|
|
2b8fab6828 | ||
|
|
3a4f820d62 | ||
|
|
74dd289a1c | ||
|
|
dfd73d7e16 | ||
|
|
303391ea41 | ||
|
|
31bd3147d1 | ||
|
|
f03d68a7d0 | ||
|
|
dea89f2a52 | ||
|
|
a6f99bb3e3 | ||
|
|
6ddbca6f2b | ||
|
|
9bc6ba0be9 | ||
|
|
34de85dab8 | ||
|
|
f98e145c5b | ||
|
|
2420320b96 | ||
|
|
769551c336 | ||
|
|
174d00fbb8 | ||
|
|
a02efbe1f8 | ||
|
|
ea5626179e | ||
|
|
23c1f7e506 | ||
|
|
cb578fae92 | ||
|
|
ee83b59e5e | ||
|
|
55a10b7acd | ||
|
|
93f2d25a9a | ||
|
|
3f66b8acb0 | ||
|
|
0ea363746e | ||
|
|
6aae115d15 | ||
|
|
53fbf143db | ||
|
|
30e58374a3 | ||
|
|
3adcc033f6 | ||
|
|
b9886abd86 | ||
|
|
56f17ab3d0 | ||
|
|
92e540df1e | ||
|
|
770235900e | ||
|
|
9845c4c4a7 | ||
|
|
172d0c401e | ||
|
|
e93a950b70 | ||
|
|
65975a3b5f | ||
|
|
0ee14aa594 | ||
|
|
15afdf94ef | ||
|
|
1bd5f61c60 | ||
|
|
31cdf770a4 | ||
|
|
3c40aa004a | ||
|
|
ab112d2c4f | ||
|
|
e07f78d76e | ||
|
|
4885809eb9 | ||
|
|
8b9d2c27b4 | ||
|
|
1f10186476 | ||
|
|
d7143986b1 | ||
|
|
b1947cee82 | ||
|
|
ace465a9f9 | ||
|
|
c1bc3be806 | ||
|
|
3c22af0d35 | ||
|
|
2980cbd55f | ||
|
|
bfbeef3609 | ||
|
|
dc1ac23b9f | ||
|
|
7e650ebee4 | ||
|
|
f0d3fe5d95 | ||
|
|
a27b1d4d32 | ||
|
|
63c3a6444b | ||
|
|
5613c3441f | ||
|
|
8801c65a4b | ||
|
|
7f2863196f | ||
|
|
cd8245077c | ||
|
|
22fab3199f | ||
|
|
08050d6524 | ||
|
|
0fedfcafb5 | ||
|
|
e713f83064 | ||
|
|
65320aa38d | ||
|
|
f10e43ac94 | ||
|
|
ea95e83f5c | ||
|
|
61da2bf028 | ||
|
|
16e352248d | ||
|
|
8d648e7a8a | ||
|
|
8bf192b4d1 | ||
|
|
35d2dbb9f5 | ||
|
|
f1722ff512 | ||
|
|
115fbc3540 | ||
|
|
0795dceda7 | ||
|
|
9a3a257374 | ||
|
|
6a49d41c5b | ||
|
|
8d3220643c | ||
|
|
9d1e9ce4bd | ||
|
|
30488dddf0 | ||
|
|
6b9e3b7b06 | ||
|
|
29ff62a149 | ||
|
|
f9f09069a8 | ||
|
|
f78bfda4b8 | ||
|
|
16dea1c577 | ||
|
|
2d957c6b9f | ||
|
|
9212a1b401 | ||
|
|
30b988f09a | ||
|
|
6070c734f2 | ||
|
|
7d2c09c905 | ||
|
|
6acf326969 | ||
|
|
cfbc8e264d | ||
|
|
498491555e | ||
|
|
8b1baa10ee | ||
|
|
e00eb55cd2 | ||
|
|
4247477b61 | ||
|
|
bfbe6925df | ||
|
|
0cc7aa250e | ||
|
|
9ca3ab1168 | ||
|
|
a08ba418ef | ||
|
|
4472144220 | ||
|
|
4bef0cfcfd | ||
|
|
2b73dfea75 | ||
|
|
784087390a | ||
|
|
3852bf4f24 | ||
|
|
f8d2a46daa | ||
|
|
686edad5c5 | ||
|
|
49f8e9571c | ||
|
|
d21ff4b72e | ||
|
|
89cf503880 | ||
|
|
dc8fc06e53 | ||
|
|
58c103e09c | ||
|
|
529d862573 | ||
|
|
c592655c0f | ||
|
|
d4086d6b04 | ||
|
|
f5b7ad718a | ||
|
|
2fc568b2e7 | ||
|
|
f0dc3b44df | ||
|
|
62bc422df1 | ||
|
|
d52283111d | ||
|
|
9bbd5e8dd6 | ||
|
|
7f434f1005 | ||
|
|
4d59a96b98 | ||
|
|
2845d7160e | ||
|
|
e20790c956 | ||
|
|
a23b305e6b | ||
|
|
68e9315c7d | ||
|
|
8fc9f64df9 | ||
|
|
7b61a857ba | ||
|
|
aba6ec896f | ||
|
|
0d8d3dc170 | ||
|
|
293d9132d7 | ||
|
|
46fd0b62f8 | ||
|
|
e10903c785 | ||
|
|
286a7b6b9a | ||
|
|
488ae9051e | ||
|
|
13d1861034 | ||
|
|
3fbf9d3ea1 | ||
|
|
7fe67ae949 | ||
|
|
717a4eb6e1 | ||
|
|
23f97f9a66 | ||
|
|
5311a3b7b5 | ||
|
|
96a07ba867 | ||
|
|
7278c455bc | ||
|
|
11f26b42e3 | ||
|
|
921d05ddcf | ||
|
|
b9552250cb | ||
|
|
9fda5253fd | ||
|
|
ccdb0287e8 | ||
|
|
20d145efef | ||
|
|
fd9c3ad389 | ||
|
|
97a88e2248 | ||
|
|
8bdc23add2 | ||
|
|
c2f42583c0 | ||
|
|
01f8e5dbb8 | ||
|
|
8c99d104e3 | ||
|
|
91683d19a8 | ||
|
|
44b84cb5a6 | ||
|
|
7467735258 | ||
|
|
7749d7945f | ||
|
|
93ee6b8a22 | ||
|
|
80ab2c0f22 | ||
|
|
06d164306b | ||
|
|
ecf5556bea | ||
|
|
2ad82b0083 | ||
|
|
330b26c9df | ||
|
|
ccff953c25 | ||
|
|
ecd812b4d6 | ||
|
|
ebf7641610 | ||
|
|
f595ab93eb | ||
|
|
266f491ff8 | ||
|
|
deae7d33f1 | ||
|
|
d7faee2566 | ||
|
|
39ddf9991f | ||
|
|
4df4a8e731 | ||
|
|
0d2a03c290 | ||
|
|
76fa1c181c | ||
|
|
f6a16bbd4a | ||
|
|
102a397e39 | ||
|
|
c8aa1ee9e6 | ||
|
|
d54d482af0 | ||
|
|
702c022016 | ||
|
|
ef0e68bfc3 | ||
|
|
7dbc6768d6 | ||
|
|
42ee8c853a | ||
|
|
25cd3168a7 | ||
|
|
8c12e488f7 | ||
|
|
e2a06db7f3 | ||
|
|
e20b702418 | ||
|
|
275a6a3bec | ||
|
|
76e17b54ea | ||
|
|
d39b3209fb | ||
|
|
d76ed0da1c | ||
|
|
f0a07b7546 | ||
|
|
3687648384 | ||
|
|
10814aaf3b | ||
|
|
f87e0c03ee | ||
|
|
622cffee9d | ||
|
|
f70121ed90 | ||
|
|
860e76b9a5 | ||
|
|
8da5e5290f | ||
|
|
21c2871667 | ||
|
|
ab992d40b0 | ||
|
|
e74c245e29 | ||
|
|
3c092eff4a | ||
|
|
860d4f6177 | ||
|
|
b097be17ef | ||
|
|
d81e1caa71 | ||
|
|
8b1b809ab4 | ||
|
|
c0405c3024 | ||
|
|
ef2b2a6c92 | ||
|
|
d2b3188c61 | ||
|
|
edaafacf36 | ||
|
|
01cc622e7b | ||
|
|
955ca7382d | ||
|
|
e0e81288cd | ||
|
|
4dad408ead | ||
|
|
8cf29aafec | ||
|
|
5009724f40 | ||
|
|
dc7b3d7597 | ||
|
|
6755118493 | ||
|
|
950c354b3d | ||
|
|
c727f0797b | ||
|
|
52909b5dbe | ||
|
|
08f66d8509 | ||
|
|
9bbffd019c | ||
|
|
d637c9cc03 | ||
|
|
859af8662f | ||
|
|
de3a4af1bf | ||
|
|
d8f4837fc5 | ||
|
|
4be5667b2c | ||
|
|
c0a29b30c9 | ||
|
|
6e4b5f2345 | ||
|
|
92a3ff9182 | ||
|
|
dd5dff3096 | ||
|
|
77f63c48b6 | ||
|
|
6d9fb4e7e4 | ||
|
|
e98b2489f3 | ||
|
|
2a44fd3f80 | ||
|
|
d20d86e37d | ||
|
|
56f398c7b2 | ||
|
|
c5e7198006 | ||
|
|
8c5fe523b2 | ||
|
|
0e8907be4d | ||
|
|
30b0b686ad | ||
|
|
05a1f9f301 | ||
|
|
f3070d104a | ||
|
|
e9571d29af | ||
|
|
77d5f5075a | ||
|
|
f4a517e5d7 | ||
|
|
00043bfa18 | ||
|
|
3e75d9d31b | ||
|
|
e7590c7528 | ||
|
|
8f44ef7d59 | ||
|
|
1c075646f5 | ||
|
|
76c05a71fc | ||
|
|
29b94bbb04 | ||
|
|
8254cf69d3 | ||
|
|
94757c1545 | ||
|
|
505f673451 | ||
|
|
2320443f63 | ||
|
|
5eb05263f6 | ||
|
|
c34d76ed36 | ||
|
|
90f9d86261 | ||
|
|
dc350eb049 | ||
|
|
0fabe0da83 | ||
|
|
da4aa9b03f | ||
|
|
26e0ed8331 | ||
|
|
e2bb9824f8 | ||
|
|
acc8efa44a | ||
|
|
1b3eac926e | ||
|
|
a15588cdcd | ||
|
|
c72ff6e008 | ||
|
|
f9e3434826 | ||
|
|
fccf8ca2f6 | ||
|
|
3baf604bea | ||
|
|
2df7134d69 | ||
|
|
3686f141a3 | ||
|
|
3a5333e681 | ||
|
|
6f3cc75364 | ||
|
|
fbd5658db7 | ||
|
|
129e13b92d | ||
|
|
733086cc67 | ||
|
|
745bedd0f0 | ||
|
|
56353aaf42 | ||
|
|
96794f7d2b | ||
|
|
a173c9c18f | ||
|
|
2dd47e73f4 | ||
|
|
86e00cbb71 | ||
|
|
74347f4a55 | ||
|
|
d132f73497 | ||
|
|
9b753aa154 | ||
|
|
a4ebe83cdb | ||
|
|
f58ac8ada3 | ||
|
|
8ecf69ef7b | ||
|
|
109546cbda | ||
|
|
c6c1e99252 | ||
|
|
d80825c40b | ||
|
|
e2b8699df9 | ||
|
|
874e2fc70c | ||
|
|
979f054702 | ||
|
|
05b7251d51 | ||
|
|
62f650078a | ||
|
|
6ad1a042bc | ||
|
|
6717f31e10 | ||
|
|
ccfe778c01 | ||
|
|
344ab0eb7d | ||
|
|
a633f6c5dd | ||
|
|
36649c498a | ||
|
|
ef0b4c91bc | ||
|
|
cba2b972bc | ||
|
|
91bfcb1aed | ||
|
|
c330c65e77 | ||
|
|
09004c25a8 | ||
|
|
8dd99563d1 | ||
|
|
69ef7e53a4 | ||
|
|
51fd3e631b | ||
|
|
a35e456b09 | ||
|
|
7d1738785f | ||
|
|
2f4845e968 | ||
|
|
58be47e3e1 | ||
|
|
c92bacec63 | ||
|
|
ab2913a29f | ||
|
|
7c1de1edec | ||
|
|
efc9bc5d8d | ||
|
|
a890ab4bc2 | ||
|
|
7cda25f1af | ||
|
|
c9f4bdde94 | ||
|
|
32f875f9fc | ||
|
|
012ca0a27d | ||
|
|
8be9ce2f06 | ||
|
|
88a2202093 | ||
|
|
93267b8207 | ||
|
|
c4cb99cf4a | ||
|
|
6f4344af83 | ||
|
|
62c1dcb661 | ||
|
|
b83014ab14 | ||
|
|
fbca0ba9fc | ||
|
|
f2af05432d | ||
|
|
83f85817aa | ||
|
|
3e7e280040 | ||
|
|
ca55c672b0 | ||
|
|
c7b9c005d0 | ||
|
|
1eff695f33 | ||
|
|
055daeb0a5 | ||
|
|
4a714bffbc | ||
|
|
341603a7dd | ||
|
|
a9b6bed6af | ||
|
|
ffc3e73c36 | ||
|
|
98255e40e7 | ||
|
|
d24fb6b032 | ||
|
|
d631701be7 | ||
|
|
f1def91625 | ||
|
|
55049d02dc | ||
|
|
82e9b59b91 | ||
|
|
82fd772dab | ||
|
|
3eb90582de | ||
|
|
e50849097a | ||
|
|
4528b887b0 | ||
|
|
4f96cebce3 | ||
|
|
2a50fc324b | ||
|
|
c047405c5d | ||
|
|
1f18d33804 | ||
|
|
6c09f305ae | ||
|
|
1f400b68a8 | ||
|
|
5c0327e8ff | ||
|
|
57f7cf211c | ||
|
|
8529e124ea | ||
|
|
91d8c1f95c | ||
|
|
3fed986199 | ||
|
|
b291b45312 | ||
|
|
148cc40381 | ||
|
|
86838b2a02 | ||
|
|
78352caba7 | ||
|
|
4cb0873a0a | ||
|
|
cb6633c11c | ||
|
|
985d35f6b7 | ||
|
|
f22af09819 | ||
|
|
58ad17bd54 | ||
|
|
b7c22b8f09 | ||
|
|
f7fe1e3098 | ||
|
|
38940619c6 | ||
|
|
642e20db8a | ||
|
|
28068857e7 | ||
|
|
9006d6dbbd | ||
|
|
8282fd8b50 | ||
|
|
0e52fbd0b3 | ||
|
|
e656041fd7 | ||
|
|
2e7c726bb0 | ||
|
|
451241a776 | ||
|
|
409cc22934 | ||
|
|
a8b583e78b | ||
|
|
e0221f2d25 | ||
|
|
1d403f9d3c | ||
|
|
857a40c87b | ||
|
|
e1d6c9a663 | ||
|
|
67a8b5ec17 | ||
|
|
0dfcb9beaa | ||
|
|
ab0fe63f07 | ||
|
|
48ca11df5f | ||
|
|
a04bb76973 | ||
|
|
b71a1386ed | ||
|
|
e8249dcd49 | ||
|
|
70d192eb97 | ||
|
|
a4186b1867 | ||
|
|
f2c22662cc | ||
|
|
dcd309bea1 | ||
|
|
7b27be54ee | ||
|
|
1cd63cd634 |
+2
-1
@@ -21,9 +21,10 @@ ans.run
|
||||
named.run
|
||||
named.memstats
|
||||
gen.dSYM/
|
||||
.libs/
|
||||
.ccache/
|
||||
.deps/
|
||||
.dirstamp
|
||||
.libs/
|
||||
unit/atf-src/atf-c++/atf-c++.pc
|
||||
unit/atf-src/atf-c/atf-c.pc
|
||||
unit/atf-src/atf-c/defs.h
|
||||
|
||||
+98
-12
@@ -3,8 +3,10 @@ variables:
|
||||
LC_ALL: C
|
||||
DOCKER_DRIVER: overlay2
|
||||
CI_REGISTRY_IMAGE: oerdnj/bind9
|
||||
CCACHE_DIR: "/ccache"
|
||||
|
||||
stages:
|
||||
- precheck
|
||||
- build
|
||||
- test
|
||||
|
||||
@@ -13,95 +15,141 @@ stages:
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- amd64
|
||||
|
||||
.debian-jessie-i386: &debian_jessie_i386_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-jessie-i386"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- i386
|
||||
|
||||
.debian-stretch-amd64: &debian_stretch_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- amd64
|
||||
|
||||
.debian-stretch-i386:: &debian_stretch_i386_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-stretch-i386"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- i386
|
||||
|
||||
.debian-buster-amd64: &debian_buster_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-buster-amd64"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- amd64
|
||||
|
||||
.debian-buster-i386:: &debian_buster_i386_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-buster-i386"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- i386
|
||||
|
||||
.debian-sid-amd64: &debian_sid_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- amd64
|
||||
|
||||
.debian-sid-i386: &debian_sid_i386_image
|
||||
image: "$CI_REGISTRY_IMAGE:debian-sid-i386"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- i386
|
||||
|
||||
.ubuntu-trusty-amd64: &ubuntu_trusty_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:ubuntu-trusty-amd64"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- amd64
|
||||
|
||||
.ubuntu-trusty-i386: &ubuntu_trusty_i386_image
|
||||
image: "$CI_REGISTRY_IMAGE:ubuntu-trusty-i386"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- i386
|
||||
|
||||
.ubuntu-xenial-amd64: &ubuntu_xenial_amd64_image
|
||||
image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-amd64"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- amd64
|
||||
|
||||
.ubuntu-xenial-i386: &ubuntu_xenial_i386_image
|
||||
image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-i386"
|
||||
tags:
|
||||
- linux
|
||||
- docker
|
||||
- i386
|
||||
|
||||
.build: &build_job
|
||||
stage: build
|
||||
before_script:
|
||||
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
|
||||
- ./autogen.sh
|
||||
script:
|
||||
- ./configure --with-libtool --disable-static
|
||||
- make -j6 -k all V=1
|
||||
- ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr/local --with-libidn2
|
||||
- make -j${PARALLEL_JOBS_BUILD:-1} -k all V=1
|
||||
artifacts:
|
||||
expire_in: '1 hour'
|
||||
untracked: true
|
||||
|
||||
.test: &test_job
|
||||
.system_test: &system_test_job
|
||||
stage: test
|
||||
before_script:
|
||||
- rm -rf .ccache
|
||||
- bash -x bin/tests/system/ifconfig.sh up
|
||||
script:
|
||||
- make -j8 -k check V=1
|
||||
- ( cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
|
||||
- test -s bin/tests/system/systests.output
|
||||
artifacts:
|
||||
untracked: true
|
||||
expire_in: '1 week'
|
||||
when: on_failure
|
||||
|
||||
.unit_test: &unit_test_job
|
||||
stage: test
|
||||
before_script:
|
||||
- export KYUA_RESULT="$CI_PROJECT_DIR/kyua.results"
|
||||
script:
|
||||
- make unit
|
||||
after_script:
|
||||
- kyua report-html --force --results-file kyua.results --results-filter "" --output kyua_html
|
||||
artifacts:
|
||||
paths:
|
||||
- atf.out
|
||||
- kyua.log
|
||||
- kyua.results
|
||||
- kyua_html/
|
||||
expire_in: '1 week'
|
||||
when: on_failure
|
||||
|
||||
precheck:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
stage: precheck
|
||||
script:
|
||||
- perl util/check-changes CHANGES
|
||||
- perl -w util/merge_copyrights
|
||||
- diff -urNap util/copyrights util/newcopyrights
|
||||
- rm util/newcopyrights
|
||||
artifacts:
|
||||
paths:
|
||||
- util/newcopyrights
|
||||
expire_in: '1 week'
|
||||
when: on_failure
|
||||
|
||||
#build:debian:jessie:amd64:
|
||||
# <<: *debian_jessie_amd64_image
|
||||
# <<: *build_job
|
||||
@@ -126,22 +174,60 @@ stages:
|
||||
# <<: *ubuntu_xenial_i386_image
|
||||
# <<: *build_job
|
||||
|
||||
build:debian:sid:amd64:
|
||||
build:clang:debian:sid:amd64:
|
||||
variables:
|
||||
CC: clang-6.0
|
||||
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
build:debian:sid:i386:
|
||||
|
||||
build:debian:sid:amd64:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *build_job
|
||||
|
||||
build:clang:debian:sid:i386:
|
||||
variables:
|
||||
CC: clang-6.0
|
||||
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *build_job
|
||||
|
||||
test:debian:sid:amd64:
|
||||
build:debian:sid:i386:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *build_job
|
||||
|
||||
unittest:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *test_job
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- build:debian:sid:amd64
|
||||
|
||||
test:debian:sid:i386:
|
||||
|
||||
unittest:clang:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- build:clang:debian:sid:amd64
|
||||
|
||||
unittest:debian:sid:i386:
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *test_job
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- build:debian:sid:i386
|
||||
|
||||
systemtest:debian:sid:amd64:
|
||||
<<: *debian_sid_amd64_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- build:debian:sid:amd64
|
||||
|
||||
systemtest:debian:sid:i386:
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- build:debian:sid:i386
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
<!--
|
||||
If the bug you are reporting is potentially security-related - for example,
|
||||
if it involves an assertion failure or other crash in `named` that can be
|
||||
triggered repeatedly - then please do *NOT* report it here, but send an
|
||||
email to [security-officer@isc.org](security-officer@isc.org).
|
||||
-->
|
||||
|
||||
### Summary
|
||||
|
||||
(Summarize the bug encountered concisely.)
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
(How one can reproduce the issue - this is very important.)
|
||||
|
||||
### What is the current *bug* behavior?
|
||||
|
||||
(What actually happens.)
|
||||
|
||||
### What is the expected *correct* behavior?
|
||||
|
||||
(What you should see instead.)
|
||||
|
||||
### Relevant configuration files
|
||||
|
||||
(Paste any relevant configuration files - please use code blocks (```)
|
||||
to format console output. If submitting the contents of your
|
||||
configuration file in a non-confidential Issue, it is advisable to
|
||||
obscure key secrets: this can be done automatically by using
|
||||
`named-checkconf -px`.)
|
||||
|
||||
### Relevant logs and/or screenshots
|
||||
|
||||
(Paste any relevant logs - please use code blocks (```) to format console
|
||||
output, logs, and code, as it's very hard to read otherwise.)
|
||||
|
||||
### Possible fixes
|
||||
|
||||
(If you can, link to the line of code that might be responsible for the
|
||||
problem.)
|
||||
|
||||
/label ~bug
|
||||
@@ -0,0 +1,11 @@
|
||||
### Description
|
||||
|
||||
(Describe the problem, use cases, benefits, and/or goals.)
|
||||
|
||||
### Request
|
||||
|
||||
(Describe the solution you'd like to see.)
|
||||
|
||||
### Links / references
|
||||
|
||||
/label ~"feature request"
|
||||
@@ -1,8 +1,184 @@
|
||||
4951. [protocol] Add "HOME.ARPA" to list of built in empty zones as
|
||||
per RFC 8375. [GL #273]
|
||||
--- 9.13.0 released ---
|
||||
|
||||
4950. [bug] ISC_SOCKEVENTATTR_TRUNC was not be set. [GL #238]
|
||||
|
||||
4949. [placeholder]
|
||||
|
||||
4948. [bug] When request-nsid is turned on, EDNS NSID options
|
||||
should be logged at level info. Since change 3741
|
||||
they have been logged at debug(3) by mistake.
|
||||
[GL !290]
|
||||
|
||||
4947. [func] Replace all random functions with isc_random(),
|
||||
isc_random_buf() and isc_random_uniform() API.
|
||||
[GL #221]
|
||||
|
||||
4946. [bug] Additional glue was not being returned by resolver
|
||||
for unsigned zones since change 4596. [GL #209]
|
||||
|
||||
4945. [func] BIND can no longer be built without DNSSEC support.
|
||||
A cryptography provder (i.e., OpenSSL or a hardware
|
||||
service module with PKCS#11 support) must be
|
||||
available. [GL #244]
|
||||
|
||||
4944. [cleanup] Silence cppcheck portability warnings in
|
||||
lib/isc/tests/buffer_test.c. [GL #239]
|
||||
|
||||
4943. [bug] Change 4687 consumed too much memory when running
|
||||
system tests with --with-tuning=large. Reduced the
|
||||
hash table size to 512 entries for 'named -m record'
|
||||
restoring the previous memory footprint. [GL #248]
|
||||
|
||||
4942. [cleanup] Consolidate multiple instances of splitting of
|
||||
batchline in dig into a single function. [GL #196]
|
||||
|
||||
4941. [cleanup] Silence clang static analyzer warnings. [GL #196]
|
||||
|
||||
4940. [cleanup] Extract the loop in dns__zone_updatesigs() into
|
||||
separate functions to improve code readability.
|
||||
[GL #135]
|
||||
|
||||
4939. [test] Add basic unit tests for update_sigs(). [GL #135]
|
||||
|
||||
4938. [placeholder]
|
||||
|
||||
4937. [func] Remove support for OpenSSL < 1.0.0 [GL #191]
|
||||
|
||||
4936. [func] Always use OpenSSL or PKCS#11 random data providers,
|
||||
and remove the --{enable,disable}-crypto-rand configure
|
||||
options. [GL #165]
|
||||
|
||||
4935. [func] Add support for LibreSSL >= 2.7.0 (some OpenSSL 1.1.0
|
||||
call were added). [GL #191]
|
||||
|
||||
4934. [security] The serve-stale feature could cause an assertion failure
|
||||
in rbtdb.c even when stale-answer-enable was false.
|
||||
Simultaneous use of stale cache records and NSEC
|
||||
aggressive negative caching could trigger a recursion
|
||||
loop. (CVE-2018-5737) [GL #185]
|
||||
|
||||
4933. [bug] Not creating signing keys for an inline signed zone
|
||||
prevented changes applied to the raw zone from being
|
||||
reflected in the secure zone until signing keys were
|
||||
made available. [GL #159]
|
||||
|
||||
4932. [bug] Bumped signed serial of an inline signed zone was
|
||||
logged even when an error occurred while updating
|
||||
signatures. [GL #159]
|
||||
|
||||
4931. [func] Removed the "rbtdb64" database implementation.
|
||||
[GL #217]
|
||||
|
||||
4930. [bug] Remove a bogus check in nslookup command line
|
||||
argument processing. [GL #206]
|
||||
|
||||
4929. [func] Add the ability to set RA and TC in queries made by
|
||||
dig (+[no]raflag, +[no]tcflag). [GL #213]
|
||||
|
||||
4928. [func] The "dnskey-sig-validity" option allows
|
||||
"sig-validity-interval" to be overriden for signatures
|
||||
covering DNSKEY RRsets. [GL #145]
|
||||
|
||||
4927. [placeholder]
|
||||
|
||||
4926. [func] Add root key sentinel support. To disable, add
|
||||
'root-key-sentinel no;' to named.conf. [GL #37]
|
||||
|
||||
4925. [func] Several configuration options that define intervals
|
||||
can now take TTL value suffixes (for example, 2h or 1d)
|
||||
in addition to integer parameters. These include
|
||||
max-cache-ttl, max-ncache-ttl, max-policy-ttl,
|
||||
fstrm-set-reopen-interval, interface-interval, and
|
||||
min-update-interval. [GL #203]
|
||||
|
||||
4924. [cleanup] Clean up the isc_string_* namespace and leave
|
||||
only strlcpy and strlcat. [GL #178]
|
||||
|
||||
4923. [cleanup] Refactor socket and socket event options into
|
||||
enum types. [GL !135]
|
||||
|
||||
4922. [bug] dnstap: Log the destination address of client
|
||||
packets rather than the interface address.
|
||||
[GL #197]
|
||||
|
||||
4921. [cleanup] Add dns_fixedname_initname() and refactor the caller
|
||||
code to make usage of the new function, as a part of
|
||||
refactoring dns_fixedname_*() macros were turned into
|
||||
functions. [GL #183]
|
||||
|
||||
4920. [cleanup] Clean up libdns removing most of the backwards
|
||||
compatibility wrappers.
|
||||
|
||||
4919. [cleanup] Clean up the isc_hash_* namespace and leave only
|
||||
the FNV-1a hash implementation. [GL #178]
|
||||
|
||||
4918. [bug] Fix double free after keygen error in dnssec-keygen
|
||||
when OpenSSL >= 1.1.0 is used and RSA_generate_key_ex
|
||||
fails. [GL #109]
|
||||
|
||||
4917. [func] Support 64 RPZ policy zones by default. [GL #123]
|
||||
|
||||
4916. [func] Remove IDNA2003 support and the bundled idnkit-1.0
|
||||
library.
|
||||
|
||||
4915. [func] Implement IDNA2008 support in dig by adding support
|
||||
for libidn2. New dig option +idnin has been added,
|
||||
which allows to process invalid domain names much
|
||||
like dig without IDN support. libidn2 version 2.0
|
||||
or higher is needed for +idnout enabled by default.
|
||||
|
||||
4914. [security] A bug in zone database reference counting could lead to
|
||||
a crash when multiple versions of a slave zone were
|
||||
transferred from a master in close succession.
|
||||
(CVE-2018-5736) [GL #134]
|
||||
|
||||
4913. [test] Re-implemented older unit tests in bin/tests as ATF,
|
||||
removed the lib/tests unit testing library. [GL #115]
|
||||
|
||||
4912. [test] Improved the reliability of the 'cds' system test.
|
||||
[GL #136]
|
||||
|
||||
4911. [test] Improved the reliability of the 'mkeys' system test.
|
||||
[GL #128]
|
||||
|
||||
4910. [func] Update util/check-changes to work on release branches.
|
||||
[GL #113]
|
||||
|
||||
4909. [bug] named-checkconf did not detect in-view zone collisions.
|
||||
[GL #125]
|
||||
|
||||
4908. [test] Eliminated unnecessary waiting in the allow_query
|
||||
system test. Also changed its name to allow-query.
|
||||
[GL #81]
|
||||
|
||||
4907. [test] Improved the reliability of the 'notify' system
|
||||
test. [GL #59]
|
||||
|
||||
4906. [func] Replace getquad() with inet_pton(), completing
|
||||
change #4900. [GL #56]
|
||||
|
||||
4905. [bug] irs_resconf_load() ignored resolv.conf syntax errors
|
||||
when "domain" or "search" options were present in that
|
||||
file. [GL #110]
|
||||
|
||||
4904. [bug] Temporarily revert change #4859. [GL #124]
|
||||
|
||||
4903. [bug] "check-mx fail;" did not prevent MX records containing
|
||||
IP addresses from being added to a zone by a dynamic
|
||||
update. [GL #112]
|
||||
|
||||
4902. [test] Improved the reliability of the 'ixfr' system
|
||||
test. [GL #66]
|
||||
|
||||
4901. [func] "dig +nssearch" now lists the name servers
|
||||
for a domain that time out, as well as the servers
|
||||
that respond. [GL #64]
|
||||
|
||||
4900. [cleanup] Remove all uses of inet_aton(). [GL #13]
|
||||
4900. [func] Remove all uses of inet_aton(). As a result of this
|
||||
change, IPv4 addresses are now only accepted in
|
||||
dotted-quad format. [GL #13]
|
||||
|
||||
4899. [test] Convert most of the remaining system tests to be able
|
||||
to run in parallel, continuing the work from change
|
||||
|
||||
+186
@@ -0,0 +1,186 @@
|
||||
BIND Source Access and Contributor Guidelines
|
||||
|
||||
Feb 22, 2018
|
||||
|
||||
Contents
|
||||
|
||||
1. Access to source code
|
||||
2. Reporting bugs
|
||||
3. Contributing code
|
||||
|
||||
Introduction
|
||||
|
||||
Thank you for using BIND!
|
||||
|
||||
BIND is open source software that implements the Domain Name System (DNS)
|
||||
protocols for the Internet. It is a reference implementation of those
|
||||
protocols, but it is also production-grade software, suitable for use in
|
||||
high-volume and high-reliability applications. It is by far the most
|
||||
widely used DNS software, providing a robust and stable platform on top of
|
||||
which organizations can build distributed computing systems with the
|
||||
knowledge that those systems are fully compliant with published DNS
|
||||
standards.
|
||||
|
||||
BIND is and will always remain free and openly available. It can be used
|
||||
and modified in any way by anyone.
|
||||
|
||||
BIND is maintained by the Internet Systems Consortium, a public-benefit
|
||||
501(c)(3) nonprofit, using a "managed open source" approach: anyone can
|
||||
see the source, but only ISC employees have commit access. Until recently,
|
||||
the source could only be seen once ISC had published a release: read
|
||||
access to the source repository was restricted just as commit access was.
|
||||
That's now changing, with the opening of a public git mirror to the BIND
|
||||
source tree (see below).
|
||||
|
||||
Access to source code
|
||||
|
||||
Public BIND releases are always available from the ISC FTP site.
|
||||
|
||||
A public-access GIT repository is also available at https://gitlab.isc.org
|
||||
. This repository is a mirror, updated several times per day, of the
|
||||
source repository maintained by ISC. It contains all the public release
|
||||
branches; upcoming releases can be viewed in their current state at any
|
||||
time. It does not contain development branches or unreviewed work in
|
||||
progress. Commits which address security vulnerablilities are withheld
|
||||
until after public disclosure.
|
||||
|
||||
You can browse the source online via https://gitlab.isc.org/isc-projects/
|
||||
bind9
|
||||
|
||||
To clone the repository, use:
|
||||
|
||||
$ git clone https://gitlab.isc.org/isc-projects/bind9.git
|
||||
|
||||
Release branch names are of the form v9_X, where X represents the second
|
||||
number in the BIND 9 version number. So, to check out the BIND 9.12
|
||||
branch, use:
|
||||
|
||||
$ git checkout v9_12
|
||||
|
||||
Whenever a branch is ready for publication, a tag will be placed of the
|
||||
form v9_X_Y. The 9.12.0 release, for instance, is tagged as v9_12_0.
|
||||
|
||||
The branch in which the next major release is being developed is called
|
||||
master.
|
||||
|
||||
Reporting bugs
|
||||
|
||||
Reports of flaws in the BIND package, including software bugs, errors in
|
||||
the documentation, missing files in the tarball, suggested changes or
|
||||
requests for new features, etc, can be filed using https://gitlab.isc.org/
|
||||
isc-projects/bind9/issues.
|
||||
|
||||
Due to a large ticket backlog, we are sometimes slow to respond,
|
||||
especially if a bug is cosmetic or if a feature request is vague or low in
|
||||
priority, but we will try at least to acknowledge legitimate bug reports
|
||||
within a week.
|
||||
|
||||
ISC's ticketing system is publicly readable; however, you must have an
|
||||
account to file a new issue. You can either register locally or use
|
||||
credentials from an existing account at GitHub, GitLab, Google, Twitter,
|
||||
or Facebook.
|
||||
|
||||
Reporting possible security issues
|
||||
|
||||
If you think you may be seeing a potential security vulnerability in BIND
|
||||
(for example, a crash with REQUIRE, INSIST, or ASSERT failure), please
|
||||
report it immediately by emailing to security-officer@isc.org. Plain-text
|
||||
e-mail is not a secure choice for communications concerning undisclosed
|
||||
security issues so please encrypt your communications to us if possible,
|
||||
using the ISC Security Officer public key.
|
||||
|
||||
Do not discuss undisclosed security vulnerabilites on any public mailing
|
||||
list. ISC has a long history of handling reported vulnerabilities promptly
|
||||
and effectively and we respect and acknowledge responsible reporters.
|
||||
|
||||
ISC's Security Vulnerability Disclosure Policy is documented at https://
|
||||
kb.isc.org/article/AA-00861/0.
|
||||
|
||||
If you have a crash, you may want to consult ?What to do if your BIND or
|
||||
DHCP server has crashed.?
|
||||
|
||||
Contributing code
|
||||
|
||||
BIND is licensed under the Mozilla Public License 2.0. Earier versions
|
||||
(BIND 9.10 and earlier) were licensed under the ISC License
|
||||
|
||||
ISC does not require an explicit copyright assignment for patch
|
||||
contributions. However, by submitting a patch to ISC, you implicitly
|
||||
certify that you are the author of the code, that you intend to reliquish
|
||||
exclusive copyright, and that you grant permission to publish your work
|
||||
under the open source license used for the BIND version(s) to which your
|
||||
patch will be applied.
|
||||
|
||||
BIND code
|
||||
|
||||
Patches for BIND may be submitted directly via merge requests in ISC's
|
||||
Gitlab source repository for BIND.
|
||||
|
||||
Patches can also be submitted as diffs against a specific version of BIND
|
||||
-- preferably the current top of the master branch. Diffs may be generated
|
||||
using either git format-patch or git diff.
|
||||
|
||||
Those wanting to write code for BIND may be interested in the developer
|
||||
information page, which includes information about BIND design and coding
|
||||
practices, including discussion of internal APIs and overall system
|
||||
architecture. (This is a work in progress, and still quite preliminary.)
|
||||
|
||||
Every patch submitted will be reviewed by ISC engineers following our code
|
||||
review process before it is merged.
|
||||
|
||||
It may take considerable time to review patch submissions, especially if
|
||||
they don't meet ISC style and quality guidelines. If a patch is a good
|
||||
idea, we can and will do additional work to bring it up to par, but if
|
||||
we're busy with other work, it may take us a long time to get to it.
|
||||
|
||||
To ensure your patch is acted on as promptly as possible, please:
|
||||
|
||||
* Try to adhere to the BIND 9 coding style.
|
||||
* Run make check to ensure your change hasn't caused any functional
|
||||
regressions.
|
||||
* Document your work, both in the patch itself and in the accompanying
|
||||
email.
|
||||
* In patches that make non-trivial functional changes, include system
|
||||
tests if possible; when introducing or substantially altering a
|
||||
library API, include unit tests. See Testing for more information.
|
||||
|
||||
Changes to configure
|
||||
|
||||
If you need to make changes to configure, you should not edit it directly;
|
||||
instead, edit configure.in, then run autoconf. Similarly, instead of
|
||||
editing config.h.in directly, edit configure.in and run autoheader.
|
||||
|
||||
When submitting a patch as a diff, it's fine to omit the configure diffs
|
||||
to save space. Just send the configure.in diffs and we'll generate the new
|
||||
configure during the review process.
|
||||
|
||||
Documentation
|
||||
|
||||
All functional changes should be documented. There are three types of
|
||||
documentation in the BIND source tree:
|
||||
|
||||
* Man pages are kept alongside the source code for the commands they
|
||||
document, in files ending in .docbook; for example, the named man page
|
||||
is bin/named/named.docbook.
|
||||
* The BIND 9 Administrator Reference Manual is mostly in doc/arm/
|
||||
Bv9ARM-book.xml, plus a few other XML files that are included in it.
|
||||
* API documentation is in the header file describing the API, in
|
||||
Doxygen-formatted comments.
|
||||
|
||||
It is not necessary to edit any documentation files other than these; all
|
||||
PDF, HTML, and nroff-format man page files will be updated automatically
|
||||
from the docbook and XML files after merging.
|
||||
|
||||
Patches to improve existing documentation are also very welcome!
|
||||
|
||||
Tests
|
||||
|
||||
BIND is a large and complex project. We rely heavily on continuous
|
||||
automated testing and cannot merge new code without adequate test
|
||||
coverage. Please see the 'Testing' section of doc/dev/dev.md for more
|
||||
information.
|
||||
|
||||
Thanks
|
||||
|
||||
Thank you for your interest in contributing to the ongoing development of
|
||||
BIND.
|
||||
@@ -9,7 +9,7 @@
|
||||
- information regarding copyright ownership.
|
||||
-->
|
||||
## BIND Source Access and Contributor Guidelines
|
||||
*Apr 14, 2017*
|
||||
*Feb 22, 2018*
|
||||
|
||||
### Contents
|
||||
|
||||
@@ -47,7 +47,7 @@ Public BIND releases are always available from the
|
||||
[ISC FTP site](ftp://ftp.isc.org/isc/bind9).
|
||||
|
||||
A public-access GIT repository is also available at
|
||||
[https://bindmember.isc.org](https://bindmember.isc.org).
|
||||
[https://gitlab.isc.org](https://gitlab.isc.org).
|
||||
This repository is a mirror, updated several times per day, of the
|
||||
source repository maintained by ISC. It contains all the public release
|
||||
branches; upcoming releases can be viewed in their current state at any
|
||||
@@ -56,104 +56,105 @@ progress. Commits which address security vulnerablilities are withheld
|
||||
until after public disclosure.
|
||||
|
||||
You can browse the source online via
|
||||
[https://bindmember.isc.org/cgi-bin/gitweb.cgi?p=bind9.git;a=summary](https://bindmember.isc.org/cgi-bin/gitweb.cgi?p=bind9.git;a=summary)
|
||||
[https://gitlab.isc.org/isc-projects/bind9](https://gitlab.isc.org/isc-projects/bind9)
|
||||
|
||||
To clone the repository, use:
|
||||
|
||||
> $ git clone https://bindmember.isc.org/git/bind9.git
|
||||
> $ git clone https://gitlab.isc.org/isc-projects/bind9.git
|
||||
|
||||
Branch names are of the form `v9_X`, where X represents the second number in the BIND 9 version number. So, to check out the BIND 9.10 branch, use:
|
||||
Release branch names are of the form `v9_X`, where X represents the second
|
||||
number in the BIND 9 version number. So, to check out the BIND 9.12
|
||||
branch, use:
|
||||
|
||||
> $ git checkout v9_10
|
||||
> $ git checkout v9_12
|
||||
|
||||
Whenever a branch is ready for publication, a tag will be placed of the
|
||||
form `v9_X_Y`. The 9.9.5 release, for instance, is tagged as `v9_9_5`.
|
||||
form `v9_X_Y`. The 9.12.0 release, for instance, is tagged as `v9_12_0`.
|
||||
|
||||
The branch in which the next major release is being developed is called
|
||||
`master`.
|
||||
|
||||
### <a name="bugs"></a>Reporting bugs
|
||||
|
||||
Reports of flaws in the BIND package, including software bugs, errors in
|
||||
the documentation, missing files in the tarball, etc, can be emailed to
|
||||
`bind9-bugs@isc.org`, or reported via the
|
||||
[bug submission form](http://www.isc.org/community/report-bug) at
|
||||
[http://www.isc.org/community/report-bug](http://www.isc.org/community/report-bug).
|
||||
Reports of flaws in the BIND package, including software bugs, errors
|
||||
in the documentation, missing files in the tarball, suggested changes
|
||||
or requests for new features, etc, can be filed using
|
||||
[https://gitlab.isc.org/isc-projects/bind9/issues](https://gitlab.isc.org/isc-projects/bind9/issues).
|
||||
|
||||
Suggested changes or requests for new features can be emailed to
|
||||
`bind-suggest@isc.org`. Both bugs and suggestions are stored in the
|
||||
ticketing system used by the software engineering team at ISC.
|
||||
Due to a large ticket backlog, we are sometimes slow to respond,
|
||||
especially if a bug is cosmetic or if a feature request is vague or
|
||||
low in priority, but we will try at least to acknowledge legitimate
|
||||
bug reports within a week.
|
||||
|
||||
All submissions to the ticketing system receive an automatic response. Any
|
||||
followup email sent to the ticketing system should use the same subject
|
||||
header, so that it will be routed to the same ticket.
|
||||
ISC's ticketing system is publicly readable; however, you must have
|
||||
an account to file a new issue. You can either register locally or
|
||||
use credentials from an existing account at GitHub, GitLab, Google,
|
||||
Twitter, or Facebook.
|
||||
|
||||
Due to a large ticket backlog and an even larger quantity of incoming spam,
|
||||
we are sometimes slow to respond, especially if a bug is cosmetic or if a
|
||||
feature request is vague or low in priority, but we will try at least to
|
||||
acknowledge legitimate bug reports within a week.
|
||||
### Reporting possible security issues
|
||||
If you think you may be seeing a potential security vulnerability in BIND
|
||||
(for example, a crash with REQUIRE, INSIST, or ASSERT failure), please
|
||||
report it immediately by emailing to security-officer@isc.org. Plain-text
|
||||
e-mail is not a secure choice for communications concerning undisclosed
|
||||
security issues so please encrypt your communications to us if possible,
|
||||
using the [ISC Security Officer public key](https://www.isc.org/downloads/software-support-policy/openpgp-key/).
|
||||
|
||||
Currently, ISC's ticketing system is not publicly readable. However, ISC
|
||||
may open it in the future. Please do not include information you consider
|
||||
to be confidential.
|
||||
Do not discuss undisclosed security vulnerabilites on any public mailing list.
|
||||
ISC has a long history of handling reported vulnerabilities promptly and
|
||||
effectively and we respect and acknowledge responsible reporters.
|
||||
|
||||
ISC's Security Vulnerability Disclosure Policy is documented at [https://kb.isc.org/article/AA-00861/0](https://kb.isc.org/article/AA-00861/0).
|
||||
|
||||
If you have a crash, you may want to consult
|
||||
[‘What to do if your BIND or DHCP server has crashed.’](https://kb.isc.org/article/AA-00340/89/What-to-do-if-your-BIND-or-DHCP-server-has-crashed.html)
|
||||
|
||||
### <a name="bugs"></a>Contributing code
|
||||
|
||||
BIND's [open source
|
||||
license](http://www.isc.org/downloads/software-support-policy/isc-license/)
|
||||
not require changes to be contributed back to ISC, but this page
|
||||
includes some guidelines for those who would like to do so.
|
||||
|
||||
We accept two different types of code contribution: Code intended for
|
||||
inclusion in [BIND](#bind) itself, and code intended for the
|
||||
[`contrib`](#contrib) directory.
|
||||
|
||||
#### <a name="bind"></a>BIND code
|
||||
|
||||
Patches for BIND itself may be submitted using the same methods as bug
|
||||
reports or suggestions. When submitting a patch, please prepend the
|
||||
subject header with "`[PATCH]`" so it will be easier for us to find. If
|
||||
your patch introduces a new feature in BIND, please submit it to
|
||||
`bind-suggest@isc.org`; if it fixes a bug, please submit it to
|
||||
`bind9-bugs@isc.org`.
|
||||
BIND is licensed under the
|
||||
[Mozilla Public License 2.0](http://www.isc.org/downloads/software-support-policy/isc-license/).
|
||||
Earier versions (BIND 9.10 and earlier) were licensed under the [ISC License](http://www.isc.org/downloads/software-support-policy/isc-license/)
|
||||
|
||||
ISC does not require an explicit copyright assignment for patch
|
||||
contributions. However, by submitting a patch to ISC, you implicitly
|
||||
certify that you are the author of the code, that you intend to reliquish
|
||||
exclusive copyright, and that you grant permission to publish your work
|
||||
under the
|
||||
[Mozilla Public License 2.0](http://www.isc.org/downloads/software-support-policy/isc-license/)
|
||||
for BIND 9.11 and higher, and the
|
||||
[ISC License](http://www.isc.org/downloads/software-support-policy/isc-license/)
|
||||
for BIND 9.10 and earlier.
|
||||
under the open source license used for the BIND version(s) to which your
|
||||
patch will be applied.
|
||||
|
||||
Patches should be submitted as diffs against a specific version of BIND --
|
||||
preferably the current top of the `master` branch. Diffs may be
|
||||
generated using either `git format-patch` or `git diff`.
|
||||
#### <a name="bind"></a>BIND code
|
||||
|
||||
Those wanting to write code for BIND may be interested in the [developer
|
||||
information](dev.md) page, which includes information about BIND design and
|
||||
coding practices, including discussion of internal APIs and overall system
|
||||
architecture. (This is a work in progress, and still quite preliminary.)
|
||||
Patches for BIND may be submitted directly via merge requests in
|
||||
[ISC's Gitlab](https://gitlab.isc.org/isc-projects/bind9/) source
|
||||
repository for BIND.
|
||||
|
||||
Every patch submitted will be reviewed by ISC engineers following our [code
|
||||
review process](dev.md#reviews) before it is merged.
|
||||
Patches can also be submitted as diffs against a specific version of
|
||||
BIND -- preferably the current top of the `master` branch. Diffs may
|
||||
be generated using either `git format-patch` or `git diff`.
|
||||
|
||||
Those wanting to write code for BIND may be interested in the
|
||||
[developer information](doc/dev/dev.md) page, which includes information
|
||||
about BIND design and coding practices, including discussion of internal
|
||||
APIs and overall system architecture. (This is a work in progress, and
|
||||
still quite preliminary.)
|
||||
|
||||
Every patch submitted will be reviewed by ISC engineers following our
|
||||
[code review process](doc/dev/dev.md#reviews) before it is merged.
|
||||
|
||||
It may take considerable time to review patch submissions, especially if
|
||||
they don't meet ISC style and quality guidelines. If the patch is a good
|
||||
idea, we can and will do additional work to bring them up to par, but if
|
||||
they don't meet ISC style and quality guidelines. If a patch is a good
|
||||
idea, we can and will do additional work to bring it up to par, but if
|
||||
we're busy with other work, it may take us a long time to get to it.
|
||||
|
||||
To ensure your patch is acted on as promptly as possible, please:
|
||||
|
||||
* Try to adhere to the [BIND 9 coding style](style.md).
|
||||
* Try to adhere to the [BIND 9 coding style](doc/dev/style.md).
|
||||
* Run `make` `check` to ensure your change hasn't caused any
|
||||
functional regressions.
|
||||
* Document your work, both in the patch itself and in the
|
||||
accompanying email.
|
||||
* In patches that make non-trivial functional changes, include system
|
||||
tests if possible; when introducing or substantially altering a
|
||||
library API, include unit tests. See [Testing](dev.md#testing)
|
||||
library API, include unit tests. See [Testing](doc/dev/dev.md#testing)
|
||||
for more information.
|
||||
|
||||
##### Changes to `configure`
|
||||
@@ -163,9 +164,9 @@ directly; instead, edit `configure.in`, then run `autoconf`. Similarly,
|
||||
instead of editing `config.h.in` directly, edit `configure.in` and run
|
||||
`autoheader`.
|
||||
|
||||
When submitting your patch, it is fine to omit the `configure` diffs.
|
||||
Just send the `configure.in` diffs and we'll generate the new `configure`
|
||||
during the review process.
|
||||
When submitting a patch as a diff, it's fine to omit the `configure`
|
||||
diffs to save space. Just send the `configure.in` diffs and we'll
|
||||
generate the new `configure` during the review process.
|
||||
|
||||
##### Documentation
|
||||
|
||||
@@ -181,24 +182,20 @@ of documentation in the BIND source tree:
|
||||
* API documentation is in the header file describing the API, in
|
||||
Doxygen-formatted comments.
|
||||
|
||||
It is not necessary to edit any documentation files other than these; the
|
||||
PDF, HTML, and `nroff`-format files will be generated automatically
|
||||
from the `docbook` and `XML` files by a script whenever a documentation
|
||||
change is merged to a release branch.
|
||||
It is not necessary to edit any documentation files other than these;
|
||||
all PDF, HTML, and `nroff`-format man page files will be updated
|
||||
automatically from the `docbook` and `XML` files after merging.
|
||||
|
||||
#### <a name="contrib"></a>Contrib code
|
||||
Patches to improve existing documentation are also very welcome!
|
||||
|
||||
The software in the `contrib` directory of the BIND 9 `tar` archive is not
|
||||
formally supported by ISC, but is included for the convenience of users.
|
||||
These are things we consider useful or informative, but are not able to
|
||||
support at the same level as BIND.
|
||||
##### Tests
|
||||
|
||||
`contrib` includes some useful DNS-related open source tools such as `zkt`,
|
||||
`nslint`, and the `idnkit` library for internationalized domain name
|
||||
support; useful scripts such as `nanny.pl` and `mkdane.sh`; performance
|
||||
testers including `queryperf` and `perftcpdns`; and drivers and modules for
|
||||
DLZ.
|
||||
BIND is a large and complex project. We rely heavily on continuous
|
||||
automated testing and cannot merge new code without adequate test coverage.
|
||||
Please see [the 'Testing' section of doc/dev/dev.md](doc/dev/dev.md#testing)
|
||||
for more information.
|
||||
|
||||
If you have code with a BSD-compatible license that you would like us to
|
||||
include in `contrib`, please send it to `bind-suggest@isc.org`, with
|
||||
"`[CONTRIB]`" in the subject header.
|
||||
#### Thanks
|
||||
|
||||
Thank you for your interest in contributing to the ongoing development
|
||||
of BIND.
|
||||
@@ -522,4 +522,3 @@ BIND 9.2.0
|
||||
DNSSEC implementation is still considered experimental. For detailed
|
||||
information about the state of the DNSSEC implementation, see the file
|
||||
doc/misc/dnssec.
|
||||
|
||||
|
||||
+13
-5
@@ -22,7 +22,7 @@ MANPAGES = isc-config.sh.1
|
||||
|
||||
HTMLPAGES = isc-config.sh.html
|
||||
|
||||
MANOBJS = README HISTORY OPTIONS ${MANPAGES} ${HTMLPAGES}
|
||||
MANOBJS = README HISTORY OPTIONS CONTRIBUTING ${MANPAGES} ${HTMLPAGES}
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
@@ -74,7 +74,7 @@ tags:
|
||||
find lib bin -name "*.[ch]" -print | @ETAGS@ -
|
||||
|
||||
test check:
|
||||
@if test -n "`${PERL} ${top_srcdir}/bin/tests/system/testsock.pl 2>&- || echo fail`"; then \
|
||||
@if test -n "`${PERL} ${top_srcdir}/bin/tests/system/testsock.pl 2>/dev/null || echo fail`"; then \
|
||||
echo I: NOTE: The tests were not run because they require that; \
|
||||
echo I: the IP addresses 10.53.0.1 through 10.53.0.8 are configured; \
|
||||
echo I: as alias addresses on the loopback interface. Please run; \
|
||||
@@ -96,15 +96,23 @@ test-force:
|
||||
|
||||
README: README.md
|
||||
${PANDOC} --email-obfuscation=none -s -t html README.md | \
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html > $@
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
HISTORY: HISTORY.md
|
||||
${PANDOC} --email-obfuscation=none -s -t html HISTORY.md | \
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html > $@
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
OPTIONS: OPTIONS.md
|
||||
${PANDOC} --email-obfuscation=none -s -t html OPTIONS.md | \
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html > $@
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
CONTRIBUTING: CONTRIBUTING.md
|
||||
${PANDOC} --email-obfuscation=none -s -t html CONTRIBUTING.md | \
|
||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||
sed -e '$${/^$$/d;}' > $@
|
||||
|
||||
unit::
|
||||
sh ${top_builddir}/unit/unittest.sh
|
||||
|
||||
@@ -19,12 +19,8 @@ Setting Description
|
||||
named-checkzone
|
||||
-DNS_RUN_PID_DIR=0 Create default PID files in ${localstatedir}/run
|
||||
rather than ${localstatedir}/run/named/
|
||||
Increase the maximum number of configurable
|
||||
-DNS_RPZ_MAX_ZONES=64 response policy zones from 32 to 64; this is the
|
||||
highest possible setting
|
||||
Disable the use of inline functions to implement
|
||||
-DISC_BUFFER_USEINLINE=0 the isc_buffer API: this reduces performance but
|
||||
may be useful when debugging
|
||||
-DISC_HEAP_CHECK Test heap consistency after every heap
|
||||
operation; used when debugging
|
||||
|
||||
|
||||
@@ -23,6 +23,5 @@ Some of these settings are:
|
||||
|`-DCHECK_SIBLING=0`|Don't check sibling glue in `named-checkzone`|
|
||||
|`-DCHECK_LOCAL=0`|Don't check out-of-zone addresses in `named-checkzone`|
|
||||
|`-DNS_RUN_PID_DIR=0`|Create default PID files in `${localstatedir}/run` rather than `${localstatedir}/run/named/`|
|
||||
|`-DNS_RPZ_MAX_ZONES=64`|Increase the maximum number of configurable response policy zones from 32 to 64; this is the highest possible setting|
|
||||
|`-DISC_BUFFER_USEINLINE=0`|Disable the use of inline functions to implement the `isc_buffer` API: this reduces performance but may be useful when debugging |
|
||||
|`-DISC_HEAP_CHECK`|Test heap consistency after every heap operation; used when debugging|
|
||||
|
||||
@@ -50,19 +50,21 @@ bind9/releasenotes
|
||||
|
||||
Reporting bugs and getting help
|
||||
|
||||
Please report assertion failure errors and suspected security issues to
|
||||
security-officer@isc.org.
|
||||
To report non-security-sensitive bugs or request new features, you may
|
||||
open an Issue in the BIND 9 project on the ISC GitLab server at https://
|
||||
gitlab.isc.org/isc-projects/bind9.
|
||||
|
||||
General bug reports can be sent to bind9-bugs@isc.org.
|
||||
Please note that, unless you explicitly mark the newly created Issue as
|
||||
"confidential", it will be publicly readable. Please do not include any
|
||||
information in bug reports that you consider to be confidential unless the
|
||||
issue has been marked as such. In particular, if submitting the contents
|
||||
of your configuration file in a non-confidential Issue, it is advisable to
|
||||
obscure key secrets: this can be done automatically by using
|
||||
named-checkconf -px.
|
||||
|
||||
Feature requests can be sent to bind-suggest@isc.org.
|
||||
|
||||
Please note that, while tickets submitted to ISC's ticketing system are
|
||||
not initially publicly readable by default, they can be made publicly
|
||||
acessible afterward. Please do not include information in bug reports that
|
||||
you consider to be confidential. In particular, when sending the contents
|
||||
of your configuration file, it is advisable to obscure key secrets: this
|
||||
can be done automatically by using named-checkconf -px.
|
||||
If the bug you are reporting is a potential security issue, such as an
|
||||
assertion failure or other crash in named, please do NOT use GitLab to
|
||||
report it. Instead, please send mail to security-officer@isc.org.
|
||||
|
||||
Professional support and training for BIND are available from ISC at
|
||||
https://www.isc.org/support.
|
||||
@@ -80,14 +82,20 @@ ISC maintains a public git repository for BIND; details can be found at
|
||||
http://www.isc.org/git/.
|
||||
|
||||
Information for BIND contributors can be found in the following files: -
|
||||
General information: doc/dev/contrib.md - BIND 9 code style: doc/dev/
|
||||
style.md - BIND architecture and developer guide: doc/dev/dev.md
|
||||
General information: CONTRIBUTING.md - BIND 9 code style: doc/dev/style.md
|
||||
- BIND architecture and developer guide: doc/dev/dev.md
|
||||
|
||||
Patches for BIND may be submitted either as Github pull requests or via
|
||||
email. When submitting a patch via email, please prepend the subject
|
||||
header with "[PATCH]" so it will be easier for us to find. If your patch
|
||||
introduces a new feature in BIND, please submit it to bind-suggest@isc.org
|
||||
; if it fixes a bug, please submit it to bind9-bugs@isc.org.
|
||||
Patches for BIND may be submitted as Merge Requests in the ISC GitLab
|
||||
server at at https://gitlab.isc.org/isc-projects/bind9/merge_requests.
|
||||
|
||||
By default, external contributors don't have ability to fork BIND in the
|
||||
GitLab server, but if you wish to contribute code to BIND, you may request
|
||||
permission to do so. Thereafter, you can create git branches and directly
|
||||
submit requests that they be reviewed and merged.
|
||||
|
||||
If you prefer, you may also submit code by opening a GitLab Issue and
|
||||
including your patch as an attachment, preferably generated by git
|
||||
format-patch.
|
||||
|
||||
BIND 9.13 features
|
||||
|
||||
@@ -324,4 +332,3 @@ Acknowledgments
|
||||
(eay@cryptsoft.com)
|
||||
* This product includes software written by Tim Hudson
|
||||
(tjh@cryptsoft.com)
|
||||
|
||||
|
||||
@@ -61,22 +61,24 @@ For up-to-date release notes and errata, see
|
||||
|
||||
### <a name="help"/> Reporting bugs and getting help
|
||||
|
||||
Please report assertion failure errors and suspected security issues to
|
||||
To report non-security-sensitive bugs or request new features, you may
|
||||
open an Issue in the BIND 9 project on the
|
||||
[ISC GitLab server](https://gitlab.isc.org) at
|
||||
[https://gitlab.isc.org/isc-projects/bind9](https://gitlab.isc.org/isc-projects/bind9).
|
||||
|
||||
Please note that, unless you explicitly mark the newly created Issue as
|
||||
"confidential", it will be publicly readable. Please do not include any
|
||||
information in bug reports that you consider to be confidential unless
|
||||
the issue has been marked as such. In particular, if submitting the
|
||||
contents of your configuration file in a non-confidential Issue, it is
|
||||
advisable to obscure key secrets: this can be done automatically by
|
||||
using `named-checkconf -px`.
|
||||
|
||||
If the bug you are reporting is a potential security issue, such as an
|
||||
assertion failure or other crash in `named`, please do *NOT* use GitLab to
|
||||
report it. Instead, please send mail to
|
||||
[security-officer@isc.org](mailto:security-officer@isc.org).
|
||||
|
||||
General bug reports can be sent to
|
||||
[bind9-bugs@isc.org](mailto:bind9-bugs@isc.org).
|
||||
|
||||
Feature requests can be sent to
|
||||
[bind-suggest@isc.org](mailto:bind-suggest@isc.org).
|
||||
|
||||
Please note that, while tickets submitted to ISC's ticketing system
|
||||
are not initially publicly readable by default, they can be made publicly
|
||||
acessible afterward. Please do not include information in bug reports that
|
||||
you consider to be confidential. In particular, when sending the contents of
|
||||
your configuration file, it is advisable to obscure key secrets: this can
|
||||
be done automatically by using `named-checkconf -px`.
|
||||
|
||||
Professional support and training for BIND are available from
|
||||
ISC at [https://www.isc.org/support](https://www.isc.org/support).
|
||||
|
||||
@@ -93,16 +95,24 @@ ISC maintains a public git repository for BIND; details can be found
|
||||
at [http://www.isc.org/git/](http://www.isc.org/git/).
|
||||
|
||||
Information for BIND contributors can be found in the following files:
|
||||
- General information: [doc/dev/contrib.md](doc/dev/contrib.md)
|
||||
- General information: [CONTRIBUTING.md](CONTRIBUTING)
|
||||
- BIND 9 code style: [doc/dev/style.md](doc/dev/style.md)
|
||||
- BIND architecture and developer guide: [doc/dev/dev.md](doc/dev/dev.md)
|
||||
|
||||
Patches for BIND may be submitted either as Github pull requests
|
||||
or via email. When submitting a patch via email, please prepend the
|
||||
subject header with "`[PATCH]`" so it will be easier for us to find.
|
||||
If your patch introduces a new feature in BIND, please submit it to
|
||||
[bind-suggest@isc.org](mailto:bind-suggest@isc.org); if it fixes a bug,
|
||||
please submit it to [bind9-bugs@isc.org](mailto:bind9-bugs@isc.org).
|
||||
Patches for BIND may be submitted as
|
||||
[Merge Requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests)
|
||||
in the [ISC GitLab server](https://gitlab.isc.org) at
|
||||
at [https://gitlab.isc.org/isc-projects/bind9/merge_requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests).
|
||||
|
||||
By default, external contributors don't have ability to fork BIND in the
|
||||
GitLab server, but if you wish to contribute code to BIND, you may request
|
||||
permission to do so. Thereafter, you can create git branches and directly
|
||||
submit requests that they be reviewed and merged.
|
||||
|
||||
If you prefer, you may also submit code by opening a
|
||||
[GitLab Issue](https://gitlab.isc.org/isc-projects/bind9/issues) and
|
||||
including your patch as an attachment, preferably generated by
|
||||
`git format-patch`.
|
||||
|
||||
### <a name="features"/> BIND 9.13 features
|
||||
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: acconfig.h,v 1.53 2008/12/01 23:47:44 tbox Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
/***
|
||||
|
||||
+2
-4
@@ -7,14 +7,12 @@
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
# $Id: Makefile.in,v 1.29 2009/10/05 12:07:08 fdupont Exp $
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
SUBDIRS = named rndc dig delv dnssec tools tests nsupdate \
|
||||
check confgen @NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@
|
||||
SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen \
|
||||
@NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ tests
|
||||
TARGETS =
|
||||
|
||||
@BIND9_MAKE_RULES@
|
||||
|
||||
@@ -18,7 +18,7 @@ VERSION=@BIND9_VERSION@
|
||||
CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \
|
||||
${ISC_INCLUDES} @DST_OPENSSL_INC@
|
||||
|
||||
CDEFINES = @CRYPTO@ -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
|
||||
CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
|
||||
+15
-19
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: check-tool.c,v 1.44 2011/12/22 07:32:39 each Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -99,18 +98,17 @@ isc_boolean_t docheckmx = ISC_FALSE;
|
||||
isc_boolean_t dochecksrv = ISC_FALSE;
|
||||
isc_boolean_t docheckns = ISC_FALSE;
|
||||
#endif
|
||||
unsigned int zone_options = DNS_ZONEOPT_CHECKNS |
|
||||
DNS_ZONEOPT_CHECKMX |
|
||||
DNS_ZONEOPT_MANYERRORS |
|
||||
DNS_ZONEOPT_CHECKNAMES |
|
||||
DNS_ZONEOPT_CHECKINTEGRITY |
|
||||
dns_zoneopt_t zone_options = DNS_ZONEOPT_CHECKNS |
|
||||
DNS_ZONEOPT_CHECKMX |
|
||||
DNS_ZONEOPT_MANYERRORS |
|
||||
DNS_ZONEOPT_CHECKNAMES |
|
||||
DNS_ZONEOPT_CHECKINTEGRITY |
|
||||
#if CHECK_SIBLING
|
||||
DNS_ZONEOPT_CHECKSIBLING |
|
||||
DNS_ZONEOPT_CHECKSIBLING |
|
||||
#endif
|
||||
DNS_ZONEOPT_CHECKWILDCARD |
|
||||
DNS_ZONEOPT_WARNMXCNAME |
|
||||
DNS_ZONEOPT_WARNSRVCNAME;
|
||||
unsigned int zone_options2 = 0;
|
||||
DNS_ZONEOPT_CHECKWILDCARD |
|
||||
DNS_ZONEOPT_WARNMXCNAME |
|
||||
DNS_ZONEOPT_WARNSRVCNAME;
|
||||
|
||||
/*
|
||||
* This needs to match the list in bin/named/log.c.
|
||||
@@ -590,8 +588,7 @@ check_ttls(dns_zone_t *zone, dns_ttl_t maxttl) {
|
||||
dns_rdataset_t rdataset;
|
||||
dns_fixedname_t fname;
|
||||
dns_name_t *name;
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
name = dns_fixedname_initname(&fname);
|
||||
dns_rdataset_init(&rdataset);
|
||||
|
||||
CHECK(dns_zone_getdb(zone, &db));
|
||||
@@ -686,12 +683,12 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
||||
|
||||
isc_buffer_constinit(&buffer, zonename, strlen(zonename));
|
||||
isc_buffer_add(&buffer, strlen(zonename));
|
||||
dns_fixedname_init(&fixorigin);
|
||||
origin = dns_fixedname_name(&fixorigin);
|
||||
origin = dns_fixedname_initname(&fixorigin);
|
||||
CHECK(dns_name_fromtext(origin, &buffer, dns_rootname, 0, NULL));
|
||||
CHECK(dns_zone_setorigin(zone, origin));
|
||||
CHECK(dns_zone_setdbtype(zone, 1, (const char * const *) dbtype));
|
||||
CHECK(dns_zone_setfile2(zone, filename, fileformat));
|
||||
CHECK(dns_zone_setfile(zone, filename, fileformat,
|
||||
&dns_master_style_default));
|
||||
if (journal != NULL)
|
||||
CHECK(dns_zone_setjournal(zone, journal));
|
||||
|
||||
@@ -701,7 +698,6 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
||||
|
||||
dns_zone_setclass(zone, rdclass);
|
||||
dns_zone_setoption(zone, zone_options, ISC_TRUE);
|
||||
dns_zone_setoption2(zone, zone_options2, ISC_TRUE);
|
||||
dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge);
|
||||
|
||||
dns_zone_setmaxttl(zone, maxttl);
|
||||
@@ -764,8 +760,8 @@ dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
|
||||
}
|
||||
}
|
||||
|
||||
result = dns_zone_dumptostream3(zone, output, fileformat, style,
|
||||
rawversion);
|
||||
result = dns_zone_dumptostream(zone, output, fileformat, style,
|
||||
rawversion);
|
||||
if (output != stdout)
|
||||
(void)isc_stdio_close(output);
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: check-tool.h,v 1.18 2011/12/09 23:47:02 tbox Exp $ */
|
||||
|
||||
#ifndef CHECK_TOOL_H
|
||||
#define CHECK_TOOL_H
|
||||
@@ -22,6 +21,7 @@
|
||||
|
||||
#include <dns/masterdump.h>
|
||||
#include <dns/types.h>
|
||||
#include <dns/zone.h>
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
@@ -49,8 +49,7 @@ extern isc_boolean_t nomerge;
|
||||
extern isc_boolean_t docheckmx;
|
||||
extern isc_boolean_t docheckns;
|
||||
extern isc_boolean_t dochecksrv;
|
||||
extern unsigned int zone_options;
|
||||
extern unsigned int zone_options2;
|
||||
extern dns_zoneopt_t zone_options;
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -136,5 +136,5 @@ BIND 9 Administrator Reference Manual\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2000-2002, 2004, 2005, 2007, 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: named-checkconf.c,v 1.56 2011/03/12 04:59:46 tbox Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -21,7 +20,6 @@
|
||||
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/dir.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
@@ -408,7 +406,7 @@ configure_zone(const char *vclass, const char *view,
|
||||
obj = NULL;
|
||||
if (get_maps(maps, "max-zone-ttl", &obj)) {
|
||||
maxttl = cfg_obj_asuint32(obj);
|
||||
zone_options2 |= DNS_ZONEOPT2_CHECKTTL;
|
||||
zone_options |= DNS_ZONEOPT_CHECKTTL;
|
||||
}
|
||||
|
||||
result = load_zone(mctx, zname, zfile, masterformat,
|
||||
@@ -539,7 +537,6 @@ main(int argc, char **argv) {
|
||||
isc_mem_t *mctx = NULL;
|
||||
isc_result_t result;
|
||||
int exit_status = 0;
|
||||
isc_entropy_t *ectx = NULL;
|
||||
isc_boolean_t load_zones = ISC_FALSE;
|
||||
isc_boolean_t list_zones = ISC_FALSE;
|
||||
isc_boolean_t print = ISC_FALSE;
|
||||
@@ -655,10 +652,6 @@ main(int argc, char **argv) {
|
||||
|
||||
RUNTIME_CHECK(setup_logging(mctx, stdout, &logc) == ISC_R_SUCCESS);
|
||||
|
||||
RUNTIME_CHECK(isc_entropy_create(mctx, &ectx) == ISC_R_SUCCESS);
|
||||
RUNTIME_CHECK(isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE)
|
||||
== ISC_R_SUCCESS);
|
||||
|
||||
dns_result_register();
|
||||
|
||||
RUNTIME_CHECK(cfg_parser_create(mctx, logc, &parser) == ISC_R_SUCCESS);
|
||||
@@ -689,9 +682,6 @@ main(int argc, char **argv) {
|
||||
|
||||
isc_log_destroy(&logc);
|
||||
|
||||
isc_hash_destroy();
|
||||
isc_entropy_detach(&ectx);
|
||||
|
||||
isc_mem_destroy(&mctx);
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2000-2002, 2004-2007, 2009-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -325,5 +325,5 @@ BIND 9 Administrator Reference Manual\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2000-2002, 2004-2007, 2009-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2000-2002, 2004-2007, 2009-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: named-checkzone.c,v 1.65.32.2 2012/02/07 02:45:21 each Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -20,7 +19,6 @@
|
||||
#include <isc/app.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/dir.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
@@ -47,7 +45,6 @@
|
||||
|
||||
static int quiet = 0;
|
||||
static isc_mem_t *mctx = NULL;
|
||||
static isc_entropy_t *ectx = NULL;
|
||||
dns_zone_t *zone = NULL;
|
||||
dns_zonetype_t zonetype = dns_zone_master;
|
||||
static int dumpzone = 0;
|
||||
@@ -260,7 +257,7 @@ main(int argc, char **argv) {
|
||||
break;
|
||||
|
||||
case 'l':
|
||||
zone_options2 |= DNS_ZONEOPT2_CHECKTTL;
|
||||
zone_options |= DNS_ZONEOPT_CHECKTTL;
|
||||
endp = NULL;
|
||||
maxttl = strtol(isc_commandline_argument, &endp, 0);
|
||||
if (*endp != '\0') {
|
||||
@@ -522,9 +519,6 @@ main(int argc, char **argv) {
|
||||
if (!quiet)
|
||||
RUNTIME_CHECK(setup_logging(mctx, errout, &lctx)
|
||||
== ISC_R_SUCCESS);
|
||||
RUNTIME_CHECK(isc_entropy_create(mctx, &ectx) == ISC_R_SUCCESS);
|
||||
RUNTIME_CHECK(isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE)
|
||||
== ISC_R_SUCCESS);
|
||||
|
||||
dns_result_register();
|
||||
|
||||
@@ -556,8 +550,6 @@ main(int argc, char **argv) {
|
||||
destroy();
|
||||
if (lctx != NULL)
|
||||
isc_log_destroy(&lctx);
|
||||
isc_hash_destroy();
|
||||
isc_entropy_detach(&ectx);
|
||||
isc_mem_destroy(&mctx);
|
||||
#ifdef _WIN32
|
||||
DestroySockets();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2000-2002, 2004-2007, 2009-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -39,7 +39,7 @@
|
||||
ddns-confgen \- ddns key generation tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBtsig\-keygen\fR\ 'u
|
||||
\fBtsig\-keygen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-h\fR] [\fB\-r\ \fR\fB\fIrandomfile\fR\fR] [name]
|
||||
\fBtsig\-keygen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-h\fR] [name]
|
||||
.HP \w'\fBddns\-confgen\fR\ 'u
|
||||
\fBddns\-confgen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkeyname\fR\fR] [\fB\-q\fR] [\fB\-r\ \fR\fB\fIrandomfile\fR\fR] [\-s\ \fIname\fR | \-z\ \fIzone\fR]
|
||||
.SH "DESCRIPTION"
|
||||
@@ -109,17 +109,6 @@ only\&.) Quiet mode: Print only the key, with no explanatory text or usage examp
|
||||
\fBtsig\-keygen\fR\&.
|
||||
.RE
|
||||
.PP
|
||||
\-r \fIrandomfile\fR
|
||||
.RS 4
|
||||
Specifies a source of random data for generating the authorization\&. If the operating system does not provide a
|
||||
/dev/random
|
||||
or equivalent device, the default source of randomness is keyboard input\&.
|
||||
randomdev
|
||||
specifies the name of a character device or file containing random data to be used instead of the default\&. The special value
|
||||
keyboard
|
||||
indicates that keyboard input should be used\&.
|
||||
.RE
|
||||
.PP
|
||||
\-s \fIname\fR
|
||||
.RS 4
|
||||
(\fBddns\-confgen\fR
|
||||
@@ -155,5 +144,5 @@ BIND 9 Administrator Reference Manual\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#include <isc/base64.h>
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/keyboard.h>
|
||||
#include <isc/mem.h>
|
||||
@@ -37,7 +36,7 @@
|
||||
#include <isc/time.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -67,10 +66,9 @@ usage(int status) {
|
||||
if (progmode == progmode_confgen) {
|
||||
fprintf(stderr, "\
|
||||
Usage:\n\
|
||||
%s [-a alg] [-k keyname] [-r randomfile] [-q] [-s name | -z zone]\n\
|
||||
%s [-a alg] [-k keyname] [-q] [-s name | -z zone]\n\
|
||||
-a alg: algorithm (default hmac-sha256)\n\
|
||||
-k keyname: name of the key as it will be used in named.conf\n\
|
||||
-r randomfile: source of random data (use \"keyboard\" for key timing)\n\
|
||||
-s name: domain name to be updated using the created key\n\
|
||||
-z zone: name of the zone as it will be used in named.conf\n\
|
||||
-q: quiet mode: print the key, with no explanatory text\n",
|
||||
@@ -78,9 +76,8 @@ Usage:\n\
|
||||
} else {
|
||||
fprintf(stderr, "\
|
||||
Usage:\n\
|
||||
%s [-a alg] [-r randomfile] [keyname]\n\
|
||||
-a alg: algorithm (default hmac-sha256)\n\
|
||||
-r randomfile: source of random data (use \"keyboard\" for key timing)\n",
|
||||
%s [-a alg] [keyname]\n\
|
||||
-a alg: algorithm (default hmac-sha256)\n\n",
|
||||
progname);
|
||||
}
|
||||
|
||||
@@ -95,7 +92,6 @@ main(int argc, char **argv) {
|
||||
isc_buffer_t key_txtbuffer;
|
||||
char key_txtsecret[256];
|
||||
isc_mem_t *mctx = NULL;
|
||||
const char *randomfile = NULL;
|
||||
const char *keyname = NULL;
|
||||
const char *zone = NULL;
|
||||
const char *self_domain = NULL;
|
||||
@@ -106,7 +102,7 @@ main(int argc, char **argv) {
|
||||
int len = 0;
|
||||
int ch;
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
@@ -168,7 +164,7 @@ main(int argc, char **argv) {
|
||||
usage(1);
|
||||
break;
|
||||
case 'r':
|
||||
randomfile = isc_commandline_argument;
|
||||
fatal("The -r option has been deprecated.");
|
||||
break;
|
||||
case 's':
|
||||
if (progmode == progmode_confgen)
|
||||
@@ -235,7 +231,7 @@ main(int argc, char **argv) {
|
||||
|
||||
isc_buffer_init(&key_txtbuffer, &key_txtsecret, sizeof(key_txtsecret));
|
||||
|
||||
generate_key(mctx, randomfile, alg, keysize, &key_txtbuffer);
|
||||
generate_key(mctx, alg, keysize, &key_txtbuffer);
|
||||
|
||||
|
||||
if (!quiet)
|
||||
|
||||
@@ -46,7 +46,6 @@
|
||||
<command>tsig-keygen</command>
|
||||
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">randomfile</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat">name</arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis sepchar=" ">
|
||||
@@ -157,23 +156,6 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-r <replaceable class="parameter">randomfile</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies a source of random data for generating the
|
||||
authorization. If the operating system does not provide a
|
||||
<filename>/dev/random</filename> or equivalent device, the
|
||||
default source of randomness is keyboard input.
|
||||
<filename>randomdev</filename> specifies the name of a
|
||||
character device or file containing random data to be used
|
||||
instead of the default. The special value
|
||||
<filename>keyboard</filename> indicates that keyboard input
|
||||
should be used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-s <replaceable class="parameter">name</replaceable></term>
|
||||
<listitem>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -35,7 +35,6 @@
|
||||
<code class="command">tsig-keygen</code>
|
||||
[<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>]
|
||||
[<code class="option">-h</code>]
|
||||
[<code class="option">-r <em class="replaceable"><code>randomfile</code></em></code>]
|
||||
[name]
|
||||
</p></div>
|
||||
<div class="cmdsynopsis"><p>
|
||||
@@ -136,20 +135,6 @@
|
||||
This is essentially identical to <span class="command"><strong>tsig-keygen</strong></span>.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-r <em class="replaceable"><code>randomfile</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies a source of random data for generating the
|
||||
authorization. If the operating system does not provide a
|
||||
<code class="filename">/dev/random</code> or equivalent device, the
|
||||
default source of randomness is keyboard input.
|
||||
<code class="filename">randomdev</code> specifies the name of a
|
||||
character device or file containing random data to be used
|
||||
instead of the default. The special value
|
||||
<code class="filename">keyboard</code> indicates that keyboard input
|
||||
should be used.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-s <em class="replaceable"><code>name</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: os.h,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
||||
+7
-41
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: keygen.c,v 1.4 2009/11/12 14:02:38 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -20,7 +19,6 @@
|
||||
|
||||
#include <isc/base64.h>
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/keyboard.h>
|
||||
#include <isc/mem.h>
|
||||
@@ -114,17 +112,12 @@ alg_bits(dns_secalg_t alg) {
|
||||
}
|
||||
|
||||
/*%
|
||||
* Generate a key of size 'keysize' using entropy source 'randomfile',
|
||||
* and place it in 'key_txtbuffer'
|
||||
* Generate a key of size 'keysize' and place it in 'key_txtbuffer'
|
||||
*/
|
||||
void
|
||||
generate_key(isc_mem_t *mctx, const char *randomfile, dns_secalg_t alg,
|
||||
int keysize, isc_buffer_t *key_txtbuffer) {
|
||||
generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
|
||||
isc_buffer_t *key_txtbuffer) {
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
isc_entropysource_t *entropy_source = NULL;
|
||||
int open_keyboard = ISC_ENTROPY_KEYBOARDMAYBE;
|
||||
int entropy_flags = 0;
|
||||
isc_entropy_t *ectx = NULL;
|
||||
isc_buffer_t key_rawbuffer;
|
||||
isc_region_t key_rawregion;
|
||||
char key_rawsecret[64];
|
||||
@@ -151,31 +144,12 @@ generate_key(isc_mem_t *mctx, const char *randomfile, dns_secalg_t alg,
|
||||
fatal("unsupported algorithm %d\n", alg);
|
||||
}
|
||||
|
||||
|
||||
DO("create entropy context", isc_entropy_create(mctx, &ectx));
|
||||
|
||||
#ifdef ISC_PLATFORM_CRYPTORANDOM
|
||||
if (randomfile == NULL) {
|
||||
isc_entropy_usehook(ectx, ISC_TRUE);
|
||||
}
|
||||
#endif
|
||||
if (randomfile != NULL && strcmp(randomfile, "keyboard") == 0) {
|
||||
randomfile = NULL;
|
||||
open_keyboard = ISC_ENTROPY_KEYBOARDYES;
|
||||
}
|
||||
DO("start entropy source", isc_entropy_usebestsource(ectx,
|
||||
&entropy_source,
|
||||
randomfile,
|
||||
open_keyboard));
|
||||
|
||||
entropy_flags = ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY;
|
||||
|
||||
DO("initialize dst library", dst_lib_init(mctx, ectx, entropy_flags));
|
||||
DO("initialize dst library", dst_lib_init(mctx, NULL));
|
||||
|
||||
DO("generate key", dst_key_generate(dns_rootname, alg,
|
||||
keysize, 0, 0,
|
||||
DNS_KEYPROTO_ANY,
|
||||
dns_rdataclass_in, mctx, &key));
|
||||
keysize, 0, 0, DNS_KEYPROTO_ANY,
|
||||
dns_rdataclass_in, mctx, &key,
|
||||
NULL));
|
||||
|
||||
isc_buffer_init(&key_rawbuffer, &key_rawsecret, sizeof(key_rawsecret));
|
||||
|
||||
@@ -186,17 +160,9 @@ generate_key(isc_mem_t *mctx, const char *randomfile, dns_secalg_t alg,
|
||||
DO("bsse64 encode secret", isc_base64_totext(&key_rawregion, -1, "",
|
||||
key_txtbuffer));
|
||||
|
||||
/*
|
||||
* Shut down the entropy source now so the "stop typing" message
|
||||
* does not muck with the output.
|
||||
*/
|
||||
if (entropy_source != NULL)
|
||||
isc_entropy_destroysource(&entropy_source);
|
||||
|
||||
if (key != NULL)
|
||||
dst_key_free(&key);
|
||||
|
||||
isc_entropy_detach(&ectx);
|
||||
dst_lib_destroy();
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: keygen.h,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
|
||||
|
||||
#ifndef RNDC_KEYGEN_H
|
||||
#define RNDC_KEYGEN_H 1
|
||||
@@ -20,8 +19,8 @@
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
void generate_key(isc_mem_t *mctx, const char *randomfile, dns_secalg_t alg,
|
||||
int keysize, isc_buffer_t *key_txtbuffer);
|
||||
void generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
|
||||
isc_buffer_t *key_txtbuffer);
|
||||
|
||||
void write_key_file(const char *keyfile, const char *user,
|
||||
const char *keyname, isc_buffer_t *secret,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -39,7 +39,7 @@
|
||||
rndc-confgen \- rndc key generation tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBrndc\-confgen\fR\ 'u
|
||||
\fBrndc\-confgen\fR [\fB\-a\fR] [\fB\-A\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-c\ \fR\fB\fIkeyfile\fR\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkeyname\fR\fR] [\fB\-p\ \fR\fB\fIport\fR\fR] [\fB\-r\ \fR\fB\fIrandomfile\fR\fR] [\fB\-s\ \fR\fB\fIaddress\fR\fR] [\fB\-t\ \fR\fB\fIchrootdir\fR\fR] [\fB\-u\ \fR\fB\fIuser\fR\fR]
|
||||
\fBrndc\-confgen\fR [\fB\-a\fR] [\fB\-A\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-c\ \fR\fB\fIkeyfile\fR\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkeyname\fR\fR] [\fB\-p\ \fR\fB\fIport\fR\fR] [\fB\-s\ \fR\fB\fIaddress\fR\fR] [\fB\-t\ \fR\fB\fIchrootdir\fR\fR] [\fB\-u\ \fR\fB\fIuser\fR\fR]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBrndc\-confgen\fR
|
||||
@@ -147,17 +147,6 @@ listens for connections from
|
||||
\fBrndc\fR\&. The default is 953\&.
|
||||
.RE
|
||||
.PP
|
||||
\-r \fIrandomfile\fR
|
||||
.RS 4
|
||||
Specifies a source of random data for generating the authorization\&. If the operating system does not provide a
|
||||
/dev/random
|
||||
or equivalent device, the default source of randomness is keyboard input\&.
|
||||
randomdev
|
||||
specifies the name of a character device or file containing random data to be used instead of the default\&. The special value
|
||||
keyboard
|
||||
indicates that keyboard input should be used\&.
|
||||
.RE
|
||||
.PP
|
||||
\-s \fIaddress\fR
|
||||
.RS 4
|
||||
Specifies the IP address where
|
||||
@@ -217,5 +206,5 @@ BIND 9 Administrator Reference Manual\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2001, 2003-2005, 2007, 2009, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2001, 2003-2005, 2007, 2009, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <isc/base64.h>
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/keyboard.h>
|
||||
#include <isc/mem.h>
|
||||
@@ -70,7 +69,7 @@ usage(int status) {
|
||||
|
||||
fprintf(stderr, "\
|
||||
Usage:\n\
|
||||
%s [-a] [-b bits] [-c keyfile] [-k keyname] [-p port] [-r randomfile] \
|
||||
%s [-a] [-b bits] [-c keyfile] [-k keyname] [-p port] \
|
||||
[-s addr] [-t chrootdir] [-u user]\n\
|
||||
-a: generate just the key clause and write it to keyfile (%s)\n\
|
||||
-A alg: algorithm (default hmac-sha256)\n\
|
||||
@@ -78,7 +77,6 @@ Usage:\n\
|
||||
-c keyfile: specify an alternate key file (requires -a)\n\
|
||||
-k keyname: the name as it will be used in named.conf and rndc.conf\n\
|
||||
-p port: the port named will listen on and rndc will connect to\n\
|
||||
-r randomfile: source of random data (use \"keyboard\" for key timing)\n\
|
||||
-s addr: the address to which rndc should connect\n\
|
||||
-t chrootdir: write a keyfile in chrootdir as well (requires -a)\n\
|
||||
-u user: set the keyfile owner to \"user\" (requires -a)\n",
|
||||
@@ -95,7 +93,6 @@ main(int argc, char **argv) {
|
||||
isc_mem_t *mctx = NULL;
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
const char *keyname = NULL;
|
||||
const char *randomfile = NULL;
|
||||
const char *serveraddr = NULL;
|
||||
dns_secalg_t alg;
|
||||
const char *algname;
|
||||
@@ -165,7 +162,7 @@ main(int argc, char **argv) {
|
||||
isc_commandline_argument);
|
||||
break;
|
||||
case 'r':
|
||||
randomfile = isc_commandline_argument;
|
||||
fatal("The -r option has been deprecated.");
|
||||
break;
|
||||
case 's':
|
||||
serveraddr = isc_commandline_argument;
|
||||
@@ -217,7 +214,7 @@ main(int argc, char **argv) {
|
||||
DO("create memory context", isc_mem_create(0, 0, &mctx));
|
||||
isc_buffer_init(&key_txtbuffer, &key_txtsecret, sizeof(key_txtsecret));
|
||||
|
||||
generate_key(mctx, randomfile, alg, keysize, &key_txtbuffer);
|
||||
generate_key(mctx, alg, keysize, &key_txtbuffer);
|
||||
|
||||
if (keyonly) {
|
||||
write_key_file(keyfile, chrootdir == NULL ? user : NULL,
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-k <replaceable class="parameter">keyname</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-p <replaceable class="parameter">port</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">randomfile</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">address</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">chrootdir</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-u <replaceable class="parameter">user</replaceable></option></arg>
|
||||
@@ -191,24 +190,6 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-r <replaceable class="parameter">randomfile</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies a source of random data for generating the
|
||||
authorization. If the operating
|
||||
system does not provide a <filename>/dev/random</filename>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <filename>randomdev</filename>
|
||||
specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<filename>keyboard</filename> indicates that keyboard
|
||||
input should be used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-s <replaceable class="parameter">address</replaceable></term>
|
||||
<listitem>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -40,7 +40,6 @@
|
||||
[<code class="option">-h</code>]
|
||||
[<code class="option">-k <em class="replaceable"><code>keyname</code></em></code>]
|
||||
[<code class="option">-p <em class="replaceable"><code>port</code></em></code>]
|
||||
[<code class="option">-r <em class="replaceable"><code>randomfile</code></em></code>]
|
||||
[<code class="option">-s <em class="replaceable"><code>address</code></em></code>]
|
||||
[<code class="option">-t <em class="replaceable"><code>chrootdir</code></em></code>]
|
||||
[<code class="option">-u <em class="replaceable"><code>user</code></em></code>]
|
||||
@@ -154,21 +153,6 @@
|
||||
The default is 953.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-r <em class="replaceable"><code>randomfile</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies a source of random data for generating the
|
||||
authorization. If the operating
|
||||
system does not provide a <code class="filename">/dev/random</code>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <code class="filename">randomdev</code>
|
||||
specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<code class="filename">keyboard</code> indicates that keyboard
|
||||
input should be used.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-s <em class="replaceable"><code>address</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
# $Id: Makefile.in,v 1.3 2009/06/11 23:47:55 tbox Exp $
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: os.c,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: util.c,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: util.h,v 1.4 2009/09/29 15:06:05 fdupont Exp $ */
|
||||
|
||||
#ifndef RNDC_UTIL_H
|
||||
#define RNDC_UTIL_H 1
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: os.c,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ VERSION=@BIND9_VERSION@
|
||||
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${ISC_INCLUDES} \
|
||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @DST_OPENSSL_INC@
|
||||
|
||||
CDEFINES = @CRYPTO@ -DVERSION=\"${VERSION}\" \
|
||||
CDEFINES = -DVERSION=\"${VERSION}\" \
|
||||
-DSYSCONFDIR=\"${sysconfdir}\"
|
||||
CWARNINGS =
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -437,5 +437,5 @@ RFC5155\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
+21
-35
@@ -521,17 +521,17 @@ setup_style(dns_master_style_t **stylep) {
|
||||
}
|
||||
|
||||
if (multiline || (nottl && noclass))
|
||||
result = dns_master_stylecreate2(&style, styleflags,
|
||||
24, 24, 24, 32, 80, 8,
|
||||
splitwidth, mctx);
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
24, 24, 24, 32, 80, 8,
|
||||
splitwidth, mctx);
|
||||
else if (nottl || noclass)
|
||||
result = dns_master_stylecreate2(&style, styleflags,
|
||||
24, 24, 32, 40, 80, 8,
|
||||
splitwidth, mctx);
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
24, 24, 32, 40, 80, 8,
|
||||
splitwidth, mctx);
|
||||
else
|
||||
result = dns_master_stylecreate2(&style, styleflags,
|
||||
24, 32, 40, 48, 80, 8,
|
||||
splitwidth, mctx);
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
24, 32, 40, 48, 80, 8,
|
||||
splitwidth, mctx);
|
||||
|
||||
if (result == ISC_R_SUCCESS)
|
||||
*stylep = style;
|
||||
@@ -550,8 +550,7 @@ convert_name(dns_fixedname_t *fn, dns_name_t **name, const char *text) {
|
||||
|
||||
isc_buffer_constinit(&b, text, len);
|
||||
isc_buffer_add(&b, len);
|
||||
dns_fixedname_init(fn);
|
||||
n = dns_fixedname_name(fn);
|
||||
n = dns_fixedname_initname(fn);
|
||||
|
||||
result = dns_name_fromtext(n, &b, dns_rootname, 0, NULL);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
@@ -944,18 +943,6 @@ cleanup:
|
||||
return (result);
|
||||
}
|
||||
|
||||
static char *
|
||||
next_token(char **stringp, const char *delim) {
|
||||
char *res;
|
||||
|
||||
do {
|
||||
res = strsep(stringp, delim);
|
||||
if (res == NULL)
|
||||
break;
|
||||
} while (*res == '\0');
|
||||
return (res);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
parse_uint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
|
||||
const char *desc) {
|
||||
@@ -975,23 +962,23 @@ parse_uint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
|
||||
static void
|
||||
plus_option(char *option) {
|
||||
isc_result_t result;
|
||||
char option_store[256];
|
||||
char *cmd, *value, *ptr;
|
||||
char *cmd, *value, *last = NULL;
|
||||
isc_boolean_t state = ISC_TRUE;
|
||||
|
||||
strlcpy(option_store, option, sizeof(option_store));
|
||||
ptr = option_store;
|
||||
cmd = next_token(&ptr,"=");
|
||||
INSIST(option != NULL);
|
||||
|
||||
cmd = strtok_r(option, "=", &last);
|
||||
if (cmd == NULL) {
|
||||
printf(";; Invalid option %s\n", option_store);
|
||||
printf(";; Invalid option %s\n", option);
|
||||
return;
|
||||
}
|
||||
value = ptr;
|
||||
if (strncasecmp(cmd, "no", 2)==0) {
|
||||
cmd += 2;
|
||||
state = ISC_FALSE;
|
||||
}
|
||||
|
||||
value = strtok_r(NULL, "\0", &last);
|
||||
|
||||
#define FULLCHECK(A) \
|
||||
do { \
|
||||
size_t _l = strlen(cmd); \
|
||||
@@ -1538,9 +1525,8 @@ get_reverse(char *reverse, size_t len, char *value, isc_boolean_t strict) {
|
||||
dns_name_t *name;
|
||||
unsigned int options = 0;
|
||||
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
result = dns_byaddr_createptrname2(&addr, options, name);
|
||||
name = dns_fixedname_initname(&fname);
|
||||
result = dns_byaddr_createptrname(&addr, options, name);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
dns_name_format(name, reverse, (unsigned int)len);
|
||||
@@ -1624,8 +1610,8 @@ main(int argc, char *argv[]) {
|
||||
|
||||
/* Create client */
|
||||
clopt = DNS_CLIENTCREATEOPT_USECACHE;
|
||||
result = dns_client_createx2(mctx, actx, taskmgr, socketmgr, timermgr,
|
||||
clopt, &client, srcaddr4, srcaddr6);
|
||||
result = dns_client_createx(mctx, actx, taskmgr, socketmgr, timermgr,
|
||||
clopt, &client, srcaddr4, srcaddr6);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
delv_log(ISC_LOG_ERROR, "dns_client_create: %s",
|
||||
isc_result_totext(result));
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
||||
+4
-4
@@ -19,9 +19,9 @@ READLINE_LIB = @READLINE_LIB@
|
||||
|
||||
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \
|
||||
${BIND9_INCLUDES} ${ISC_INCLUDES} \
|
||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @DST_OPENSSL_INC@
|
||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @DST_OPENSSL_INC@
|
||||
|
||||
CDEFINES = -DVERSION=\"${VERSION}\" @CRYPTO@
|
||||
CDEFINES = -DVERSION=\"${VERSION}\"
|
||||
CWARNINGS =
|
||||
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
@@ -41,10 +41,10 @@ DEPLIBS = ${DNSDEPLIBS} ${IRSDEPLIBS} ${BIND9DEPLIBS} \
|
||||
${ISCDEPLIBS} ${ISCCFGDEPLIBS}
|
||||
|
||||
LIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
|
||||
${ISCLIBS} @IDNLIBS@ @LIBS@
|
||||
${ISCLIBS} @LIBIDN2_LIBS@ @LIBS@
|
||||
|
||||
NOSYMLIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
|
||||
${ISCNOSYMLIBS} @IDNLIBS@ @LIBS@
|
||||
${ISCNOSYMLIBS} @LIBIDN2_LIBS@ @LIBS@
|
||||
|
||||
SUBDIRS =
|
||||
|
||||
|
||||
+25
-9
@@ -176,7 +176,7 @@ using the command\-line interface\&.
|
||||
.PP
|
||||
\-i
|
||||
.RS 4
|
||||
Do reverse IPv6 lookups using the obsolete RFC1886 IP6\&.INT domain, which is no longer in use\&. Obsolete bit string label queries (RFC2874) are not attempted\&.
|
||||
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6\&.INT domain, which is no longer in use\&. Obsolete bit string label queries (RFC 2874) are not attempted\&.
|
||||
.RE
|
||||
.PP
|
||||
\-k \fIkeyfile\fR
|
||||
@@ -210,13 +210,15 @@ from other arguments\&.
|
||||
.PP
|
||||
\-t \fItype\fR
|
||||
.RS 4
|
||||
The resource record type to query\&. It can be any valid query type which is supported in BIND 9\&. The default query type is "A", unless the
|
||||
The resource record type to query\&. It can be any valid query type\&. If it is a resource record type supported in BIND 9, it can be given by the type mnemonic (such as "NS" or "AAAA")\&. The default query type is "A", unless the
|
||||
\fB\-x\fR
|
||||
option is supplied to indicate a reverse lookup\&. A zone transfer can be requested by specifying a type of AXFR\&. When an incremental zone transfer (IXFR) is required, set the
|
||||
\fItype\fR
|
||||
to
|
||||
ixfr=N\&. The incremental zone transfer will contain the changes made to the zone since the serial number in the zone\*(Aqs SOA record was
|
||||
\fIN\fR\&.
|
||||
.sp
|
||||
All resource record types can be expressed as "TYPEnn", where "nn" is the number of the type\&. If the resource record type is not supported in BIND 9, the result will be displayed as described in RFC 3597\&.
|
||||
.RE
|
||||
.PP
|
||||
\-u
|
||||
@@ -464,6 +466,11 @@ Show [or do not show] the IP address and port number that supplied the answer wh
|
||||
option is enabled\&. If short form answers are requested, the default is not to show the source address and port number of the server that provided the answer\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]idnin\fR
|
||||
.RS 4
|
||||
Process [do not process] IDN domain names on input\&. This requires IDN SUPPORT to have been enabled at compile time\&. The default is to process IDN input\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]idnout\fR
|
||||
.RS 4
|
||||
Convert [do not convert] puny code on output\&. This requires IDN SUPPORT to have been enabled at compile time\&. The default is to convert output\&.
|
||||
@@ -525,7 +532,7 @@ Include an EDNS name server ID request when sending a query\&.
|
||||
.RS 4
|
||||
When this option is set,
|
||||
\fBdig\fR
|
||||
attempts to find the authoritative name servers for the zone containing the name being looked up and display the SOA record that each name server has for the zone\&.
|
||||
attempts to find the authoritative name servers for the zone containing the name being looked up and display the SOA record that each name server has for the zone\&. Addresses of servers that that did not respond are also printed\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]onesoa\fR
|
||||
@@ -557,6 +564,11 @@ Print [do not print] the query as it is sent\&. By default, the query is not pri
|
||||
Print [do not print] the question section of a query when an answer is returned\&. The default is to print the question section as a comment\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]raflag\fR
|
||||
.RS 4
|
||||
Set [do not set] the RA (Recursion Available) bit in the query\&. The default is +noraflag\&. This bit should be ignored by the server for QUERY\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]rdflag\fR
|
||||
.RS 4
|
||||
A synonym for
|
||||
@@ -646,6 +658,11 @@ for short, sends an EDNS CLIENT\-SUBNET option with an empty address and a sourc
|
||||
be used when resolving this query\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]tcflag\fR
|
||||
.RS 4
|
||||
Set [do not set] the TC (TrunCation) bit in the query\&. The default is +notcflag\&. This bit should be ignored by the server for QUERY\&.
|
||||
.RE
|
||||
.PP
|
||||
\fB+[no]tcp\fR
|
||||
.RS 4
|
||||
Use [do not use] TCP when querying name servers\&. The default behavior is to use UDP unless a type
|
||||
@@ -775,11 +792,10 @@ If
|
||||
\fBdig\fR
|
||||
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names\&.
|
||||
\fBdig\fR
|
||||
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, defines the
|
||||
\fBIDN_DISABLE\fR
|
||||
environment variable\&. The IDN support is disabled if the variable is set when
|
||||
\fBdig\fR
|
||||
runs\&.
|
||||
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, use parameters
|
||||
\fI+noidnin\fR
|
||||
and
|
||||
\fI+noidnout\fR\&.
|
||||
.SH "FILES"
|
||||
.PP
|
||||
/etc/resolv\&.conf
|
||||
@@ -791,7 +807,7 @@ ${HOME}/\&.digrc
|
||||
\fBhost\fR(1),
|
||||
\fBnamed\fR(8),
|
||||
\fBdnssec-keygen\fR(8),
|
||||
RFC1035\&.
|
||||
RFC 1035\&.
|
||||
.SH "BUGS"
|
||||
.PP
|
||||
There are probably too many query options\&.
|
||||
|
||||
+102
-85
@@ -190,7 +190,8 @@ help(void) {
|
||||
" +[no]fail (Don't try next server on SERVFAIL)\n"
|
||||
" +[no]header-only (Send query without a question section)\n"
|
||||
" +[no]identify (ID responders in short answers)\n"
|
||||
" +[no]idnout (convert IDN response)\n"
|
||||
" +[no]idnin (Parse IDN names)\n"
|
||||
" +[no]idnout (Convert IDN response)\n"
|
||||
" +[no]ignore (Don't revert to TCP for TC responses.)\n"
|
||||
" +[no]keepalive (Request EDNS TCP keepalive)\n"
|
||||
" +[no]keepopen (Keep the TCP socket open between queries)\n"
|
||||
@@ -204,6 +205,7 @@ help(void) {
|
||||
" +padding=### (Set padding block size [0])\n"
|
||||
" +[no]qr (Print question before sending)\n"
|
||||
" +[no]question (Control display of question section)\n"
|
||||
" +[no]raflag (Set RA flag in query (+[no]raflag))\n"
|
||||
" +[no]rdflag (Recursive mode (+[no]recurse))\n"
|
||||
" +[no]recurse (Recursive mode (+[no]rdflag))\n"
|
||||
" +retry=### (Set number of UDP retries) [2]\n"
|
||||
@@ -216,6 +218,7 @@ help(void) {
|
||||
" +[no]split=## (Split hex/base64 fields into chunks)\n"
|
||||
" +[no]stats (Control display of statistics)\n"
|
||||
" +subnet=addr (Set edns-client-subnet option)\n"
|
||||
" +[no]tcflag (Set TC flag in query (+[no]tcflag))\n"
|
||||
" +[no]tcp (TCP mode (+[no]vc))\n"
|
||||
" +timeout=### (Set query timeout) [5]\n"
|
||||
" +[no]trace (Trace delegation down from root [+dnssec])\n"
|
||||
@@ -284,12 +287,12 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
||||
} else {
|
||||
printf(";; MSG SIZE rcvd: %u\n", bytes);
|
||||
}
|
||||
if (key != NULL) {
|
||||
if (tsigkey != NULL) {
|
||||
if (!validated)
|
||||
puts(";; WARNING -- Some TSIG could not "
|
||||
"be validated");
|
||||
}
|
||||
if ((key == NULL) && (keysecret[0] != 0)) {
|
||||
if ((tsigkey == NULL) && (keysecret[0] != 0)) {
|
||||
puts(";; WARNING -- TSIG key was not used.");
|
||||
}
|
||||
puts("");
|
||||
@@ -479,17 +482,17 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
||||
}
|
||||
if (query->lookup->multiline ||
|
||||
(query->lookup->nottl && query->lookup->noclass))
|
||||
result = dns_master_stylecreate2(&style, styleflags,
|
||||
24, 24, 24, 32, 80, 8,
|
||||
splitwidth, mctx);
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
24, 24, 24, 32, 80, 8,
|
||||
splitwidth, mctx);
|
||||
else if (query->lookup->nottl || query->lookup->noclass)
|
||||
result = dns_master_stylecreate2(&style, styleflags,
|
||||
24, 24, 32, 40, 80, 8,
|
||||
splitwidth, mctx);
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
24, 24, 32, 40, 80, 8,
|
||||
splitwidth, mctx);
|
||||
else
|
||||
result = dns_master_stylecreate2(&style, styleflags,
|
||||
24, 32, 40, 48, 80, 8,
|
||||
splitwidth, mctx);
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
24, 32, 40, 48, 80, 8,
|
||||
splitwidth, mctx);
|
||||
check_result(result, "dns_master_stylecreate");
|
||||
|
||||
if (query->lookup->cmdline[0] != 0) {
|
||||
@@ -728,28 +731,27 @@ printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
|
||||
*/
|
||||
|
||||
static void
|
||||
plus_option(const char *option, isc_boolean_t is_batchfile,
|
||||
plus_option(char *option, isc_boolean_t is_batchfile,
|
||||
dig_lookup_t *lookup)
|
||||
{
|
||||
isc_result_t result;
|
||||
char option_store[256];
|
||||
char *cmd, *value, *ptr, *code;
|
||||
char *cmd, *value, *last = NULL, *code, *extra;
|
||||
isc_uint32_t num;
|
||||
isc_boolean_t state = ISC_TRUE;
|
||||
size_t n;
|
||||
|
||||
strlcpy(option_store, option, sizeof(option_store));
|
||||
ptr = option_store;
|
||||
cmd = next_token(&ptr, "=");
|
||||
if (cmd == NULL) {
|
||||
printf(";; Invalid option %s\n", option_store);
|
||||
INSIST(option != NULL);
|
||||
|
||||
if ((cmd = strtok_r(option, "=", &last)) == NULL) {
|
||||
printf(";; Invalid option %s\n", option);
|
||||
return;
|
||||
}
|
||||
value = ptr;
|
||||
if (strncasecmp(cmd, "no", 2)==0) {
|
||||
cmd += 2;
|
||||
state = ISC_FALSE;
|
||||
}
|
||||
/* parse the rest of the string */
|
||||
value = strtok_r(NULL, "", &last);
|
||||
|
||||
#define FULLCHECK(A) \
|
||||
do { \
|
||||
@@ -1005,8 +1007,9 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
|
||||
"specified");
|
||||
goto exit_or_usage;
|
||||
}
|
||||
code = next_token(&value, ":");
|
||||
save_opt(lookup, code, value);
|
||||
code = strtok_r(value, ":", &last);
|
||||
extra = strtok_r(NULL, "\0", &last);
|
||||
save_opt(lookup, code, extra);
|
||||
break;
|
||||
default:
|
||||
goto invalid_option;
|
||||
@@ -1045,13 +1048,29 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
|
||||
lookup->identify = state;
|
||||
break;
|
||||
case 'n':
|
||||
FULLCHECK("idnout");
|
||||
#ifndef WITH_IDN
|
||||
fprintf(stderr, ";; IDN support not enabled\n");
|
||||
switch (cmd[3]) {
|
||||
case 'i':
|
||||
FULLCHECK("idnin");
|
||||
#ifndef WITH_IDN_SUPPORT
|
||||
fprintf(stderr, ";; IDN input support"
|
||||
" not enabled\n");
|
||||
#else
|
||||
lookup->idnout = state;
|
||||
lookup->idnin = state;
|
||||
#endif
|
||||
break;
|
||||
case 'o':
|
||||
FULLCHECK("idnout");
|
||||
#ifndef WITH_IDN_OUT_SUPPORT
|
||||
fprintf(stderr, ";; IDN output support"
|
||||
" not enabled\n");
|
||||
#else
|
||||
lookup->idnout = state;
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
goto invalid_option;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
goto invalid_option;
|
||||
}
|
||||
@@ -1225,6 +1244,10 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
|
||||
break;
|
||||
case 'r':
|
||||
switch (cmd[1]) {
|
||||
case 'a': /* raflag */
|
||||
FULLCHECK("raflag");
|
||||
lookup->raflag = state;
|
||||
break;
|
||||
case 'd': /* rdflag */
|
||||
FULLCHECK("rdflag");
|
||||
lookup->recurse = state;
|
||||
@@ -1368,10 +1391,20 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
|
||||
case 't':
|
||||
switch (cmd[1]) {
|
||||
case 'c': /* tcp */
|
||||
FULLCHECK("tcp");
|
||||
if (!is_batchfile) {
|
||||
lookup->tcp_mode = state;
|
||||
lookup->tcp_mode_set = ISC_TRUE;
|
||||
switch (cmd[2]) {
|
||||
case 'f':
|
||||
FULLCHECK("tcflag");
|
||||
lookup->tcflag = state;
|
||||
break;
|
||||
case 'p':
|
||||
FULLCHECK("tcp");
|
||||
if (!is_batchfile) {
|
||||
lookup->tcp_mode = state;
|
||||
lookup->tcp_mode_set = ISC_TRUE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
goto invalid_option;
|
||||
}
|
||||
break;
|
||||
case 'i': /* timeout */
|
||||
@@ -1507,7 +1540,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
||||
isc_boolean_t config_only, int argc, char **argv,
|
||||
isc_boolean_t *firstarg)
|
||||
{
|
||||
char opt, *value, *ptr, *ptr2, *ptr3;
|
||||
char opt, *value, *ptr, *ptr2, *ptr3, *last;
|
||||
isc_result_t result;
|
||||
isc_boolean_t value_from_next;
|
||||
isc_textregion_t tr;
|
||||
@@ -1721,15 +1754,13 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
||||
value);
|
||||
return (value_from_next);
|
||||
case 'y':
|
||||
ptr = next_token(&value, ":"); /* hmac type or name */
|
||||
if (ptr == NULL) {
|
||||
if ((ptr = strtok_r(value, ":", &last)) == NULL) {
|
||||
usage();
|
||||
}
|
||||
ptr2 = next_token(&value, ":"); /* name or secret */
|
||||
if (ptr2 == NULL)
|
||||
if ((ptr2 = strtok_r(NULL, ":", &last)) == NULL) { /* name or secret */
|
||||
usage();
|
||||
ptr3 = next_token(&value, ":"); /* secret or NULL */
|
||||
if (ptr3 != NULL) {
|
||||
}
|
||||
if ((ptr3 = strtok_r(NULL, ":", &last)) != NULL) { /* secret or NULL */
|
||||
parse_hmac(ptr);
|
||||
ptr = ptr2;
|
||||
ptr2 = ptr3;
|
||||
@@ -1741,6 +1772,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
||||
#endif
|
||||
digestbits = 0;
|
||||
}
|
||||
/* XXXONDREJ: FIXME */
|
||||
strlcpy(keynametext, ptr, sizeof(keynametext));
|
||||
strlcpy(keysecret, ptr2, sizeof(keysecret));
|
||||
return (value_from_next);
|
||||
@@ -1824,6 +1856,22 @@ preparse_args(int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
split_batchline(char *batchline, char **bargv, int len, const char *msg) {
|
||||
int bargc;
|
||||
char *last = NULL;
|
||||
|
||||
REQUIRE(batchline != NULL);
|
||||
|
||||
for (bargc = 1, bargv[bargc] = strtok_r(batchline, " \t\r\n", &last);
|
||||
bargc < len && bargv[bargc];
|
||||
bargv[++bargc] = strtok_r(NULL, " \t\r\n", &last))
|
||||
{
|
||||
debug("%s %d: %s", msg, bargc, bargv[bargc]);
|
||||
}
|
||||
return (bargc);
|
||||
}
|
||||
|
||||
static void
|
||||
parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
||||
int argc, char **argv)
|
||||
@@ -1842,10 +1890,8 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
||||
char **rv;
|
||||
#ifndef NOPOSIX
|
||||
char *homedir;
|
||||
char rcfile[256];
|
||||
char rcfile[PATH_MAX];
|
||||
#endif
|
||||
char *input;
|
||||
int i;
|
||||
isc_boolean_t need_clone = ISC_TRUE;
|
||||
|
||||
/*
|
||||
@@ -1877,30 +1923,21 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
||||
unsigned int n;
|
||||
n = snprintf(rcfile, sizeof(rcfile), "%s/.digrc",
|
||||
homedir);
|
||||
if (n < sizeof(rcfile))
|
||||
if (n < sizeof(rcfile)) {
|
||||
batchfp = fopen(rcfile, "r");
|
||||
}
|
||||
}
|
||||
if (batchfp != NULL) {
|
||||
while (fgets(batchline, sizeof(batchline),
|
||||
batchfp) != 0) {
|
||||
batchfp) != 0)
|
||||
{
|
||||
debug("config line %s", batchline);
|
||||
bargc = 1;
|
||||
input = batchline;
|
||||
bargv[bargc] = next_token(&input, " \t\r\n");
|
||||
while ((bargc < 62) && (bargv[bargc] != NULL)) {
|
||||
bargc++;
|
||||
bargv[bargc] =
|
||||
next_token(&input, " \t\r\n");
|
||||
}
|
||||
|
||||
bargc = split_batchline(batchline, bargv, 62,
|
||||
".digrc argv");
|
||||
bargv[0] = argv[0];
|
||||
argv0 = argv[0];
|
||||
|
||||
for(i = 0; i < bargc; i++)
|
||||
debug(".digrc argv %d: %s",
|
||||
i, bargv[i]);
|
||||
parse_args(ISC_TRUE, ISC_TRUE, bargc,
|
||||
(char **)bargv);
|
||||
parse_args(ISC_TRUE, ISC_TRUE,
|
||||
bargc, (char **)bargv);
|
||||
}
|
||||
fclose(batchfp);
|
||||
}
|
||||
@@ -1911,8 +1948,9 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
||||
/* Processing '-f batchfile'. */
|
||||
lookup = clone_lookup(default_lookup, ISC_TRUE);
|
||||
need_clone = ISC_FALSE;
|
||||
} else
|
||||
} else {
|
||||
lookup = default_lookup;
|
||||
}
|
||||
|
||||
rc = argc;
|
||||
rv = argv;
|
||||
@@ -2079,23 +2117,14 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
||||
/* XXX Remove code dup from shutdown code */
|
||||
next_line:
|
||||
if (fgets(batchline, sizeof(batchline), batchfp) != 0) {
|
||||
bargc = 1;
|
||||
debug("batch line %s", batchline);
|
||||
if (batchline[0] == '\r' || batchline[0] == '\n'
|
||||
|| batchline[0] == '#' || batchline[0] == ';')
|
||||
if (batchline[0] == '\r' || batchline[0] == '\n' ||
|
||||
batchline[0] == '#' || batchline[0] == ';')
|
||||
goto next_line;
|
||||
input = batchline;
|
||||
bargv[bargc] = next_token(&input, " \t\r\n");
|
||||
while ((bargc < 14) && (bargv[bargc] != NULL)) {
|
||||
bargc++;
|
||||
bargv[bargc] = next_token(&input, " \t\r\n");
|
||||
}
|
||||
|
||||
bargc = split_batchline(batchline, bargv, 14,
|
||||
"batch argv");
|
||||
bargv[0] = argv[0];
|
||||
argv0 = argv[0];
|
||||
|
||||
for(i = 0; i < bargc; i++)
|
||||
debug("batch argv %d: %s", i, bargv[i]);
|
||||
parse_args(ISC_TRUE, ISC_FALSE, bargc, (char **)bargv);
|
||||
return;
|
||||
}
|
||||
@@ -2134,8 +2163,6 @@ query_finished(void) {
|
||||
char batchline[MXNAME];
|
||||
int bargc;
|
||||
char *bargv[16];
|
||||
char *input;
|
||||
int i;
|
||||
|
||||
if (batchname == NULL) {
|
||||
isc_app_shutdown();
|
||||
@@ -2153,18 +2180,8 @@ query_finished(void) {
|
||||
|
||||
if (fgets(batchline, sizeof(batchline), batchfp) != 0) {
|
||||
debug("batch line %s", batchline);
|
||||
bargc = 1;
|
||||
input = batchline;
|
||||
bargv[bargc] = next_token(&input, " \t\r\n");
|
||||
while ((bargc < 14) && (bargv[bargc] != NULL)) {
|
||||
bargc++;
|
||||
bargv[bargc] = next_token(&input, " \t\r\n");
|
||||
}
|
||||
|
||||
bargc = split_batchline(batchline, bargv, 14, "batch argv");
|
||||
bargv[0] = argv0;
|
||||
|
||||
for(i = 0; i < bargc; i++)
|
||||
debug("batch argv %d: %s", i, bargv[i]);
|
||||
parse_args(ISC_TRUE, ISC_FALSE, bargc, (char **)bargv);
|
||||
start_lookup();
|
||||
} else {
|
||||
|
||||
+57
-18
@@ -275,9 +275,9 @@
|
||||
<term>-i</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Do reverse IPv6 lookups using the obsolete RFC1886 IP6.INT
|
||||
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6.INT
|
||||
domain, which is no longer in use. Obsolete bit string
|
||||
label queries (RFC2874) are not attempted.
|
||||
label queries (RFC 2874) are not attempted.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -338,11 +338,12 @@
|
||||
<term>-t <replaceable class="parameter">type</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The resource record type to query. It can be any valid query type
|
||||
which is
|
||||
supported in BIND 9. The default query type is "A", unless the
|
||||
<option>-x</option> option is supplied to indicate a reverse lookup.
|
||||
A zone transfer can be requested by specifying a type of AXFR. When
|
||||
The resource record type to query. It can be any valid query
|
||||
type. If it is a resource record type supported in BIND 9, it
|
||||
can be given by the type mnemonic (such as "NS" or "AAAA").
|
||||
The default query type is "A", unless the <option>-x</option>
|
||||
option is supplied to indicate a reverse lookup. A zone
|
||||
transfer can be requested by specifying a type of AXFR. When
|
||||
an incremental zone transfer (IXFR) is required, set the
|
||||
<parameter>type</parameter> to <literal>ixfr=N</literal>.
|
||||
The incremental zone transfer will contain the changes
|
||||
@@ -350,6 +351,12 @@
|
||||
record was
|
||||
<parameter>N</parameter>.
|
||||
</para>
|
||||
<para>
|
||||
All resource record types can be expressed as "TYPEnn", where
|
||||
"nn" is the number of the type. If the resource record type is
|
||||
not supported in BIND 9, the result will be displayed as
|
||||
described in RFC 3597.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -776,6 +783,17 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]idnin</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Process [do not process] IDN domain names on input.
|
||||
This requires IDN SUPPORT to have been enabled at
|
||||
compile time. The default is to process IDN input.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]idnout</option></term>
|
||||
<listitem>
|
||||
@@ -942,6 +960,17 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]raflag</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Set [do not set] the RA (Recursion Available) bit in
|
||||
the query. The default is +noraflag. This bit should
|
||||
be ignored by the server for QUERY.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]rdflag</option></term>
|
||||
<listitem>
|
||||
@@ -1033,7 +1062,7 @@
|
||||
<listitem>
|
||||
<para>
|
||||
This feature is now obsolete and has been removed;
|
||||
use <command>delv</command> instead.
|
||||
use <command>delv</command> instead.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -1085,6 +1114,17 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]tcflag</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Set [do not set] the TC (TrunCation) bit in the query.
|
||||
The default is +notcflag. This bit should be ignored
|
||||
by the server for QUERY.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>+[no]tcp</option></term>
|
||||
<listitem>
|
||||
@@ -1118,8 +1158,8 @@
|
||||
<listitem>
|
||||
<para>
|
||||
This feature is related to <command>dig +sigchase</command>,
|
||||
which is obsolete and has been removed. Use
|
||||
<command>delv</command> instead.
|
||||
which is obsolete and has been removed. Use
|
||||
<command>delv</command> instead.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -1164,9 +1204,9 @@
|
||||
<listitem>
|
||||
<para>
|
||||
Formerly specified trusted keys for use with
|
||||
<command>dig +sigchase</command>. This feature is now
|
||||
obsolete and has been removed; use
|
||||
<command>delv</command> instead.
|
||||
<command>dig +sigchase</command>. This feature is now
|
||||
obsolete and has been removed; use
|
||||
<command>delv</command> instead.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -1288,10 +1328,9 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
|
||||
<command>dig</command> appropriately converts character encoding of
|
||||
domain name before sending a request to DNS server or displaying a
|
||||
reply from the server.
|
||||
If you'd like to turn off the IDN support for some reason, defines
|
||||
the <envar>IDN_DISABLE</envar> environment variable.
|
||||
The IDN support is disabled if the variable is set when
|
||||
<command>dig</command> runs.
|
||||
If you'd like to turn off the IDN support for some reason, use
|
||||
parameters <parameter>+noidnin</parameter> and
|
||||
<parameter>+noidnout</parameter>.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
@@ -1317,7 +1356,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
|
||||
<citerefentry>
|
||||
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
|
||||
</citerefentry>,
|
||||
<citetitle>RFC1035</citetitle>.
|
||||
<citetitle>RFC 1035</citetitle>.
|
||||
</para>
|
||||
</refsection>
|
||||
|
||||
|
||||
+50
-19
@@ -230,9 +230,9 @@
|
||||
<dt><span class="term">-i</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Do reverse IPv6 lookups using the obsolete RFC1886 IP6.INT
|
||||
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6.INT
|
||||
domain, which is no longer in use. Obsolete bit string
|
||||
label queries (RFC2874) are not attempted.
|
||||
label queries (RFC 2874) are not attempted.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-k <em class="replaceable"><code>keyfile</code></em></span></dt>
|
||||
@@ -277,11 +277,12 @@
|
||||
<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
The resource record type to query. It can be any valid query type
|
||||
which is
|
||||
supported in BIND 9. The default query type is "A", unless the
|
||||
<code class="option">-x</code> option is supplied to indicate a reverse lookup.
|
||||
A zone transfer can be requested by specifying a type of AXFR. When
|
||||
The resource record type to query. It can be any valid query
|
||||
type. If it is a resource record type supported in BIND 9, it
|
||||
can be given by the type mnemonic (such as "NS" or "AAAA").
|
||||
The default query type is "A", unless the <code class="option">-x</code>
|
||||
option is supplied to indicate a reverse lookup. A zone
|
||||
transfer can be requested by specifying a type of AXFR. When
|
||||
an incremental zone transfer (IXFR) is required, set the
|
||||
<em class="parameter"><code>type</code></em> to <code class="literal">ixfr=N</code>.
|
||||
The incremental zone transfer will contain the changes
|
||||
@@ -289,6 +290,12 @@
|
||||
record was
|
||||
<em class="parameter"><code>N</code></em>.
|
||||
</p>
|
||||
<p>
|
||||
All resource record types can be expressed as "TYPEnn", where
|
||||
"nn" is the number of the type. If the resource record type is
|
||||
not supported in BIND 9, the result will be displayed as
|
||||
described in RFC 3597.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-u</span></dt>
|
||||
<dd>
|
||||
@@ -619,6 +626,14 @@
|
||||
server that provided the answer.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]idnin</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Process [do not process] IDN domain names on input.
|
||||
This requires IDN SUPPORT to have been enabled at
|
||||
compile time. The default is to process IDN input.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]idnout</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
@@ -695,7 +710,8 @@
|
||||
attempts to find the authoritative name servers for
|
||||
the zone containing the name being looked up and
|
||||
display the SOA record that each name server has for
|
||||
the zone.
|
||||
the zone. Addresses of servers that that did not
|
||||
respond are also printed.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]onesoa</code></span></dt>
|
||||
@@ -742,6 +758,14 @@
|
||||
the question section as a comment.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]raflag</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Set [do not set] the RA (Recursion Available) bit in
|
||||
the query. The default is +noraflag. This bit should
|
||||
be ignored by the server for QUERY.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]rdflag</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
@@ -811,7 +835,7 @@
|
||||
<dd>
|
||||
<p>
|
||||
This feature is now obsolete and has been removed;
|
||||
use <span class="command"><strong>delv</strong></span> instead.
|
||||
use <span class="command"><strong>delv</strong></span> instead.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+split=W</code></span></dt>
|
||||
@@ -852,6 +876,14 @@
|
||||
this query.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]tcflag</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Set [do not set] the TC (TrunCation) bit in the query.
|
||||
The default is +notcflag. This bit should be ignored
|
||||
by the server for QUERY.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
@@ -878,8 +910,8 @@
|
||||
<dd>
|
||||
<p>
|
||||
This feature is related to <span class="command"><strong>dig +sigchase</strong></span>,
|
||||
which is obsolete and has been removed. Use
|
||||
<span class="command"><strong>delv</strong></span> instead.
|
||||
which is obsolete and has been removed. Use
|
||||
<span class="command"><strong>delv</strong></span> instead.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]trace</code></span></dt>
|
||||
@@ -915,9 +947,9 @@
|
||||
<dd>
|
||||
<p>
|
||||
Formerly specified trusted keys for use with
|
||||
<span class="command"><strong>dig +sigchase</strong></span>. This feature is now
|
||||
obsolete and has been removed; use
|
||||
<span class="command"><strong>delv</strong></span> instead.
|
||||
<span class="command"><strong>dig +sigchase</strong></span>. This feature is now
|
||||
obsolete and has been removed; use
|
||||
<span class="command"><strong>delv</strong></span> instead.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term"><code class="option">+[no]ttlid</code></span></dt>
|
||||
@@ -1027,10 +1059,9 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
|
||||
<span class="command"><strong>dig</strong></span> appropriately converts character encoding of
|
||||
domain name before sending a request to DNS server or displaying a
|
||||
reply from the server.
|
||||
If you'd like to turn off the IDN support for some reason, defines
|
||||
the <code class="envar">IDN_DISABLE</code> environment variable.
|
||||
The IDN support is disabled if the variable is set when
|
||||
<span class="command"><strong>dig</strong></span> runs.
|
||||
If you'd like to turn off the IDN support for some reason, use
|
||||
parameters <em class="parameter"><code>+noidnin</code></em> and
|
||||
<em class="parameter"><code>+noidnout</code></em>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1058,7 +1089,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
|
||||
<span class="citerefentry">
|
||||
<span class="refentrytitle">dnssec-keygen</span>(8)
|
||||
</span>,
|
||||
<em class="citetitle">RFC1035</em>.
|
||||
<em class="citetitle">RFC 1035</em>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
+199
-177
@@ -24,17 +24,18 @@
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
#ifdef WITH_IDN
|
||||
#include <idn/result.h>
|
||||
#include <idn/log.h>
|
||||
#include <idn/resconf.h>
|
||||
#include <idn/api.h>
|
||||
#ifdef WITH_IDN_SUPPORT
|
||||
|
||||
#ifdef WITH_LIBIDN2
|
||||
#include <idn2.h>
|
||||
#endif
|
||||
#endif /* WITH_IDN_SUPPORT */
|
||||
|
||||
#include <dns/byaddr.h>
|
||||
#include <dns/fixedname.h>
|
||||
@@ -56,7 +57,6 @@
|
||||
|
||||
#include <isc/app.h>
|
||||
#include <isc/base64.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/hex.h>
|
||||
#include <isc/lang.h>
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
#include <dig/dig.h>
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -134,18 +134,23 @@ int lookup_counter = 0;
|
||||
|
||||
static char servercookie[256];
|
||||
|
||||
#ifdef WITH_IDN
|
||||
static void initialize_idn(void);
|
||||
static isc_result_t output_filter(isc_buffer_t *buffer,
|
||||
unsigned int used_org,
|
||||
isc_boolean_t absolute);
|
||||
static idn_result_t append_textname(char *name, const char *origin,
|
||||
size_t namesize);
|
||||
static void idn_check_result(idn_result_t r, const char *msg);
|
||||
#ifdef WITH_IDN_SUPPORT
|
||||
static void idn_initialize(void);
|
||||
static isc_result_t idn_locale_to_ace(const char *from,
|
||||
char *to,
|
||||
size_t tolen);
|
||||
#endif /* WITH_IDN_SUPPORT */
|
||||
|
||||
#define MAXDLEN 256
|
||||
int idnoptions = 0;
|
||||
#endif
|
||||
#ifdef WITH_IDN_OUT_SUPPORT
|
||||
static isc_result_t idn_ace_to_locale(const char *from,
|
||||
char *to,
|
||||
size_t tolen);
|
||||
static isc_result_t output_filter(isc_buffer_t *buffer,
|
||||
unsigned int used_org,
|
||||
isc_boolean_t absolute);
|
||||
#define MAXDLEN 256
|
||||
|
||||
#endif /* WITH_IDN_OUT_SUPPORT */
|
||||
|
||||
isc_socket_t *keep = NULL;
|
||||
isc_sockaddr_t keepaddr;
|
||||
@@ -170,9 +175,8 @@ unsigned char cookie[8];
|
||||
const dns_name_t *hmacname = NULL;
|
||||
unsigned int digestbits = 0;
|
||||
isc_buffer_t *namebuf = NULL;
|
||||
dns_tsigkey_t *key = NULL;
|
||||
dns_tsigkey_t *tsigkey = NULL;
|
||||
isc_boolean_t validated = ISC_TRUE;
|
||||
isc_entropy_t *entp = NULL;
|
||||
isc_mempool_t *commctx = NULL;
|
||||
isc_boolean_t debugging = ISC_FALSE;
|
||||
isc_boolean_t debugtiming = ISC_FALSE;
|
||||
@@ -236,18 +240,6 @@ check_next_lookup(dig_lookup_t *lookup);
|
||||
static isc_boolean_t
|
||||
next_origin(dig_lookup_t *oldlookup);
|
||||
|
||||
char *
|
||||
next_token(char **stringp, const char *delim) {
|
||||
char *res;
|
||||
|
||||
do {
|
||||
res = strsep(stringp, delim);
|
||||
if (res == NULL)
|
||||
break;
|
||||
} while (*res == '\0');
|
||||
return (res);
|
||||
}
|
||||
|
||||
static int
|
||||
count_dots(char *string) {
|
||||
char *s;
|
||||
@@ -347,9 +339,8 @@ get_reverse(char *reverse, size_t len, char *value, isc_boolean_t ip6_int,
|
||||
|
||||
if (ip6_int)
|
||||
options |= DNS_BYADDROPT_IPV6INT;
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
result = dns_byaddr_createptrname2(&addr, options, name);
|
||||
name = dns_fixedname_initname(&fname);
|
||||
result = dns_byaddr_createptrname(&addr, options, name);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
dns_name_format(name, reverse, (unsigned int)len);
|
||||
@@ -646,7 +637,12 @@ make_empty_lookup(void) {
|
||||
looknew->ttlunits = ISC_FALSE;
|
||||
looknew->ttlunits = ISC_FALSE;
|
||||
looknew->qr = ISC_FALSE;
|
||||
#ifdef WITH_IDN
|
||||
#ifdef WITH_IDN_SUPPORT
|
||||
looknew->idnin = ISC_TRUE;
|
||||
#else
|
||||
looknew->idnin = ISC_FALSE;
|
||||
#endif
|
||||
#ifdef WITH_IDN_OUT_SUPPORT
|
||||
looknew->idnout = ISC_TRUE;
|
||||
#else
|
||||
looknew->idnout = ISC_FALSE;
|
||||
@@ -657,6 +653,8 @@ make_empty_lookup(void) {
|
||||
looknew->aaonly = ISC_FALSE;
|
||||
looknew->adflag = ISC_FALSE;
|
||||
looknew->cdflag = ISC_FALSE;
|
||||
looknew->raflag = ISC_FALSE;
|
||||
looknew->tcflag = ISC_FALSE;
|
||||
looknew->print_unknown_format = ISC_FALSE;
|
||||
looknew->zflag = ISC_FALSE;
|
||||
looknew->ns_search_only = ISC_FALSE;
|
||||
@@ -791,6 +789,7 @@ clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers) {
|
||||
looknew->nocrypto = lookold->nocrypto;
|
||||
looknew->ttlunits = lookold->ttlunits;
|
||||
looknew->qr = lookold->qr;
|
||||
looknew->idnin = lookold->idnin;
|
||||
looknew->idnout = lookold->idnout;
|
||||
looknew->udpsize = lookold->udpsize;
|
||||
looknew->edns = lookold->edns;
|
||||
@@ -798,6 +797,8 @@ clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers) {
|
||||
looknew->aaonly = lookold->aaonly;
|
||||
looknew->adflag = lookold->adflag;
|
||||
looknew->cdflag = lookold->cdflag;
|
||||
looknew->raflag = lookold->raflag;
|
||||
looknew->tcflag = lookold->tcflag;
|
||||
looknew->print_unknown_format = lookold->print_unknown_format;
|
||||
looknew->zflag = lookold->zflag;
|
||||
looknew->ns_search_only = lookold->ns_search_only;
|
||||
@@ -902,13 +903,13 @@ setup_text_key(void) {
|
||||
|
||||
result = dns_tsigkey_create(&keyname, hmacname, secretstore,
|
||||
(int)secretsize, ISC_FALSE, NULL, 0, 0,
|
||||
mctx, NULL, &key);
|
||||
mctx, NULL, &tsigkey);
|
||||
failure:
|
||||
if (result != ISC_R_SUCCESS)
|
||||
printf(";; Couldn't create key %s: %s\n",
|
||||
keynametext, isc_result_totext(result));
|
||||
else
|
||||
dst_key_setbits(key->key, digestbits);
|
||||
dst_key_setbits(tsigkey->key, digestbits);
|
||||
|
||||
isc_mem_free(mctx, secretstore);
|
||||
dns_name_invalidate(&keyname);
|
||||
@@ -1195,7 +1196,7 @@ setup_file_key(void) {
|
||||
}
|
||||
result = dns_tsigkey_createfromkey(dst_key_name(dstkey), hmacname,
|
||||
dstkey, ISC_FALSE, NULL, 0, 0,
|
||||
mctx, NULL, &key);
|
||||
mctx, NULL, &tsigkey);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
printf(";; Couldn't create key %s: %s\n",
|
||||
keynametext, isc_result_totext(result));
|
||||
@@ -1294,18 +1295,27 @@ setup_system(isc_boolean_t ipv4only, isc_boolean_t ipv6only) {
|
||||
|
||||
irs_resconf_destroy(&resconf);
|
||||
|
||||
#ifdef WITH_IDN
|
||||
initialize_idn();
|
||||
#ifdef HAVE_SETLOCALE
|
||||
/* Set locale */
|
||||
(void)setlocale(LC_ALL, "");
|
||||
#endif
|
||||
|
||||
#ifdef WITH_IDN_SUPPORT
|
||||
idn_initialize();
|
||||
#endif
|
||||
|
||||
#ifdef WITH_IDN_OUT_SUPPORT
|
||||
/* Set domain name -> text post-conversion filter. */
|
||||
result = dns_name_settotextfilter(output_filter);
|
||||
check_result(result, "dns_name_settotextfilter");
|
||||
#endif
|
||||
|
||||
if (keyfile[0] != 0)
|
||||
setup_file_key();
|
||||
else if (keysecret[0] != 0)
|
||||
setup_text_key();
|
||||
result = isc_entropy_getdata(entp, cookie_secret,
|
||||
sizeof(cookie_secret), NULL, 0);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("unable to generate cookie secret");
|
||||
|
||||
isc_random_buf(cookie_secret, sizeof(cookie_secret));
|
||||
}
|
||||
|
||||
/*%
|
||||
@@ -1330,7 +1340,7 @@ setup_libs(void) {
|
||||
|
||||
debug("setup_libs()");
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
@@ -1374,10 +1384,7 @@ setup_libs(void) {
|
||||
result = isc_socketmgr_create(mctx, &socketmgr);
|
||||
check_result(result, "isc_socketmgr_create");
|
||||
|
||||
result = isc_entropy_create(mctx, &entp);
|
||||
check_result(result, "isc_entropy_create");
|
||||
|
||||
result = dst_lib_init(mctx, entp, 0);
|
||||
result = dst_lib_init(mctx, NULL);
|
||||
check_result(result, "dst_lib_init");
|
||||
is_dst_up = ISC_TRUE;
|
||||
|
||||
@@ -1863,7 +1870,7 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section)
|
||||
srv != NULL;
|
||||
srv = ISC_LIST_HEAD(lookup->my_server_list)) {
|
||||
INSIST(i > 0);
|
||||
isc_random_get(&j);
|
||||
j = isc_random();
|
||||
j %= i;
|
||||
next = ISC_LIST_NEXT(srv, link);
|
||||
while (j-- > 0 && next != NULL) {
|
||||
@@ -1910,8 +1917,7 @@ next_origin(dig_lookup_t *oldlookup) {
|
||||
/*
|
||||
* Check for a absolute name or ndots being met.
|
||||
*/
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
result = dns_name_fromstring2(name, oldlookup->textname, NULL,
|
||||
0, NULL);
|
||||
if (result == ISC_R_SUCCESS &&
|
||||
@@ -2026,12 +2032,13 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
char store[MXNAME];
|
||||
char ecsbuf[20];
|
||||
char cookiebuf[256];
|
||||
#ifdef WITH_IDN
|
||||
idn_result_t mr;
|
||||
char utf8_textname[MXNAME], utf8_origin[MXNAME], idn_textname[MXNAME];
|
||||
char *origin = NULL;
|
||||
char *textname = NULL;
|
||||
#ifdef WITH_IDN_SUPPORT
|
||||
char idn_origin[MXNAME], idn_textname[MXNAME];
|
||||
#endif
|
||||
|
||||
#ifdef WITH_IDN
|
||||
#ifdef WITH_IDN_OUT_SUPPORT
|
||||
result = dns_name_settotextfilter(lookup->idnout ?
|
||||
output_filter : NULL);
|
||||
check_result(result, "dns_name_settotextfilter");
|
||||
@@ -2064,15 +2071,19 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
isc_buffer_init(&lookup->onamebuf, lookup->oname_space,
|
||||
sizeof(lookup->oname_space));
|
||||
|
||||
#ifdef WITH_IDN
|
||||
/*
|
||||
* We cannot convert `textname' and `origin' separately.
|
||||
* `textname' doesn't contain TLD, but local mapping needs
|
||||
* TLD.
|
||||
*/
|
||||
mr = idn_encodename(IDN_LOCALCONV | IDN_DELIMMAP, lookup->textname,
|
||||
utf8_textname, sizeof(utf8_textname));
|
||||
idn_check_result(mr, "convert textname to UTF-8");
|
||||
textname = lookup->textname;
|
||||
#ifdef WITH_IDN_SUPPORT
|
||||
if (lookup->idnin) {
|
||||
result = idn_locale_to_ace(textname, idn_textname, sizeof(idn_textname));
|
||||
check_result(result, "convert textname to IDN encoding");
|
||||
debug("idn_textname: %s", idn_textname);
|
||||
textname = idn_textname;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -2083,8 +2094,8 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
* is TRUE or we got a domain line in the resolv.conf file.
|
||||
*/
|
||||
if (lookup->new_search) {
|
||||
#ifdef WITH_IDN
|
||||
if ((count_dots(utf8_textname) >= ndots) || !usesearch) {
|
||||
if ((count_dots(textname) >= ndots) || !usesearch)
|
||||
{
|
||||
lookup->origin = NULL; /* Force abs lookup */
|
||||
lookup->done_as_is = ISC_TRUE;
|
||||
lookup->need_search = usesearch;
|
||||
@@ -2092,33 +2103,8 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
lookup->origin = ISC_LIST_HEAD(search_list);
|
||||
lookup->need_search = ISC_FALSE;
|
||||
}
|
||||
#else
|
||||
if ((count_dots(lookup->textname) >= ndots) || !usesearch) {
|
||||
lookup->origin = NULL; /* Force abs lookup */
|
||||
lookup->done_as_is = ISC_TRUE;
|
||||
lookup->need_search = usesearch;
|
||||
} else if (lookup->origin == NULL && usesearch) {
|
||||
lookup->origin = ISC_LIST_HEAD(search_list);
|
||||
lookup->need_search = ISC_FALSE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef WITH_IDN
|
||||
if (lookup->origin != NULL) {
|
||||
mr = idn_encodename(IDN_LOCALCONV | IDN_DELIMMAP,
|
||||
lookup->origin->origin, utf8_origin,
|
||||
sizeof(utf8_origin));
|
||||
idn_check_result(mr, "convert origin to UTF-8");
|
||||
mr = append_textname(utf8_textname, utf8_origin,
|
||||
sizeof(utf8_textname));
|
||||
idn_check_result(mr, "append origin to textname");
|
||||
}
|
||||
mr = idn_encodename(idnoptions | IDN_LOCALMAP | IDN_NAMEPREP |
|
||||
IDN_IDNCONV | IDN_LENCHECK, utf8_textname,
|
||||
idn_textname, sizeof(idn_textname));
|
||||
idn_check_result(mr, "convert UTF-8 textname to IDN encoding");
|
||||
#else
|
||||
if (lookup->origin != NULL) {
|
||||
debug("trying origin %s", lookup->origin->origin);
|
||||
result = dns_message_gettempname(lookup->sendmsg,
|
||||
@@ -2126,8 +2112,17 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
check_result(result, "dns_message_gettempname");
|
||||
dns_name_init(lookup->oname, NULL);
|
||||
/* XXX Helper funct to conv char* to name? */
|
||||
len = (unsigned int) strlen(lookup->origin->origin);
|
||||
isc_buffer_init(&b, lookup->origin->origin, len);
|
||||
origin = lookup->origin->origin;
|
||||
#ifdef WITH_IDN_SUPPORT
|
||||
if (lookup->idnin) {
|
||||
result = idn_locale_to_ace(origin, idn_origin, sizeof(idn_origin));
|
||||
check_result(result, "convert origin to IDN encoding");
|
||||
debug("trying idn origin %s", idn_origin);
|
||||
origin = idn_origin;
|
||||
}
|
||||
#endif
|
||||
len = (unsigned int) strlen(origin);
|
||||
isc_buffer_init(&b, origin, len);
|
||||
isc_buffer_add(&b, len);
|
||||
result = dns_name_fromtext(lookup->oname, &b, dns_rootname,
|
||||
0, &lookup->onamebuf);
|
||||
@@ -2137,7 +2132,7 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
dns_message_puttempname(lookup->sendmsg,
|
||||
&lookup->oname);
|
||||
fatal("'%s' is not in legal name syntax (%s)",
|
||||
lookup->origin->origin,
|
||||
origin,
|
||||
isc_result_totext(result));
|
||||
}
|
||||
if (lookup->trace && lookup->trace_root) {
|
||||
@@ -2146,10 +2141,9 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
dns_fixedname_t fixed;
|
||||
dns_name_t *name;
|
||||
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
len = (unsigned int) strlen(lookup->textname);
|
||||
isc_buffer_init(&b, lookup->textname, len);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
len = (unsigned int) strlen(textname);
|
||||
isc_buffer_init(&b, textname, len);
|
||||
isc_buffer_add(&b, len);
|
||||
result = dns_name_fromtext(name, &b, NULL, 0, NULL);
|
||||
if (result == ISC_R_SUCCESS &&
|
||||
@@ -2174,28 +2168,17 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
}
|
||||
}
|
||||
dns_message_puttempname(lookup->sendmsg, &lookup->oname);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
debug("using root origin");
|
||||
if (lookup->trace && lookup->trace_root)
|
||||
dns_name_clone(dns_rootname, lookup->name);
|
||||
else {
|
||||
#ifdef WITH_IDN
|
||||
len = (unsigned int) strlen(idn_textname);
|
||||
isc_buffer_init(&b, idn_textname, len);
|
||||
len = (unsigned int) strlen(textname);
|
||||
isc_buffer_init(&b, textname, len);
|
||||
isc_buffer_add(&b, len);
|
||||
result = dns_name_fromtext(lookup->name, &b,
|
||||
dns_rootname, 0,
|
||||
&lookup->namebuf);
|
||||
#else
|
||||
len = (unsigned int) strlen(lookup->textname);
|
||||
isc_buffer_init(&b, lookup->textname, len);
|
||||
isc_buffer_add(&b, len);
|
||||
result = dns_name_fromtext(lookup->name, &b,
|
||||
dns_rootname, 0,
|
||||
&lookup->namebuf);
|
||||
#endif
|
||||
}
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_message_puttempname(lookup->sendmsg,
|
||||
@@ -2215,7 +2198,7 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
dighost_trying(store, lookup);
|
||||
INSIST(dns_name_isabsolute(lookup->name));
|
||||
|
||||
isc_random_get(&id);
|
||||
id = isc_random();
|
||||
lookup->sendmsg->id = (unsigned short)id & 0xFFFF;
|
||||
lookup->sendmsg->opcode = lookup->opcode;
|
||||
lookup->msgcounter = 0;
|
||||
@@ -2249,6 +2232,16 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
lookup->sendmsg->flags |= DNS_MESSAGEFLAG_CD;
|
||||
}
|
||||
|
||||
if (lookup->raflag) {
|
||||
debug("RA query");
|
||||
lookup->sendmsg->flags |= DNS_MESSAGEFLAG_RA;
|
||||
}
|
||||
|
||||
if (lookup->tcflag) {
|
||||
debug("TC query");
|
||||
lookup->sendmsg->flags |= DNS_MESSAGEFLAG_TC;
|
||||
}
|
||||
|
||||
if (lookup->zflag) {
|
||||
debug("Z query");
|
||||
lookup->sendmsg->flags |= 0x0040U;
|
||||
@@ -2286,9 +2279,9 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
/* XXX Insist this? */
|
||||
lookup->tsigctx = NULL;
|
||||
lookup->querysig = NULL;
|
||||
if (key != NULL) {
|
||||
if (tsigkey != NULL) {
|
||||
debug("initializing keys");
|
||||
result = dns_message_settsigkey(lookup->sendmsg, key);
|
||||
result = dns_message_settsigkey(lookup->sendmsg, tsigkey);
|
||||
check_result(result, "dns_message_settsigkey");
|
||||
}
|
||||
|
||||
@@ -3653,7 +3646,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
result = dns_message_create(mctx, DNS_MESSAGE_INTENTPARSE, &msg);
|
||||
check_result(result, "dns_message_create");
|
||||
|
||||
if (key != NULL) {
|
||||
if (tsigkey != NULL) {
|
||||
if (l->querysig == NULL) {
|
||||
debug("getting initial querysig");
|
||||
result = dns_message_getquerytsig(l->sendmsg, mctx,
|
||||
@@ -3662,7 +3655,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
}
|
||||
result = dns_message_setquerytsig(msg, l->querysig);
|
||||
check_result(result, "dns_message_setquerytsig");
|
||||
result = dns_message_settsigkey(msg, key);
|
||||
result = dns_message_settsigkey(msg, tsigkey);
|
||||
check_result(result, "dns_message_settsigkey");
|
||||
msg->tsigctx = l->tsigctx;
|
||||
l->tsigctx = NULL;
|
||||
@@ -3838,7 +3831,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
|
||||
}
|
||||
}
|
||||
|
||||
if (key != NULL) {
|
||||
if (tsigkey != NULL) {
|
||||
result = dns_tsig_verify(&query->recvbuf, msg, NULL, NULL);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
printf(";; Couldn't verify signature: %s\n",
|
||||
@@ -4153,7 +4146,7 @@ cancel_all(void) {
|
||||
*/
|
||||
void
|
||||
destroy_libs(void) {
|
||||
#ifdef WITH_IDN
|
||||
#ifdef WITH_IDN_SUPPORT
|
||||
isc_result_t result;
|
||||
#endif
|
||||
|
||||
@@ -4187,7 +4180,7 @@ destroy_libs(void) {
|
||||
|
||||
clear_searchlist();
|
||||
|
||||
#ifdef WITH_IDN
|
||||
#ifdef WITH_IDN_SUPPORT
|
||||
result = dns_name_settotextfilter(NULL);
|
||||
check_result(result, "dns_name_settotextfilter");
|
||||
#endif
|
||||
@@ -4205,9 +4198,9 @@ destroy_libs(void) {
|
||||
debug("freeing timermgr");
|
||||
isc_timermgr_destroy(&timermgr);
|
||||
}
|
||||
if (key != NULL) {
|
||||
debug("freeing key %p", key);
|
||||
dns_tsigkey_detach(&key);
|
||||
if (tsigkey != NULL) {
|
||||
debug("freeing key %p", tsigkey);
|
||||
dns_tsigkey_detach(&tsigkey);
|
||||
}
|
||||
if (namebuf != NULL)
|
||||
isc_buffer_free(&namebuf);
|
||||
@@ -4217,10 +4210,6 @@ destroy_libs(void) {
|
||||
dst_lib_destroy();
|
||||
is_dst_up = ISC_FALSE;
|
||||
}
|
||||
if (entp != NULL) {
|
||||
debug("detach from entropy");
|
||||
isc_entropy_detach(&entp);
|
||||
}
|
||||
|
||||
UNLOCK_LOOKUP;
|
||||
DESTROYLOCK(&lookup_lock);
|
||||
@@ -4234,27 +4223,7 @@ destroy_libs(void) {
|
||||
isc_mem_destroy(&mctx);
|
||||
}
|
||||
|
||||
#ifdef WITH_IDN
|
||||
static void
|
||||
initialize_idn(void) {
|
||||
idn_result_t r;
|
||||
isc_result_t result;
|
||||
|
||||
#ifdef HAVE_SETLOCALE
|
||||
/* Set locale */
|
||||
(void)setlocale(LC_ALL, "");
|
||||
#endif
|
||||
/* Create configuration context. */
|
||||
r = idn_nameinit(1);
|
||||
if (r != idn_success)
|
||||
fatal("idn api initialization failed: %s",
|
||||
idn_result_tostring(r));
|
||||
|
||||
/* Set domain name -> text post-conversion filter. */
|
||||
result = dns_name_settotextfilter(output_filter);
|
||||
check_result(result, "dns_name_settotextfilter");
|
||||
}
|
||||
|
||||
#ifdef WITH_IDN_OUT_SUPPORT
|
||||
static isc_result_t
|
||||
output_filter(isc_buffer_t *buffer, unsigned int used_org,
|
||||
isc_boolean_t absolute)
|
||||
@@ -4262,6 +4231,7 @@ output_filter(isc_buffer_t *buffer, unsigned int used_org,
|
||||
char tmp1[MAXDLEN], tmp2[MAXDLEN];
|
||||
size_t fromlen, tolen;
|
||||
isc_boolean_t end_with_dot;
|
||||
isc_result_t result;
|
||||
|
||||
/*
|
||||
* Copy contents of 'buffer' to 'tmp1', supply trailing dot
|
||||
@@ -4270,6 +4240,7 @@ output_filter(isc_buffer_t *buffer, unsigned int used_org,
|
||||
fromlen = isc_buffer_usedlength(buffer) - used_org;
|
||||
if (fromlen >= MAXDLEN)
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
memmove(tmp1, (char *)isc_buffer_base(buffer) + used_org, fromlen);
|
||||
end_with_dot = (tmp1[fromlen - 1] == '.') ? ISC_TRUE : ISC_FALSE;
|
||||
if (absolute && !end_with_dot) {
|
||||
@@ -4278,58 +4249,109 @@ output_filter(isc_buffer_t *buffer, unsigned int used_org,
|
||||
return (ISC_R_SUCCESS);
|
||||
tmp1[fromlen - 1] = '.';
|
||||
}
|
||||
|
||||
tmp1[fromlen] = '\0';
|
||||
|
||||
/*
|
||||
* Convert contents of 'tmp1' to local encoding.
|
||||
*/
|
||||
if (idn_decodename(IDN_DECODE_APP, tmp1, tmp2, MAXDLEN) != idn_success)
|
||||
result = idn_ace_to_locale(tmp1, tmp2, sizeof(tmp2));
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return (ISC_R_SUCCESS);
|
||||
strlcpy(tmp1, tmp2, MAXDLEN);
|
||||
|
||||
}
|
||||
/*
|
||||
* Copy the converted contents in 'tmp1' back to 'buffer'.
|
||||
* If we have appended trailing dot, remove it.
|
||||
*/
|
||||
tolen = strlen(tmp1);
|
||||
if (absolute && !end_with_dot && tmp1[tolen - 1] == '.')
|
||||
tolen = strlen(tmp2);
|
||||
if (absolute && !end_with_dot && tmp2[tolen - 1] == '.')
|
||||
tolen--;
|
||||
|
||||
if (isc_buffer_length(buffer) < used_org + tolen)
|
||||
return (ISC_R_NOSPACE);
|
||||
|
||||
isc_buffer_subtract(buffer, isc_buffer_usedlength(buffer) - used_org);
|
||||
memmove(isc_buffer_used(buffer), tmp1, tolen);
|
||||
memmove(isc_buffer_used(buffer), tmp2, tolen);
|
||||
isc_buffer_add(buffer, (unsigned int)tolen);
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
#endif
|
||||
|
||||
static idn_result_t
|
||||
append_textname(char *name, const char *origin, size_t namesize) {
|
||||
size_t namelen = strlen(name);
|
||||
size_t originlen = strlen(origin);
|
||||
|
||||
/* Already absolute? */
|
||||
if (namelen > 0 && name[namelen - 1] == '.')
|
||||
return (idn_success);
|
||||
|
||||
/* Append dot and origin */
|
||||
|
||||
if (namelen + 1 + originlen >= namesize)
|
||||
return (idn_buffer_overflow);
|
||||
|
||||
if (*origin != '.')
|
||||
name[namelen++] = '.';
|
||||
(void)strlcpy(name + namelen, origin, namesize - namelen);
|
||||
return (idn_success);
|
||||
}
|
||||
|
||||
#ifdef WITH_IDN_SUPPORT
|
||||
#ifdef WITH_LIBIDN2
|
||||
static void
|
||||
idn_check_result(idn_result_t r, const char *msg) {
|
||||
if (r != idn_success) {
|
||||
exitcode = 1;
|
||||
fatal("%s: %s", msg, idn_result_tostring(r));
|
||||
}
|
||||
idn_initialize(void) {
|
||||
}
|
||||
#endif /* WITH_IDN */
|
||||
|
||||
static isc_result_t
|
||||
idn_locale_to_ace(const char *from, char *to, size_t tolen) {
|
||||
int res;
|
||||
char *tmp_str = NULL;
|
||||
|
||||
res = idn2_to_ascii_lz(from, &tmp_str, IDN2_NONTRANSITIONAL|IDN2_NFC_INPUT);
|
||||
if (res == IDN2_DISALLOWED) {
|
||||
res = idn2_to_ascii_lz(from, &tmp_str, IDN2_TRANSITIONAL|IDN2_NFC_INPUT);
|
||||
}
|
||||
|
||||
if (res == IDN2_OK) {
|
||||
/*
|
||||
* idn2_to_ascii_lz() normalizes all strings to lowerl case,
|
||||
* but we generally don't want to lowercase all input strings;
|
||||
* make sure to return the original case if the two strings
|
||||
* differ only in case
|
||||
*/
|
||||
if (!strcasecmp(from, tmp_str)) {
|
||||
if (strlen(from) >= tolen) {
|
||||
debug("from string is too long");
|
||||
idn2_free(tmp_str);
|
||||
return ISC_R_NOSPACE;
|
||||
}
|
||||
idn2_free(tmp_str);
|
||||
(void) strlcpy(to, from, tolen);
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
/* check the length */
|
||||
if (strlen(tmp_str) >= tolen) {
|
||||
debug("ACE string is too long");
|
||||
idn2_free(tmp_str);
|
||||
return ISC_R_NOSPACE;
|
||||
}
|
||||
|
||||
(void) strlcpy(to, tmp_str, tolen);
|
||||
idn2_free(tmp_str);
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
fatal("'%s' is not a legal IDN name (%s), use +noidnin", from, idn2_strerror(res));
|
||||
return ISC_R_FAILURE;
|
||||
}
|
||||
|
||||
#ifdef WITH_IDN_OUT_SUPPORT
|
||||
static isc_result_t
|
||||
idn_ace_to_locale(const char *from, char *to, size_t tolen) {
|
||||
int res;
|
||||
char *tmp_str = NULL;
|
||||
|
||||
res = idn2_to_unicode_8zlz(from, &tmp_str,
|
||||
IDN2_NONTRANSITIONAL|IDN2_NFC_INPUT);
|
||||
|
||||
if (res == IDN2_OK) {
|
||||
/* check the length */
|
||||
if (strlen(tmp_str) >= tolen) {
|
||||
debug("encoded ASC string is too long");
|
||||
idn2_free(tmp_str);
|
||||
return ISC_R_FAILURE;
|
||||
}
|
||||
|
||||
(void) strlcpy(to, tmp_str, tolen);
|
||||
idn2_free(tmp_str);
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
fatal("'%s' is not a legal IDN name (%s), use +noidnout", from, idn2_strerror(res));
|
||||
return ISC_R_FAILURE;
|
||||
}
|
||||
#endif /* WITH_IDN_OUT_SUPPORT */
|
||||
#endif /* WITH_LIBIDN2 */
|
||||
#endif /* WITH_IDN_SUPPORT */
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -274,5 +274,5 @@ runs\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2000-2002, 2004, 2005, 2007-2009, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2000-2002, 2004, 2005, 2007-2009, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
+1
-25
@@ -19,13 +19,6 @@
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
#ifdef WITH_IDN
|
||||
#include <idn/result.h>
|
||||
#include <idn/log.h>
|
||||
#include <idn/resconf.h>
|
||||
#include <idn/api.h>
|
||||
#endif
|
||||
|
||||
#include <isc/app.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/netaddr.h>
|
||||
@@ -459,8 +452,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
||||
dns_name_t *name;
|
||||
|
||||
/* Add AAAA and MX lookups. */
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
dns_name_copy(query->lookup->name, name, NULL);
|
||||
chase_cnamechain(msg, name);
|
||||
dns_name_format(name, namestr, sizeof(namestr));
|
||||
@@ -721,9 +713,6 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
||||
lookup->rdtype != dns_rdatatype_axfr)
|
||||
lookup->rdtype = rdtype;
|
||||
lookup->rdtypeset = ISC_TRUE;
|
||||
#ifdef WITH_IDN
|
||||
idnoptions = 0;
|
||||
#endif
|
||||
if (rdtype == dns_rdatatype_axfr) {
|
||||
/* -l -t any -v */
|
||||
list_type = dns_rdatatype_any;
|
||||
@@ -736,13 +725,6 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
||||
} else if (rdtype == dns_rdatatype_any) {
|
||||
if (!lookup->tcp_mode_set)
|
||||
lookup->tcp_mode = ISC_TRUE;
|
||||
#ifdef WITH_IDN
|
||||
} else if (rdtype == dns_rdatatype_a ||
|
||||
rdtype == dns_rdatatype_aaaa ||
|
||||
rdtype == dns_rdatatype_mx) {
|
||||
idnoptions = IDN_ASCCHECK;
|
||||
list_type = rdtype;
|
||||
#endif
|
||||
} else
|
||||
list_type = rdtype;
|
||||
list_addresses = ISC_FALSE;
|
||||
@@ -771,9 +753,6 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
||||
if (!lookup->rdtypeset ||
|
||||
lookup->rdtype != dns_rdatatype_axfr)
|
||||
lookup->rdtype = dns_rdatatype_any;
|
||||
#ifdef WITH_IDN
|
||||
idnoptions = 0;
|
||||
#endif
|
||||
list_type = dns_rdatatype_any;
|
||||
list_addresses = ISC_FALSE;
|
||||
lookup->rdtypeset = ISC_TRUE;
|
||||
@@ -885,9 +864,6 @@ main(int argc, char **argv) {
|
||||
ISC_LIST_INIT(search_list);
|
||||
|
||||
fatalexit = 1;
|
||||
#ifdef WITH_IDN
|
||||
idnoptions = IDN_ASCCHECK;
|
||||
#endif
|
||||
|
||||
/* setup dighost callbacks */
|
||||
dighost_printmessage = printmessage;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
||||
@@ -94,6 +94,8 @@ struct dig_lookup {
|
||||
aaonly,
|
||||
adflag,
|
||||
cdflag,
|
||||
raflag,
|
||||
tcflag,
|
||||
zflag,
|
||||
trace, /*% dig +trace */
|
||||
trace_root, /*% initial query for either +trace or +nssearch */
|
||||
@@ -129,6 +131,7 @@ struct dig_lookup {
|
||||
use_usec,
|
||||
nocrypto,
|
||||
ttlunits,
|
||||
idnin,
|
||||
idnout,
|
||||
qr;
|
||||
char textname[MXNAME]; /*% Name we're going to be looking up */
|
||||
@@ -256,7 +259,7 @@ extern char keyfile[MXNAME];
|
||||
extern char keysecret[MXNAME];
|
||||
extern const dns_name_t *hmacname;
|
||||
extern unsigned int digestbits;
|
||||
extern dns_tsigkey_t *key;
|
||||
extern dns_tsigkey_t *tsigkey;
|
||||
extern isc_boolean_t validated;
|
||||
extern isc_taskmgr_t *taskmgr;
|
||||
extern isc_task_t *global_task;
|
||||
@@ -268,9 +271,6 @@ extern char *progname;
|
||||
extern int tries;
|
||||
extern int fatalexit;
|
||||
extern isc_boolean_t verbose;
|
||||
#ifdef WITH_IDN
|
||||
extern int idnoptions;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Routines in dighost.c.
|
||||
@@ -371,9 +371,6 @@ destroy_libs(void);
|
||||
void
|
||||
set_search_domain(char *domain);
|
||||
|
||||
char *
|
||||
next_token(char **stringp, const char *delim);
|
||||
|
||||
/*
|
||||
* Routines to be defined in dig.c, host.c, and nslookup.c. and
|
||||
* then assigned to the appropriate function pointer
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2004-2007, 2010, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2004-2007, 2010, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -290,5 +290,5 @@ returns with an exit status of 1 if any query failed, and 0 otherwise\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2004-2007, 2010, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2004-2007, 2010, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
+16
-17
@@ -475,8 +475,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
||||
dns_name_t *name;
|
||||
|
||||
/* Add AAAA lookup. */
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
dns_name_copy(query->lookup->name, name, NULL);
|
||||
chase_cnamechain(msg, name);
|
||||
dns_name_format(name, namestr, sizeof(namestr));
|
||||
@@ -710,31 +709,31 @@ setoption(char *opt) {
|
||||
usesearch = ISC_TRUE;
|
||||
} else if (CHECKOPT("nodefname", 5)) {
|
||||
usesearch = ISC_FALSE;
|
||||
} else if (CHECKOPT("vc", 2) == 0) {
|
||||
} else if (CHECKOPT("vc", 2)) {
|
||||
tcpmode = ISC_TRUE;
|
||||
tcpmode_set = ISC_TRUE;
|
||||
} else if (CHECKOPT("novc", 4) == 0) {
|
||||
} else if (CHECKOPT("novc", 4)) {
|
||||
tcpmode = ISC_FALSE;
|
||||
tcpmode_set = ISC_TRUE;
|
||||
} else if (CHECKOPT("debug", 3) == 0) {
|
||||
} else if (CHECKOPT("debug", 3)) {
|
||||
short_form = ISC_FALSE;
|
||||
showsearch = ISC_TRUE;
|
||||
} else if (CHECKOPT("nodebug", 5) == 0) {
|
||||
} else if (CHECKOPT("nodebug", 5)) {
|
||||
short_form = ISC_TRUE;
|
||||
showsearch = ISC_FALSE;
|
||||
} else if (CHECKOPT("d2", 2) == 0) {
|
||||
} else if (CHECKOPT("d2", 2)) {
|
||||
debugging = ISC_TRUE;
|
||||
} else if (CHECKOPT("nod2", 4) == 0) {
|
||||
} else if (CHECKOPT("nod2", 4)) {
|
||||
debugging = ISC_FALSE;
|
||||
} else if (CHECKOPT("search", 3) == 0) {
|
||||
} else if (CHECKOPT("search", 3)) {
|
||||
usesearch = ISC_TRUE;
|
||||
} else if (CHECKOPT("nosearch", 5) == 0) {
|
||||
} else if (CHECKOPT("nosearch", 5)) {
|
||||
usesearch = ISC_FALSE;
|
||||
} else if (CHECKOPT("sil", 3) == 0) {
|
||||
} else if (CHECKOPT("sil", 3)) {
|
||||
/* deprecation_msg = ISC_FALSE; */
|
||||
} else if (CHECKOPT("fail", 3) == 0) {
|
||||
} else if (CHECKOPT("fail", 3)) {
|
||||
nofail=ISC_FALSE;
|
||||
} else if (CHECKOPT("nofail", 5) == 0) {
|
||||
} else if (CHECKOPT("nofail", 5)) {
|
||||
nofail=ISC_TRUE;
|
||||
} else if (strncasecmp(opt, "ndots=", 6) == 0) {
|
||||
set_ndots(&opt[6]);
|
||||
@@ -814,12 +813,12 @@ addlookup(char *opt) {
|
||||
|
||||
static void
|
||||
do_next_command(char *input) {
|
||||
char *ptr, *arg;
|
||||
char *ptr, *arg, *last;
|
||||
|
||||
ptr = next_token(&input, " \t\r\n");
|
||||
if (ptr == NULL)
|
||||
if ((ptr = strtok_r(input, " \t\r\n", &last)) == NULL) {
|
||||
return;
|
||||
arg = next_token(&input, " \t\r\n");
|
||||
}
|
||||
arg = strtok_r(NULL, " \t\r\n", &last);
|
||||
if ((strcasecmp(ptr, "set") == 0) &&
|
||||
(arg != NULL))
|
||||
setoption(arg);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2004-2007, 2010, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2004-2007, 2010, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
||||
@@ -18,7 +18,7 @@ VERSION=@BIND9_VERSION@
|
||||
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@
|
||||
|
||||
CDEFINES = -DVERSION=\"${VERSION}\" @USE_PKCS11@ @PKCS11_ENGINE@ \
|
||||
@CRYPTO@ -DPK11_LIB_LOCATION=\"@PKCS11_PROVIDER@\"
|
||||
-DPK11_LIB_LOCATION=\"@PKCS11_PROVIDER@\"
|
||||
CWARNINGS =
|
||||
|
||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||
|
||||
+14
-25
@@ -23,7 +23,6 @@
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/mem.h>
|
||||
@@ -54,7 +53,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -72,7 +71,6 @@ int verbose;
|
||||
*/
|
||||
static isc_log_t *lctx = NULL;
|
||||
static isc_mem_t *mctx = NULL;
|
||||
static isc_entropy_t *ectx = NULL;
|
||||
|
||||
/*
|
||||
* The domain we are working on
|
||||
@@ -173,8 +171,7 @@ initname(char *setname) {
|
||||
isc_result_t result;
|
||||
isc_buffer_t buf;
|
||||
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
namestr = setname;
|
||||
|
||||
isc_buffer_init(&buf, setname, strlen(setname));
|
||||
@@ -254,8 +251,8 @@ load_db(const char *filename, dns_db_t **dbp, dns_dbnode_t **nodep) {
|
||||
rdclass, 0, NULL, dbp);
|
||||
check_result(result, "dns_db_create()");
|
||||
|
||||
result = dns_db_load3(*dbp, filename,
|
||||
dns_masterformat_text, DNS_MASTER_HINT);
|
||||
result = dns_db_load(*dbp, filename,
|
||||
dns_masterformat_text, DNS_MASTER_HINT);
|
||||
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE) {
|
||||
fatal("can't load %s: %s", filename,
|
||||
isc_result_totext(result));
|
||||
@@ -379,9 +376,9 @@ formatset(dns_rdataset_t *rdataset) {
|
||||
* which just separates fields with spaces. The huge tab stop width
|
||||
* eliminates any tab characters.
|
||||
*/
|
||||
result = dns_master_stylecreate2(&style, styleflags,
|
||||
0, 0, 0, 0, 0, 1000000, 0,
|
||||
mctx);
|
||||
result = dns_master_stylecreate(&style, styleflags,
|
||||
0, 0, 0, 0, 0, 1000000, 0,
|
||||
mctx);
|
||||
check_result(result, "dns_master_stylecreate2 failed");
|
||||
|
||||
result = isc_buffer_allocate(mctx, &buf, MAX_CDS_RDATA_TEXT_SIZE);
|
||||
@@ -671,8 +668,11 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
|
||||
}
|
||||
|
||||
result = dns_dnssec_verify(name, rdataset, ki->dst,
|
||||
ISC_FALSE, mctx, &sigrdata);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
ISC_FALSE, 0, mctx,
|
||||
&sigrdata, NULL);
|
||||
|
||||
if (result != ISC_R_SUCCESS &&
|
||||
result != DNS_R_FROMWILDCARD) {
|
||||
vbprintf(1, "skip RRSIG by key %d:"
|
||||
" verification failed: %s\n",
|
||||
sig.keyid, isc_result_totext(result));
|
||||
@@ -1147,7 +1147,7 @@ main(int argc, char *argv[]) {
|
||||
fatal("out of memory");
|
||||
}
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
@@ -1231,20 +1231,11 @@ main(int argc, char *argv[]) {
|
||||
|
||||
setup_logging(mctx, &lctx);
|
||||
|
||||
if (ectx == NULL) {
|
||||
setup_entropy(mctx, NULL, &ectx);
|
||||
}
|
||||
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("could not initialize hash");
|
||||
}
|
||||
result = dst_lib_init(mctx, ectx,
|
||||
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
|
||||
result = dst_lib_init(mctx, NULL);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("could not initialize dst: %s",
|
||||
isc_result_totext(result));
|
||||
}
|
||||
isc_entropy_stopcallbacksources(ectx);
|
||||
|
||||
if (ds_path == NULL) {
|
||||
fatal("missing -d DS pathname");
|
||||
@@ -1394,8 +1385,6 @@ main(int argc, char *argv[]) {
|
||||
free_all_sets();
|
||||
cleanup_logging(&lctx);
|
||||
dst_lib_destroy();
|
||||
isc_hash_destroy();
|
||||
cleanup_entropy(&ectx);
|
||||
if (verbose > 10) {
|
||||
isc_mem_stats(mctx, stdout);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2008-2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2008-2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -178,5 +178,5 @@ RFC 4509\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2008-2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2008-2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
@@ -42,7 +41,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -67,8 +66,7 @@ initname(char *setname) {
|
||||
isc_result_t result;
|
||||
isc_buffer_t buf;
|
||||
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
|
||||
isc_buffer_init(&buf, setname, strlen(setname));
|
||||
isc_buffer_add(&buf, strlen(setname));
|
||||
@@ -114,7 +112,7 @@ loadset(const char *filename, dns_rdataset_t *rdataset) {
|
||||
db_load_from_stream(db, stdin);
|
||||
filename = "input";
|
||||
} else {
|
||||
result = dns_db_load(db, filename);
|
||||
result = dns_db_load(db, filename, dns_masterformat_text, 0);
|
||||
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
|
||||
fatal("can't load %s: %s", filename,
|
||||
isc_result_totext(result));
|
||||
@@ -206,8 +204,7 @@ loadkey(char *filename, unsigned char *key_buf, unsigned int key_buf_size,
|
||||
|
||||
rdclass = dst_key_class(key);
|
||||
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
result = dns_name_copy(dst_key_name(key), name, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("can't copy name");
|
||||
@@ -361,7 +358,6 @@ main(int argc, char **argv) {
|
||||
isc_boolean_t showall = ISC_FALSE;
|
||||
isc_result_t result;
|
||||
isc_log_t *log = NULL;
|
||||
isc_entropy_t *ectx = NULL;
|
||||
dns_rdataset_t rdataset;
|
||||
dns_rdata_t rdata;
|
||||
|
||||
@@ -374,7 +370,7 @@ main(int argc, char **argv) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("out of memory");
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
@@ -477,17 +473,10 @@ main(int argc, char **argv) {
|
||||
if (argc > isc_commandline_index + 1)
|
||||
fatal("extraneous arguments");
|
||||
|
||||
if (ectx == NULL)
|
||||
setup_entropy(mctx, NULL, &ectx);
|
||||
result = dst_lib_init(mctx, ectx,
|
||||
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
|
||||
result = dst_lib_init(mctx, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not initialize dst: %s",
|
||||
isc_result_totext(result));
|
||||
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not initialize hash");
|
||||
isc_entropy_stopcallbacksources(ectx);
|
||||
|
||||
setup_logging(mctx, &log);
|
||||
|
||||
@@ -548,9 +537,7 @@ main(int argc, char **argv) {
|
||||
if (dns_rdataset_isassociated(&rdataset))
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
cleanup_logging(&log);
|
||||
isc_hash_destroy();
|
||||
dst_lib_destroy();
|
||||
cleanup_entropy(&ectx);
|
||||
dns_name_destroy();
|
||||
if (verbose > 10)
|
||||
isc_mem_stats(mctx, stdout);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2008-2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2008-2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2013-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -134,5 +134,5 @@ RFC 5011\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2013-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2013-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
@@ -42,7 +41,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -72,8 +71,7 @@ initname(char *setname) {
|
||||
isc_result_t result;
|
||||
isc_buffer_t buf;
|
||||
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
|
||||
isc_buffer_init(&buf, setname, strlen(setname));
|
||||
isc_buffer_add(&buf, strlen(setname));
|
||||
@@ -119,8 +117,8 @@ loadset(const char *filename, dns_rdataset_t *rdataset) {
|
||||
db_load_from_stream(db, stdin);
|
||||
filename = "input";
|
||||
} else {
|
||||
result = dns_db_load3(db, filename, dns_masterformat_text,
|
||||
DNS_MASTER_NOTTL);
|
||||
result = dns_db_load(db, filename, dns_masterformat_text,
|
||||
DNS_MASTER_NOTTL);
|
||||
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
|
||||
fatal("can't load %s: %s", filename,
|
||||
isc_result_totext(result));
|
||||
@@ -181,8 +179,7 @@ loadkey(char *filename, unsigned char *key_buf, unsigned int key_buf_size,
|
||||
|
||||
rdclass = dst_key_class(key);
|
||||
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
result = dns_name_copy(dst_key_name(key), name, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("can't copy name");
|
||||
@@ -299,7 +296,6 @@ main(int argc, char **argv) {
|
||||
int ch;
|
||||
isc_result_t result;
|
||||
isc_log_t *log = NULL;
|
||||
isc_entropy_t *ectx = NULL;
|
||||
dns_rdataset_t rdataset;
|
||||
dns_rdata_t rdata;
|
||||
isc_stdtime_t now;
|
||||
@@ -314,7 +310,7 @@ main(int argc, char **argv) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("out of memory");
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
@@ -406,17 +402,10 @@ main(int argc, char **argv) {
|
||||
if (argc > isc_commandline_index + 1)
|
||||
fatal("extraneous arguments");
|
||||
|
||||
if (ectx == NULL)
|
||||
setup_entropy(mctx, NULL, &ectx);
|
||||
result = dst_lib_init(mctx, ectx,
|
||||
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
|
||||
result = dst_lib_init(mctx, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not initialize dst: %s",
|
||||
isc_result_totext(result));
|
||||
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not initialize hash");
|
||||
isc_entropy_stopcallbacksources(ectx);
|
||||
|
||||
setup_logging(mctx, &log);
|
||||
|
||||
@@ -459,9 +448,7 @@ main(int argc, char **argv) {
|
||||
if (dns_rdataset_isassociated(&rdataset))
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
cleanup_logging(&log);
|
||||
isc_hash_destroy();
|
||||
dst_lib_destroy();
|
||||
cleanup_entropy(&ectx);
|
||||
dns_name_destroy();
|
||||
if (verbose > 10)
|
||||
isc_mem_stats(mctx, stdout);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2013-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2008-2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2008-2012, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -307,5 +307,5 @@ The PKCS#11 URI Scheme (draft\-pechanec\-pkcs11uri\-13)\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2008-2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2008-2012, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/print.h>
|
||||
@@ -38,7 +37,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -70,7 +69,7 @@ usage(void) {
|
||||
fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
|
||||
fprintf(stderr, " -c class (default: IN)\n");
|
||||
fprintf(stderr, " -E <engine>:\n");
|
||||
#if defined(PKCS11CRYPTO)
|
||||
#if HAVE_PKCS11
|
||||
fprintf(stderr, " path to PKCS#11 provider library "
|
||||
"(default is %s)\n", PK11_LIB_LOCATION);
|
||||
#elif defined(USE_PKCS11)
|
||||
@@ -146,7 +145,6 @@ main(int argc, char **argv) {
|
||||
char filename[255];
|
||||
isc_buffer_t buf;
|
||||
isc_log_t *log = NULL;
|
||||
isc_entropy_t *ectx = NULL;
|
||||
dns_rdataclass_t rdclass;
|
||||
int options = DST_TYPE_PRIVATE | DST_TYPE_PUBLIC;
|
||||
char *label = NULL;
|
||||
@@ -175,7 +173,7 @@ main(int argc, char **argv) {
|
||||
|
||||
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
@@ -347,10 +345,7 @@ main(int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
|
||||
if (ectx == NULL)
|
||||
setup_entropy(mctx, NULL, &ectx);
|
||||
ret = dst_lib_init2(mctx, ectx, engine,
|
||||
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
|
||||
ret = dst_lib_init(mctx, engine);
|
||||
if (ret != ISC_R_SUCCESS)
|
||||
fatal("could not initialize dst: %s",
|
||||
isc_result_totext(ret));
|
||||
@@ -365,8 +360,7 @@ main(int argc, char **argv) {
|
||||
if (argc > isc_commandline_index + 1)
|
||||
fatal("extraneous arguments");
|
||||
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
name = dns_fixedname_initname(&fname);
|
||||
isc_buffer_init(&buf, argv[isc_commandline_index],
|
||||
strlen(argv[isc_commandline_index]));
|
||||
isc_buffer_add(&buf, strlen(argv[isc_commandline_index]));
|
||||
@@ -613,13 +607,12 @@ main(int argc, char **argv) {
|
||||
|
||||
/* associate the key */
|
||||
ret = dst_key_fromlabel(name, alg, flags, protocol, rdclass,
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
"pkcs11",
|
||||
#else
|
||||
engine,
|
||||
#endif
|
||||
label, NULL, mctx, &key);
|
||||
isc_entropy_stopcallbacksources(ectx);
|
||||
|
||||
if (ret != ISC_R_SUCCESS) {
|
||||
char namestr[DNS_NAME_FORMATSIZE];
|
||||
@@ -738,7 +731,6 @@ main(int argc, char **argv) {
|
||||
dst_key_free(&prevkey);
|
||||
|
||||
cleanup_logging(&log);
|
||||
cleanup_entropy(&ectx);
|
||||
dst_lib_destroy();
|
||||
dns_name_destroy();
|
||||
if (verbose > 10)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2008-2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2008-2012, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
dnssec-keygen \- DNSSEC key generation tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBdnssec\-keygen\fR\ 'u
|
||||
\fBdnssec\-keygen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-n\ \fR\fB\fInametype\fR\fR] [\fB\-3\fR] [\fB\-A\ \fR\fB\fIdate/offset\fR\fR] [\fB\-C\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-D\ \fR\fB\fIdate/offset\fR\fR] [\fB\-D\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-f\ \fR\fB\fIflag\fR\fR] [\fB\-G\fR] [\fB\-g\ \fR\fB\fIgenerator\fR\fR] [\fB\-h\fR] [\fB\-I\ \fR\fB\fIdate/offset\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\fR] [\fB\-L\ \fR\fB\fIttl\fR\fR] [\fB\-P\ \fR\fB\fIdate/offset\fR\fR] [\fB\-P\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-p\ \fR\fB\fIprotocol\fR\fR] [\fB\-q\fR] [\fB\-R\ \fR\fB\fIdate/offset\fR\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-S\ \fR\fB\fIkey\fR\fR] [\fB\-s\ \fR\fB\fIstrength\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-V\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-z\fR] {name}
|
||||
\fBdnssec\-keygen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-n\ \fR\fB\fInametype\fR\fR] [\fB\-3\fR] [\fB\-A\ \fR\fB\fIdate/offset\fR\fR] [\fB\-C\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-D\ \fR\fB\fIdate/offset\fR\fR] [\fB\-D\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-f\ \fR\fB\fIflag\fR\fR] [\fB\-G\fR] [\fB\-g\ \fR\fB\fIgenerator\fR\fR] [\fB\-h\fR] [\fB\-I\ \fR\fB\fIdate/offset\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\fR] [\fB\-L\ \fR\fB\fIttl\fR\fR] [\fB\-P\ \fR\fB\fIdate/offset\fR\fR] [\fB\-P\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-p\ \fR\fB\fIprotocol\fR\fR] [\fB\-q\fR] [\fB\-R\ \fR\fB\fIdate/offset\fR\fR] [\fB\-S\ \fR\fB\fIkey\fR\fR] [\fB\-s\ \fR\fB\fIstrength\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-V\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-z\fR] {name}
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBdnssec\-keygen\fR
|
||||
@@ -178,21 +178,6 @@ stderr
|
||||
indicating the progress of the key generation\&. A \*(Aq\&.\*(Aq indicates that a random number has been found which passed an initial sieve test; \*(Aq+\*(Aq means a number has passed a single round of the Miller\-Rabin primality test; a space means that the number has passed all the tests and is a satisfactory key\&.
|
||||
.RE
|
||||
.PP
|
||||
\-r \fIrandomdev\fR
|
||||
.RS 4
|
||||
Specifies a source of randomness\&. Normally, when generating DNSSEC keys, this option has no effect; the random number generation function provided by the cryptographic library will be used\&.
|
||||
.sp
|
||||
If that behavior is disabled at compile time, however, the specified file will be used as entropy source for key generation\&.
|
||||
randomdev
|
||||
is the name of a character device or file containing random data to be used\&. The special value
|
||||
keyboard
|
||||
indicates that keyboard input should be used\&.
|
||||
.sp
|
||||
The default is
|
||||
/dev/random
|
||||
if the operating system provides it or an equivalent device; if not, the default source of randomness is keyboard input\&.
|
||||
.RE
|
||||
.PP
|
||||
\-S \fIkey\fR
|
||||
.RS 4
|
||||
Create a new key which is an explicit successor to an existing key\&. The name, algorithm, size, and type of the key will be set to match the existing key\&. The activation date of the new key will be set to the inactivation date of the existing one\&. The publication date will be set to the activation date minus the prepublication interval, which defaults to 30 days\&.
|
||||
|
||||
+14
-23
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Portions Copyright (C) 1999-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -33,7 +33,6 @@
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/region.h>
|
||||
@@ -53,7 +52,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -107,7 +106,7 @@ usage(void) {
|
||||
fprintf(stderr, " -c <class>: (default: IN)\n");
|
||||
fprintf(stderr, " -d <digest bits> (0 => max, default)\n");
|
||||
fprintf(stderr, " -E <engine>:\n");
|
||||
#if defined(PKCS11CRYPTO)
|
||||
#if HAVE_PKCS11
|
||||
fprintf(stderr, " path to PKCS#11 provider library "
|
||||
"(default is %s)\n", PK11_LIB_LOCATION);
|
||||
#elif defined(USE_PKCS11)
|
||||
@@ -121,7 +120,6 @@ usage(void) {
|
||||
"(DH only)\n");
|
||||
fprintf(stderr, " -L <ttl>: default key TTL\n");
|
||||
fprintf(stderr, " -p <protocol>: (default: 3 [dnssec])\n");
|
||||
fprintf(stderr, " -r <randomdev>: a file containing random data\n");
|
||||
fprintf(stderr, " -s <strength>: strength value this key signs DNS "
|
||||
"records with (default: 0)\n");
|
||||
fprintf(stderr, " -T <rrtype>: DNSKEY | KEY (default: DNSKEY; "
|
||||
@@ -218,7 +216,6 @@ main(int argc, char **argv) {
|
||||
dst_key_t *prevkey = NULL;
|
||||
isc_buffer_t buf;
|
||||
isc_log_t *log = NULL;
|
||||
isc_entropy_t *ectx = NULL;
|
||||
#ifdef USE_PKCS11
|
||||
const char *engine = PKCS11_ENGINE;
|
||||
#else
|
||||
@@ -250,7 +247,7 @@ main(int argc, char **argv) {
|
||||
if (argc == 1)
|
||||
usage();
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
@@ -365,7 +362,8 @@ main(int argc, char **argv) {
|
||||
quiet = ISC_TRUE;
|
||||
break;
|
||||
case 'r':
|
||||
setup_entropy(mctx, isc_commandline_argument, &ectx);
|
||||
fatal("The -r option has been deprecated.\n"
|
||||
"System random data is always used.\n");
|
||||
break;
|
||||
case 's':
|
||||
signatory = strtol(isc_commandline_argument,
|
||||
@@ -494,10 +492,7 @@ main(int argc, char **argv) {
|
||||
if (!isatty(0))
|
||||
quiet = ISC_TRUE;
|
||||
|
||||
if (ectx == NULL)
|
||||
setup_entropy(mctx, NULL, &ectx);
|
||||
ret = dst_lib_init2(mctx, ectx, engine,
|
||||
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
|
||||
ret = dst_lib_init(mctx, engine);
|
||||
if (ret != ISC_R_SUCCESS)
|
||||
fatal("could not initialize dst: %s",
|
||||
isc_result_totext(ret));
|
||||
@@ -513,8 +508,7 @@ main(int argc, char **argv) {
|
||||
if (argc > isc_commandline_index + 1)
|
||||
fatal("extraneous arguments");
|
||||
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
name = dns_fixedname_initname(&fname);
|
||||
isc_buffer_init(&buf, argv[isc_commandline_index],
|
||||
strlen(argv[isc_commandline_index]));
|
||||
isc_buffer_add(&buf, strlen(argv[isc_commandline_index]));
|
||||
@@ -862,19 +856,17 @@ main(int argc, char **argv) {
|
||||
|
||||
if (!quiet && show_progress) {
|
||||
fprintf(stderr, "Generating key pair.");
|
||||
ret = dst_key_generate2(name, alg, size, param, flags,
|
||||
protocol, rdclass, mctx, &key,
|
||||
&progress);
|
||||
ret = dst_key_generate(name, alg, size, param, flags,
|
||||
protocol, rdclass, mctx, &key,
|
||||
&progress);
|
||||
putc('\n', stderr);
|
||||
fflush(stderr);
|
||||
} else {
|
||||
ret = dst_key_generate2(name, alg, size, param, flags,
|
||||
protocol, rdclass, mctx, &key,
|
||||
NULL);
|
||||
ret = dst_key_generate(name, alg, size, param, flags,
|
||||
protocol, rdclass, mctx, &key,
|
||||
NULL);
|
||||
}
|
||||
|
||||
isc_entropy_stopcallbacksources(ectx);
|
||||
|
||||
if (ret != ISC_R_SUCCESS) {
|
||||
char namestr[DNS_NAME_FORMATSIZE];
|
||||
char algstr[DNS_SECALG_FORMATSIZE];
|
||||
@@ -1027,7 +1019,6 @@ main(int argc, char **argv) {
|
||||
dst_key_free(&prevkey);
|
||||
|
||||
cleanup_logging(&log);
|
||||
cleanup_entropy(&ectx);
|
||||
dst_lib_destroy();
|
||||
dns_name_destroy();
|
||||
if (verbose > 10)
|
||||
|
||||
@@ -81,7 +81,6 @@
|
||||
<arg choice="opt" rep="norepeat"><option>-p <replaceable class="parameter">protocol</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-q</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-R <replaceable class="parameter">date/offset</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">randomdev</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-S <replaceable class="parameter">key</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">strength</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">type</replaceable></option></arg>
|
||||
@@ -349,31 +348,6 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-r <replaceable class="parameter">randomdev</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies a source of randomness. Normally, when generating
|
||||
DNSSEC keys, this option has no effect; the random number
|
||||
generation function provided by the cryptographic library will
|
||||
be used.
|
||||
</para>
|
||||
<para>
|
||||
If that behavior is disabled at compile time, however,
|
||||
the specified file will be used as entropy source
|
||||
for key generation. <filename>randomdev</filename> is
|
||||
the name of a character device or file containing random
|
||||
data to be used. The special value <filename>keyboard</filename>
|
||||
indicates that keyboard input should be used.
|
||||
</para>
|
||||
<para>
|
||||
The default is <filename>/dev/random</filename> if the
|
||||
operating system provides it or an equivalent device;
|
||||
if not, the default source of randomness is keyboard input.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-S <replaceable class="parameter">key</replaceable></term>
|
||||
<listitem>
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
[<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>]
|
||||
[<code class="option">-q</code>]
|
||||
[<code class="option">-R <em class="replaceable"><code>date/offset</code></em></code>]
|
||||
[<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>]
|
||||
[<code class="option">-S <em class="replaceable"><code>key</code></em></code>]
|
||||
[<code class="option">-s <em class="replaceable"><code>strength</code></em></code>]
|
||||
[<code class="option">-t <em class="replaceable"><code>type</code></em></code>]
|
||||
@@ -279,28 +278,6 @@
|
||||
a satisfactory key.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-r <em class="replaceable"><code>randomdev</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies a source of randomness. Normally, when generating
|
||||
DNSSEC keys, this option has no effect; the random number
|
||||
generation function provided by the cryptographic library will
|
||||
be used.
|
||||
</p>
|
||||
<p>
|
||||
If that behavior is disabled at compile time, however,
|
||||
the specified file will be used as entropy source
|
||||
for key generation. <code class="filename">randomdev</code> is
|
||||
the name of a character device or file containing random
|
||||
data to be used. The special value <code class="filename">keyboard</code>
|
||||
indicates that keyboard input should be used.
|
||||
</p>
|
||||
<p>
|
||||
The default is <code class="filename">/dev/random</code> if the
|
||||
operating system provides it or an equivalent device;
|
||||
if not, the default source of randomness is keyboard input.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-S <em class="replaceable"><code>key</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2009, 2011, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2009, 2011, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -99,5 +99,5 @@ RFC 5011\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2009, 2011, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2009, 2011, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/mem.h>
|
||||
@@ -31,7 +30,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -50,7 +49,7 @@ usage(void) {
|
||||
fprintf(stderr, "Usage:\n");
|
||||
fprintf(stderr, " %s [options] keyfile\n\n", program);
|
||||
fprintf(stderr, "Version: %s\n", VERSION);
|
||||
#if defined(PKCS11CRYPTO)
|
||||
#if HAVE_PKCS11
|
||||
fprintf(stderr, " -E engine: specify PKCS#11 provider "
|
||||
"(default: %s)\n", PK11_LIB_LOCATION);
|
||||
#elif defined(USE_PKCS11)
|
||||
@@ -87,7 +86,6 @@ main(int argc, char **argv) {
|
||||
char keystr[DST_KEY_FORMATSIZE];
|
||||
char *endp;
|
||||
int ch;
|
||||
isc_entropy_t *ectx = NULL;
|
||||
dst_key_t *key = NULL;
|
||||
isc_uint32_t flags;
|
||||
isc_buffer_t buf;
|
||||
@@ -102,7 +100,7 @@ main(int argc, char **argv) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("Out of memory");
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
@@ -180,17 +178,10 @@ main(int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
|
||||
if (ectx == NULL)
|
||||
setup_entropy(mctx, NULL, &ectx);
|
||||
result = dst_lib_init2(mctx, ectx, engine,
|
||||
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
|
||||
result = dst_lib_init(mctx, engine);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("Could not initialize dst: %s",
|
||||
isc_result_totext(result));
|
||||
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("Could not initialize hash");
|
||||
isc_entropy_stopcallbacksources(ectx);
|
||||
|
||||
result = dst_key_fromnamedfile(filename, dir,
|
||||
DST_TYPE_PUBLIC|DST_TYPE_PRIVATE,
|
||||
@@ -271,9 +262,7 @@ main(int argc, char **argv) {
|
||||
|
||||
cleanup:
|
||||
dst_key_free(&key);
|
||||
isc_hash_destroy();
|
||||
dst_lib_destroy();
|
||||
cleanup_entropy(&ectx);
|
||||
if (verbose > 10)
|
||||
isc_mem_stats(mctx, stdout);
|
||||
if (dir != NULL)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2009, 2011, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2009, 2011, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2009-2011, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2009-2011, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -200,5 +200,5 @@ RFC 5011\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2009-2011, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2009-2011, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/mem.h>
|
||||
@@ -34,7 +33,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -54,7 +53,7 @@ usage(void) {
|
||||
fprintf(stderr, " %s [options] keyfile\n\n", program);
|
||||
fprintf(stderr, "Version: %s\n", VERSION);
|
||||
fprintf(stderr, "General options:\n");
|
||||
#if defined(PKCS11CRYPTO)
|
||||
#if HAVE_PKCS11
|
||||
fprintf(stderr, " -E engine: specify PKCS#11 provider "
|
||||
"(default: %s)\n", PK11_LIB_LOCATION);
|
||||
#elif defined(USE_PKCS11)
|
||||
@@ -139,7 +138,6 @@ main(int argc, char **argv) {
|
||||
char keystr[DST_KEY_FORMATSIZE];
|
||||
char *endp, *p;
|
||||
int ch;
|
||||
isc_entropy_t *ectx = NULL;
|
||||
const char *predecessor = NULL;
|
||||
dst_key_t *prevkey = NULL;
|
||||
dst_key_t *key = NULL;
|
||||
@@ -180,7 +178,7 @@ main(int argc, char **argv) {
|
||||
|
||||
setup_logging(mctx, &log);
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
@@ -378,17 +376,10 @@ main(int argc, char **argv) {
|
||||
if (argc > isc_commandline_index + 1)
|
||||
fatal("Extraneous arguments");
|
||||
|
||||
if (ectx == NULL)
|
||||
setup_entropy(mctx, NULL, &ectx);
|
||||
result = dst_lib_init2(mctx, ectx, engine,
|
||||
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
|
||||
result = dst_lib_init(mctx, engine);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("Could not initialize dst: %s",
|
||||
isc_result_totext(result));
|
||||
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("Could not initialize hash");
|
||||
isc_entropy_stopcallbacksources(ectx);
|
||||
|
||||
if (predecessor != NULL) {
|
||||
int major, minor;
|
||||
@@ -672,9 +663,7 @@ main(int argc, char **argv) {
|
||||
if (prevkey != NULL)
|
||||
dst_key_free(&prevkey);
|
||||
dst_key_free(&key);
|
||||
isc_hash_destroy();
|
||||
dst_lib_destroy();
|
||||
cleanup_entropy(&ectx);
|
||||
if (verbose > 10)
|
||||
isc_mem_stats(mctx, stdout);
|
||||
cleanup_logging(&log);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2009-2011, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2009-2011, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2000-2009, 2011-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000-2009, 2011-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -39,7 +39,7 @@
|
||||
dnssec-signzone \- DNSSEC zone signing tool
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBdnssec\-signzone\fR\ 'u
|
||||
\fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-f\ \fR\fB\fIoutput\-file\fR\fR] [\fB\-g\fR] [\fB\-h\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-I\ \fR\fB\fIinput\-format\fR\fR] [\fB\-j\ \fR\fB\fIjitter\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\ \fR\fB\fIkey\fR\fR] [\fB\-L\ \fR\fB\fIserial\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-M\ \fR\fB\fImaxttl\fR\fR] [\fB\-N\ \fR\fB\fIsoa\-serial\-format\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-O\ \fR\fB\fIoutput\-format\fR\fR] [\fB\-P\fR] [\fB\-p\fR] [\fB\-Q\fR] [\fB\-R\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-S\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-T\ \fR\fB\fIttl\fR\fR] [\fB\-t\fR] [\fB\-u\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-V\fR] [\fB\-X\ \fR\fB\fIextended\ end\-time\fR\fR] [\fB\-x\fR] [\fB\-z\fR] [\fB\-3\ \fR\fB\fIsalt\fR\fR] [\fB\-H\ \fR\fB\fIiterations\fR\fR] [\fB\-A\fR] {zonefile} [key...]
|
||||
\fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-f\ \fR\fB\fIoutput\-file\fR\fR] [\fB\-g\fR] [\fB\-h\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-I\ \fR\fB\fIinput\-format\fR\fR] [\fB\-j\ \fR\fB\fIjitter\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\ \fR\fB\fIkey\fR\fR] [\fB\-L\ \fR\fB\fIserial\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-M\ \fR\fB\fImaxttl\fR\fR] [\fB\-N\ \fR\fB\fIsoa\-serial\-format\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-O\ \fR\fB\fIoutput\-format\fR\fR] [\fB\-P\fR] [\fB\-Q\fR] [\fB\-R\fR] [\fB\-S\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-T\ \fR\fB\fIttl\fR\fR] [\fB\-t\fR] [\fB\-u\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-V\fR] [\fB\-X\ \fR\fB\fIextended\ end\-time\fR\fR] [\fB\-x\fR] [\fB\-z\fR] [\fB\-3\ \fR\fB\fIsalt\fR\fR] [\fB\-H\ \fR\fB\fIiterations\fR\fR] [\fB\-A\fR] {zonefile} [key...]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
\fBdnssec\-signzone\fR
|
||||
@@ -278,11 +278,6 @@ specifies the format version of the raw zone file: if N is 0, the raw file can b
|
||||
\fBnamed\fR; if N is 1, the file can be read by release 9\&.9\&.0 or higher; the default is 1\&.
|
||||
.RE
|
||||
.PP
|
||||
\-p
|
||||
.RS 4
|
||||
Use pseudo\-random data when signing the zone\&. This is faster, but less secure, than using real random data\&. This option may be useful when signing large zones or when the entropy source is limited\&.
|
||||
.RE
|
||||
.PP
|
||||
\-P
|
||||
.RS 4
|
||||
Disable post sign verification tests\&.
|
||||
@@ -311,17 +306,6 @@ This option is similar to
|
||||
to signatures from keys that are no longer published\&. This enables ZSK rollover using the procedure described in RFC 4641, section 4\&.2\&.1\&.2 ("Double Signature Zone Signing Key Rollover")\&.
|
||||
.RE
|
||||
.PP
|
||||
\-r \fIrandomdev\fR
|
||||
.RS 4
|
||||
Specifies the source of randomness\&. If the operating system does not provide a
|
||||
/dev/random
|
||||
or equivalent device, the default source of randomness is keyboard input\&.
|
||||
randomdev
|
||||
specifies the name of a character device or file containing random data to be used instead of the default\&. The special value
|
||||
keyboard
|
||||
indicates that keyboard input should be used\&.
|
||||
.RE
|
||||
.PP
|
||||
\-S
|
||||
.RS 4
|
||||
Smart signing: Instructs
|
||||
@@ -484,5 +468,5 @@ RFC 4641\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2000-2009, 2011-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2000-2009, 2011-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Portions Copyright (C) 1999-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
* Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -34,7 +34,6 @@
|
||||
#include <isc/app.h>
|
||||
#include <isc/base32.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/event.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/hash.h>
|
||||
@@ -80,7 +79,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -130,7 +129,6 @@ static int jitter = 0;
|
||||
static isc_boolean_t tryverify = ISC_FALSE;
|
||||
static isc_boolean_t printstats = ISC_FALSE;
|
||||
static isc_mem_t *mctx = NULL;
|
||||
static isc_entropy_t *ectx = NULL;
|
||||
static dns_ttl_t zone_soa_min_ttl;
|
||||
static dns_ttl_t soa_ttl;
|
||||
static FILE *outfp = NULL;
|
||||
@@ -282,11 +280,10 @@ signwithkey(dns_name_t *name, dns_rdataset_t *rdataset, dst_key_t *key,
|
||||
else
|
||||
expiry = endtime;
|
||||
|
||||
jendtime = (jitter != 0) ? isc_random_jitter(expiry, jitter) : expiry;
|
||||
jendtime = (jitter != 0) ? expiry - isc_random_uniform(jitter) : expiry;
|
||||
isc_buffer_init(&b, array, sizeof(array));
|
||||
result = dns_dnssec_sign(name, rdataset, key, &starttime, &jendtime,
|
||||
mctx, &b, &trdata);
|
||||
isc_entropy_stopcallbacksources(ectx);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("dnskey '%s' failed to sign data: %s",
|
||||
keystr, isc_result_totext(result));
|
||||
@@ -295,8 +292,8 @@ signwithkey(dns_name_t *name, dns_rdataset_t *rdataset, dst_key_t *key,
|
||||
|
||||
if (tryverify) {
|
||||
result = dns_dnssec_verify(name, rdataset, key,
|
||||
ISC_TRUE, mctx, &trdata);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
ISC_TRUE, 0, mctx, &trdata, NULL);
|
||||
if (result == ISC_R_SUCCESS || result == DNS_R_FROMWILDCARD) {
|
||||
vbprintf(3, "\tsignature verified\n");
|
||||
INCSTAT(nverified);
|
||||
} else {
|
||||
@@ -456,8 +453,9 @@ setverifies(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
|
||||
dns_rdata_t *rrsig)
|
||||
{
|
||||
isc_result_t result;
|
||||
result = dns_dnssec_verify(name, set, key, ISC_FALSE, mctx, rrsig);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
result = dns_dnssec_verify(name, set, key, ISC_FALSE, 0, mctx, rrsig,
|
||||
NULL);
|
||||
if (result == ISC_R_SUCCESS || result == DNS_R_FROMWILDCARD) {
|
||||
INCSTAT(nverified);
|
||||
return (ISC_TRUE);
|
||||
} else {
|
||||
@@ -849,8 +847,7 @@ addnowildcardhash(hashlist_t *l, /*const*/ dns_name_t *name,
|
||||
isc_result_t result;
|
||||
char namestr[DNS_NAME_FORMATSIZE];
|
||||
|
||||
dns_fixedname_init(&fixed);
|
||||
wild = dns_fixedname_name(&fixed);
|
||||
wild = dns_fixedname_initname(&fixed);
|
||||
|
||||
result = dns_name_concatenate(dns_wildcardname, name, wild, NULL);
|
||||
if (result == ISC_R_NOSPACE)
|
||||
@@ -905,7 +902,7 @@ opendb(const char *prefix, dns_name_t *name, dns_rdataclass_t rdclass,
|
||||
rdclass, 0, NULL, dbp);
|
||||
check_result(result, "dns_db_create()");
|
||||
|
||||
result = dns_db_load3(*dbp, filename, inputformat, DNS_MASTER_HINT);
|
||||
result = dns_db_load(*dbp, filename, inputformat, DNS_MASTER_HINT);
|
||||
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
|
||||
dns_db_detach(dbp);
|
||||
}
|
||||
@@ -1236,8 +1233,7 @@ get_soa_ttls(void) {
|
||||
isc_result_t result;
|
||||
dns_rdata_t rdata = DNS_RDATA_INIT;
|
||||
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
name = dns_fixedname_initname(&fname);
|
||||
dns_rdataset_init(&soaset);
|
||||
result = dns_db_find(gdb, gorigin, gversion, dns_rdatatype_soa,
|
||||
0, 0, NULL, name, &soaset, NULL);
|
||||
@@ -1406,8 +1402,7 @@ signapex(void) {
|
||||
dns_name_t *name;
|
||||
isc_result_t result;
|
||||
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
result = dns_dbiterator_seek(gdbiter, gorigin);
|
||||
check_result(result, "dns_dbiterator_seek()");
|
||||
result = dns_dbiterator_current(gdbiter, &node, name);
|
||||
@@ -1457,8 +1452,7 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
|
||||
fname = isc_mem_get(mctx, sizeof(dns_fixedname_t));
|
||||
if (fname == NULL)
|
||||
fatal("out of memory");
|
||||
dns_fixedname_init(fname);
|
||||
name = dns_fixedname_name(fname);
|
||||
name = dns_fixedname_initname(fname);
|
||||
node = NULL;
|
||||
found = ISC_FALSE;
|
||||
while (!found) {
|
||||
@@ -1492,8 +1486,7 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
|
||||
(zonecut == NULL ||
|
||||
!dns_name_issubdomain(name, zonecut))) {
|
||||
if (is_delegation(gdb, gversion, gorigin, name, node, NULL)) {
|
||||
dns_fixedname_init(&fzonecut);
|
||||
zonecut = dns_fixedname_name(&fzonecut);
|
||||
zonecut = dns_fixedname_initname(&fzonecut);
|
||||
dns_name_copy(name, zonecut, NULL);
|
||||
if (!OPTOUT(nsec3flags) ||
|
||||
secure(name, node))
|
||||
@@ -1736,10 +1729,8 @@ nsecify(void) {
|
||||
isc_uint32_t nsttl = 0;
|
||||
|
||||
dns_rdataset_init(&rdataset);
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
dns_fixedname_init(&fnextname);
|
||||
nextname = dns_fixedname_name(&fnextname);
|
||||
name = dns_fixedname_initname(&fname);
|
||||
nextname = dns_fixedname_initname(&fnextname);
|
||||
dns_fixedname_init(&fzonecut);
|
||||
zonecut = NULL;
|
||||
|
||||
@@ -2151,8 +2142,7 @@ cleanup_zone(void) {
|
||||
|
||||
dns_diff_init(mctx, &add);
|
||||
dns_diff_init(mctx, &del);
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
name = dns_fixedname_initname(&fname);
|
||||
dns_rdataset_init(&rdataset);
|
||||
|
||||
result = dns_db_createiterator(gdb, 0, &dbiter);
|
||||
@@ -2212,10 +2202,8 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
|
||||
unsigned int count, nlabels;
|
||||
|
||||
dns_rdataset_init(&rdataset);
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
dns_fixedname_init(&fnextname);
|
||||
nextname = dns_fixedname_name(&fnextname);
|
||||
name = dns_fixedname_initname(&fname);
|
||||
nextname = dns_fixedname_initname(&fnextname);
|
||||
dns_fixedname_init(&fzonecut);
|
||||
zonecut = NULL;
|
||||
|
||||
@@ -2459,8 +2447,7 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) {
|
||||
isc_buffer_init(&b, origin, len);
|
||||
isc_buffer_add(&b, len);
|
||||
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
name = dns_fixedname_initname(&fname);
|
||||
result = dns_name_fromtext(name, &b, dns_rootname, 0, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("failed converting name '%s' to dns format: %s",
|
||||
@@ -2470,7 +2457,7 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) {
|
||||
rdclass, 0, NULL, db);
|
||||
check_result(result, "dns_db_create()");
|
||||
|
||||
result = dns_db_load2(*db, file, inputformat);
|
||||
result = dns_db_load(*db, file, inputformat, 0);
|
||||
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
|
||||
fatal("failed loading zone from '%s': %s",
|
||||
file, isc_result_totext(result));
|
||||
@@ -2636,7 +2623,7 @@ build_final_keylist(void) {
|
||||
* Find keys that match this zone in the key repository.
|
||||
*/
|
||||
result = dns_dnssec_findmatchingkeys(gorigin, directory,
|
||||
mctx, &matchkeys);
|
||||
now, mctx, &matchkeys);
|
||||
if (result == ISC_R_NOTFOUND) {
|
||||
result = ISC_R_SUCCESS;
|
||||
}
|
||||
@@ -2808,8 +2795,7 @@ set_nsec3params(isc_boolean_t update, isc_boolean_t set_salt,
|
||||
* (This assumes all NSEC3 records agree.)
|
||||
*/
|
||||
|
||||
dns_fixedname_init(&fname);
|
||||
hashname = dns_fixedname_name(&fname);
|
||||
hashname = dns_fixedname_initname(&fname);
|
||||
result = dns_nsec3_hashname(&fname, NULL, NULL,
|
||||
gorigin, gorigin, dns_hash_sha1,
|
||||
orig_iter, orig_salt, orig_saltlen);
|
||||
@@ -2898,8 +2884,7 @@ writeset(const char *prefix, dns_rdatatype_t type) {
|
||||
unsigned int labels;
|
||||
|
||||
dns_name_init(&tname, NULL);
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
labels = dns_name_countlabels(gorigin);
|
||||
dns_name_getlabelsequence(gorigin, 0, labels - 1, &tname);
|
||||
result = dns_name_concatenate(&tname, dlv, name, NULL);
|
||||
@@ -2985,7 +2970,8 @@ writeset(const char *prefix, dns_rdatatype_t type) {
|
||||
check_result(result, "dns_diff_apply");
|
||||
dns_diff_clear(&diff);
|
||||
|
||||
result = dns_master_dump(mctx, db, dbversion, style, filename);
|
||||
result = dns_master_dump(mctx, db, dbversion, style, filename,
|
||||
dns_masterformat_text, NULL);
|
||||
check_result(result, "dns_master_dump");
|
||||
|
||||
isc_mem_put(mctx, filename, filenamelen);
|
||||
@@ -3067,13 +3053,11 @@ usage(void) {
|
||||
fprintf(stderr, "\t\tsoa serial format of signed zone file (keep)\n");
|
||||
fprintf(stderr, "\t-D:\n");
|
||||
fprintf(stderr, "\t\toutput only DNSSEC-related records\n");
|
||||
fprintf(stderr, "\t-r randomdev:\n");
|
||||
fprintf(stderr, "\t\ta file containing random data\n");
|
||||
fprintf(stderr, "\t-a:\t");
|
||||
fprintf(stderr, "verify generated signatures\n");
|
||||
fprintf(stderr, "\t-c class (IN)\n");
|
||||
fprintf(stderr, "\t-E engine:\n");
|
||||
#if defined(PKCS11CRYPTO)
|
||||
#if HAVE_PKCS11
|
||||
fprintf(stderr, "\t\tpath to PKCS#11 provider library "
|
||||
"(default is %s)\n", PK11_LIB_LOCATION);
|
||||
#elif defined(USE_PKCS11)
|
||||
@@ -3082,8 +3066,6 @@ usage(void) {
|
||||
#else
|
||||
fprintf(stderr, "\t\tname of an OpenSSL engine to use\n");
|
||||
#endif
|
||||
fprintf(stderr, "\t-p:\t");
|
||||
fprintf(stderr, "use pseudorandom data (faster but less secure)\n");
|
||||
fprintf(stderr, "\t-P:\t");
|
||||
fprintf(stderr, "disable post-sign verification\n");
|
||||
fprintf(stderr, "\t-Q:\t");
|
||||
@@ -3173,13 +3155,11 @@ main(int argc, char *argv[]) {
|
||||
dns_dnsseckey_t *key;
|
||||
isc_result_t result;
|
||||
isc_log_t *log = NULL;
|
||||
isc_boolean_t pseudorandom = ISC_FALSE;
|
||||
#ifdef USE_PKCS11
|
||||
const char *engine = PKCS11_ENGINE;
|
||||
#else
|
||||
const char *engine = NULL;
|
||||
#endif
|
||||
unsigned int eflags;
|
||||
isc_boolean_t free_output = ISC_FALSE;
|
||||
int tempfilelen = 0;
|
||||
dns_rdataclass_t rdclass;
|
||||
@@ -3232,7 +3212,7 @@ main(int argc, char *argv[]) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("out of memory");
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
@@ -3364,8 +3344,7 @@ main(int argc, char *argv[]) {
|
||||
isc_buffer_init(&b, isc_commandline_argument, len);
|
||||
isc_buffer_add(&b, len);
|
||||
|
||||
dns_fixedname_init(&dlv_fixed);
|
||||
dlv = dns_fixedname_name(&dlv_fixed);
|
||||
dlv = dns_fixedname_initname(&dlv_fixed);
|
||||
result = dns_name_fromtext(dlv, &b, dns_rootname, 0,
|
||||
NULL);
|
||||
check_result(result, "dns_name_fromtext(dlv)");
|
||||
@@ -3409,7 +3388,7 @@ main(int argc, char *argv[]) {
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
pseudorandom = ISC_TRUE;
|
||||
fatal("The -p option has been deprecated.\n");
|
||||
break;
|
||||
|
||||
case 'Q':
|
||||
@@ -3421,7 +3400,7 @@ main(int argc, char *argv[]) {
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
setup_entropy(mctx, isc_commandline_argument, &ectx);
|
||||
fatal("The -r options has been deprecated.\n");
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
@@ -3497,21 +3476,11 @@ main(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
if (ectx == NULL)
|
||||
setup_entropy(mctx, NULL, &ectx);
|
||||
eflags = ISC_ENTROPY_BLOCKING;
|
||||
if (!pseudorandom)
|
||||
eflags |= ISC_ENTROPY_GOODONLY;
|
||||
|
||||
result = dst_lib_init2(mctx, ectx, engine, eflags);
|
||||
result = dst_lib_init(mctx, engine);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not initialize dst: %s",
|
||||
isc_result_totext(result));
|
||||
|
||||
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not create hash context");
|
||||
|
||||
isc_stdtime_get(&now);
|
||||
|
||||
if (startstr != NULL) {
|
||||
@@ -3637,8 +3606,8 @@ main(int argc, char *argv[]) {
|
||||
if (output_dnssec_only && set_maxttl)
|
||||
fatal("option -D cannot be used with -M");
|
||||
|
||||
result = dns_master_stylecreate(&dsstyle, DNS_STYLEFLAG_NO_TTL,
|
||||
0, 24, 0, 0, 0, 8, mctx);
|
||||
result = dns_master_stylecreate(&dsstyle, DNS_STYLEFLAG_NO_TTL,
|
||||
0, 24, 0, 0, 0, 8, 0xffffffff, mctx);
|
||||
check_result(result, "dns_master_stylecreate");
|
||||
|
||||
gdb = NULL;
|
||||
@@ -3882,9 +3851,9 @@ main(int argc, char *argv[]) {
|
||||
header.flags = DNS_MASTERRAW_SOURCESERIALSET;
|
||||
header.sourceserial = serialnum;
|
||||
}
|
||||
result = dns_master_dumptostream3(mctx, gdb, gversion,
|
||||
masterstyle, outputformat,
|
||||
&header, outfp);
|
||||
result = dns_master_dumptostream(mctx, gdb, gversion,
|
||||
masterstyle, outputformat,
|
||||
&header, outfp);
|
||||
check_result(result, "dns_master_dumptostream3");
|
||||
}
|
||||
|
||||
@@ -3925,9 +3894,7 @@ main(int argc, char *argv[]) {
|
||||
dns_master_styledestroy(&dsstyle, mctx);
|
||||
|
||||
cleanup_logging(&log);
|
||||
isc_hash_destroy();
|
||||
dst_lib_destroy();
|
||||
cleanup_entropy(&ectx);
|
||||
dns_name_destroy();
|
||||
if (verbose > 10)
|
||||
isc_mem_stats(mctx, stdout);
|
||||
|
||||
@@ -78,10 +78,8 @@
|
||||
<arg choice="opt" rep="norepeat"><option>-o <replaceable class="parameter">origin</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-O <replaceable class="parameter">output-format</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-P</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-p</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-Q</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-R</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">randomdev</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-S</option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">start-time</replaceable></option></arg>
|
||||
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">ttl</replaceable></option></arg>
|
||||
@@ -508,18 +506,6 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-p</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use pseudo-random data when signing the zone. This is faster,
|
||||
but less secure, than using real random data. This option
|
||||
may be useful when signing large zones or when the entropy
|
||||
source is limited.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-P</term>
|
||||
<listitem>
|
||||
@@ -571,23 +557,6 @@
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>-r <replaceable class="parameter">randomdev</replaceable></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Specifies the source of randomness. If the operating
|
||||
system does not provide a <filename>/dev/random</filename>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <filename>randomdev</filename>
|
||||
specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<filename>keyboard</filename> indicates that keyboard
|
||||
input should be used.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-S</term>
|
||||
<listitem>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2000-2009, 2011-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000-2009, 2011-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -54,10 +54,8 @@
|
||||
[<code class="option">-o <em class="replaceable"><code>origin</code></em></code>]
|
||||
[<code class="option">-O <em class="replaceable"><code>output-format</code></em></code>]
|
||||
[<code class="option">-P</code>]
|
||||
[<code class="option">-p</code>]
|
||||
[<code class="option">-Q</code>]
|
||||
[<code class="option">-R</code>]
|
||||
[<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>]
|
||||
[<code class="option">-S</code>]
|
||||
[<code class="option">-s <em class="replaceable"><code>start-time</code></em></code>]
|
||||
[<code class="option">-T <em class="replaceable"><code>ttl</code></em></code>]
|
||||
@@ -400,15 +398,6 @@
|
||||
can be read by release 9.9.0 or higher; the default is 1.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-p</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Use pseudo-random data when signing the zone. This is faster,
|
||||
but less secure, than using real random data. This option
|
||||
may be useful when signing large zones or when the entropy
|
||||
source is limited.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-P</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
@@ -453,20 +442,6 @@
|
||||
("Double Signature Zone Signing Key Rollover").
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-r <em class="replaceable"><code>randomdev</code></em></span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
Specifies the source of randomness. If the operating
|
||||
system does not provide a <code class="filename">/dev/random</code>
|
||||
or equivalent device, the default source of randomness
|
||||
is keyboard input. <code class="filename">randomdev</code>
|
||||
specifies
|
||||
the name of a character device or file containing random
|
||||
data to be used instead of the default. The special value
|
||||
<code class="filename">keyboard</code> indicates that keyboard
|
||||
input should be used.
|
||||
</p>
|
||||
</dd>
|
||||
<dt><span class="term">-S</span></dt>
|
||||
<dd>
|
||||
<p>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\"
|
||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
@@ -113,5 +113,5 @@ RFC 4033\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <isc/app.h>
|
||||
#include <isc/base32.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/event.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/hash.h>
|
||||
@@ -62,7 +61,7 @@
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -73,7 +72,6 @@ int verbose;
|
||||
|
||||
static isc_stdtime_t now;
|
||||
static isc_mem_t *mctx = NULL;
|
||||
static isc_entropy_t *ectx = NULL;
|
||||
static dns_masterformat_t inputformat = dns_masterformat_text;
|
||||
static dns_db_t *gdb; /* The database */
|
||||
static dns_dbversion_t *gversion; /* The database version */
|
||||
@@ -97,8 +95,7 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) {
|
||||
isc_buffer_init(&b, origin, len);
|
||||
isc_buffer_add(&b, len);
|
||||
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
name = dns_fixedname_initname(&fname);
|
||||
result = dns_name_fromtext(name, &b, dns_rootname, 0, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("failed converting name '%s' to dns format: %s",
|
||||
@@ -108,7 +105,7 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) {
|
||||
rdclass, 0, NULL, db);
|
||||
check_result(result, "dns_db_create()");
|
||||
|
||||
result = dns_db_load2(*db, file, inputformat);
|
||||
result = dns_db_load(*db, file, inputformat, 0);
|
||||
switch (result) {
|
||||
case DNS_R_SEENINCLUDE:
|
||||
case ISC_R_SUCCESS:
|
||||
@@ -152,7 +149,7 @@ usage(void) {
|
||||
fprintf(stderr, "\t\tfile format of input zonefile (text)\n");
|
||||
fprintf(stderr, "\t-c class (IN)\n");
|
||||
fprintf(stderr, "\t-E engine:\n");
|
||||
#if defined(PKCS11CRYPTO)
|
||||
#if HAVE_PKCS11
|
||||
fprintf(stderr, "\t\tpath to PKCS#11 provider library "
|
||||
"(default is %s)\n", PK11_LIB_LOCATION);
|
||||
#elif defined(USE_PKCS11)
|
||||
@@ -214,7 +211,7 @@ main(int argc, char *argv[]) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("out of memory");
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
@@ -278,18 +275,11 @@ main(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
if (ectx == NULL)
|
||||
setup_entropy(mctx, NULL, &ectx);
|
||||
|
||||
result = dst_lib_init2(mctx, ectx, engine, ISC_ENTROPY_BLOCKING);
|
||||
result = dst_lib_init(mctx, engine);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not initialize dst: %s",
|
||||
isc_result_totext(result));
|
||||
|
||||
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not create hash context");
|
||||
|
||||
isc_stdtime_get(&now);
|
||||
|
||||
rdclass = strtoclass(classname);
|
||||
@@ -340,8 +330,6 @@ main(int argc, char *argv[]) {
|
||||
|
||||
cleanup_logging(&log);
|
||||
dst_lib_destroy();
|
||||
isc_hash_destroy();
|
||||
cleanup_entropy(&ectx);
|
||||
dns_name_destroy();
|
||||
if (verbose > 10)
|
||||
isc_mem_stats(mctx, stdout);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
- Copyright (C) 2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
-
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
||||
+8
-74
@@ -27,7 +27,6 @@
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/dir.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/heap.h>
|
||||
#include <isc/list.h>
|
||||
@@ -73,15 +72,6 @@ struct nsec3_chain_fixed {
|
||||
extern int verbose;
|
||||
extern const char *program;
|
||||
|
||||
typedef struct entropysource entropysource_t;
|
||||
|
||||
struct entropysource {
|
||||
isc_entropysource_t *source;
|
||||
isc_mem_t *mctx;
|
||||
ISC_LINK(entropysource_t) link;
|
||||
};
|
||||
|
||||
static ISC_LIST(entropysource_t) sources;
|
||||
static fatalcallback_t *fatalcallback = NULL;
|
||||
|
||||
void
|
||||
@@ -222,63 +212,6 @@ cleanup_logging(isc_log_t **logp) {
|
||||
dns_log_setcontext(NULL);
|
||||
}
|
||||
|
||||
void
|
||||
setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx) {
|
||||
isc_result_t result;
|
||||
isc_entropysource_t *source = NULL;
|
||||
entropysource_t *elt;
|
||||
int usekeyboard = ISC_ENTROPY_KEYBOARDMAYBE;
|
||||
|
||||
REQUIRE(ectx != NULL);
|
||||
|
||||
if (*ectx == NULL) {
|
||||
result = isc_entropy_create(mctx, ectx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not create entropy object: %s",
|
||||
isc_result_totext(result));
|
||||
ISC_LIST_INIT(sources);
|
||||
}
|
||||
|
||||
#ifdef ISC_PLATFORM_CRYPTORANDOM
|
||||
if (randomfile == NULL) {
|
||||
isc_entropy_usehook(*ectx, ISC_TRUE);
|
||||
}
|
||||
#endif
|
||||
if (randomfile != NULL && strcmp(randomfile, "keyboard") == 0) {
|
||||
usekeyboard = ISC_ENTROPY_KEYBOARDYES;
|
||||
randomfile = NULL;
|
||||
}
|
||||
|
||||
result = isc_entropy_usebestsource(*ectx, &source, randomfile,
|
||||
usekeyboard);
|
||||
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fatal("could not initialize entropy source: %s",
|
||||
isc_result_totext(result));
|
||||
|
||||
if (source != NULL) {
|
||||
elt = isc_mem_get(mctx, sizeof(*elt));
|
||||
if (elt == NULL)
|
||||
fatal("out of memory");
|
||||
elt->source = source;
|
||||
elt->mctx = mctx;
|
||||
ISC_LINK_INIT(elt, link);
|
||||
ISC_LIST_APPEND(sources, elt, link);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
cleanup_entropy(isc_entropy_t **ectx) {
|
||||
entropysource_t *source;
|
||||
while (!ISC_LIST_EMPTY(sources)) {
|
||||
source = ISC_LIST_HEAD(sources);
|
||||
ISC_LIST_UNLINK(sources, source, link);
|
||||
isc_entropy_destroysource(&source->source);
|
||||
isc_mem_put(source->mctx, source, sizeof(*source));
|
||||
}
|
||||
isc_entropy_detach(ectx);
|
||||
}
|
||||
|
||||
static isc_stdtime_t
|
||||
time_units(isc_stdtime_t offset, char *suffix, const char *str) {
|
||||
switch (suffix[0]) {
|
||||
@@ -506,6 +439,7 @@ key_collision(dst_key_t *dstkey, dns_name_t *name, const char *dir,
|
||||
dns_secalg_t alg;
|
||||
char filename[ISC_DIR_NAMEMAX];
|
||||
isc_buffer_t fileb;
|
||||
isc_stdtime_t now;
|
||||
|
||||
if (exact != NULL)
|
||||
*exact = ISC_FALSE;
|
||||
@@ -529,7 +463,8 @@ key_collision(dst_key_t *dstkey, dns_name_t *name, const char *dir,
|
||||
}
|
||||
|
||||
ISC_LIST_INIT(matchkeys);
|
||||
result = dns_dnssec_findmatchingkeys(name, dir, mctx, &matchkeys);
|
||||
isc_stdtime_get(&now);
|
||||
result = dns_dnssec_findmatchingkeys(name, dir, now, mctx, &matchkeys);
|
||||
if (result == ISC_R_NOTFOUND)
|
||||
return (ISC_FALSE);
|
||||
|
||||
@@ -624,10 +559,11 @@ goodsig(dns_name_t *origin, dns_rdata_t *sigrdata, dns_name_t *name,
|
||||
continue;
|
||||
}
|
||||
result = dns_dnssec_verify(name, rdataset, dstkey, ISC_FALSE,
|
||||
mctx, sigrdata);
|
||||
0, mctx, sigrdata, NULL);
|
||||
dst_key_free(&dstkey);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS || result == DNS_R_FROMWILDCARD) {
|
||||
return(ISC_TRUE);
|
||||
}
|
||||
}
|
||||
return (ISC_FALSE);
|
||||
}
|
||||
@@ -1714,10 +1650,8 @@ verifyzone(dns_db_t *db, dns_dbversion_t *ver,
|
||||
* present in the DNSKEY RRSET.
|
||||
*/
|
||||
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
dns_fixedname_init(&fnextname);
|
||||
nextname = dns_fixedname_name(&fnextname);
|
||||
name = dns_fixedname_initname(&fname);
|
||||
nextname = dns_fixedname_initname(&fnextname);
|
||||
dns_fixedname_init(&fprevname);
|
||||
prevname = NULL;
|
||||
dns_fixedname_init(&fzonecut);
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: dnssectool.h,v 1.33 2011/10/20 23:46:51 tbox Exp $ */
|
||||
|
||||
#ifndef DNSSECTOOL_H
|
||||
#define DNSSECTOOL_H 1
|
||||
@@ -56,12 +55,6 @@ setup_logging(isc_mem_t *mctx, isc_log_t **logp);
|
||||
void
|
||||
cleanup_logging(isc_log_t **logp);
|
||||
|
||||
void
|
||||
setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx);
|
||||
|
||||
void
|
||||
cleanup_entropy(isc_entropy_t **ectx);
|
||||
|
||||
dns_ttl_t strtottl(const char *str);
|
||||
|
||||
isc_stdtime_t
|
||||
|
||||
@@ -48,7 +48,7 @@ CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include -I. \
|
||||
${ISC_INCLUDES} ${DLZDRIVER_INCLUDES} \
|
||||
${DBDRIVER_INCLUDES} @DST_OPENSSL_INC@
|
||||
|
||||
CDEFINES = @CONTRIB_DLZ@ @USE_PKCS11@ @PKCS11_ENGINE@ @CRYPTO@
|
||||
CDEFINES = @CONTRIB_DLZ@ @USE_PKCS11@ @PKCS11_ENGINE@
|
||||
|
||||
CWARNINGS =
|
||||
|
||||
|
||||
@@ -5,11 +5,14 @@
|
||||
static char xslmsg[] =
|
||||
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
||||
"<!--\n"
|
||||
" - Copyright (C) 2006-2009, 2012-2017 Internet Systems Consortium, Inc. (\"ISC\")\n"
|
||||
" - Copyright (C) Internet Systems Consortium, Inc. (\"ISC\")\n"
|
||||
" -\n"
|
||||
" - This Source Code Form is subject to the terms of the Mozilla Public\n"
|
||||
" - License, v. 2.0. If a copy of the MPL was not distributed with this\n"
|
||||
" - file, You can obtain one at http://mozilla.org/MPL/2.0/.\n"
|
||||
" -\n"
|
||||
" - See the COPYRIGHT file distributed with this work for additional\n"
|
||||
" - information regarding copyright ownership.\n"
|
||||
"-->\n"
|
||||
"\n"
|
||||
"<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns=\"http://www.w3.org/1999/xhtml\" version=\"1.0\">\n"
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: builtin.c,v 1.26 2012/01/21 19:44:18 each Exp $ */
|
||||
|
||||
/*! \file
|
||||
* \brief
|
||||
|
||||
+4
-7
@@ -88,13 +88,8 @@ options {\n\
|
||||
nta-recheck 300;\n\
|
||||
# pid-file \"" NAMED_LOCALSTATEDIR "/run/named/named.pid\"; \n\
|
||||
port 53;\n\
|
||||
prefetch 2 9;\n"
|
||||
#if defined(ISC_PLATFORM_CRYPTORANDOM)
|
||||
" random-device none;\n"
|
||||
#elif defined(PATH_RANDOMDEV)
|
||||
" random-device \"" PATH_RANDOMDEV "\";\n"
|
||||
#endif
|
||||
" recursing-file \"named.recursing\";\n\
|
||||
prefetch 2 9;\n\
|
||||
recursing-file \"named.recursing\";\n\
|
||||
recursive-clients 1000;\n\
|
||||
request-nsid false;\n\
|
||||
reserved-sockets 512;\n\
|
||||
@@ -195,6 +190,7 @@ options {\n\
|
||||
resolver-nonbackoff-tries 3;\n\
|
||||
resolver-retry-interval 800; /* in milliseconds */\n\
|
||||
# rfc2308-type1 <obsolete>;\n\
|
||||
root-key-sentinel yes;\n\
|
||||
servfail-ttl 1;\n\
|
||||
# sortlist <none>\n\
|
||||
stale-answer-enable false;\n\
|
||||
@@ -247,6 +243,7 @@ options {\n\
|
||||
sig-signing-signatures 10;\n\
|
||||
sig-signing-type 65534;\n\
|
||||
sig-validity-interval 30; /* days */\n\
|
||||
dnskey-sig-validity 0; /* default: sig-validity-interval */\n\
|
||||
transfer-source *;\n\
|
||||
transfer-source-v6 *;\n\
|
||||
try-tcp-refresh yes; /* BIND 8 compat */\n\
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: control.c,v 1.49 2012/01/31 23:47:31 tbox Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
||||
@@ -230,7 +230,8 @@ address_ok(isc_sockaddr_t *sockaddr, dns_acl_t *acl) {
|
||||
|
||||
isc_netaddr_fromsockaddr(&netaddr, sockaddr);
|
||||
|
||||
result = dns_acl_match(&netaddr, NULL, acl, env, &match, NULL);
|
||||
result = dns_acl_match(&netaddr, NULL, NULL, 0, NULL, acl, env, &match,
|
||||
NULL);
|
||||
|
||||
if (result != ISC_R_SUCCESS || match <= 0)
|
||||
return (ISC_FALSE);
|
||||
@@ -325,7 +326,6 @@ static void
|
||||
control_recvmessage(isc_task_t *task, isc_event_t *event) {
|
||||
controlconnection_t *conn = NULL;
|
||||
controllistener_t *listener = NULL;
|
||||
named_server_t *server = NULL;
|
||||
controlkey_t *key = NULL;
|
||||
isccc_sexpr_t *request = NULL;
|
||||
isccc_sexpr_t *response = NULL;
|
||||
@@ -347,7 +347,6 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
|
||||
|
||||
conn = event->ev_arg;
|
||||
listener = conn->listener;
|
||||
server = listener->controls->server;
|
||||
algorithm = DST_ALG_UNKNOWN;
|
||||
secret.rstart = NULL;
|
||||
text = NULL;
|
||||
@@ -459,8 +458,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
|
||||
*/
|
||||
if (conn->nonce == 0) {
|
||||
while (conn->nonce == 0) {
|
||||
isc_rng_randombytes(server->sctx->rngctx, &conn->nonce,
|
||||
sizeof(conn->nonce));
|
||||
isc_random_buf(&conn->nonce, sizeof(conn->nonce));
|
||||
}
|
||||
eresult = ISC_R_SUCCESS;
|
||||
} else
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
# $Id: convertxsl.pl,v 1.14 2008/07/17 23:43:26 jinmei Exp $
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: dlz_dlopen_driver.h,v 1.4 2011/03/17 09:25:53 fdupont Exp $ */
|
||||
|
||||
#ifndef DLZ_DLOPEN_DRIVER_H
|
||||
#define DLZ_DLOPEN_DRIVER_H
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: config.h,v 1.16 2009/06/11 23:47:55 tbox Exp $ */
|
||||
|
||||
#ifndef NAMED_CONFIG_H
|
||||
#define NAMED_CONFIG_H 1
|
||||
|
||||
@@ -48,8 +48,6 @@ EXTERN unsigned int named_g_cpus INIT(0);
|
||||
EXTERN unsigned int named_g_udpdisp INIT(0);
|
||||
EXTERN isc_taskmgr_t * named_g_taskmgr INIT(NULL);
|
||||
EXTERN dns_dispatchmgr_t * named_g_dispatchmgr INIT(NULL);
|
||||
EXTERN isc_entropy_t * named_g_entropy INIT(NULL);
|
||||
EXTERN isc_entropy_t * named_g_fallbackentropy INIT(NULL);
|
||||
EXTERN unsigned int named_g_cpus_detected INIT(1);
|
||||
|
||||
#ifdef ENABLE_AFL
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: logconf.h,v 1.17 2007/06/19 23:46:59 tbox Exp $ */
|
||||
|
||||
#ifndef NAMED_LOGCONF_H
|
||||
#define NAMED_LOGCONF_H 1
|
||||
|
||||
@@ -23,7 +23,7 @@ ISC_LANG_BEGINDECLS
|
||||
|
||||
isc_result_t
|
||||
named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
|
||||
isc_entropy_t *ectx, dns_tkeyctx_t **tctxp);
|
||||
dns_tkeyctx_t **tctxp);
|
||||
/*%<
|
||||
* Create a TKEY context and configure it, including the default DH key
|
||||
* and default domain, according to 'options'.
|
||||
@@ -31,7 +31,6 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
|
||||
* Requires:
|
||||
*\li 'cfg' is a valid configuration options object.
|
||||
*\li 'mctx' is not NULL
|
||||
*\li 'ectx' is not NULL
|
||||
*\li 'tctx' is not NULL
|
||||
*\li '*tctx' is NULL
|
||||
*
|
||||
|
||||
+8
-60
@@ -21,7 +21,6 @@
|
||||
#include <isc/backtrace.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/dir.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/httpd.h>
|
||||
@@ -45,7 +44,7 @@
|
||||
#include <dns/view.h>
|
||||
|
||||
#include <dst/result.h>
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -76,7 +75,7 @@
|
||||
#include <named/smf_globals.h>
|
||||
#endif
|
||||
|
||||
#ifdef OPENSSL
|
||||
#if HAVE_OPENSSL
|
||||
#include <openssl/opensslv.h>
|
||||
#include <openssl/crypto.h>
|
||||
#endif
|
||||
@@ -470,6 +469,7 @@ parse_command_line(int argc, char *argv[]) {
|
||||
int ch;
|
||||
int port;
|
||||
const char *p;
|
||||
char *last;
|
||||
|
||||
save_command_line(argc, argv);
|
||||
|
||||
@@ -607,14 +607,14 @@ parse_command_line(int argc, char *argv[]) {
|
||||
else if (!strncmp(isc_commandline_argument,
|
||||
"mkeytimers=", 11))
|
||||
{
|
||||
p = strtok(isc_commandline_argument + 11, "/");
|
||||
p = strtok_r(isc_commandline_argument + 11, "/", &last);
|
||||
if (p == NULL)
|
||||
named_main_earlyfatal("bad mkeytimer");
|
||||
dns_zone_mkey_hour = atoi(p);
|
||||
if (dns_zone_mkey_hour == 0)
|
||||
named_main_earlyfatal("bad mkeytimer");
|
||||
|
||||
p = strtok(NULL, "/");
|
||||
p = strtok_r(NULL, "/", &last);
|
||||
if (p == NULL) {
|
||||
dns_zone_mkey_day =
|
||||
(24 * dns_zone_mkey_hour);
|
||||
@@ -626,7 +626,7 @@ parse_command_line(int argc, char *argv[]) {
|
||||
if (dns_zone_mkey_day < dns_zone_mkey_hour)
|
||||
named_main_earlyfatal("bad mkeytimer");
|
||||
|
||||
p = strtok(NULL, "/");
|
||||
p = strtok_r(NULL, "/", &last);
|
||||
if (p == NULL) {
|
||||
dns_zone_mkey_month =
|
||||
(30 * dns_zone_mkey_day);
|
||||
@@ -693,7 +693,7 @@ parse_command_line(int argc, char *argv[]) {
|
||||
#ifdef __SUNPRO_C
|
||||
printf("compiled by Solaris Studio %x\n", __SUNPRO_C);
|
||||
#endif
|
||||
#ifdef OPENSSL
|
||||
#if HAVE_OPENSSL
|
||||
printf("compiled with OpenSSL version: %s\n",
|
||||
OPENSSL_VERSION_TEXT);
|
||||
#if !defined(LIBRESSL_VERSION_NUMBER) && \
|
||||
@@ -844,23 +844,6 @@ create_managers(void) {
|
||||
ISC_LOG_INFO, "using up to %u sockets", socks);
|
||||
}
|
||||
|
||||
result = isc_entropy_create(named_g_mctx, &named_g_entropy);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_entropy_create() failed: %s",
|
||||
isc_result_totext(result));
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
||||
result = isc_hash_create(named_g_mctx, named_g_entropy,
|
||||
DNS_NAME_MAXWIRE);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_hash_create() failed: %s",
|
||||
isc_result_totext(result));
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -872,13 +855,6 @@ destroy_managers(void) {
|
||||
isc_taskmgr_destroy(&named_g_taskmgr);
|
||||
isc_timermgr_destroy(&named_g_timermgr);
|
||||
isc_socketmgr_destroy(&named_g_socketmgr);
|
||||
|
||||
/*
|
||||
* isc_hash_destroy() cannot be called as long as a resolver may be
|
||||
* running. Calling this after isc_taskmgr_destroy() ensures the
|
||||
* call is safe.
|
||||
*/
|
||||
isc_hash_destroy();
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -945,30 +921,6 @@ setup(void) {
|
||||
isc_mem_free(named_g_mctx, instance);
|
||||
#endif /* HAVE_LIBSCF */
|
||||
|
||||
#ifdef PATH_RANDOMDEV
|
||||
/*
|
||||
* Initialize system's random device as fallback entropy source
|
||||
* if running chroot'ed.
|
||||
*/
|
||||
if (named_g_chrootdir != NULL) {
|
||||
result = isc_entropy_create(named_g_mctx,
|
||||
&named_g_fallbackentropy);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
named_main_earlyfatal("isc_entropy_create() failed: %s",
|
||||
isc_result_totext(result));
|
||||
|
||||
result = isc_entropy_createfilesource(named_g_fallbackentropy,
|
||||
PATH_RANDOMDEV);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
named_main_earlywarning("could not open pre-chroot "
|
||||
"entropy source %s: %s",
|
||||
PATH_RANDOMDEV,
|
||||
isc_result_totext(result));
|
||||
isc_entropy_detach(&named_g_fallbackentropy);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ISC_PLATFORM_USETHREADS
|
||||
/*
|
||||
* Check for the number of cpu's before named_os_chroot().
|
||||
@@ -1175,10 +1127,6 @@ cleanup(void) {
|
||||
if (named_g_mapped != NULL)
|
||||
dns_acl_detach(&named_g_mapped);
|
||||
|
||||
isc_entropy_detach(&named_g_entropy);
|
||||
if (named_g_fallbackentropy != NULL)
|
||||
isc_entropy_detach(&named_g_fallbackentropy);
|
||||
|
||||
named_server_destroy(&named_g_server);
|
||||
|
||||
named_builtin_deinit();
|
||||
@@ -1331,7 +1279,7 @@ main(int argc, char *argv[]) {
|
||||
dns_result_register();
|
||||
dst_result_register();
|
||||
isccc_result_register();
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user