Compare commits
280
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 |
+44
-5
@@ -15,72 +15,84 @@ 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
|
||||
@@ -100,7 +112,8 @@ stages:
|
||||
- rm -rf .ccache
|
||||
- bash -x bin/tests/system/ifconfig.sh up
|
||||
script:
|
||||
- cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test 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'
|
||||
@@ -161,11 +174,31 @@ precheck:debian:sid:amd64:
|
||||
# <<: *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: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
|
||||
|
||||
build:debian:sid:i386:
|
||||
variables:
|
||||
CC: gcc
|
||||
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *build_job
|
||||
|
||||
@@ -174,7 +207,13 @@ unittest:debian:sid:amd64:
|
||||
<<: *unit_test_job
|
||||
dependencies:
|
||||
- build:debian:sid:amd64
|
||||
|
||||
|
||||
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
|
||||
<<: *unit_test_job
|
||||
@@ -186,7 +225,7 @@ systemtest:debian:sid:amd64:
|
||||
<<: *system_test_job
|
||||
dependencies:
|
||||
- build:debian:sid:amd64
|
||||
|
||||
|
||||
systemtest:debian:sid:i386:
|
||||
<<: *debian_sid_i386_image
|
||||
<<: *system_test_job
|
||||
|
||||
@@ -1,3 +1,123 @@
|
||||
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
|
||||
@@ -9,10 +129,10 @@
|
||||
like dig without IDN support. libidn2 version 2.0
|
||||
or higher is needed for +idnout enabled by default.
|
||||
|
||||
4914. [bug] A bug in zone database reference counting could lead to
|
||||
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.
|
||||
[GL #134]
|
||||
(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]
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
+1
-1
@@ -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; \
|
||||
|
||||
@@ -24,4 +24,3 @@ Setting Description
|
||||
may be useful when debugging
|
||||
-DISC_HEAP_CHECK Test heap consistency after every heap
|
||||
operation; used when debugging
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \
|
||||
${BIND9_INCLUDES} ${ISC_INCLUDES} \
|
||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @DST_OPENSSL_INC@
|
||||
|
||||
CDEFINES = -DVERSION=\"${VERSION}\" @CRYPTO@
|
||||
CDEFINES = -DVERSION=\"${VERSION}\"
|
||||
CWARNINGS =
|
||||
|
||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||
|
||||
+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\&.
|
||||
|
||||
+82
-82
@@ -205,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"
|
||||
@@ -217,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"
|
||||
@@ -285,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("");
|
||||
@@ -480,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) {
|
||||
@@ -729,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 { \
|
||||
@@ -1006,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;
|
||||
@@ -1051,7 +1053,7 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
|
||||
FULLCHECK("idnin");
|
||||
#ifndef WITH_IDN_SUPPORT
|
||||
fprintf(stderr, ";; IDN input support"
|
||||
" not enabled\n");
|
||||
" not enabled\n");
|
||||
#else
|
||||
lookup->idnin = state;
|
||||
#endif
|
||||
@@ -1060,7 +1062,7 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
|
||||
FULLCHECK("idnout");
|
||||
#ifndef WITH_IDN_OUT_SUPPORT
|
||||
fprintf(stderr, ";; IDN output support"
|
||||
" not enabled\n");
|
||||
" not enabled\n");
|
||||
#else
|
||||
lookup->idnout = state;
|
||||
#endif
|
||||
@@ -1242,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;
|
||||
@@ -1385,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 */
|
||||
@@ -1524,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;
|
||||
@@ -1738,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;
|
||||
@@ -1758,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);
|
||||
@@ -1841,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)
|
||||
@@ -1859,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;
|
||||
|
||||
/*
|
||||
@@ -1894,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);
|
||||
}
|
||||
@@ -1928,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;
|
||||
@@ -2096,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;
|
||||
}
|
||||
@@ -2151,8 +2163,6 @@ query_finished(void) {
|
||||
char batchline[MXNAME];
|
||||
int bargc;
|
||||
char *bargv[16];
|
||||
char *input;
|
||||
int i;
|
||||
|
||||
if (batchname == NULL) {
|
||||
isc_app_shutdown();
|
||||
@@ -2170,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 {
|
||||
|
||||
+44
-15
@@ -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>
|
||||
|
||||
@@ -953,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>
|
||||
@@ -1044,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>
|
||||
@@ -1096,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>
|
||||
@@ -1129,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>
|
||||
@@ -1175,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>
|
||||
@@ -1299,7 +1328,7 @@ 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, use
|
||||
If you'd like to turn off the IDN support for some reason, use
|
||||
parameters <parameter>+noidnin</parameter> and
|
||||
<parameter>+noidnout</parameter>.
|
||||
</para>
|
||||
@@ -1327,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>
|
||||
|
||||
|
||||
+67
-68
@@ -57,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>
|
||||
@@ -87,7 +86,7 @@
|
||||
|
||||
#include <dig/dig.h>
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
#include <pk11/result.h>
|
||||
#endif
|
||||
|
||||
@@ -176,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;
|
||||
@@ -242,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;
|
||||
@@ -353,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);
|
||||
@@ -668,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;
|
||||
@@ -810,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;
|
||||
@@ -914,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);
|
||||
@@ -1207,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));
|
||||
@@ -1325,10 +1314,8 @@ setup_system(isc_boolean_t ipv4only, isc_boolean_t ipv6only) {
|
||||
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));
|
||||
}
|
||||
|
||||
/*%
|
||||
@@ -1353,7 +1340,7 @@ setup_libs(void) {
|
||||
|
||||
debug("setup_libs()");
|
||||
|
||||
#ifdef PKCS11CRYPTO
|
||||
#if HAVE_PKCS11
|
||||
pk11_result_register();
|
||||
#endif
|
||||
dns_result_register();
|
||||
@@ -1397,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;
|
||||
|
||||
@@ -1886,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) {
|
||||
@@ -1933,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 &&
|
||||
@@ -2096,8 +2079,7 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
textname = lookup->textname;
|
||||
#ifdef WITH_IDN_SUPPORT
|
||||
if (lookup->idnin) {
|
||||
result = idn_locale_to_ace(lookup->textname, idn_textname,
|
||||
sizeof(idn_textname));
|
||||
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;
|
||||
@@ -2133,8 +2115,7 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
origin = lookup->origin->origin;
|
||||
#ifdef WITH_IDN_SUPPORT
|
||||
if (lookup->idnin) {
|
||||
result = idn_locale_to_ace(lookup->origin->origin,
|
||||
idn_origin, sizeof(idn_origin));
|
||||
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;
|
||||
@@ -2160,8 +2141,7 @@ setup_lookup(dig_lookup_t *lookup) {
|
||||
dns_fixedname_t fixed;
|
||||
dns_name_t *name;
|
||||
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
len = (unsigned int) strlen(textname);
|
||||
isc_buffer_init(&b, textname, len);
|
||||
isc_buffer_add(&b, len);
|
||||
@@ -2218,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;
|
||||
@@ -2252,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;
|
||||
@@ -2289,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");
|
||||
}
|
||||
|
||||
@@ -3656,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,
|
||||
@@ -3665,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;
|
||||
@@ -3841,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",
|
||||
@@ -4208,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);
|
||||
@@ -4220,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);
|
||||
@@ -4273,21 +4259,19 @@ output_filter(isc_buffer_t *buffer, unsigned int used_org,
|
||||
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);
|
||||
@@ -4305,11 +4289,28 @@ idn_locale_to_ace(const char *from, char *to, size_t tolen) {
|
||||
int res;
|
||||
char *tmp_str = NULL;
|
||||
|
||||
res = idn2_lookup_ul(from, &tmp_str, IDN2_NONTRANSITIONAL);
|
||||
if (res == IDN2_DISALLOWED)
|
||||
res = idn2_lookup_ul(from, &tmp_str, IDN2_TRANSITIONAL);
|
||||
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");
|
||||
@@ -4322,7 +4323,7 @@ idn_locale_to_ace(const char *from, char *to, size_t tolen) {
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
fatal("idn2_lookup_ul failed: %s", idn2_strerror(res));
|
||||
fatal("'%s' is not a legal IDN name (%s), use +noidnin", from, idn2_strerror(res));
|
||||
return ISC_R_FAILURE;
|
||||
}
|
||||
|
||||
@@ -4333,7 +4334,7 @@ idn_ace_to_locale(const char *from, char *to, size_t tolen) {
|
||||
char *tmp_str = NULL;
|
||||
|
||||
res = idn2_to_unicode_8zlz(from, &tmp_str,
|
||||
IDN2_NONTRANSITIONAL|IDN2_NFC_INPUT);
|
||||
IDN2_NONTRANSITIONAL|IDN2_NFC_INPUT);
|
||||
|
||||
if (res == IDN2_OK) {
|
||||
/* check the length */
|
||||
@@ -4343,14 +4344,12 @@ idn_ace_to_locale(const char *from, char *to, size_t tolen) {
|
||||
return ISC_R_FAILURE;
|
||||
}
|
||||
|
||||
(void) strncpy(to, tmp_str, tolen);
|
||||
free(tmp_str);
|
||||
(void) strlcpy(to, tmp_str, tolen);
|
||||
idn2_free(tmp_str);
|
||||
return ISC_R_SUCCESS;
|
||||
} else {
|
||||
debug("idn2_to_unicode_8zlz failed: %s",
|
||||
idn2_strerror(res));
|
||||
}
|
||||
|
||||
fatal("'%s' is not a legal IDN name (%s), use +noidnout", from, idn2_strerror(res));
|
||||
return ISC_R_FAILURE;
|
||||
}
|
||||
#endif /* WITH_IDN_OUT_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
-2
@@ -452,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));
|
||||
|
||||
+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 */
|
||||
@@ -257,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;
|
||||
@@ -369,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\&.
|
||||
|
||||
+13
-22
@@ -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
|
||||
|
||||
@@ -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 =
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
.\" Copyright (C) 2000, 2001, 2003-2009, 2011, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
.\" Copyright (C) 2000, 2001, 2003-2009, 2011, 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
|
||||
@@ -378,5 +378,5 @@ BIND 9 Administrator Reference Manual\&.
|
||||
\fBInternet Systems Consortium, Inc\&.\fR
|
||||
.SH "COPYRIGHT"
|
||||
.br
|
||||
Copyright \(co 2000, 2001, 2003-2009, 2011, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
Copyright \(co 2000, 2001, 2003-2009, 2011, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||
.br
|
||||
|
||||
@@ -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, 2001, 2003-2009, 2011, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
|
||||
- Copyright (C) 2000, 2001, 2003-2009, 2011, 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
|
||||
|
||||
+105
-194
@@ -25,7 +25,6 @@
|
||||
#include <isc/base64.h>
|
||||
#include <isc/commandline.h>
|
||||
#include <isc/dir.h>
|
||||
#include <isc/entropy.h>
|
||||
#include <isc/file.h>
|
||||
#include <isc/hash.h>
|
||||
#include <isc/hex.h>
|
||||
@@ -420,6 +419,9 @@ const char *empty_zones[] = {
|
||||
/* RFC 7534 */
|
||||
"EMPTY.AS112.ARPA",
|
||||
|
||||
/* RFC 8375 */
|
||||
"HOME.ARPA",
|
||||
|
||||
NULL
|
||||
};
|
||||
|
||||
@@ -656,8 +658,7 @@ configure_view_nametable(const cfg_obj_t *vconfig, const cfg_obj_t *config,
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
for (element = cfg_list_first(obj);
|
||||
element != NULL;
|
||||
element = cfg_list_next(element)) {
|
||||
@@ -869,8 +870,8 @@ load_view_keys(const cfg_obj_t *keys, const cfg_obj_t *vconfig,
|
||||
* initializing key; that's why 'managed'
|
||||
* is duplicated below.
|
||||
*/
|
||||
CHECK(dns_keytable_add2(secroots, managed,
|
||||
managed, &dstkey));
|
||||
CHECK(dns_keytable_add(secroots, managed,
|
||||
managed, &dstkey));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1095,8 +1096,7 @@ mustbesecure(const cfg_obj_t *mbs, dns_resolver_t *resolver) {
|
||||
isc_result_t result;
|
||||
isc_buffer_t b;
|
||||
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
for (element = cfg_list_first(mbs);
|
||||
element != NULL;
|
||||
element = cfg_list_next(element))
|
||||
@@ -1532,8 +1532,7 @@ disable_algorithms(const cfg_obj_t *disabled, dns_resolver_t *resolver) {
|
||||
dns_name_t *name;
|
||||
isc_buffer_t b;
|
||||
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
str = cfg_obj_asstring(cfg_tuple_get(disabled, "name"));
|
||||
isc_buffer_constinit(&b, str, strlen(str));
|
||||
isc_buffer_add(&b, strlen(str));
|
||||
@@ -1578,8 +1577,7 @@ disable_ds_digests(const cfg_obj_t *disabled, dns_resolver_t *resolver) {
|
||||
dns_name_t *name;
|
||||
isc_buffer_t b;
|
||||
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
str = cfg_obj_asstring(cfg_tuple_get(disabled, "name"));
|
||||
isc_buffer_constinit(&b, str, strlen(str));
|
||||
isc_buffer_add(&b, strlen(str));
|
||||
@@ -1620,8 +1618,7 @@ on_disable_list(const cfg_obj_t *disablelist, dns_name_t *zonename) {
|
||||
const char *str;
|
||||
isc_buffer_t b;
|
||||
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
|
||||
for (element = cfg_list_first(disablelist);
|
||||
element != NULL;
|
||||
@@ -1815,8 +1812,7 @@ dns64_reverse(dns_view_t *view, isc_mem_t *mctx, isc_netaddr_t *na,
|
||||
dns64_dbtype[2] = server;
|
||||
if (contact != NULL)
|
||||
dns64_dbtype[3] = contact;
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
isc_buffer_constinit(&b, reverse, strlen(reverse));
|
||||
isc_buffer_add(&b, strlen(reverse));
|
||||
CHECK(dns_name_fromtext(name, &b, dns_rootname, 0, NULL));
|
||||
@@ -2103,8 +2099,10 @@ configure_rpz_name2(dns_view_t *view, const cfg_obj_t *obj, dns_name_t *name,
|
||||
|
||||
static isc_result_t
|
||||
configure_rpz_zone(dns_view_t *view, const cfg_listelt_t *element,
|
||||
isc_boolean_t recursive_only_def, dns_ttl_t ttl_def,
|
||||
isc_uint32_t minupdateint_def, const dns_rpz_zone_t *old,
|
||||
isc_boolean_t recursive_only_default,
|
||||
dns_ttl_t ttl_default,
|
||||
isc_uint32_t minupdateinterval_default,
|
||||
const dns_rpz_zone_t *old,
|
||||
isc_boolean_t *old_rpz_okp)
|
||||
{
|
||||
const cfg_obj_t *rpz_obj, *obj;
|
||||
@@ -2133,7 +2131,9 @@ configure_rpz_zone(dns_view_t *view, const cfg_listelt_t *element,
|
||||
}
|
||||
|
||||
obj = cfg_tuple_get(rpz_obj, "recursive-only");
|
||||
if (cfg_obj_isvoid(obj) ? recursive_only_def : cfg_obj_asboolean(obj)) {
|
||||
if (cfg_obj_isvoid(obj) ?
|
||||
recursive_only_default : cfg_obj_asboolean(obj))
|
||||
{
|
||||
view->rpzs->p.no_rd_ok &= ~DNS_RPZ_ZBIT(zone->num);
|
||||
} else {
|
||||
view->rpzs->p.no_rd_ok |= DNS_RPZ_ZBIT(zone->num);
|
||||
@@ -2150,14 +2150,14 @@ configure_rpz_zone(dns_view_t *view, const cfg_listelt_t *element,
|
||||
if (cfg_obj_isuint32(obj)) {
|
||||
zone->max_policy_ttl = cfg_obj_asuint32(obj);
|
||||
} else {
|
||||
zone->max_policy_ttl = ttl_def;
|
||||
zone->max_policy_ttl = ttl_default;
|
||||
}
|
||||
|
||||
obj = cfg_tuple_get(rpz_obj, "min-update-interval");
|
||||
if (cfg_obj_isuint32(obj)) {
|
||||
zone->min_update_int = cfg_obj_asuint32(obj);
|
||||
zone->min_update_interval = cfg_obj_asuint32(obj);
|
||||
} else {
|
||||
zone->min_update_int = minupdateint_def;
|
||||
zone->min_update_interval = minupdateinterval_default;
|
||||
}
|
||||
|
||||
if (*old_rpz_okp && zone->max_policy_ttl != old->max_policy_ttl)
|
||||
@@ -2256,11 +2256,11 @@ configure_rpz(dns_view_t *view, const cfg_obj_t **maps,
|
||||
char *rps_cstr;
|
||||
size_t rps_cstr_size;
|
||||
const cfg_obj_t *sub_obj;
|
||||
isc_boolean_t recursive_only_def;
|
||||
isc_boolean_t recursive_only_default;
|
||||
isc_boolean_t nsip_enabled, nsdname_enabled;
|
||||
dns_rpz_zbits_t nsip_on, nsdname_on;
|
||||
dns_ttl_t ttl_def;
|
||||
isc_uint32_t minupdateint_def;
|
||||
dns_ttl_t ttl_default;
|
||||
isc_uint32_t minupdateinterval_default;
|
||||
dns_rpz_zones_t *zones;
|
||||
const dns_rpz_zones_t *old;
|
||||
dns_view_t *pview;
|
||||
@@ -2351,9 +2351,9 @@ configure_rpz(dns_view_t *view, const cfg_obj_t **maps,
|
||||
sub_obj = cfg_tuple_get(rpz_obj, "recursive-only");
|
||||
if (!cfg_obj_isvoid(sub_obj) &&
|
||||
!cfg_obj_asboolean(sub_obj))
|
||||
recursive_only_def = ISC_FALSE;
|
||||
recursive_only_default = ISC_FALSE;
|
||||
else
|
||||
recursive_only_def = ISC_TRUE;
|
||||
recursive_only_default = ISC_TRUE;
|
||||
|
||||
sub_obj = cfg_tuple_get(rpz_obj, "break-dnssec");
|
||||
if (!cfg_obj_isvoid(sub_obj) &&
|
||||
@@ -2364,15 +2364,15 @@ configure_rpz(dns_view_t *view, const cfg_obj_t **maps,
|
||||
|
||||
sub_obj = cfg_tuple_get(rpz_obj, "max-policy-ttl");
|
||||
if (cfg_obj_isuint32(sub_obj))
|
||||
ttl_def = cfg_obj_asuint32(sub_obj);
|
||||
ttl_default = cfg_obj_asuint32(sub_obj);
|
||||
else
|
||||
ttl_def = DNS_RPZ_MAX_TTL_DEFAULT;
|
||||
ttl_default = DNS_RPZ_MAX_TTL_DEFAULT;
|
||||
|
||||
sub_obj = cfg_tuple_get(rpz_obj, "min-update-interval");
|
||||
if (cfg_obj_isuint32(sub_obj))
|
||||
minupdateint_def = cfg_obj_asuint32(sub_obj);
|
||||
minupdateinterval_default = cfg_obj_asuint32(sub_obj);
|
||||
else
|
||||
minupdateint_def = DNS_RPZ_MINUPDATEINT_DEF;
|
||||
minupdateinterval_default = DNS_RPZ_MINUPDATEINTERVAL_DEFAULT;
|
||||
|
||||
sub_obj = cfg_tuple_get(rpz_obj, "min-ns-dots");
|
||||
if (cfg_obj_isuint32(sub_obj))
|
||||
@@ -2416,9 +2416,10 @@ configure_rpz(dns_view_t *view, const cfg_obj_t **maps,
|
||||
old_zone = NULL;
|
||||
}
|
||||
result = configure_rpz_zone(view, zone_element,
|
||||
recursive_only_def, ttl_def,
|
||||
minupdateint_def, old_zone,
|
||||
old_rpz_okp);
|
||||
recursive_only_default,
|
||||
ttl_default,
|
||||
minupdateinterval_default,
|
||||
old_zone, old_rpz_okp);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (pview != NULL)
|
||||
dns_view_detach(&pview);
|
||||
@@ -3228,12 +3229,9 @@ create_empty_zone(dns_zone_t *zone, dns_name_t *name, dns_view_t *view,
|
||||
int order;
|
||||
unsigned int nlabels;
|
||||
|
||||
dns_fixedname_init(&fixed);
|
||||
zname = dns_fixedname_name(&fixed);
|
||||
dns_fixedname_init(&nsfixed);
|
||||
ns = dns_fixedname_name(&nsfixed);
|
||||
dns_fixedname_init(&cfixed);
|
||||
contact = dns_fixedname_name(&cfixed);
|
||||
zname = dns_fixedname_initname(&fixed);
|
||||
ns = dns_fixedname_initname(&nsfixed);
|
||||
contact = dns_fixedname_initname(&cfixed);
|
||||
|
||||
/*
|
||||
* Look for forward "zones" beneath this empty zone and if so
|
||||
@@ -3350,7 +3348,7 @@ create_empty_zone(dns_zone_t *zone, dns_name_t *name, dns_view_t *view,
|
||||
dns_db_closeversion(db, &version, ISC_TRUE);
|
||||
CHECK(dns_zone_replacedb(zone, db, ISC_FALSE));
|
||||
}
|
||||
dns_zone_setoption2(zone, DNS_ZONEOPT2_AUTOEMPTY, ISC_TRUE);
|
||||
dns_zone_setoption(zone, DNS_ZONEOPT_AUTOEMPTY, ISC_TRUE);
|
||||
dns_zone_setview(zone, view);
|
||||
CHECK(dns_view_addzone(view, zone));
|
||||
|
||||
@@ -3552,7 +3550,7 @@ configure_dnstap(const cfg_obj_t **maps, dns_view_t *view) {
|
||||
fstrm_iothr_options_set_reopen_interval(fopt, i);
|
||||
}
|
||||
|
||||
CHECKM(dns_dt_create2(named_g_mctx, dmode, dpath,
|
||||
CHECKM(dns_dt_create(named_g_mctx, dmode, dpath,
|
||||
&fopt, named_g_server->task,
|
||||
&named_g_server->dtenv),
|
||||
"unable to create dnstap environment");
|
||||
@@ -3615,8 +3613,8 @@ create_mapped_acl(void) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
result = dns_iptable_addprefix2(acl->iptable, &addr, 96,
|
||||
ISC_TRUE, ISC_FALSE);
|
||||
result = dns_iptable_addprefix(acl->iptable, &addr, 96,
|
||||
ISC_TRUE, ISC_FALSE);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
dns_acl_attach(acl, &named_g_mapped);
|
||||
dns_acl_detach(&acl);
|
||||
@@ -4208,10 +4206,10 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
isc_mem_setname(cmctx, "cache", NULL);
|
||||
CHECK(isc_mem_create(0, 0, &hmctx));
|
||||
isc_mem_setname(hmctx, "cache_heap", NULL);
|
||||
CHECK(dns_cache_create3(cmctx, hmctx, named_g_taskmgr,
|
||||
named_g_timermgr, view->rdclass,
|
||||
cachename, "rbt", 0, NULL,
|
||||
&cache));
|
||||
CHECK(dns_cache_create(cmctx, hmctx, named_g_taskmgr,
|
||||
named_g_timermgr, view->rdclass,
|
||||
cachename, "rbt", 0, NULL,
|
||||
&cache));
|
||||
isc_mem_detach(&cmctx);
|
||||
isc_mem_detach(&hmctx);
|
||||
}
|
||||
@@ -4229,7 +4227,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
ISC_LINK_INIT(nsc, link);
|
||||
ISC_LIST_APPEND(*cachelist, nsc, link);
|
||||
}
|
||||
dns_view_setcache2(view, cache, shared_cache);
|
||||
dns_view_setcache(view, cache, shared_cache);
|
||||
|
||||
/*
|
||||
* cache-file cannot be inherited if views are present, but this
|
||||
@@ -4691,6 +4689,11 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
view->trust_anchor_telemetry = cfg_obj_asboolean(obj);
|
||||
|
||||
obj = NULL;
|
||||
result = named_config_get(maps, "root-key-sentinel", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
view->root_key_sentinel = cfg_obj_asboolean(obj);
|
||||
|
||||
CHECK(configure_view_acl(vconfig, config, named_g_config,
|
||||
"allow-query-cache-on", NULL, actx,
|
||||
named_g_mctx, &view->cacheonacl));
|
||||
@@ -5030,10 +5033,9 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
dns_name_t *dlv, *iscdlv;
|
||||
dns_fixedname_t f;
|
||||
dns_fixedname_init(&f);
|
||||
|
||||
/* Also log a warning if manually configured to dlv.isc.org */
|
||||
iscdlv = dns_fixedname_name(&f);
|
||||
iscdlv = dns_fixedname_initname(&f);
|
||||
CHECK(dns_name_fromstring(iscdlv, "dlv.isc.org", 0, NULL));
|
||||
|
||||
for (element = cfg_list_first(obj);
|
||||
@@ -5103,8 +5105,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
dns_fixedname_t fixed;
|
||||
dns_name_t *name;
|
||||
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
for (element = cfg_list_first(obj);
|
||||
element != NULL;
|
||||
element = cfg_list_next(element))
|
||||
@@ -5179,8 +5180,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
int empty_dbtypec = 4;
|
||||
dns_zonestat_level_t statlevel;
|
||||
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
|
||||
obj = NULL;
|
||||
result = named_config_get(maps, "empty-server", &obj);
|
||||
@@ -5254,7 +5254,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
|
||||
* empty zone for it.
|
||||
*/
|
||||
result = dns_fwdtable_find(view->fwdtable, name,
|
||||
&dnsforwarders);
|
||||
NULL, &dnsforwarders);
|
||||
if (result == ISC_R_SUCCESS &&
|
||||
dnsforwarders->fwdpolicy == dns_fwdpolicy_only)
|
||||
continue;
|
||||
@@ -5423,8 +5423,7 @@ configure_alternates(const cfg_obj_t *config, dns_view_t *view,
|
||||
|
||||
isc_buffer_constinit(&buffer, str, strlen(str));
|
||||
isc_buffer_add(&buffer, strlen(str));
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
CHECK(dns_name_fromtext(name, &buffer, dns_rootname, 0,
|
||||
NULL));
|
||||
|
||||
@@ -5672,12 +5671,7 @@ create_view(const cfg_obj_t *vconfig, dns_viewlist_t *viewlist,
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
result = isc_entropy_getdata(named_g_entropy, view->secret,
|
||||
sizeof(view->secret), NULL, 0);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_view_detach(&view);
|
||||
return (result);
|
||||
}
|
||||
isc_random_buf(view->secret, sizeof(view->secret));
|
||||
|
||||
ISC_LIST_APPEND(*viewlist, view, link);
|
||||
dns_view_attach(view, viewp);
|
||||
@@ -6145,7 +6139,8 @@ add_keydata_zone(dns_view_t *view, const char *directory, isc_mem_t *mctx) {
|
||||
defaultview ? "managed-keys" : view->name,
|
||||
defaultview ? "bind" : "mkeys",
|
||||
filename, sizeof(filename)));
|
||||
CHECK(dns_zone_setfile(zone, filename));
|
||||
CHECK(dns_zone_setfile(zone, filename, dns_masterformat_text,
|
||||
&dns_master_style_default));
|
||||
|
||||
dns_zone_setview(zone, view);
|
||||
dns_zone_settype(zone, dns_zone_key);
|
||||
@@ -6266,8 +6261,8 @@ add_listenelt(isc_mem_t *mctx, ns_listenlist_t *list, isc_sockaddr_t *addr,
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
result = dns_iptable_addprefix(src_acl->iptable,
|
||||
&netaddr, 128, ISC_TRUE);
|
||||
result = dns_iptable_addprefix(src_acl->iptable, &netaddr,
|
||||
128, ISC_TRUE, ISC_FALSE);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto clean;
|
||||
|
||||
@@ -6537,8 +6532,7 @@ dotat(dns_keytable_t *keytable, dns_keynode_t *keynode, void *arg) {
|
||||
}
|
||||
isc_textregion_consume(&r, m);
|
||||
}
|
||||
dns_fixedname_init(&fixed);
|
||||
tatname = dns_fixedname_name(&fixed);
|
||||
tatname = dns_fixedname_initname(&fixed);
|
||||
result = dns_name_fromstring2(tatname, label, name, 0, NULL);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return;
|
||||
@@ -6565,9 +6559,9 @@ dotat(dns_keytable_t *keytable, dns_keynode_t *keynode, void *arg) {
|
||||
|
||||
result = dns_resolver_createfetch(view->resolver, tatname,
|
||||
dns_rdatatype_null, NULL, NULL,
|
||||
NULL, 0, tat->task, tat_done, tat,
|
||||
&tat->rdataset, &tat->sigrdataset,
|
||||
&tat->fetch);
|
||||
NULL, NULL, 0, 0, 0, NULL, tat->task,
|
||||
tat_done, tat, &tat->rdataset,
|
||||
&tat->sigrdataset, &tat->fetch);
|
||||
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_task_detach(&tat->task);
|
||||
@@ -6819,7 +6813,7 @@ generate_session_key(const char *filename, const char *keynamestr,
|
||||
/* generate key */
|
||||
result = dst_key_generate(keyname, algtype, bits, 1, 0,
|
||||
DNS_KEYPROTO_ANY, dns_rdataclass_in,
|
||||
mctx, &key);
|
||||
mctx, &key, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
@@ -6915,10 +6909,9 @@ configure_session_key(const cfg_obj_t **maps, named_server_t *server,
|
||||
result = named_config_get(maps, "session-keyname", &obj);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
keynamestr = cfg_obj_asstring(obj);
|
||||
dns_fixedname_init(&fname);
|
||||
isc_buffer_constinit(&buffer, keynamestr, strlen(keynamestr));
|
||||
isc_buffer_add(&buffer, strlen(keynamestr));
|
||||
keyname = dns_fixedname_name(&fname);
|
||||
keyname = dns_fixedname_initname(&fname);
|
||||
result = dns_name_fromtext(keyname, &buffer, dns_rootname, 0, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
@@ -7224,8 +7217,7 @@ configure_zone_setviewcommit(isc_result_t result, const cfg_obj_t *zconfig,
|
||||
dns_zone_t *raw = NULL;
|
||||
|
||||
zname = cfg_obj_asstring(cfg_tuple_get(zconfig, "name"));
|
||||
dns_fixedname_init(&fixorigin);
|
||||
origin = dns_fixedname_name(&fixorigin);
|
||||
origin = dns_fixedname_initname(&fixorigin);
|
||||
|
||||
result2 = dns_name_fromstring(origin, zname, 0, NULL);
|
||||
if (result2 != ISC_R_SUCCESS) {
|
||||
@@ -7573,8 +7565,7 @@ get_newzone_config(dns_view_t *view, const char *zonename,
|
||||
/* Normalize zone name */
|
||||
isc_buffer_constinit(&b, zonename, strlen(zonename));
|
||||
isc_buffer_add(&b, strlen(zonename));
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
name = dns_fixedname_initname(&fname);
|
||||
CHECK(dns_name_fromtext(name, &b, dns_rootname,
|
||||
DNS_NAME_DOWNCASE, NULL));
|
||||
dns_name_format(name, zname, sizeof(zname));
|
||||
@@ -8516,8 +8507,7 @@ load_configuration(const char *filename, named_server_t *server,
|
||||
/* Load the TKEY information from the configuration. */
|
||||
if (options != NULL) {
|
||||
dns_tkeyctx_t *t = NULL;
|
||||
CHECKM(named_tkeyctx_fromconfig(options, named_g_mctx,
|
||||
named_g_entropy, &t),
|
||||
CHECKM(named_tkeyctx_fromconfig(options, named_g_mctx, &t),
|
||||
"configuring TKEY");
|
||||
if (server->sctx->tkeyctx != NULL) {
|
||||
dns_tkeyctx_destroy(&server->sctx->tkeyctx);
|
||||
@@ -8532,72 +8522,6 @@ load_configuration(const char *filename, named_server_t *server,
|
||||
named_g_aclconfctx),
|
||||
"binding control channel(s)");
|
||||
|
||||
/*
|
||||
* Open the source of entropy.
|
||||
*/
|
||||
if (first_time) {
|
||||
const char *randomdev = NULL;
|
||||
int level = ISC_LOG_ERROR;
|
||||
obj = NULL;
|
||||
result = named_config_get(maps, "random-device", &obj);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
if (!cfg_obj_isvoid(obj)) {
|
||||
level = ISC_LOG_INFO;
|
||||
randomdev = cfg_obj_asstring(obj);
|
||||
}
|
||||
}
|
||||
if (randomdev == NULL) {
|
||||
#ifdef ISC_PLATFORM_CRYPTORANDOM
|
||||
isc_entropy_usehook(named_g_entropy, ISC_TRUE);
|
||||
#else
|
||||
if ((obj != NULL) && !cfg_obj_isvoid(obj))
|
||||
level = ISC_LOG_INFO;
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, level,
|
||||
"no source of entropy found");
|
||||
if ((obj == NULL) || cfg_obj_isvoid(obj)) {
|
||||
CHECK(ISC_R_FAILURE);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
result = isc_entropy_createfilesource(named_g_entropy,
|
||||
randomdev);
|
||||
#ifdef PATH_RANDOMDEV
|
||||
if (named_g_fallbackentropy != NULL) {
|
||||
level = ISC_LOG_INFO;
|
||||
}
|
||||
#endif
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(named_g_lctx,
|
||||
NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER,
|
||||
level,
|
||||
"could not open "
|
||||
"entropy source %s: %s",
|
||||
randomdev,
|
||||
isc_result_totext(result));
|
||||
}
|
||||
#ifdef PATH_RANDOMDEV
|
||||
if (named_g_fallbackentropy != NULL) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(named_g_lctx,
|
||||
NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER,
|
||||
ISC_LOG_INFO,
|
||||
"using pre-chroot "
|
||||
"entropy source %s",
|
||||
PATH_RANDOMDEV);
|
||||
isc_entropy_detach(&named_g_entropy);
|
||||
isc_entropy_attach(
|
||||
named_g_fallbackentropy,
|
||||
&named_g_entropy);
|
||||
}
|
||||
isc_entropy_detach(&named_g_fallbackentropy);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_LMDB
|
||||
/*
|
||||
* If we're using LMDB, we may have created newzones databases
|
||||
@@ -8927,14 +8851,8 @@ load_configuration(const char *filename, named_server_t *server,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result = isc_entropy_getdata(named_g_entropy,
|
||||
server->sctx->secret,
|
||||
sizeof(server->sctx->secret),
|
||||
NULL,
|
||||
0);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
isc_random_buf(server->sctx->secret,
|
||||
sizeof(server->sctx->secret));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -9012,7 +8930,7 @@ load_configuration(const char *filename, named_server_t *server,
|
||||
{
|
||||
dns_view_setviewrevert(view);
|
||||
(void)dns_zt_apply(view->zonetable, ISC_FALSE,
|
||||
removed, view);
|
||||
NULL, removed, view);
|
||||
}
|
||||
dns_view_detach(&view);
|
||||
}
|
||||
@@ -9188,8 +9106,7 @@ run_server(isc_task_t *task, isc_event_t *event) {
|
||||
|
||||
isc_event_free(&event);
|
||||
|
||||
CHECKFATAL(dns_dispatchmgr_create(named_g_mctx, named_g_entropy,
|
||||
&named_g_dispatchmgr),
|
||||
CHECKFATAL(dns_dispatchmgr_create(named_g_mctx, &named_g_dispatchmgr),
|
||||
"creating dispatch manager");
|
||||
|
||||
dns_dispatchmgr_setstats(named_g_dispatchmgr, server->resolverstats);
|
||||
@@ -9247,8 +9164,6 @@ run_server(isc_task_t *task, isc_event_t *event) {
|
||||
CHECKFATAL(load_configuration(named_g_conffile, server, ISC_TRUE),
|
||||
"loading configuration");
|
||||
|
||||
isc_hash_init();
|
||||
|
||||
CHECKFATAL(load_zones(server, ISC_TRUE, ISC_FALSE), "loading zones");
|
||||
#ifdef ENABLE_AFL
|
||||
named_g_run_done = ISC_TRUE;
|
||||
@@ -9425,8 +9340,7 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
|
||||
server->in_roothints = NULL;
|
||||
|
||||
/* Must be first. */
|
||||
CHECKFATAL(dst_lib_init2(named_g_mctx, named_g_entropy,
|
||||
named_g_engine, ISC_ENTROPY_GOODONLY),
|
||||
CHECKFATAL(dst_lib_init(named_g_mctx, named_g_engine),
|
||||
"initializing DST");
|
||||
|
||||
CHECKFATAL(dns_rootns_create(mctx, dns_rdataclass_in, NULL,
|
||||
@@ -9456,8 +9370,7 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
|
||||
isc_taskmgr_setexcltask(named_g_taskmgr, server->task);
|
||||
|
||||
server->sctx = NULL;
|
||||
CHECKFATAL(ns_server_create(mctx, named_g_entropy,
|
||||
get_matching_view,
|
||||
CHECKFATAL(ns_server_create(mctx, get_matching_view,
|
||||
&server->sctx),
|
||||
"creating server context");
|
||||
|
||||
@@ -9912,8 +9825,7 @@ zone_from_args(named_server_t *server, isc_lex_t *lex, const char *zonetxt,
|
||||
strlcpy(zonename, redirect ? "." : zonetxt,
|
||||
DNS_NAME_FORMATSIZE);
|
||||
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
name = dns_fixedname_initname(&fname);
|
||||
CHECK(dns_name_fromstring(name, zonebuf, 0, NULL));
|
||||
|
||||
/* Look for the optional class name. */
|
||||
@@ -10381,7 +10293,7 @@ add_view_tolist(struct dumpcontext *dctx, dns_view_t *view) {
|
||||
ISC_LIST_INIT(vle->zonelist);
|
||||
ISC_LIST_APPEND(dctx->viewlist, vle, link);
|
||||
if (dctx->dumpzones)
|
||||
result = dns_zt_apply(view->zonetable, ISC_TRUE,
|
||||
result = dns_zt_apply(view->zonetable, ISC_TRUE, NULL,
|
||||
add_zone_tolist, dctx);
|
||||
return (result);
|
||||
}
|
||||
@@ -10878,7 +10790,7 @@ named_server_validation(named_server_t *server, isc_lex_t *lex,
|
||||
{
|
||||
if (ptr != NULL && strcasecmp(ptr, view->name) != 0)
|
||||
continue;
|
||||
CHECK(dns_view_flushcache(view));
|
||||
CHECK(dns_view_flushcache(view, ISC_FALSE));
|
||||
|
||||
if (set) {
|
||||
view->enablevalidation = enable;
|
||||
@@ -10969,7 +10881,7 @@ named_server_flushcache(named_server_t *server, isc_lex_t *lex) {
|
||||
if (ptr != NULL && !nsc->needflush)
|
||||
continue;
|
||||
nsc->needflush = ISC_TRUE;
|
||||
result = dns_view_flushcache2(nsc->primaryview, ISC_FALSE);
|
||||
result = dns_view_flushcache(nsc->primaryview, ISC_FALSE);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
flushed = ISC_FALSE;
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
@@ -11000,7 +10912,7 @@ named_server_flushcache(named_server_t *server, isc_lex_t *lex) {
|
||||
nsc = ISC_LIST_NEXT(nsc, link)) {
|
||||
if (!nsc->needflush || nsc->cache != view->cache)
|
||||
continue;
|
||||
result = dns_view_flushcache2(view, ISC_TRUE);
|
||||
result = dns_view_flushcache(view, ISC_TRUE);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
flushed = ISC_FALSE;
|
||||
isc_log_write(named_g_lctx,
|
||||
@@ -11073,8 +10985,7 @@ named_server_flushnode(named_server_t *server, isc_lex_t *lex,
|
||||
strlcpy(target, ptr, DNS_NAME_FORMATSIZE);
|
||||
isc_buffer_constinit(&b, target, strlen(target));
|
||||
isc_buffer_add(&b, strlen(target));
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
result = dns_name_fromtext(name, &b, dns_rootname, 0, NULL);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
@@ -11299,8 +11210,7 @@ delete_keynames(dns_tsig_keyring_t *ring, char *target,
|
||||
dns_tsigkey_t *tkey;
|
||||
|
||||
dns_name_init(&foundname, NULL);
|
||||
dns_fixedname_init(&fixedorigin);
|
||||
origin = dns_fixedname_name(&fixedorigin);
|
||||
origin = dns_fixedname_initname(&fixedorigin);
|
||||
|
||||
again:
|
||||
dns_rbtnodechain_init(&chain, ring->mctx);
|
||||
@@ -11418,8 +11328,7 @@ list_keynames(dns_view_t *view, dns_tsig_keyring_t *ring, isc_buffer_t **text,
|
||||
viewname = "(global)";
|
||||
|
||||
dns_name_init(&foundname, NULL);
|
||||
dns_fixedname_init(&fixedorigin);
|
||||
origin = dns_fixedname_name(&fixedorigin);
|
||||
origin = dns_fixedname_initname(&fixedorigin);
|
||||
dns_rbtnodechain_init(&chain, ring->mctx);
|
||||
result = dns_rbtnodechain_first(&chain, ring->keys, &foundname,
|
||||
origin);
|
||||
@@ -11623,7 +11532,7 @@ named_server_sync(named_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
|
||||
view != NULL;
|
||||
view = ISC_LIST_NEXT(view, link)) {
|
||||
result = dns_zt_apply(view->zonetable, ISC_FALSE,
|
||||
synczone, &cleanup);
|
||||
NULL, synczone, &cleanup);
|
||||
if (result != ISC_R_SUCCESS &&
|
||||
tresult == ISC_R_SUCCESS)
|
||||
tresult = result;
|
||||
@@ -12364,8 +12273,7 @@ migrate_nzf(dns_view_t *view) {
|
||||
/* Normalize zone name */
|
||||
isc_buffer_constinit(&b, origin, strlen(origin));
|
||||
isc_buffer_add(&b, strlen(origin));
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
name = dns_fixedname_initname(&fname);
|
||||
CHECK(dns_name_fromtext(name, &b, dns_rootname,
|
||||
DNS_NAME_DOWNCASE, NULL));
|
||||
dns_name_format(name, zname, sizeof(zname));
|
||||
@@ -12577,8 +12485,7 @@ delete_zoneconf(dns_view_t *view, cfg_parser_t *pctx,
|
||||
|
||||
DE_CONST(&zl->value.list, list);
|
||||
|
||||
dns_fixedname_init(&myfixed);
|
||||
myname = dns_fixedname_name(&myfixed);
|
||||
myname = dns_fixedname_initname(&myfixed);
|
||||
|
||||
for (elt = ISC_LIST_HEAD(*list);
|
||||
elt != NULL;
|
||||
@@ -13055,8 +12962,7 @@ named_server_changezone(named_server_t *server, char *command,
|
||||
isc_buffer_constinit(&buf, zonename, strlen(zonename));
|
||||
isc_buffer_add(&buf, strlen(zonename));
|
||||
|
||||
dns_fixedname_init(&fname);
|
||||
dnsname = dns_fixedname_name(&fname);
|
||||
dnsname = dns_fixedname_initname(&fname);
|
||||
CHECK(dns_name_fromtext(dnsname, &buf, dns_rootname, 0, NULL));
|
||||
|
||||
if (redirect) {
|
||||
@@ -13434,10 +13340,8 @@ find_name_in_list_from_map(const cfg_obj_t *config,
|
||||
isc_result_t result;
|
||||
|
||||
if (strcmp(map_key_for_list, "zone") == 0) {
|
||||
dns_fixedname_init(&fixed1);
|
||||
dns_fixedname_init(&fixed2);
|
||||
name1 = dns_fixedname_name(&fixed1);
|
||||
name2 = dns_fixedname_name(&fixed2);
|
||||
name1 = dns_fixedname_initname(&fixed1);
|
||||
name2 = dns_fixedname_initname(&fixed2);
|
||||
result = dns_name_fromstring(name1, name, 0, NULL);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
}
|
||||
@@ -13624,7 +13528,7 @@ generate_salt(unsigned char *salt, size_t saltlen) {
|
||||
if (saltlen > 256U)
|
||||
return (ISC_R_RANGE);
|
||||
|
||||
isc_rng_randombytes(named_g_server->sctx->rngctx, salt, saltlen);
|
||||
isc_random_buf(salt, saltlen);
|
||||
|
||||
r.base = salt;
|
||||
r.length = (unsigned int) saltlen;
|
||||
@@ -13869,7 +13773,8 @@ named_server_zonestatus(named_server_t *server, isc_lex_t *lex,
|
||||
const char *type, *file;
|
||||
char zonename[DNS_NAME_FORMATSIZE];
|
||||
isc_uint32_t serial, signed_serial, nodes;
|
||||
char serbuf[16], sserbuf[16], nodebuf[16], resignbuf[512];
|
||||
char serbuf[16], sserbuf[16], nodebuf[16];
|
||||
char resignbuf[DNS_NAME_FORMATSIZE + DNS_RDATATYPE_FORMATSIZE + 2];
|
||||
char lbuf[ISC_FORMATHTTPTIMESTAMP_SIZE];
|
||||
char xbuf[ISC_FORMATHTTPTIMESTAMP_SIZE];
|
||||
char rbuf[ISC_FORMATHTTPTIMESTAMP_SIZE];
|
||||
@@ -13938,10 +13843,18 @@ named_server_zonestatus(named_server_t *server, isc_lex_t *lex,
|
||||
}
|
||||
|
||||
/* Serial number */
|
||||
serial = dns_zone_getserial(mayberaw);
|
||||
result = dns_zone_getserial(mayberaw, &serial);
|
||||
/* XXXWPK TODO this is to mirror old behavior with dns_zone_getserial */
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
serial = 0;
|
||||
}
|
||||
snprintf(serbuf, sizeof(serbuf), "%u", serial);
|
||||
if (hasraw) {
|
||||
signed_serial = dns_zone_getserial(zone);
|
||||
result = dns_zone_getserial(zone, &signed_serial);
|
||||
/* XXXWPK TODO ut supra */
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
serial = 0;
|
||||
}
|
||||
snprintf(sserbuf, sizeof(sserbuf), "%u", signed_serial);
|
||||
}
|
||||
|
||||
@@ -13999,8 +13912,7 @@ named_server_zonestatus(named_server_t *server, isc_lex_t *lex,
|
||||
dns_rdataset_t next;
|
||||
|
||||
dns_rdataset_init(&next);
|
||||
dns_fixedname_init(&fixed);
|
||||
name = dns_fixedname_name(&fixed);
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
|
||||
result = dns_db_getsigningtime(db, &next, name);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
@@ -14182,8 +14094,7 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
|
||||
|
||||
UNUSED(force);
|
||||
|
||||
dns_fixedname_init(&fn);
|
||||
fname = dns_fixedname_name(&fn);
|
||||
fname = dns_fixedname_initname(&fn);
|
||||
|
||||
/* Skip the command name. */
|
||||
ptr = next_token(lex, text);
|
||||
|
||||
+46
-27
@@ -100,7 +100,7 @@ user_zonetype( dns_zone_t *zone ) {
|
||||
};
|
||||
const struct zt *tp;
|
||||
|
||||
if ((dns_zone_getoptions2(zone) & DNS_ZONEOPT2_AUTOEMPTY) != 0)
|
||||
if ((dns_zone_getoptions(zone) & DNS_ZONEOPT_AUTOEMPTY) != 0)
|
||||
return ("builtin");
|
||||
|
||||
view = dns_zone_getview(zone);
|
||||
@@ -1494,7 +1494,7 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
|
||||
TRY0(xmlTextWriterEndElement(writer)); /* type */
|
||||
|
||||
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "serial"));
|
||||
if (dns_zone_getserial2(zone, &serial) == ISC_R_SUCCESS)
|
||||
if (dns_zone_getserial(zone, &serial) == ISC_R_SUCCESS)
|
||||
TRY0(xmlTextWriterWriteFormatString(writer, "%u", serial));
|
||||
else
|
||||
TRY0(xmlTextWriterWriteString(writer, ISC_XMLCHAR "-"));
|
||||
@@ -1916,7 +1916,7 @@ generatexml(named_server_t *server, isc_uint32_t flags,
|
||||
TRY0(xmlTextWriterStartElement(writer,
|
||||
ISC_XMLCHAR "zones"));
|
||||
result = dns_zt_apply(view->zonetable, ISC_TRUE,
|
||||
zone_xmlrender, writer);
|
||||
NULL, zone_xmlrender, writer);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto error;
|
||||
TRY0(xmlTextWriterEndElement(writer)); /* /zones */
|
||||
@@ -2271,7 +2271,7 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
|
||||
dns_rdataclass_format(rdclass, classbuf, sizeof(classbuf));
|
||||
class_only = classbuf;
|
||||
|
||||
if (dns_zone_getserial2(zone, &serial) != ISC_R_SUCCESS)
|
||||
if (dns_zone_getserial(zone, &serial) != ISC_R_SUCCESS)
|
||||
zoneobj = addzone(zone_name_only, class_only,
|
||||
user_zonetype(zone), 0, ISC_FALSE);
|
||||
else
|
||||
@@ -2609,8 +2609,10 @@ generatejson(named_server_t *server, size_t *msglen,
|
||||
CHECKMEM(za);
|
||||
|
||||
if ((flags & STATS_JSON_ZONES) != 0) {
|
||||
result = dns_zt_apply(view->zonetable, ISC_TRUE,
|
||||
zone_jsonrender, za);
|
||||
result = dns_zt_apply(view->zonetable,
|
||||
ISC_TRUE,
|
||||
NULL, zone_jsonrender,
|
||||
za);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto error;
|
||||
}
|
||||
@@ -3104,6 +3106,7 @@ render_xsl(const char *url, isc_httpdurl_t *urlinfo,
|
||||
isc_httpdfree_t **freecb, void **freecb_args)
|
||||
{
|
||||
isc_result_t result;
|
||||
char *_headers = NULL;
|
||||
|
||||
UNUSED(url);
|
||||
UNUSED(querystring);
|
||||
@@ -3115,30 +3118,45 @@ render_xsl(const char *url, isc_httpdurl_t *urlinfo,
|
||||
|
||||
if (urlinfo->isstatic) {
|
||||
isc_time_t when;
|
||||
char *p = strcasestr(headers, "If-Modified-Since: ");
|
||||
char *line, *saveptr;
|
||||
const char *if_modified_since = "If-Modified-Since: ";
|
||||
_headers = strdup(headers);
|
||||
|
||||
if (p != NULL) {
|
||||
time_t t1, t2;
|
||||
p += strlen("If-Modified-Since: ");
|
||||
result = isc_time_parsehttptimestamp(p, &when);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto send;
|
||||
if (_headers == NULL) {
|
||||
goto send;
|
||||
}
|
||||
|
||||
result = isc_time_secondsastimet(&when, &t1);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto send;
|
||||
saveptr = NULL;
|
||||
for (line = strtok_r(_headers, "\n", &saveptr);
|
||||
line;
|
||||
line = strtok_r(NULL, "\n", &saveptr)) {
|
||||
if (strncasecmp(line, if_modified_since,
|
||||
strlen(if_modified_since)) == 0) {
|
||||
time_t t1, t2;
|
||||
line += strlen(if_modified_since);
|
||||
result = isc_time_parsehttptimestamp(line, &when);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto send;
|
||||
}
|
||||
|
||||
result = isc_time_secondsastimet(&urlinfo->loadtime,
|
||||
&t2);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto send;
|
||||
result = isc_time_secondsastimet(&when, &t1);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto send;
|
||||
}
|
||||
|
||||
if (t1 < t2)
|
||||
goto send;
|
||||
result = isc_time_secondsastimet(&urlinfo->loadtime, &t2);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto send;
|
||||
}
|
||||
|
||||
*retcode = 304;
|
||||
*retmsg = "Not modified";
|
||||
return (ISC_R_SUCCESS);
|
||||
if (t1 < t2) {
|
||||
goto send;
|
||||
}
|
||||
|
||||
*retcode = 304;
|
||||
*retmsg = "Not modified";
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3147,7 +3165,8 @@ render_xsl(const char *url, isc_httpdurl_t *urlinfo,
|
||||
*retmsg = "OK";
|
||||
isc_buffer_reinit(b, xslmsg, strlen(xslmsg));
|
||||
isc_buffer_add(b, strlen(xslmsg));
|
||||
|
||||
end:
|
||||
free(_headers);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -3177,7 +3196,7 @@ client_ok(const isc_sockaddr_t *fromaddr, void *arg) {
|
||||
isc_netaddr_fromsockaddr(&netaddr, fromaddr);
|
||||
|
||||
LOCK(&listener->lock);
|
||||
if (dns_acl_match(&netaddr, NULL, listener->acl, env,
|
||||
if (dns_acl_match(&netaddr, NULL, NULL, 0, NULL, listener->acl, env,
|
||||
&match, NULL) == ISC_R_SUCCESS && match > 0)
|
||||
{
|
||||
UNLOCK(&listener->lock);
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: tkeyconf.c,v 1.33 2010/12/20 23:47:20 tbox Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -46,7 +45,7 @@
|
||||
|
||||
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)
|
||||
{
|
||||
isc_result_t result;
|
||||
dns_tkeyctx_t *tctx = NULL;
|
||||
@@ -58,7 +57,7 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
|
||||
const cfg_obj_t *obj;
|
||||
int type;
|
||||
|
||||
result = dns_tkeyctx_create(mctx, ectx, &tctx);
|
||||
result = dns_tkeyctx_create(mctx, &tctx);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
@@ -69,8 +68,7 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
|
||||
n = cfg_obj_asuint32(cfg_tuple_get(obj, "keyid"));
|
||||
isc_buffer_constinit(&b, s, strlen(s));
|
||||
isc_buffer_add(&b, strlen(s));
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
name = dns_fixedname_initname(&fname);
|
||||
RETERR(dns_name_fromtext(name, &b, dns_rootname, 0, NULL));
|
||||
type = DST_TYPE_PUBLIC|DST_TYPE_PRIVATE|DST_TYPE_KEY;
|
||||
RETERR(dst_key_fromfile(name, (dns_keytag_t) n, DNS_KEYALG_DH,
|
||||
@@ -83,8 +81,7 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
|
||||
s = cfg_obj_asstring(obj);
|
||||
isc_buffer_constinit(&b, s, strlen(s));
|
||||
isc_buffer_add(&b, strlen(s));
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
name = dns_fixedname_initname(&fname);
|
||||
RETERR(dns_name_fromtext(name, &b, dns_rootname, 0, NULL));
|
||||
tctx->domain = isc_mem_get(mctx, sizeof(dns_name_t));
|
||||
if (tctx->domain == NULL) {
|
||||
@@ -102,8 +99,7 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
|
||||
|
||||
isc_buffer_constinit(&b, s, strlen(s));
|
||||
isc_buffer_add(&b, strlen(s));
|
||||
dns_fixedname_init(&fname);
|
||||
name = dns_fixedname_name(&fname);
|
||||
name = dns_fixedname_initname(&fname);
|
||||
RETERR(dns_name_fromtext(name, &b, dns_rootname, 0, NULL));
|
||||
RETERR(dst_gssapi_acquirecred(name, ISC_FALSE, &tctx->gsscred));
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: tsigconf.c,v 1.35 2011/01/11 23:47:12 tbox Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
# See the COPYRIGHT file distributed with this work for additional
|
||||
# information regarding copyright ownership.
|
||||
|
||||
# $Id: Makefile.in,v 1.15 2011/03/10 23:47:49 tbox Exp $
|
||||
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
@@ -19,7 +17,7 @@ CINCLUDES = -I${srcdir}/include -I${srcdir}/../include \
|
||||
${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} \
|
||||
${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@
|
||||
|
||||
CDEFINES = @CRYPTO@
|
||||
CDEFINES =
|
||||
CWARNINGS =
|
||||
|
||||
OBJS = os.@O@ dlz_dlopen_driver.@O@
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
||||
+7
-19
@@ -1003,36 +1003,24 @@ named_os_gethostname(char *buf, size_t len) {
|
||||
return ((n == 0) ? ISC_R_SUCCESS : ISC_R_FAILURE);
|
||||
}
|
||||
|
||||
static char *
|
||||
next_token(char **stringp, const char *delim) {
|
||||
char *res;
|
||||
|
||||
do {
|
||||
res = strsep(stringp, delim);
|
||||
if (res == NULL)
|
||||
break;
|
||||
} while (*res == '\0');
|
||||
return (res);
|
||||
}
|
||||
|
||||
void
|
||||
named_os_shutdownmsg(char *command, isc_buffer_t *text) {
|
||||
char *input, *ptr;
|
||||
char *last, *ptr;
|
||||
pid_t pid;
|
||||
|
||||
input = command;
|
||||
|
||||
/* Skip the command name. */
|
||||
ptr = next_token(&input, " \t");
|
||||
if (ptr == NULL)
|
||||
if ((ptr = strtok_r(command, " \t", &last)) == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
ptr = next_token(&input, " \t");
|
||||
if (ptr == NULL)
|
||||
if ((ptr = strtok_r(NULL, " \t", &last)) == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcmp(ptr, "-p") != 0)
|
||||
if (strcmp(ptr, "-p") != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LINUXTHREADS
|
||||
pid = mainpid;
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: dlz_dlopen_driver.c,v 1.5 2011/10/14 00:52:32 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
/* $Id: ntservice.h,v 1.6 2007/06/19 23:46:59 tbox Exp $ */
|
||||
|
||||
#ifndef NTSERVICE_H
|
||||
#define NTSERVICE_H
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user