Compare commits

...
Author SHA1 Message Date
Evan HuntandOndřej Surý 708b81f8ff Remove local implementations of hash functions 2018-04-24 22:37:01 +02:00
Evan HuntandOndřej Surý bc151efc33 Enforce crypto selection in configure 2018-04-24 22:36:52 +02:00
Ondřej Surý 5a9eb7ec7e Remove -p option usage from rpz test 2018-04-24 21:11:48 +02:00
Ondřej Surý 132682e3a7 Update tests to not use '>&-' that closes file descriptor, but instead use correct redirection to '>/dev/null' 2018-04-24 20:58:58 +02:00
Ondřej Surý 704d86ac16 Remove genrandom command and all usage of specific random files throughout the system test suite 2018-04-24 16:01:23 +02:00
Ondřej Surý 519a237b48 Refactor and cleanup duplicate code in the isc_hmac functions 2018-04-24 15:07:38 +02:00
Ondřej Surý f5dbfbc669 Replace all random functions with isc_random, isc_random_buf and isc_random_uniform API.
The three functions has been modeled after the arc4random family of
functions, and they will always return random bytes.

The isc_random family of functions internally use these CSPRNG (if available):

1. getrandom() libc call (might be available on Linux and Solaris)
2. SYS_getrandom syscall (might be available on Linux, detected at runtime)
3. arc4random(), arc4random_buf() and arc4random_uniform() (available on BSDs and Mac OS X)
4. crypto library function:
4a. RAND_bytes in case OpenSSL
4b. pkcs_C_GenerateRandom() in case PKCS#11 library
2018-04-24 14:01:30 +02:00
Evan Hunt 498491555e Merge branch '171-lgtm-issues' into 'master'
Resolve "problems detected by LGTM static analyzer"

Closes #171

See merge request isc-projects/bind9!213
2018-04-20 20:18:28 -04:00
Evan Hunt 8b1baa10ee remove unnecessary comparison 2018-04-20 19:51:00 -04:00
Evan Hunt e00eb55cd2 silence warnings about unnecessary comparisons
- these are cases where result has been explicitly set, so
  if (result != ISC_R_SUCCESS) is unnecessary
2018-04-20 19:51:00 -04:00
Evan Hunt 4247477b61 add header guards in files that were missing them 2018-04-20 19:51:00 -04:00
Evan Hunt bfbe6925df add header guard when generating bind.keys.h 2018-04-20 19:51:00 -04:00
Evan Hunt 0cc7aa250e change "key" to "tsigkey" to silence "short global name" warning 2018-04-20 19:51:00 -04:00
Evan Hunt 9ca3ab1168 fix shadowed global variables 2018-04-20 19:51:00 -04:00
Evan Hunt a08ba418ef fix duplicate include guard in dnsconf.h
- IMHO we should consider removing dnsconf.c and deprecating the
  /etc/dns.conf file, though, as I don't think it's likely anyone
  is using it
2018-04-20 19:51:00 -04:00
Evan Hunt 4472144220 Merge branch 'fix-win32-def' into 'master'
add missing symbols

See merge request isc-projects/bind9!218
2018-04-20 19:47:55 -04:00
Evan Hunt 4bef0cfcfd add missing symbols 2018-04-20 16:40:17 -07:00
Evan Hunt 2b73dfea75 Merge branch '217-remove-rbtdb64' into 'master'
Resolve "remove rbtdb64"

Closes #217

See merge request isc-projects/bind9!209
2018-04-20 19:34:44 -04:00
Evan Hunt 784087390a remove the rbtdb64 database implementation 2018-04-20 16:14:51 -07:00
Ondřej Surý 3852bf4f24 Merge branch '202-cppcheck-reporting-miscellaneous-issues' into 'master'
Resolve "cppcheck reporting miscellaneous issues"

Closes #202

See merge request isc-projects/bind9!202
2018-04-20 18:12:39 -04:00
Mark AndrewsandOndřej Surý f8d2a46daa remove exit calls after FATAL_ERROR 2018-04-20 14:50:35 -07:00
Mark AndrewsandOndřej Surý 686edad5c5 remove dead code 2018-04-20 14:50:35 -07:00
Mark AndrewsandOndřej Surý 49f8e9571c use %u instead of %d for unsigned int arguments 2018-04-20 14:50:35 -07:00
Ondřej Surý d21ff4b72e Merge branch '206-nslookup-accepts-any-bogus-option-interpret-it-as-vc' into 'master'
Resolve "nslookup accepts any -bogus -option, interpret it as -vc"

Closes #206

See merge request isc-projects/bind9!205
2018-04-20 17:50:27 -04:00
Mukund SivaramanandOndřej Surý 89cf503880 Remove bogus comparison 2018-04-20 14:43:06 -07:00
Evan Hunt dc8fc06e53 Merge branch '213-add-raflag-and-tcflag-to-dig' into 'master'
Resolve "Add +raflag and +tcflag to dig."

Closes #213

See merge request isc-projects/bind9!201
2018-04-20 17:25:17 -04:00
Mark AndrewsandEvan Hunt 58c103e09c dig: add the ability to set RA and TC in queries 2018-04-20 14:17:58 -07:00
Evan Hunt 529d862573 Merge branch '145-dnskey-sigvalidity' into 'master'
Resolve "different RRSIG expiry for DNSKEY"

Closes #145

See merge request isc-projects/bind9!121
2018-04-20 15:20:09 -04:00
Evan Hunt c592655c0f new option "dnskey-sig-validity"
- overrides "sig-validity-interval" for DNSKEY, CDNSKEY and CDS RRSIGs
2018-04-20 12:12:08 -07:00
Evan Hunt d4086d6b04 Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!211
2018-04-19 13:36:43 -04:00
Evan Hunt f5b7ad718a placeholder 2018-04-19 10:36:13 -07:00
Ondřej Surý 2fc568b2e7 Merge branch 'rm-clang-format' into 'master'
Remove .clang-format as we are going to use uncrustify anyway

See merge request isc-projects/bind9!207
2018-04-18 18:12:56 -04:00
Ondřej Surý f0dc3b44df We are going to use uncrustify 2018-04-18 15:05:24 -07:00
Ondřej Surý 62bc422df1 Merge branch 'clang-format-updates' into 'master'
Add more tweaks to .clang-format style for experiments

See merge request isc-projects/bind9!206
2018-04-18 14:21:51 -04:00
Ondřej Surý d52283111d Add more tweaks to .clang-format style for experimenting 2018-04-18 11:14:57 -07:00
Ondřej Surý 9bbd5e8dd6 Merge branch '46-add-clang-format-configuration' into 'master'
Add basic clang-format configuration that match our current formatting style closest

See merge request isc-projects/bind9!204
2018-04-18 12:45:51 -04:00
Ondřej Surý 7f434f1005 Add basic clang-format configuration that match our current formatting style closest 2018-04-18 09:38:52 -07:00
Ondřej Surý 4d59a96b98 Merge branch '37-implement-geoff-huston-s-trusted-key-sentinel-feature' into 'master'
Implement Geoff Huston's trusted key sentinel feature

Closes #37

See merge request isc-projects/bind9!123
2018-04-18 12:27:03 -04:00
Mark AndrewsandOndřej Surý 2845d7160e CHANGES entry for root-key-sentinel 2018-04-18 08:49:55 -07:00
Mark AndrewsandOndřej Surý e20790c956 add release note for root-key-sentinel 2018-04-18 08:49:55 -07:00
Mark AndrewsandOndřej Surý a23b305e6b add system test for root-key-sentinel 2018-04-18 08:49:55 -07:00
Mark AndrewsandOndřej Surý 68e9315c7d add named.conf option root-key-sentinel 2018-04-18 08:49:55 -07:00
Mark AndrewsandOndřej Surý 8fc9f64df9 detect and processes root-key-sentinel labels. 2018-04-18 08:49:55 -07:00
Ondřej Surý 7b61a857ba Merge branch '200-add-clang-to-gitlab-ci' into 'master'
Add clang (with clang specific extra options like -Wenum-conversion) to out GitLab CI

Closes #200

See merge request isc-projects/bind9!203
2018-04-17 23:59:04 -04:00
Ondřej Surý aba6ec896f Run the clang-compiled unittest 2018-04-17 20:40:32 -07:00
Ondřej Surý 0d8d3dc170 Add clang to the build job matrix and build gcc and clang builds with -Wall -Wextra 2018-04-17 17:49:35 -07:00
Evan Hunt 293d9132d7 Merge branch 'fix-strtok' into 'master'
fix a missing variable declaration needed by strtok_r on non-threaded builds

See merge request isc-projects/bind9!200
2018-04-13 15:02:44 -04:00
Evan Hunt 46fd0b62f8 fixed a missing variable declaration needed by strtok_r on non-threaded builds 2018-04-13 11:55:30 -07:00
Evan Hunt e10903c785 Merge branch '203-max-cache-ttlval' into 'master'
max-cache-ttl and other interval options should take ttlval arguments

Closes #203

See merge request isc-projects/bind9!197
2018-04-13 14:53:18 -04:00
Tony FinchandEvan Hunt 286a7b6b9a Allow TTL values when configuring TTLs and time intervals.
Options updated to use ttlvals: max-cache-ttl, max-ncache-ttl,
max-policy-ttl, fstrm-set-reopen-interval, interface-interval, and
min-update-interval.
2018-04-13 11:46:06 -07:00
Ondřej Surý 488ae9051e Merge branch 'u/fanf2/werror-maybe-uninitialized' into 'master'
Appease -Werror=maybe-uninitialized before calling strtok_r()

See merge request isc-projects/bind9!198
2018-04-12 16:23:26 -04:00
Tony Finch 13d1861034 Appease -Werror=maybe-uninitialized before calling strtok_r() 2018-04-12 19:19:24 +01:00
Evan Hunt 3fbf9d3ea1 Merge branch 'add-print.h' into 'master'
add missing include

See merge request isc-projects/bind9!195
2018-04-12 12:27:03 -04:00
Evan Hunt 7fe67ae949 add missing include 2018-04-12 09:20:09 -07:00
Witold Krecicki 717a4eb6e1 Merge branch '178-cleanup-isc-string' into 'master'
Cleanup <isc/string.h> functions

See merge request isc-projects/bind9!163
2018-04-12 04:46:09 -04:00
Ondřej Surý 23f97f9a66 Add CHANGES entry:
4924.   [cleanup]       Clean up the isc_string_* namespace and leave
                        only strlcpy and strlcat. [GL #178]
2018-04-12 10:38:01 +02:00
Ondřej Surý 5311a3b7b5 We use too old Visual Compiler to use scoped variables 2018-04-12 10:37:33 +02:00
Ondřej Surý 96a07ba867 Remove usage of strcasestr, so we don't have to have replacement function on Windows 2018-04-12 10:37:33 +02:00
Ondřej Surý 7278c455bc Remove isc_string_strcasestr implementation and clean up the header and headers 2018-04-12 10:37:33 +02:00
Ondřej Surý 11f26b42e3 Replace all usage of non-reentrant strtok() with strtok_r() 2018-04-12 10:37:33 +02:00
Ondřej Surý 921d05ddcf Replace usage of strsep with POSIX strtok_r() 2018-04-12 10:37:33 +02:00
Ondřej Surý b9552250cb Remove unused isc_string_regiondup function. 2018-04-12 10:37:33 +02:00
Ondřej Surý 9fda5253fd Remove isc_string_printf and isc_string_printf_truncate.
Replace with simple snprintf() as appropriate.
2018-04-12 10:37:33 +02:00
Ondřej Surý ccdb0287e8 Remove isc_string_copy, isc_string_copy_truncate and isc_string_append.
Use strlcpy and strlcat as appropriate instead.
2018-04-12 10:37:33 +02:00
Ondřej Surý 20d145efef Replace isc_string_touint64 with strtoull (C99) 2018-04-12 10:37:33 +02:00
Ondřej Surý fd9c3ad389 Merge branch 'socket-options-refactoring' into 'master'
Refactoring #defines into typedef enums

See merge request isc-projects/bind9!135
2018-04-12 04:06:51 -04:00
Ondřej Surý 97a88e2248 Add CHANGES entry:
4923.   [cleanup]       Refactor socket and socket event options into
                        enum types. [GL !135]
2018-04-12 09:55:40 +02:00
Ondřej Surý 8bdc23add2 Change ISC_SOCKEVENTATTR_* defines into isc_sockeventattr_t enum 2018-04-12 09:54:24 +02:00
Ondřej Surý c2f42583c0 Refactor ISC_SOCKET_* defines into an isc_socket_options_t enum 2018-04-12 09:54:21 +02:00
Ondřej Surý 01f8e5dbb8 Merge branch '189-fix-win32-build' into 'master'
Fix runtime assertion on Windows due isc_file_template being out-of-sync

Closes #189

See merge request isc-projects/bind9!193
2018-04-12 02:46:21 -04:00
Ondřej Surý 8c99d104e3 Sync isc_file_template functions between unix and win32, so they are same 2018-04-11 23:04:20 +02:00
Ondřej Surý 91683d19a8 Merge branch '189-fix-tsig-dump-keyfile-name-generation-issues' into 'master'
Resolve "Fix TSIG dump keyfile name generation issues"

Closes #189

See merge request isc-projects/bind9!164
2018-04-11 08:37:05 -04:00
Mukund SivaramanandOndřej Surý 44b84cb5a6 Fix TSIG dump keyfile name buffer size issues 2018-04-11 12:04:39 +02:00
Ondřej Surý 7467735258 Define PATH_MAX on Windows as _MAX_PATH, so we can use it everywhere 2018-04-11 12:04:39 +02:00
Evan Hunt 7749d7945f Merge branch '193-fix-variable-definitions-in-bin-tests-Makefile.in' into 'master'
Fix variable definitions in bin/tests/Makefile.in

Closes #193

See merge request isc-projects/bind9!183
2018-04-10 23:03:36 -04:00
Evan Hunt 93ee6b8a22 Alter distclean rule to prevent recursing into the same directory twice
Commit f87e0c03ee removed the "system" directory from the TESTDIRS
variable in bin/tests/Makefile.in in an attempt to fix "make distclean"
which was broken since commit 0d784de16a.  However, this change
prevented any system tests from being run when "make test" is invoked.

We now put it back into both SUBDIRS and TESTDIRS, but with a modified
rule to check for the existence of a Makefile in each subdirectory before
trying to run make there. This prevents "make distclean" from trying to
run again in a directory where it's already been run.
2018-04-10 19:56:45 -07:00
Michał KępieńandEvan Hunt 80ab2c0f22 Fail CI pipeline when "make test" does not run any system tests
Apart from ensuring "make test" returns 0, also check whether any system
test output was generated as a result of running it.  This prevents the
CI job running system tests from succeeding unless it actually tests
something.
2018-04-10 19:56:45 -07:00
Evan Hunt 06d164306b Merge branch 'revert-freebsd-runner' into 'master'
Revert freebsd CI runner

See merge request isc-projects/bind9!189
2018-04-10 22:54:24 -04:00
Evan Hunt ecf5556bea Revert "Merge branch 'gitlab-ci-freebsd11' into 'master'"
This reverts commit f595ab93eb, reversing
changes made to deae7d33f1.
2018-04-10 19:46:12 -07:00
Evan Hunt 2ad82b0083 Merge branch '197-dnstap-sockaddr' into 'master'
Resolve "dnstap: log actual local IPv6 address, not :: listening address"

Closes #197

See merge request isc-projects/bind9!188
2018-04-10 20:18:03 -04:00
Evan Hunt 330b26c9df CHANGES note 2018-04-10 17:13:06 -07:00
Tony Finch ccff953c25 dnstap: log actual local IPv6 address, not :: listening address 2018-04-09 18:26:51 +01:00
Ondřej Surý ecd812b4d6 Merge branch '194-libdns-cleanup-cleanup' into 'master'
Fixup the one last occurence of dns_dt_create2 (in dnstap enabled build)

Closes #194

See merge request isc-projects/bind9!185
2018-04-09 10:51:54 -04:00
Mathieu ArnoldandOndřej Surý ebf7641610 Rename the last occurence of dns_dt_create2. 2018-04-09 16:46:07 +02:00
Ondřej Surý f595ab93eb Merge branch 'gitlab-ci-freebsd11' into 'master'
Add FreeBSD 11 to GitLab CI

See merge request isc-projects/bind9!184
2018-04-09 10:43:22 -04:00
Ondřej Surý 266f491ff8 Add FreeBSD 11 GitLab CI Runner 2018-04-09 16:32:41 +02:00
Ondřej Surý deae7d33f1 Merge branch '183-add-dns_fixedname_initname' into 'master'
Add and use dns_fixedname_initname()

Closes #183

See merge request isc-projects/bind9!161
2018-04-09 10:12:36 -04:00
Mukund SivaramanandOndřej Surý d7faee2566 Add CHANGES entry:
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]
2018-04-09 12:14:16 +02:00
Michał KępieńandOndřej Surý 39ddf9991f Do not access dns_fixedname_t fields directly
Employ dns_fixedname_name() and dns_fixedname_initname() to no longer
directly access dns_fixedname_t fields.
2018-04-09 12:14:16 +02:00
Michał KępieńandOndřej Surý 4df4a8e731 Use dns_fixedname_initname() where possible
Replace dns_fixedname_init() calls followed by dns_fixedname_name()
calls with calls to dns_fixedname_initname() where it is possible
without affecting current behavior and/or performance.

This patch was mostly prepared using Coccinelle and the following
semantic patch:

    @@
    expression fixedname, name;
    @@
    -	dns_fixedname_init(&fixedname);
    	...
    -	name = dns_fixedname_name(&fixedname);
    +	name = dns_fixedname_initname(&fixedname);

The resulting set of changes was then manually reviewed to exclude false
positives and apply minor tweaks.

It is likely that more occurrences of this pattern can be refactored in
an identical way.  This commit only takes care of the low-hanging fruit.
2018-04-09 12:14:16 +02:00
Mukund SivaramanandOndřej Surý 0d2a03c290 Add a dns_fixedname_initname() helper function
This also turns the dns_fixedname macros into functions.
2018-04-09 12:14:16 +02:00
Witold Krecicki 76fa1c181c Merge branch 'libdns-cleanup2' into 'master'
libdns cleanup

See merge request isc-projects/bind9!172
2018-04-06 02:10:50 -04:00
Witold Kręcicki f6a16bbd4a libdns refactoring: CHANGES entry 2018-04-06 08:04:41 +02:00
Witold Kręcicki 102a397e39 libdns refactoring: get rid of multiple versions of dns_keytable_add, dns_iptable_addprefix and dns_iptable_addprefix 2018-04-06 08:04:41 +02:00
Witold Kręcicki c8aa1ee9e6 libdns refactoring: get rid of multiple versions of dns_dt_create, dns_view_setcache, dns_zt_apply, dns_message_logfmtpacket, dns_message_logpacket, dns_ssutable_checkrules and dns_ttl_totext 2018-04-06 08:04:41 +02:00
Witold Kręcicki d54d482af0 libdns refactoring: get rid of multiple versions of dns_view_find, dns_view_findzonecut and dns_view_flushcache 2018-04-06 08:04:41 +02:00
Witold Kręcicki 702c022016 libdns refactoring: get rid of multiple versions of dns_xfrin_create, dst_key_generate, dst_lib_init and dst_context_create 2018-04-06 08:04:41 +02:00
Witold Kręcicki ef0e68bfc3 libdns refactoring: integrate zone->options and zone->options2 into one enum, removing unnecessary flags. 2018-04-06 08:04:41 +02:00
Witold Kręcicki 7dbc6768d6 libdns refactoring: get rid of multiple versions of dns_zone_setfile, dns_zone_notifyreceive, dns_zone_dumptostream, dns_zone_getserial 2018-04-06 08:04:41 +02:00
Witold Kręcicki 42ee8c853a libdns refactoring: get rid of 3 versions of dns_resolver_createfetch 2018-04-06 08:04:41 +02:00
Witold Kręcicki 25cd3168a7 libdns refactoring: get rid of multiple versions of dns_dnssec_findmatchingkeys and dns_dnssec_findzonekeys 2018-04-06 08:04:41 +02:00
Witold Kręcicki 8c12e488f7 libdns refactoring: get rid of multiple versions of dns_request_createraw and dns_request_createvia 2018-04-06 08:04:41 +02:00
Witold Kręcicki e2a06db7f3 libdns refactoring: get rid of multiple versions of dns_master_loadfile, dns_master_loadfileinc, dns_master_dump, dns_master_dumpinc, dns_master_dumptostream, dns_master_stylecreate 2018-04-06 08:04:41 +02:00
Witold Kręcicki e20b702418 libdns refactoring: get rid of multiple versions of dns_dispatch_createtcp and dns_dispatch_addresponse, unify dns_dispatch_gettcp and dns_dispatch_gettcp2 2018-04-06 08:04:41 +02:00
Witold Kręcicki 275a6a3bec libdns refactoring: get rid of unnecessary dns_db_dump2 and 3 versions of dns_db_load 2018-04-06 08:04:41 +02:00
Witold Kręcicki 76e17b54ea libdns refactoring: get rid of two versions of dns_client_createx 2018-04-06 08:04:41 +02:00
Witold Kręcicki d39b3209fb libdns refactoring: get rid of 3 versions of dns_cache_create 2018-04-06 08:04:41 +02:00
Witold Kręcicki d76ed0da1c libdns refactoring: get rid of two versions of dns_byaddr_createptrname 2018-04-06 08:04:41 +02:00
Witold Kręcicki f0a07b7546 libdns refactoring: get rid of two versions of dns_adb_createfind and dns_adb_probesize 2018-04-06 08:04:41 +02:00
Witold Kręcicki 3687648384 libdns refactoring: get rid of two versions of dns_acl_match and dns_aclelement_match 2018-04-06 08:04:40 +02:00
Mark Andrews 10814aaf3b Merge branch '193-make-distclean-fails' into 'master'
Resolve "make distclean fails"

Closes #193

See merge request isc-projects/bind9!182
2018-04-05 23:37:07 -04:00
Mark Andrews f87e0c03ee system should only be in SUBDIRS 2018-04-06 13:33:53 +10:00
Ondřej Surý 622cffee9d Merge branch 'fix-CHANGES-188-178' into 'master'
Fix typo in issue number in CHANGES file (188 -> 178)

See merge request isc-projects/bind9!181
2018-04-05 07:52:45 -04:00
Ondřej Surý f70121ed90 Fix typo in issue number in CHANGES file (188 -> 178) 2018-04-05 13:45:54 +02:00
Ondřej Surý 860e76b9a5 Merge branch 'pemensik/bind9-no-idn2-export' into 'master'
Don't include -lidn2 in isc-config.sh output

Closes #163

See merge request isc-projects/bind9!178
2018-04-05 06:03:02 -04:00
Ondřej Surý 8da5e5290f Print information about LIBIDN2 in Configuration summary (Closes: #163) 2018-04-05 11:52:24 +02:00
Petr MenšíkandOndřej Surý 21c2871667 Remove -lidn2 from exported LIBS. Do not propagate it from isc-config.sh --libs isc. 2018-04-05 11:52:24 +02:00
Ondřej Surý ab992d40b0 Merge branch '178-cleanup-isc_hash-functions' into 'master'
Clean up the isc_hash_* family of functions

See merge request isc-projects/bind9!160
2018-04-04 17:19:41 -04:00
Ondřej Surý e74c245e29 Update CHANGES 2018-04-04 23:12:35 +02:00
Ondřej Surý 3c092eff4a Cleanup included headers in hash.c using iwyu 2018-04-04 23:12:14 +02:00
Ondřej Surý 860d4f6177 Remove premature optimization in the FNV-1a while loop, the difference is negligible and the code is simpler. 2018-04-04 23:12:14 +02:00
Ondřej Surý b097be17ef Remove unused obsolete isc_hash_* function, and just keep the FNV-1a version 2018-04-04 23:12:14 +02:00
Ondřej Surý d81e1caa71 Merge branch 'kchen/bind9-test-prereqs' into 'master'
Add a Net::DNS prereq for couple of tests

See merge request isc-projects/bind9!171
2018-04-04 16:29:36 -04:00
Kevin ChenandOndřej Surý 8b1b809ab4 Add a Net::DNS prereq for digdelv, fetchlimit, rpzrecurse, and zero
tests to avoid failed tests when Net::DNS is not present.
2018-04-04 22:23:14 +02:00
Ondřej Surý c0405c3024 Merge branch 'ssl-double-free' into 'master'
Fix double free after keygen error in dnssec-keygen

Closes #109

See merge request isc-projects/bind9!70
2018-04-04 11:41:26 -04:00
Ondřej Surý ef2b2a6c92 Add CHANGES entry 2018-04-04 17:28:55 +02:00
Ondřej Surý d2b3188c61 A couple of more cleanups after free in opensslrsa_generate() 2018-04-04 17:28:55 +02:00
Petr MensikandOndřej Surý edaafacf36 Do not assign NULL conditionally in OpenSSL < 1.1, make it always explicit. 2018-04-04 17:28:55 +02:00
Petr MensikandOndřej Surý 01cc622e7b Fix double free on RSA_generate_key_ex failure 2018-04-04 17:28:55 +02:00
Stephen Morris 955ca7382d Merge branch '139-tests-for-idna2008-libidn2' into 'master'
Resolve "Tests for IDNA2008 (libidn2)"

Closes #139

See merge request isc-projects/bind9!147
2018-04-04 09:52:23 -04:00
Stephen Morris e0e81288cd Check libidn2 version before proceding with one of the tests.
A known issue in libidn2 causes one of the tests of a fake A-label
to fail.  The problem should be corrected in version 2.0.5 of
libidn2.
2018-04-04 09:42:08 -04:00
Ondřej SurýandStephen Morris 4dad408ead Use C.UTF-8 if available, and en_US.UTF-8 is available, otherwise do nothing and let the test break 2018-04-04 09:42:08 -04:00
Stephen Morris 8cf29aafec Set known locale prior to running tests. 2018-04-04 09:42:08 -04:00
Stephen Morris 5009724f40 Fix check for the presence of IDNA. 2018-04-04 09:42:08 -04:00
Stephen Morris dc7b3d7597 Added additional tests for invalid punycode strings. 2018-04-04 09:42:07 -04:00
Stephen Morris 6755118493 Initial set of IDNA tests. 2018-04-04 09:42:07 -04:00
Michał Kępień 950c354b3d Merge branch '188-remove-duplicate-named_g_conffile-init' into 'master'
Remove redundant named_g_conffile initialization

Closes #188

See merge request isc-projects/bind9!166
2018-04-04 06:31:55 -04:00
Ondřej Surý c727f0797b Remove redundant named_g_conffile initialization from bin/named/win32/os.c 2018-04-03 20:39:34 +02:00
Ondřej Surý 52909b5dbe Merge branch '26-fix-normalization-for-non-IDN' into 'master'
Don't use the IDN translated name if no conversion took a place

Closes #26

See merge request isc-projects/bind9!153
2018-03-21 10:12:04 -04:00
Ondřej Surý 08f66d8509 Don't use the IDN traslated name if no conversion took a place 2018-03-21 14:05:00 +00:00
Mark Andrews 9bbffd019c Merge branch '168-coverity-incorrect-shifting-in-dns_rpz_mask' into 'master'
Resolve "coverity: Incorrect shifting in DNS_RPZ_MASK"

Closes #168

See merge request isc-projects/bind9!151
2018-03-19 08:57:08 -04:00
Mukund Sivaraman d637c9cc03 Fix length of integer that's shifted by DNS_RPZ_ZMASK() 2018-03-19 08:49:41 -04:00
Mark Andrews 859af8662f Merge branch '167-coverity-dereferencing-a-null-pointer-in-lib-dns-tests-rbt_test-c' into 'master'
Resolve "coverity: Dereferencing a null pointer in lib/dns/tests/rbt_test.c"

Closes #167

See merge request isc-projects/bind9!150
2018-03-19 08:48:47 -04:00
Mukund Sivaraman de3a4af1bf Check return value of isc_mem_get() 2018-03-19 18:10:41 +05:30
Mark Andrews d8f4837fc5 Merge branch 'fixfilename' into 'master'
fix temporary file name to have subtest number

See merge request isc-projects/bind9!149
2018-03-19 08:23:32 -04:00
Mark Andrews 4be5667b2c fix temporary file name to have subtest number
(cherry picked from commit e12453f43c88bac722fb511b62f12303735b788c)
2018-03-19 23:14:28 +11:00
Mark Andrews c0a29b30c9 Merge branch 'fixtypo' into 'master'
fix typo

See merge request isc-projects/bind9!148
2018-03-19 07:38:32 -04:00
Mark Andrews 6e4b5f2345 fix typo 2018-03-19 22:31:22 +11:00
Mark Andrews 92a3ff9182 Merge branch '166-statistics-system-test-numbering-is-bad' into 'master'
Resolve "statistics system test numbering is bad"

Closes #166

See merge request isc-projects/bind9!146
2018-03-19 05:15:08 -04:00
Mark Andrews dd5dff3096 fix numbering of tests and make consistent 2018-03-19 17:51:04 +11:00
Ondřej Surý 77f63c48b6 Merge branch '123-support-64-rpz-zones-by-default-from-9-13-onwards' into 'master'
Resolve "Support 64 RPZ zones by default from 9.13 onwards"

Closes #123

See merge request isc-projects/bind9!90
2018-03-18 06:16:56 -04:00
Evan HuntandOndřej Surý 6d9fb4e7e4 copyrights 2018-03-18 10:08:57 +00:00
Evan HuntandOndřej Surý e98b2489f3 Add release note 2018-03-18 10:08:57 +00:00
Mukund SivaramanandOndřej Surý 2a44fd3f80 Fix zone count check to only occur on RPZ zones 2018-03-18 10:08:22 +00:00
Mukund SivaramanandOndřej Surý d20d86e37d Check for more than 64 policy zones 2018-03-18 10:08:22 +00:00
Mukund SivaramanandOndřej Surý 56f398c7b2 Add CHANGES entry 2018-03-18 10:08:22 +00:00
Mukund SivaramanandOndřej Surý c5e7198006 Update ARM 2018-03-18 10:07:48 +00:00
Mukund SivaramanandOndřej Surý 8c5fe523b2 Add system test 2018-03-18 10:07:48 +00:00
Mukund SivaramanandOndřej Surý 0e8907be4d Support 64 RPZ zones by default from 9.13 onwards 2018-03-18 10:07:48 +00:00
Ondřej Surý 30b0b686ad Merge branch '137-remove-support-for-systems-without-ftello-fseeko' into 'master'
Resolve "Remove support for systems without ftello/fseeko"

Closes #137

See merge request isc-projects/bind9!113
2018-03-17 19:10:11 -04:00
Ondřej Surý 05a1f9f301 chg: dev: Require support for ftello/fseeko functions 2018-03-17 22:51:13 +00:00
Ondřej Surý f3070d104a Merge branch '164-remove-openssl-warning' into 'master'
Remove useless OpenSSL warning from configure script

Closes #164

See merge request isc-projects/bind9!139
2018-03-17 10:16:20 -04:00
Ondřej Surý e9571d29af Remove obsolete OpenSSL version check 2018-03-17 14:09:31 +00:00
Ondřej Surý 77d5f5075a Merge branch '94-replace-idnkit-1-support-with-idnkit-2-support-or-drop-it' into 'master'
Drop idnkit-1 support in favour of libidn2

Closes #94

See merge request isc-projects/bind9!125
2018-03-17 09:58:44 -04:00
Ondřej Surý f4a517e5d7 Add release notes and CHANGES 2018-03-17 13:50:59 +00:00
Ondřej Surý 00043bfa18 Remove idnkit-1 support from dig 2018-03-17 13:41:59 +00:00
Ondřej Surý 3e75d9d31b Merge branch '26-switch-to-IDNA2008-non-transitional-processing' into 'master'
Resolve "Switch to IDNA2008 non-transitional processing (and use libidn2 for that)"

Closes #26

See merge request isc-projects/bind9!124
2018-03-17 09:22:18 -04:00
Ondřej Surý e7590c7528 Add release notes for IDNA2008 2018-03-17 13:13:47 +00:00
Ondřej Surý 8f44ef7d59 Add CHANGES for idn2 support 2018-03-17 13:13:47 +00:00
Ondřej Surý 1c075646f5 Enable --with-libidn2 in GitLab CI checks 2018-03-17 13:13:47 +00:00
Ondřej Surý 76c05a71fc Simplify the libidn2 configure checks 2018-03-17 13:13:47 +00:00
Petr MenšíkandOndřej Surý 29b94bbb04 Sanitize IDN initialization
Signed-off-by: Petr Menšík <pemensik@redhat.com>
2018-03-17 13:13:47 +00:00
Petr MenšíkandOndřej Surý 8254cf69d3 Remove support for libidn (IDN 2003)
Signed-off-by: Petr Menšík <pemensik@redhat.com>
2018-03-17 13:13:47 +00:00
Petr MenšíkandOndřej Surý 94757c1545 Remove conversion from locale to utf8 from public API
Emit fatal failures on locale to ACE encoding

Separate idnout support, disable it for libidn2 < 2.0

Add custom path to libidn. Leave default path for multilib support.

Allow turning off IDN input processing by dig option

Improve documentation, fix support in host

Fix configure changes to adjust help text

Use strlcpy with size guard

Improve IDN variants choosing. Fix idn2 function name.

Remove immediate idn_locale_to_ace and idn_ace_to_locale.

Signed-off-by: Petr Menšík <pemensik@redhat.com>
2018-03-17 13:13:47 +00:00
Tomas HozzaandOndřej Surý 505f673451 Add support for libidn2
Added two new configure options:
--with-libidn2 - to enable IDN using GNU libidn2

idnkit, libidn and libidn2 support can not be used at the same time.

NOTE: libidn2 does not support punycode back to Unicode
characters, so support for this is missing.

Signed-off-by: Tomas Hozza <thozza@redhat.com>

Removed iconv, convert directly from locale to ACE

Fix libidn2 and idnkit origin appending

Make IDN options in help less different

Signed-off-by: Petr Menšík <pemensik@redhat.com>
2018-03-17 13:13:47 +00:00
Tomas HozzaandOndřej Surý 2320443f63 Add support for GNU libidn
Added new configure option:
--with-libidn - to enable IDN using GNU libidn

Renamed configure option:
--with-idn to --with-idnkit to make the option usage more clear

idnkit and libidn support can not be used at the same time.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2018-03-17 13:13:47 +00:00
Ondřej Surý 5eb05263f6 Merge branch '162-remove-idnkit-1-0' into 'master'
Resolve "Remove idnkit-1.0 from BIND sources"

Closes #162

See merge request isc-projects/bind9!136
2018-03-17 09:12:50 -04:00
Ondřej Surý c34d76ed36 Remove idnkit-1.0 copy from BIND sources 2018-03-17 13:05:19 +00:00
Evan Hunt 90f9d86261 Merge branch 'copyrights' into 'master'
final copyright fixes

See merge request isc-projects/bind9!132
2018-03-15 21:58:27 -04:00
Evan Hunt dc350eb049 Merge branch 'copyrights' 2018-03-15 18:33:37 -07:00
Evan Hunt 0fabe0da83 update file headers 2018-03-15 18:33:13 -07:00
Evan Hunt da4aa9b03f ensure COPYRIGHT file retains years; edit file headers for consistency 2018-03-15 18:32:29 -07:00
Evan Hunt 26e0ed8331 Merge branch '157-cleanup-win-libtests' into 'master'
Resolve "Windows build fails"

Closes #157

See merge request isc-projects/bind9!131
2018-03-15 16:45:34 -04:00
Evan Hunt e2bb9824f8 remove references to lib/tests in the windows build 2018-03-15 12:56:02 -07:00
Curtis Blackburn acc8efa44a Merge branch '154-fix-atomic-test' into 'master'
Resolve "Build failure on OSX with --disable-atomic --enable-developer"

Closes #154

See merge request isc-projects/bind9!130
2018-03-15 14:21:58 -04:00
Evan HuntandCurtis Blackburn 1b3eac926e add an 'untested' case when none of the atomic operations are available
- this fixes a build failure introduced in change 4913 when
  compiling with ATF and --disable-atomic
2018-03-15 14:15:20 -04:00
Ondřej Surý a15588cdcd Merge branch 'feature-request-template' into 'master'
Add a Feature Request template and remove the Security template

See merge request isc-projects/bind9!128
2018-03-14 19:37:29 -04:00
Ondřej Surý c72ff6e008 Add a Feature Request template and remove the Security template as it was dup of text in Bug template 2018-03-15 00:13:47 +01:00
Evan Hunt f9e3434826 Merge branch 'branchsync' into 'master'
update branchsync to deal with merge commits

See merge request isc-projects/bind9!127
2018-03-14 17:41:56 -04:00
Evan Hunt fccf8ca2f6 updated branchsync to deal with merge commits 2018-03-14 14:40:13 -07:00
Ondřej Surý 3baf604bea Merge branch 'description-templates' into 'master'
Add Issue templates for Bug and Security

See merge request isc-projects/bind9!115
2018-03-14 04:25:37 -04:00
Evan HuntandOndřej Surý 2df7134d69 some tweaks for grammar and clarity 2018-03-14 04:25:23 -04:00
Ondřej SurýandOndřej Surý 3686f141a3 Add Issue templates for Bug and Security 2018-03-14 04:25:22 -04:00
Evan Hunt 3a5333e681 Merge branch '134-fix-zone-db-reference-counting' into 'master'
Fix a zone database reference counting bug in dump_done()

Closes #134

See merge request isc-projects/bind9!122
2018-03-13 13:51:02 -04:00
Michał Kępień 6f3cc75364 Add CHANGES entry
4914.	[bug]		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]
2018-03-13 12:04:37 +01:00
Michał Kępień fbd5658db7 Fix a zone database reference counting bug in dump_done()
A typo in commit d39ab7440e introduced a bug in zone database reference
counting which leads to a crash if dumping one version of a slave zone
is not finished by the time transferring a newer version from a master
completes.  Correct the typo to fix reference counting, thus preventing
crashes.
2018-03-13 11:28:11 +01:00
Evan Hunt 129e13b92d Merge branch 'clean-xfer' into 'master'
clean up dig.out files that were left behind after xfer test

See merge request isc-projects/bind9!120
2018-03-10 16:11:33 -05:00
Evan Hunt 733086cc67 clean up dig.out files that were left behind after xfer test 2018-03-10 13:04:31 -08:00
Evan Hunt 745bedd0f0 Merge branch 'nothreads-fix' into 'master'
Fix compiler warnings and test failures when building without threads

See merge request isc-projects/bind9!119
2018-03-10 13:36:44 -05:00
Evan Hunt 56353aaf42 Fix compiler warnings and test failures when building without threads 2018-03-10 10:35:31 -08:00
Evan Hunt 96794f7d2b Merge branch 'missing-print-h' into 'master' 2018-03-09 19:58:08 -05:00
Evan Hunt a173c9c18f add missing includes 2018-03-09 16:55:21 -08:00
Evan Hunt 2dd47e73f4 Merge branch 'clean-bin-tests' into 'master'
clean up bin/tests, convert unit tests to ATF

Closes #115

See merge request isc-projects/bind9!93
2018-03-09 17:21:44 -05:00
Evan Hunt 86e00cbb71 final cleanup
- update Kyuafiles to match Atffiles
- copyrights
- CHANGES note
2018-03-09 14:12:50 -08:00
Evan Hunt 74347f4a55 reduce race risk in parallel builds 2018-03-09 14:12:50 -08:00
Evan Hunt d132f73497 remove lib/tests as nothing uses it anymore 2018-03-09 14:12:50 -08:00
Evan Hunt 9b753aa154 shorten ht_test and random_test 2018-03-09 14:12:50 -08:00
Evan Hunt a4ebe83cdb migrate t_dst signature test to lib/dns/tests/dst_test 2018-03-09 14:12:50 -08:00
Evan Hunt f58ac8ada3 migrate t_db to lib/dns/tests/db_test 2018-03-09 14:12:49 -08:00
Evan Hunt 8ecf69ef7b migrate t_names to lib/dns/tests/name_test 2018-03-09 14:12:49 -08:00
Evan Hunt 109546cbda migrate t_rbt to lib/dns/tests/rbt_test 2018-03-09 14:12:49 -08:00
Evan Hunt c6c1e99252 migrate t_tasks to lib/isc/tests/task_test 2018-03-09 14:12:49 -08:00
Evan Hunt d80825c40b migrate t_resolver to lib/dns/tests/resolver_test 2018-03-09 14:12:49 -08:00
Evan Hunt e2b8699df9 migrate t_timers to lib/isc/tests/timer_test 2018-03-09 14:12:49 -08:00
Evan Hunt 874e2fc70c migrate t_atomic to lib/isc/tests/atomic_test 2018-03-09 14:12:48 -08:00
Evan Hunt 979f054702 migrate t_mem to lib/isc/tests/mem_test 2018-03-09 14:12:48 -08:00
Evan Hunt 05b7251d51 migrate t_net to lib/isc/tests 2018-03-09 14:12:48 -08:00
Evan Hunt 62f650078a migrate t_sockaddr to lib/isc/tests 2018-03-09 14:12:48 -08:00
Evan Hunt 6ad1a042bc remove hashes test (duplicates lib/isc/tests/hash_test) 2018-03-09 14:12:48 -08:00
Evan Hunt 6717f31e10 remove master test (duplicates lib/isc/tests/master_test) 2018-03-09 14:12:48 -08:00
Evan Hunt ccfe778c01 migrate tests from bin/tests/dnssec-signzone to bin/tests/system/dnssec
- added tests to the dnssec system test that duplicate the ones
  from bin/tests/dnssec-signzone
- changed cleanall.sh so it doesn't automatically remove all
  key files, because there are now some of those that are part of the
  distribution
2018-03-09 14:12:48 -08:00
Evan Hunt 344ab0eb7d move all optional tests from bin/tests to bin/tests/optional
- some of these tests are obsolete and should be cleared up,
  others overlap with ATF tests and may be removed later.
  for now, let's just tidy up the bin/tests directory by
  moving these files down a level.
2018-03-09 14:12:47 -08:00
Evan Hunt a633f6c5dd remove some old and obsolete test files 2018-03-09 14:12:47 -08:00
Evan Hunt 36649c498a Merge branch 'parallel-unit-tests' into 'master'
capture more info from unit tests, run in parallel

See merge request isc-projects/bind9!117
2018-03-09 17:11:45 -05:00
Evan Hunt ef0b4c91bc allow ATF tests to run in parallel 2018-03-09 14:03:02 -08:00
Evan Hunt cba2b972bc capture more information from unit tests
- in unittest step, explicitly preserve kyua.log or atf.out
- preserve kyua results database if present
- generate HTML report from kyua results if available
2018-03-09 09:13:11 -08:00
Ondřej Surý 91bfcb1aed Merge branch '138-tweak-ci-settings' into 'master'
Tweak CI settings

Closes #138

See merge request isc-projects/bind9!116
2018-03-09 11:36:35 -05:00
Michał KępieńandOndřej Surý c330c65e77 Enable runner-specific make concurrency settings
Using fixed make concurrency settings on all runners is not flexible and
requires .gitlab-ci.yml to be modified each time tweaking these settings
is needed.  Use environment variables which are expected to be set by
the runner (defaulting to 1 in case they are not set) for controlling
make concurrency.
2018-03-09 12:29:24 -04:00
Michał KępieńandOndřej Surý 09004c25a8 Tweak the way ccache is used during CI
Our current CI configuration causes ccache data to be zipped after each
job and also included in build artifacts, which will quickly become
infeasible as ccache data grows.  Instead of asking gitlab-runner to
preserve ccache data between jobs, keep a separate ccache directory on
each runner, expecting it to be accessible at /ccache when a CI job is
run.  As this requires gitlab-runner to be configured in a specific way,
do not use ccache at all in case the ccache directory is not found while
building.
2018-03-09 12:28:44 -04:00
Ondřej Surý 8dd99563d1 Merge branch '111-gitlab-ci-does-not-run-unit-tests' into 'master'
Resolve "GitLab CI does not run unit tests"

Closes #111

See merge request isc-projects/bind9!100
2018-03-09 11:26:09 -05:00
Ondřej Surý 69ef7e53a4 Use runner specific make parallel build settings 2018-03-09 10:11:27 -04:00
Ondřej Surý 51fd3e631b Use runner specific ccache directory 2018-03-09 10:11:27 -04:00
Ondřej Surý a35e456b09 Split system and unit tests into separate CI jobs 2018-03-09 10:11:27 -04:00
Ondřej Surý 7d1738785f Enable developer mode in the GitLab CI builds 2018-03-09 10:11:27 -04:00
Ondřej Surý 2f4845e968 chg: dev: Compile BIND with ATF enabled, so unit tests are executed in test stage.
This needs ATF, Kyuo (and deps) available in the docker images.
2018-03-09 10:11:27 -04:00
Evan Hunt 58be47e3e1 Merge branch '136-tweak-timestamp-checking-in-the-cds-system-test' into 'master'
Tweak timestamp checking in the cds system test

Closes #136

See merge request isc-projects/bind9!114
2018-03-08 14:06:50 -05:00
Michał KępieńandEvan Hunt c92bacec63 Add CHANGES entry
4912.	[test]		Improved the reliability of the 'cds' system test.
			[GL #136]
2018-03-08 13:57:30 -05:00
Michał KępieńandEvan Hunt ab2913a29f Tweak timestamp checking in the cds system test
Given the characteristics of the three timestamps involved in file
modification time checks in the cds system test (each one is an hour
apart from the next), reduce the resolution of these checks to 1 minute.
This will prevent intermittent false negatives caused by exceeding the
currently allowed difference of 9 seconds between file modification
times without making the test moot.

Also note that by using abs(), checkmtime.pl allows the cds system test
to pass when the modification time of the checked file is less than an
hour (or two hours for the second check) in the past.  This should never
happen, so remove abs() from the condition checked by checkmtime.pl.
2018-03-08 13:57:30 -05:00
Evan Hunt 7c1de1edec Merge branch 'remove-bind9-bugs-references' into 'master'
Update documentation to remove obsolete bind9-bugs@isc.org email address

See merge request isc-projects/bind9!111
2018-03-08 13:37:25 -05:00
Ondřej SurýandEvan Hunt efc9bc5d8d Update documentation to remove obsolete bind9-bugs@isc.org email address 2018-03-08 13:36:49 -05:00
Ondřej Surý a890ab4bc2 Merge branch '130-use-ccache-to-speed-up-gitlab-ci-builds' into 'master'
Resolve "Use ccache to speed-up Gitlab CI builds"

Closes #130

See merge request isc-projects/bind9!105
2018-03-08 09:20:37 -05:00
Ondřej SurýandOndřej Surý 7cda25f1af chg: dev: Use ccache to speed-up the builds 2018-03-08 08:10:32 -05:00
Michał Kępień c9f4bdde94 Merge branch '128-fix-mkeys-system-test-race' into 'master'
Fix a race in the mkeys system test

Closes #128

See merge request isc-projects/bind9!103
2018-03-08 07:34:01 -05:00
Michał Kępień 32f875f9fc Add CHANGES entry
4911.	[test]		Improved the reliability of the 'mkeys' system test.
			[GL #128]
2018-03-08 13:20:48 +01:00
Michał Kępień 012ca0a27d Fix a race between "rndc reconfig" and waiting for a ./DNSKEY fetch to complete
Calling nextpart() after reconfiguring ns1 is not safe, because the
expected log message may appear in ns5/named.run before nextpart() is
run.  With the TTL for ./DNSKEY set to 20 seconds, ns5 will refresh it
after 10 seconds, by which time wait_for_log() will already have failed.
This results in a false negative.

However, just calling nextpart() before reconfiguring ns1 would
introduce a different problem: if ns5 refreshed ./DNSKEY between these
two steps, the subsequent wait_for_log() call would return immediately
as it would come across the log message about a failure while refreshing
./DNSKEY instead of the expected success.  This in turn would result in
a different false negative as the root key would still be uninitialized
by the time "rndc secroots" is called.

Prevent both kinds of false negatives by:

  - calling nextpart() before reconfiguring ns1, in order to prevent the
    first case described above,

  - looking for a more specific log message, in order to prevent the
    second case described above.

Also look for a more specific log message in the first part of the
relevant check, not to fix any problem, but just to emphasize that a
different fetch result is expected in that case.

With these tweaks in place, if a (failed) ./DNSKEY refresh is scheduled
between nextpart() and reconfiguring ns1, wait_for_log() will just wait
for two more seconds (one "hour"), at which point another refresh
attempt will be made that will succeed.
2018-03-08 13:19:54 +01:00
Mark Andrews 8be9ce2f06 Merge branch '133-update-util-check-changes-to-work-on-release-branches' into 'master'
Resolve "Update util/check-changes to work on release branches."

Closes #133

See merge request isc-projects/bind9!110
2018-03-08 00:11:48 -05:00
Mark Andrews 88a2202093 update util/check-changes to handle non master branched (util/check-changes master=0 CHANGES) 2018-03-08 15:45:56 +11:00
Evan Hunt 93267b8207 Merge branch '76-gitlab-ci-check-for-up-to-date-copyright' into 'master'
Add a GitLab CI precheck stage to check for up-to-date copyright information and sequential CHANGES notes.

Closes #76

See merge request isc-projects/bind9!42
2018-03-07 21:17:18 -05:00
Evan Hunt c4cb99cf4a update copyrights 2018-03-07 18:02:53 -08:00
Evan Hunt 6f4344af83 add a check-changes step, to ensure CHANGES numbers are in order before commit 2018-03-07 17:58:06 -08:00
Ondřej SurýandEvan Hunt 62c1dcb661 Add a GitLab CI precheck stage that checks for up-to-date copyright information 2018-03-07 17:58:06 -08:00
Evan Hunt b83014ab14 Merge branch '132-fix-changes-entry' into 'master'
Resolve "fix changes entry"

Closes #132

See merge request isc-projects/bind9!109
2018-03-07 20:57:38 -05:00
Mark Andrews fbca0ba9fc fix changes number 2018-03-08 12:38:53 +11:00
Mark Andrews f2af05432d Merge branch '125-in-view-duplicate-zone-not-detected-by-named-checkconf' into 'master'
Resolve "in-view duplicate zone not detected by named-checkconf"

Closes #125

See merge request isc-projects/bind9!97
2018-03-07 20:06:42 -05:00
Mark Andrews 83f85817aa add changes note for 'named-checkconf did not detect in-view zone collisions' 2018-03-08 11:53:38 +11:00
Mark Andrews 3e7e280040 check for in-view zones colliding with other zone definitions; also check the syntax of the in-view zone name 2018-03-08 11:53:21 +11:00
Mark Andrews ca55c672b0 add test configuration where a in-view zone collides with a existing zone 2018-03-08 11:50:09 +11:00
Evan Hunt c7b9c005d0 Merge branch 'test-names' into 'master'
use the test name in the -D string for each name server

See merge request isc-projects/bind9!107
2018-03-07 17:49:26 -05:00
Evan Hunt 1eff695f33 use the test name in the -D string for each name server 2018-03-07 17:37:00 -05:00
Evan Hunt 055daeb0a5 Merge branch 'longopts' into 'master'
restore long options for run.sh

See merge request isc-projects/bind9!104
2018-03-07 17:34:30 -05:00
Evan Hunt 4a714bffbc restore long options for run.sh 2018-03-07 17:22:58 -05:00
Evan Hunt 341603a7dd Merge branch 'allow-query' into 'master'
speed up allow_query test

Closes #81

See merge request isc-projects/bind9!76
2018-03-07 16:53:16 -05:00
Evan Hunt a9b6bed6af eliminate unnecessary waiting in allow-query test
- grep in the log to see if configuration is finished rather
  than sleeping for 5 seconds
2018-03-07 13:20:01 -08:00
Evan Hunt ffc3e73c36 rename allow_query to allow-query 2018-03-07 13:17:11 -08:00
Evan Hunt 98255e40e7 Merge branch '116-dnsrpz-enable-log-message-appears-to-be-broken' into 'master'
Resolve "dnsrpz-enable log message appears to be broken"

Closes #116

See merge request isc-projects/bind9!98
2018-03-07 15:49:16 -05:00
Mark AndrewsandEvan Hunt d24fb6b032 fix log message about 'dnsrps-enable yes;' when not configured (this will only ever be emitted if the parser is incorrectly updated as the error is normally caught there) 2018-03-07 15:35:38 -05:00
Evan Hunt d631701be7 Merge branch '119-remove-unnecessary-insist-in-code' into 'master'
Remove unnecessary INSIST

Closes #119

See merge request isc-projects/bind9!101
2018-03-07 15:29:30 -05:00
Mark AndrewsandEvan Hunt f1def91625 check insist on every call; make conditional block constistent with rest of code 2018-03-07 15:18:16 -05:00
Evan Hunt 55049d02dc Merge branch 're-fix-notify' into 'master'
fixed typo that caused the notify test to run slowly

See merge request isc-projects/bind9!106
2018-03-06 14:44:05 -05:00
Evan Hunt 82e9b59b91 fixed typo that caused the notify test to run slowly 2018-03-06 11:41:35 -08:00
Evan Hunt 82fd772dab Merge branch 'fix-notify' into 'master'
fix notify test

See merge request isc-projects/bind9!77
2018-03-06 14:13:14 -05:00
Evan Hunt 3eb90582de address a possible notify test failure
- wait for the transfer completion message to apear in the log instead
  of the notify message. this ensures we don't check for the presense of
  transfered records during the time between the notify and the
  transfer.
2018-03-06 10:59:45 -08:00
Michał Kępień e50849097a Merge branch '56-replace-getquad-with-inet_pton' into 'master'
Replace getquad() with inet_pton()

Closes #56

See merge request isc-projects/bind9!99
2018-03-06 04:09:01 -05:00
Michał Kępień 4528b887b0 Add CHANGES entry for GL #56, revise CHANGES entry for GL #13
4906.	[func]		Replace getquad() with inet_pton(), completing
			change #4900. [GL #56]

4900.	[func]		Remove all uses of inet_aton().  As a result of this
			change, IPv4 addresses are now only accepted in
			dotted-quad format. [GL #13]
2018-03-06 09:52:08 +01:00
Michał Kępień 4f96cebce3 Replace getquad() with inet_pton()
getquad() was implemented back in 2001 to warn about IPv4 addresses in
non-dotted-quad form being used.  As change 4900 (GL #13) removed all
uses of inet_aton(), which allowed such forms, with inet_pton(), which
does not allow them, there is no point in keeping getquad() around as it
now only prints an extra warning when the parser comes across an IP
address in a form which is not acceptable anyway.  Replace all uses of
getquad() with inet_pton(AF_INET, ...).
2018-03-06 09:49:30 +01:00
Michał Kępień 2a50fc324b Add a release note about dropping support for non-dotted-quad IPv4 addresses in master files
Support for non-dotted-quad IPv4 addresses in master files was dropped
when the inet_aton() call inside getquad() got replaced with a call to
inet_pton(), so a release note should have been added back then to
inform users that such syntax will no longer work.
2018-03-06 09:49:27 +01:00
Michał Kępień c047405c5d Merge branch '110-libirs-do-not-ignore-resolv.conf-syntax-errors' into 'master'
libirs: Do not ignore resolv.conf syntax errors

Closes #110

See merge request isc-projects/bind9!78
2018-03-06 03:22:37 -05:00
Michał Kępień 1f18d33804 Add CHANGES entry
4905.	[bug]		irs_resconf_load() ignored resolv.conf syntax errors
			when "domain" or "search" options were present in that
			file. [GL #110]
2018-03-06 08:28:41 +01:00
Michał Kępień 6c09f305ae Remove duplicate irs_resconf_load() unit test
The "sortlist-v4.conf" unit test for irs_resconf_load() is always run
twice due to a duplicate entry in the "tests" table.  Remove one of them
to prevent this.
2018-03-06 08:27:45 +01:00
Michał Kępień 1f400b68a8 Do not ignore resolv.conf syntax errors
irs_resconf_load() stores the value returned by add_search() into ret
without consulting its current value first.  This causes any previous
errors raised while parsing resolv.conf to be ignored as long as any
"domain" or "search" statement is present in the file.

Prevent this by returning early in case an error is detected while
parsing resolv.conf.  Ensure that "searchlist" and "magic" members of
the created irs_resconf_t structure are always initialized before
isc_resconf_destroy() is called.
2018-03-06 08:27:45 +01:00
Mark Andrews 5c0327e8ff Merge branch '126-make-distclean-fail' into 'master'
Resolve ""make distclean" fail."

Closes #126

See merge request isc-projects/bind9!102
2018-03-06 00:08:22 -05:00
Mark Andrews 57f7cf211c don't allow a macro to end in '\' 2018-03-06 15:13:03 +11:00
Evan Hunt 8529e124ea Merge branch 'fix-changes' into 'master'
fix CHANGES

See merge request isc-projects/bind9!96
2018-03-02 14:56:11 -05:00
Evan Hunt 91d8c1f95c fix CHANGE notes 2018-03-02 11:53:38 -08:00
Evan Hunt 3fed986199 Merge branch '124-revert-deadlock-check' into 'master'
revert cname loop test due to effects on apex CNAMEs under insecure delegations

See merge request isc-projects/bind9!95
2018-03-02 14:47:14 -05:00
Evan Hunt b291b45312 temporarily revert change #4859 2018-03-02 11:30:02 -08:00
Michał Kępień 148cc40381 Merge branch 'fix-fetchlimit' into 'master'
Improve failure logging in fetchlimit system test

See merge request isc-projects/bind9!81
2018-03-01 09:39:24 -05:00
Evan HuntandMichał Kępień 86838b2a02 revise soft limit test
- don't bail out of the loop if clients are exceeded, just count incidents
- verbosely describe expectations and results
2018-03-01 09:26:14 -05:00
Michał Kępień 78352caba7 Merge branch '121-views-system-test-has-wrong-test-strings-for-reload-completion' into 'master'
Resolve "views system test has wrong test strings for reload completion."

Closes #121

See merge request isc-projects/bind9!88
2018-02-28 08:54:38 -05:00
Mark Andrews 4cb0873a0a wait for 'all zones loaded' rather than 'reloading zones succeeded' which just indicates that everything kicked off ok 2018-02-28 17:14:30 +11:00
Evan Hunt cb6633c11c Merge branch '96-update-contributors-guide-and-move-it-at-top-level-so-it-s-recognised-by-gitlab' into 'master'
Update contributor's guide and move it to top level, so it's recognized by GitLab

Closes #96

See merge request isc-projects/bind9!58
2018-02-27 17:52:11 -05:00
Evan Hunt 985d35f6b7 Set up CONTRIBUTING.md
- moved into place from doc/dev/contrib.md
- build CONTRIBUTING from CONTRIBUTING.md, like README and OPTIONS
2018-02-27 14:40:34 -08:00
Evan Hunt f22af09819 Merge branch '113-minor-testsummary.sh-improvements' into 'master'
Minor testsummary.sh improvements (handling colored output, failure summary)

Closes #113

See merge request isc-projects/bind9!80
2018-02-27 12:33:33 -05:00
Stephen Morris 58ad17bd54 Merge branch '97-windows-version-of-bind-failing-to-build' into 'master'
Resolve "Windows version of BIND failing to build"

Closes #97

See merge request isc-projects/bind9!65
2018-02-27 04:58:05 -05:00
Michał Kępień b7c22b8f09 Merge branch '98-add-util-git-replay-merge.sh' into 'master'
Put git-replay-merge in source tree

Closes #98

See merge request isc-projects/bind9!83
2018-02-27 04:39:10 -05:00
Michał Kępień f7fe1e3098 Add util/git-replay-merge.sh
git-replay-merge.sh is a script whose purpose is to make backporting
merge requests more convenient by automating the process as much as
possible.

For more information, including usage examples, see:

    https://gitlab.isc.org/isc-projects/bind9/wikis/Backporting-a-Merge-Request
2018-02-27 10:23:32 +01:00
Evan HuntandMichał Kępień 38940619c6 Do not destroy systests.output if there are no test.output files 2018-02-27 09:47:59 +01:00
Michał Kępień 642e20db8a Use echoinfo for printing test summary
This ensures testsummary.sh is consistent with other scripts belonging
to the test framework.
2018-02-27 09:47:59 +01:00
Michał Kępień 28068857e7 Make testsummary.sh print a list of failed system tests
Print a list of failed system tests, if any, below the system test
summary to avoid the need to manually search through the test log.
2018-02-27 09:45:03 +01:00
Michał Kępień 9006d6dbbd Tweak the regular expression used for extracting system test results
The current regular expression used for extracting system test results
from systests.output, "^R:", is anchored at the start of a line, which
prevents colored system test output from being properly processed.  As
just "R:" would arguably be too general, extend the pattern a bit to
ensure it will only match lines containing system test results.
2018-02-27 08:59:51 +01:00
Evan Hunt 8282fd8b50 Merge branch 'test-output' into 'master'
Clean up test output

See merge request isc-projects/bind9!66
2018-02-27 02:50:34 -05:00
Evan Hunt 0e52fbd0b3 clean up test output
- removed a few remaing places where output wasn't being passed
  through echo_i or cat_i
- added a "digcomp" function to conf.sh.in to send digcomp.pl output
  through cat_i and return the correct exit value
- set SYSTESTDIR when calling echo_i from nsX directories, so that
  the test name will always be printed correctly
- fixed a test name typo in conf.sh.in
2018-02-26 23:37:05 -08:00
Mukund Sivaraman e656041fd7 Merge branch '79-add-working-directory-to-example-in-doc-dev-dev-md' into 'master'
Resolve "Add working directory to example in doc/dev/dev.md"

Closes #79

See merge request isc-projects/bind9!47
2018-02-26 22:27:02 -05:00
Evan Hunt 2e7c726bb0 Merge branch '112-fix-mx-checks-for-dynamic-updates' into 'master'
Fix MX checks for dynamic updates

Closes #112

See merge request isc-projects/bind9!79
2018-02-26 17:56:32 -05:00
Mukund SivaramanandEvan Hunt 451241a776 working directory is usually not in PATH 2018-02-26 12:55:12 -08:00
Evan Hunt 409cc22934 Merge branch 'check-for-test-interfaces-before-running-system-tests' into 'master'
Check for test interfaces before running system tests

See merge request isc-projects/bind9!19
2018-02-26 13:00:37 -05:00
Evan HuntandMichał Kępień a8b583e78b test interfaces directly in runall.sh and parallel.mk 2018-02-26 14:58:16 +01:00
Michał Kępień e0221f2d25 Check for test interfaces before running system tests
Prevent runall.sh and "make test" from even attempting to run system
tests when "ifconfig.sh up" has not been run beforehand.  This ensures
the user is not flooded with error messages in such a case.
2018-02-26 14:12:48 +01:00
Michał Kępień 1d403f9d3c Add CHANGES entry
4903.	[bug]		"check-mx fail;" did not prevent MX records containing
			IP addresses from being added to a zone by a dynamic
			update. [GL #112]
2018-02-26 13:47:28 +01:00
Michał Kępień 857a40c87b Fix MX checks for dynamic updates
The check_mx() function in lib/ns/update.c incorrectly tests whether the
DNS_RDATA_CHECKMX/DNS_RDATA_CHECKMXFAIL flags are set for each applied
MX record update as these flags are never set in code paths related to
dynamic updates; they can only be set when loading a zone from a master
file (DNS_ZONEOPT_CHECKMX -> DNS_MASTER_CHECKMX -> DNS_RDATA_CHECKMX).
This flaw allows MX records containing IP addresses to be added to a
zone even when "check-mx fail;" is used.

Ensure correct behavior by modifying the relevant tests in check_mx() so
that they use DNS_ZONEOPT_CHECKMX/DNS_ZONEOPT_CHECKMXFAIL instead.
2018-02-26 13:10:45 +01:00
Evan Hunt e1d6c9a663 Merge branch '66-ixfr-system-test-fails-intermittently' into 'master'
chg: dev: Improved the reliability of the 'ixfr' system test. [GL #66]

Closes #66

See merge request isc-projects/bind9!67
2018-02-26 01:30:28 -05:00
Evan Hunt 67a8b5ec17 wait for synchronization; re-notify slave if the transfer doesn't happen 2018-02-25 22:18:30 -08:00
Mark Andrews 0dfcb9beaa Merge branch '51-fix-cppcheck-detected-source-code-errors' into 'master'
Resolve "Fix cppcheck-detected source code errors"

Closes #51

See merge request isc-projects/bind9!46
2018-02-25 18:37:16 -05:00
Evan Hunt 8e71b7cd73 Merge branch 'note' into 'master'
add missing release note

See merge request isc-projects/bind9!73
2018-02-25 17:39:20 -05:00
Evan Hunt cc5432cea5 added missing release note 2018-02-25 14:37:37 -08:00
Evan Hunt cfa35420ee Merge branch 'upforwd-error' into 'master'
Resolve "upforwd test error"

See merge request isc-projects/bind9!72
2018-02-25 16:55:09 -05:00
Evan Hunt 54e010d51e fixed an upforwd test error. 2018-02-25 13:43:14 -08:00
Evan Hunt ab0fe63f07 minor cleanup and addressed a sprintf format warning 2018-02-24 17:56:17 -08:00
Mark AndrewsandEvan Hunt 48ca11df5f update printf format to match type 2018-02-24 17:50:41 -08:00
Mark AndrewsandEvan Hunt a04bb76973 improve the conditional declaration and use of variable to silence cppcheck 2018-02-24 17:50:41 -08:00
Mark AndrewsandEvan Hunt b71a1386ed remove deadcode 2018-02-24 17:50:41 -08:00
Mark AndrewsandEvan Hunt e8249dcd49 silence unread assignment warning by using POST macro 2018-02-24 17:50:41 -08:00
Mark AndrewsandEvan Hunt 70d192eb97 update the sscanf format strings so they match the pointer types 2018-02-24 17:50:27 -08:00
Mark AndrewsandEvan Hunt a4186b1867 redefine CHECK so cppcheck see the definition 2018-02-24 17:50:27 -08:00
Mark AndrewsandEvan Hunt f2c22662cc remove unused struct dst_context declaration 2018-02-24 17:50:08 -08:00
Mark AndrewsandEvan Hunt dcd309bea1 conditionally typedef fstrmtable 2018-02-24 17:49:49 -08:00
Mark AndrewsandEvan Hunt 7b27be54ee adjust goto target and conditional compilation so that cleanup_spillattimer and cleanup_alglock labels match the element to be cleanup and so that they are always used 2018-02-24 17:49:49 -08:00
Evan Hunt 4c753f5880 Merge branch 'tidy-runall.sh-environment-variables' into 'master'
Tidy runall.sh environment variables

See merge request isc-projects/bind9!18
2018-02-24 15:43:22 -05:00
Evan Hunt bd34375e9b Merge branch 'nssearch-timeout' into 'master'
chg: usr: List servers that time out in dig +nssearch. [GL #64]

See merge request isc-projects/bind9!28

Closes #64
2018-02-24 14:14:12 -05:00
Evan Hunt 7d29f7e94b CHANGES, doc 2018-02-24 11:02:03 -08:00
Evan Hunt 05a91e4e4c list servers that time out in dig +nssearch 2018-02-24 10:56:09 -08:00
Ondřej Surý 1cd63cd634 chg: dev: Remove isc_net_aton from libisc.def.in 2018-02-24 09:50:31 +01:00
Evan Hunt 20a6ab6745 Merge branch 'speedup-ci' into 'master'
Speed up CI

See merge request isc-projects/bind9!64
2018-02-24 03:36:08 -05:00
Evan Hunt 0be9ad7e17 Merge branch '71-xfer-system-test-fails-intermittently' into 'master'
chg: dev: Improve the resilience of the xfer system test, which could be flaky under load.

Closes #71

See merge request isc-projects/bind9!61
2018-02-23 21:56:16 -05:00
Evan Hunt 0d784de16a more CI speedup experiments
- turn off some of the build tests
- increase test threads to 8
- build with --disable-static
- suppress the non-system tests under bin/tests (timers, task, etc)
2018-02-23 18:04:02 -08:00
Evan Hunt 5d7d6881a1 improve reliability of xfer test 2018-02-23 16:52:34 -08:00
Evan Hunt 3c028ed07d Merge branch 'kyua-oot' into 'master'
chg: dev: Unit tests were broken in out-of-tree builds.

See merge request isc-projects/bind9!57
2018-02-23 18:22:59 -05:00
Evan Hunt 971d19f05c Merge branch '95-fix-dyndb' into 'master'
Resolve "dyndb system test fails intermittently"

Closes #95

See merge request isc-projects/bind9!63
2018-02-23 15:00:31 -05:00
Evan Hunt 749df056be improve dyndb test resilience
- no longer grep for specific line numbers when checking
  parameter logging, as those can change
- report the failure immediatey if parameter check fails
2018-02-23 10:15:15 -08:00
Ondřej Surý 9425d6ba7c Merge branch 'remote-inet_aton-usage' into 'master'
chg: dev: Replace all usage of inet_aton() with inet_pton() [GL #13]

See merge request isc-projects/bind9!5
2018-02-23 09:37:19 -05:00
Michał Kępień e4147c2d6a Add CHANGES entry
4899.	[cleanup]	Remove all uses of inet_aton(). [GL #13]
2018-02-23 13:57:10 +01:00
Ondřej SurýandMichał Kępień a11e23b5ed Replace all usage of inet_aton() with inet_pton() 2018-02-23 13:57:10 +01:00
Michał Kępień b20ff30a79 Fix dyndb system test after copyright information update 2018-02-23 13:55:05 +01:00
Ondřej Surý 018a60549b Merge branch 'year-2018-copyright-update-in-master' into 'master'
Remove copyright years from individual source files (and keep them only in the COPYRIGHT file)

Closes #55

See merge request isc-projects/bind9!37
2018-02-23 04:33:33 -05:00
Ondřej Surý 843d389661 Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
Ondřej Surý c8efcca408 Update scripts in util/ to drop the year information from the individual source files. 2018-02-23 10:10:52 +01:00
Ondřej Surý c5a09493c3 Merge branch 'na-revert-removal-of-controls.conf' into 'master'
Revert removal of bin/tests/system/common/controls.conf, it's still needed

See merge request isc-projects/bind9!62
2018-02-23 04:08:56 -05:00
Ondřej Surý 996f5154f0 Revert removal of bin/tests/system/common/controls.conf, it's still needed 2018-02-23 10:08:37 +01:00
Ondřej Surý 11825c7400 Merge branch 'na-update-copyrights-after-59-merge' into 'master'
Update copyright information after !59 merge.

See merge request isc-projects/bind9!60
2018-02-23 03:59:56 -05:00
Ondřej Surý ab1b02d274 Update copyright information after !59 merge. 2018-02-23 09:02:49 +01:00
Ondřej Surý 88aef07f58 Merge branch '91-parallel-tests' into 'master'
chg: dev: Convert most of the remaining system tests to be able to run in parallel [GL #91]

Closes #91

See merge request isc-projects/bind9!59
2018-02-23 02:29:32 -05:00
Evan Hunt 0c559199bf final cleanup
- add CHANGES note
- update copyrights and license headers
- add -j to the make commands in .gitlab-ci.yml to take
  advantage of parallelization in the gitlab CI process
2018-02-22 22:58:15 -08:00
Evan Hunt b9246ce773 improve reliability of the xfer test on slow systems
- lengthed the wait loop for the transfers to complete
2018-02-22 22:08:02 -08:00
Evan Hunt 474b10a133 remove v6synth
- this was a test for the allow-v6-synthesis option, which was
  deprecated and no longer works. the test was removed
  from conf.sh.in long ago.
2018-02-22 15:29:02 -08:00
Evan Hunt 731ad28be2 removed some unnecessary greps 2018-02-22 15:29:02 -08:00
Evan Hunt 56e440f65f reorder tests to get better use of parallelism 2018-02-22 15:29:02 -08:00
Evan Hunt c032c54dda parallelize most system tests 2018-02-22 15:29:02 -08:00
Evan Hunt 0217cc8bb2 Merge branch '93-drop-seccomp-support' into 'master'
Drop support for libseccomp system-call filtering on Linux. [RT #46729]

Closes #93

See merge request isc-projects/bind9!55
2018-02-22 17:44:46 -05:00
Evan Hunt 1cb250c37c Added a release note, plus minor cleanups. 2018-02-22 13:38:51 -08:00
Petr Menšík 95cde3608a unit/unittest.sh is generated by configure. It will always be
generated into builddir. If out-of-tree build is used, make unit
will always fail. Kyuafiles and testdata still have to be copied
manually into the builddir.
2018-02-22 15:32:16 +01:00
Ondřej Surý 3ffb13716a chg: usr: Remove libseccomp based system-call filtering [GL #93] 2018-02-22 13:41:06 +01:00
Ondřej Surý c2c1e2531b Remove libseccomp based system-call filtering. 2018-02-22 13:41:06 +01:00
Ondřej Surý 01d41d5b04 chg: dev: Improve GitLab CI build checking to build on all docker images, but run system tests only on debian/sid amd64+i386
Merge branch '72-build-but-not-test-on-most-combinations' into 'master'

Closes #72

See merge request isc-projects/bind9!44
2018-02-22 05:16:33 -05:00
Mark Andrews 14388a4ad6 Merge branch '68-rpz-system-test-fails-intermittently' into 'master'
Prevent rpz system test from wiping out forensic data

See merge request isc-projects/bind9!51
2018-02-21 22:48:25 -05:00
Mark Andrews f7172cf23f add CHANGES note 2018-02-22 14:03:50 +11:00
Mark Andrews b98a92071d perform rpz testing with a loop rather that recursion 2018-02-22 14:01:42 +11:00
Mark Andrews 05f9deba0b use symbolic test modes native/dnsrps 2018-02-22 14:01:42 +11:00
Mark Andrews 034450ba02 add test numbers as use them in file names 2018-02-22 14:01:42 +11:00
Mark Andrews aa7964dd4b Merge branch '82-cacheclean-test-is-not-robust' into 'master'
Resolve "cacheclean test is not robust."

Closes #82

See merge request isc-projects/bind9!50
2018-02-21 20:13:41 -05:00
Mark Andrews 8c8ad74abe add CHANGES entry 2018-02-22 11:30:07 +11:00
Mark Andrews 146c16c06e check that sed selects a non zero range of lines 2018-02-22 11:30:07 +11:00
Ondřej Surý bdff3aeb14 Enable --with-libtool configure option as it reduces the size of artifacts 2018-02-21 15:33:16 +01:00
Ondřej Surý ccfcf3c023 Build BIND on all available docker images, but test only in few selected ones 2018-02-21 15:33:15 +01:00
Michał Kępień d989d20fe5 Preserve values of environment variables which are already set
This enables the environment variables controlling run.sh behavior to be
permanently set in a working environment (e.g. to automatically force
colored output without using "-c" in each runall.sh invocation).

Relevant runall.sh command line arguments still have a higher priority.
2018-02-21 14:59:38 +01:00
Michał Kępień a324031a82 Allow forcing colored system test output
As parallel.mk and runsequential.sh both pipe system test output through
"tee" (for the purpose of creating test.output), run.sh invoked from
these two files detects it is not writing to a terminal, which prevents
colored output from being generated.  Allow forcing colored output using
a new command line argument for runall.sh, "-c", which sets an
environment variable (SYSTEMTEST_FORCE_COLOR) causing conf.sh to
unconditionally enable colored output.

The same environment variable can also be used directly to force colored
output when using "make test" instead of runall.sh.
2018-02-21 14:59:35 +01:00
Michał Kępień 3862043879 Allow retaining system test output using an environment variable
Instead of exporting an environment variable containing a command line
argument (NOCLEAN="-n"), extend run.sh to handle a "boolean" environment
variable (SYSTEMTEST_NO_CLEAN) itself.  The former method is buggy
because the value of NOCLEAN is set in parallel.mk when that file is
first created, but it is not subsequently updated upon each test run
(because make considers parallel.mk to be up to date).

To retain backward compatibility, the "-n" command line argument for
run.sh is still supported (and has a higher priority than the relevant
environment variable).

The SYSTEMTEST_NO_CLEAN environment variable can also be used directly
to prevent cleanup when using "make test" instead of runall.sh.

Apart from fixing a bug, this simplifies the way runall.sh controls
run.sh behavior due to the Makefile being bypassed.  Direct processing
of environment variables in run.sh is more scalable in the long run,
given that the previously utilized technique, even with its
implementation fixed, would still require Makefile.in to be modified in
two places each time a new flag needed to be passed from runall.sh to
run.sh.
2018-02-21 14:59:33 +01:00
Ondřej Surý b92161ee57 chg: dev: Remove hard copies of RFCs and I-Ds from the BIND repository
Merge branch 'remove-rfcs-and-drafts' into 'master'

See merge request isc-projects/bind9!34
2018-02-21 08:27:15 -05:00
Mark Andrews 643c8c27ff Merge branch '67-stabilize-cacheclean-system-test' into 'master'
Stabilize cacheclean system test

Closes #67

See merge request isc-projects/bind9!43
2018-02-20 16:01:00 -05:00
Ondřej Surý 890264843d Merge branch '73-remove-dockerfiles' into 'master'
Remove Dockerfiles that were preventing git checkout on Windows due colon in the directory name.

Closes #73

See merge request isc-projects/bind9!45
2018-02-20 10:40:15 -05:00
Stephen Morris 9f4c778f69 Merge branch 'rt46602' into 'master'
Allow parallel run of system tests

See merge request isc-projects/bind9!7
2018-02-20 09:00:59 -05:00
Michał Kępień ca1049b2f3 Improve the way cache contents are searched for "ns.flushtest.example"
During the "check flushtree clears adb correctly" check, expecting
"ns.flushtest.example" to always be the first name in the ADB dump is
fragile, because in a certain corner case "a.root-servers.nil" will be
the first name instead.

As the purpose of the relevant check is to ensure "ns.flushtest.example"
is removed from ADB by "rndc flushtree flushtest.example", search the
entire list of names present in ADB instead of just the first entry when
looking for "ns.flushtest.example".
2018-02-20 13:59:29 +01:00
Michał Kępień 2bbff06d36 Wait until a cache dump completes instead of waiting for a fixed amount of time
Dumping the cache is an asynchronous operation, so sleeping for a fixed
amount of time after running "rndc dumpdb" is imperfect as dumping cache
contents may take longer than expected on slower machines.  Instead of
always sleeping for 1 second, wait until the "; Dump complete" line
appears in the dump or 10 seconds pass, whichever comes first.
2018-02-20 13:59:28 +01:00
Michał Kępień aeea1faf01 Do not overwrite cache dumps
Unless configured otherwise in named.conf, "rndc dumpdb" causes a cache
dump to be written to a file called "named_dump.db" in the working
directory of the given named instance.  Repeatedly using this command
throughout different checks in the cacheclean system test causes cache
dumps for older checks to be overwritten, which hinders failure
diagnosis.  Prevent this by moving each cache dump to a check-specific
location after running "rndc dumpdb".

Furthermore, during the "check flushtree clears adb correctly" check,
dump_cache() is called twice without renaming the resulting files.
Prevent the first cache dump from being overwritten by moving it to a
different file before calling "rndc dumpdb" for the second time.
2018-02-20 13:59:27 +01:00
Michał Kępień 01de79b332 Assign an index to each check in the cacheclean system test
This will enable storing per-check forensic data, which facilitates
troubleshooting test failures.
2018-02-20 13:59:25 +01:00
Ondřej Surý 76239c6fa7 Remove integrated Dockerfiles that have been moved to separate repository 2018-02-19 22:14:36 +01:00
Evan Hunt 2a50992ab3 [master] Merge branch 'master' of ssh://repo.isc.org/proj/git/prod/bind9 2018-02-19 01:25:15 -08:00
Tinderbox User d7733df695 regen master 2018-02-19 01:09:05 +00:00
Tinderbox User 72326f7701 update copyright notice / whitespace 2018-02-18 23:47:45 +00:00
Tinderbox User b3b3f9064c newcopyrights 2018-02-18 23:30:15 +00:00
Evan Hunt 908b2f4b3b [master] add missing release notes, update README 2018-02-17 19:56:31 -08:00
Evan Hunt ceeab84d6c [master] synchronize 2018-02-17 19:21:26 -08:00
Ondřej Surý 4801f40e4d Merge branch 'master' into 'master'
Master

See merge request isc-projects/bind9!36
2018-02-16 17:19:26 -05:00
Stephen Morris dbf753b52d [rt46602] Update CHANGES for parallel tests 2018-02-16 18:17:21 +00:00
Stephen Morris 7bb9a97904 [rt46602] Changes to get tests running on Windows
1. Track changes to conf.sh.in in conf.sh.win32
2. Modifications to prevent Windows "Configure" script replacing
   the sed "@PORT@" substitution tokens in conf.sh.win32.
3. runall.sh now runs Windows tests sequentially
2018-02-16 16:14:41 +00:00
Stephen Morris 7222c9fc76 [rt46602] Miscellaneous changes to fix rebase issues 2018-02-16 16:14:41 +00:00
Stephen Morris 30cd931a0d [rt46602] Change name of shell variable holding current test directory
It was TESTNAME, but this is an obvious name and was used in one of
the system tests, something that interfered with the content of
progress messages.  It is now SYSTESTDIR.
2018-02-16 16:14:40 +00:00
Michał KępieńandStephen Morris 2c519531a7 [rt46602] Export environment variables in a portable manner 2018-02-16 16:14:40 +00:00
Michał KępieńandStephen Morris e005fb948d [rt46602] Sanitize test names to fix "make check" on Solaris 2018-02-16 16:14:40 +00:00
Stephen Morris 3dfb7c17eb [rt46602] Add .gitignore file for catz 2018-02-16 16:14:40 +00:00
Stephen Morris 59d88ee192 [rt46602] Pass noclean option to Makefile via exported variable 2018-02-16 16:09:49 +00:00
Stephen Morris 23dfa27a84 [rt46602] Mention conf.sh.win32 in instructions for adding a test. 2018-02-16 16:09:49 +00:00
Michał KępieńandStephen Morris f0721de624 [rt46602] Fix various typos, formatting issues and stylistic nits 2018-02-16 16:09:49 +00:00
Michał KępieńandStephen Morris 42cf18d239 [rt46602] Remove redundant variable assignment 2018-02-16 16:09:49 +00:00
Michał KępieńandStephen Morris 1ac4c3e4e5 [rt46602] named.port is no longer created by setup.sh for allow_query 2018-02-16 16:09:49 +00:00
Michał KępieńandStephen Morris fe1ccafc34 [rt46602] Consistently print usage for runall.sh to stderr 2018-02-16 16:09:49 +00:00
Michał KępieńandStephen Morris 0dcee1cad3 [rt46602] Clean up getopts usage
Ensure case clauses are in sync with the string passed to getopts.
Remove catch-all clauses as they will never be evaluated.
2018-02-16 16:09:49 +00:00
Michał KępieńandStephen Morris fe51c34df3 [rt46602] Assign default values to variables set by command line options and consistently treat them as integers 2018-02-16 16:09:49 +00:00
Michał KępieńandStephen Morris 1960de5530 [rt46602] named.port cannot be ignored by git because it is required to be present by notify/ns4 2018-02-16 16:09:49 +00:00
Michał KępieńandStephen Morris 344d05063f [rt46602] Re-add clean.sh invocation to catz/setup.sh
Commit 57aa7b60fd caused catz/setup.sh to no longer call clean.sh, which
results in the catz system test failing on subsequent runs if the first
run is interrupted or fails.
2018-02-16 16:09:49 +00:00
Stephen Morris 451b7309ca [rt46602] Remove option to format the printed start time of a test
There was too much incompatibility between operating systems as to
the allowed options for "date".
2018-02-16 16:09:49 +00:00
Stephen Morris 462766cd76 [rt46602] Escape line ends in shell script variable assignment
Escape the line ends in a multi-line variable assignment.  Under some
circumstances, substituting the variable caused syntax errors when
used as the list of values in a shell script "for" statement.
2018-02-16 16:09:49 +00:00
Stephen Morris fb78f82ba1 [rt46602] Fix EXTRAPORT substitutions in copy_setport
Fix problems where all EXTRAPORT macros were being replaced by
the EXTRAPORT1 value. (Copy and paste issue.)
2018-02-16 16:09:49 +00:00
Stephen Morris cdf18a5009 [rt46602] Minor documentation changes 2018-02-16 16:09:49 +00:00
Stephen Morris 7f2d41d4c4 [rt46602] Correct way allow_query test produces RNDC output 2018-02-16 16:09:49 +00:00
Stephen Morris 0855a8a6cc [rt46602] Simplify the cleanup code 2018-02-16 16:09:48 +00:00
Stephen Morris f606b17dfb [rt46602] Extensions to README
Added descriptions of how nameservers are started and stopped
during the tests, and how the framework cleans up the files created.
2018-02-16 16:09:31 +00:00
Stephen Morris b88b508b22 [rt46602] Miscellenous small changes 2018-02-16 15:19:44 +00:00
Stephen Morris 1f07c69f25 [rt46602] Handle echoing of multi-line output from tests 2018-02-16 15:19:44 +00:00
Stephen Morris c12e06755f [rt46602] Rename "test" variable to "systest"
... to avoid confusion between the variable and the command of the
same name.
2018-02-16 15:19:44 +00:00
Stephen Morris 00bc29640b [rt46602] Add ability to prevent deletion of output files when running all tests
Some tests may need to examine all output files from all system tests.
Allow the deletion of these files to be inhibited if required.
2018-02-16 15:19:44 +00:00
Stephen Morris 244d1c30e2 [rt46602] Error messages before start of test are output to stderr
Error messages concerning the invocation of run.sh are output to
stderr.  Messages after the test has started are output to stdout.
2018-02-16 15:19:44 +00:00
Stephen Morris a5cf6bd12a [rt46602] Ensure that output sent to stderr is routed to the output file 2018-02-16 15:19:44 +00:00
Stephen Morris ce66752adc [rt46602] Minor tidying up of documentation 2018-02-16 15:19:44 +00:00
Stephen Morris 549a6c6bc8 [rt46602] Check prerequsities before network interfaces when running test. 2018-02-16 15:19:44 +00:00
Stephen Morris f0f5b5f045 [rt46602] Minor formatting changes to Perl files 2018-02-16 15:19:44 +00:00
Stephen Morris c344e1d768 [rt46603] Provide echostart() and echoend() to output test start/end messages. 2018-02-16 15:19:44 +00:00
Stephen Morris 055e5be9fd [rt46602] Ensure test output in systests.output is not mixed up
When running all the system tests, output from a test is sent to a
test.output file in the test directory.  These are combined in to
systests.output when the run finishes.
2018-02-16 15:19:44 +00:00
Stephen Morris 3c25e5fa02 [rt46602] Miscellaneous minor fixes
... for misspellings, typos, trailing spaces, duplicated lines etc.
2018-02-16 15:19:43 +00:00
Stephen Morris edc7a18d84 [rt46602] Allocate 100 ports to each test 2018-02-16 15:19:43 +00:00
Stephen Morris f5d8f07900 [rt46602] Pass port numbers to tests via environment variables 2018-02-16 15:19:43 +00:00
Stephen Morris b2d90da0c2 [rt46602] Ensure parallel tests are in alphabetical order 2018-02-16 15:19:43 +00:00
Stephen Morris af005cdbcf [rt46602] Expanded system tests README
Add more information on running the tests, together with a section
on how the tests are organised, aimed at new developers.
2018-02-16 15:19:43 +00:00
Stephen Morris b24c2e11d8 [rt46602] More updates to the test running framework
Tidy up the stop/start files and make switch usage consistent. Also
tidy up the various "clean" targets in the Makefile.
2018-02-16 14:57:52 +00:00
Stephen Morris 517d990bd4 [rt46602] Modify some test files to cope with the "-p" flag 2018-02-16 14:57:51 +00:00
Stephen Morris 32fe6f7682 [rt46602] Tidy up run management
Miscellaneous tidying up of run management.  The most significant
change is that "runall.sh" now runs _all_ the tests, even the
ones that can run in parallel.  runsequential.sh is the script
to run tests that have not been converted to parallel running.
2018-02-16 14:57:51 +00:00
Stephen Morris e0ff77f9d3 [rt46602] Assign block of ports for each test
Some tests use more ports than just the query and control ports.
Each test that can run in parallel with other tests is now assigned
a unique block of 10 ports.
2018-02-16 14:57:51 +00:00
Stephen Morris 07341693e1 [rt46602] Allow catz system test to run in parallel with other tests 2018-02-16 14:57:51 +00:00
Stephen Morris 78f2b9ca01 [rt46602] Miscellaneous changes to existing parallelised tests
Currently these tests are allow_query, rpzrecurse and serve-stale

1. Function to copy files and set port numbers renamed from copy_config
to copy_setports, as this is used to change the ports in Perl and Python
test scripts as well.
2. Changes to rpzrecurse/tests.sh to handle two calls to getopts (one to
parse port numbers, the other to parse rpzrecurse-specific options). Also
fixed various commands to use correct ports.
3. Updates to "clean.sh" scripts to ensure that all files created in the
test are removed.
2018-02-16 14:57:51 +00:00
Stephen Morris e7429b124b [rt46602] Ensure that tests running in parallel use unique ports
Via an intermediate make file, tests that have been modified to be able
to run in parallel are assigned unique query and control port numbers
(other than 5300 and 9953 respectively).  Tests that have not yet been
modified all use ports 5300 and 9953, so must be run sequentially.
2018-02-16 14:57:51 +00:00
Stephen Morris e1a69e5d1f [rt46602] Miscellaneous tidying up of code cherry-picked from experimental branch 2018-02-16 14:57:51 +00:00
Ondřej SurýandStephen Morris 3b14d54fd7 [rt46602] Allow parallel run of new dynamic port tests and the old ones 2018-02-16 14:57:51 +00:00
Ondřej SurýandStephen Morris caaec1ef6d [rt46602] Put back original .gitignore files in the system tests 2018-02-16 14:57:51 +00:00
Ondřej SurýandStephen Morris 2a435708e4 [rt46602] Adjust rpzrecurse for dynamic port usage
Resolve conflict in run.sh during cherry-pick from an experimental branch.
2018-02-16 14:57:51 +00:00
Ondřej SurýandStephen Morris e6802badc0 [rt46602] Add $SEDPORTS variable to help with @PORT@ and @CONTROLPORT@ replacement 2018-02-16 14:57:51 +00:00
Ondřej SurýandStephen Morris d2c8286163 [rt46602] Move most of ignored files to top of system tests directory 2018-02-16 14:57:51 +00:00
Ondřej SurýandStephen Morris 53bade5ece [rt46602] Fix output from rndc reload 2018-02-16 14:57:51 +00:00
Ondřej SurýandStephen Morris bc276f6c05 [rt46602] Add .gitignore to allow_query 2018-02-16 14:57:51 +00:00
Ondřej SurýandStephen Morris 7e3c96c867 [rt46602] Utilize echo_i to allow mixed test output 2018-02-16 14:57:51 +00:00
Ondřej SurýandStephen Morris 278c72fef6 [rt46602] Prefix R:<result> as R:<test>:<result>
Resolve conflict in run.sh during cherry-pick from experimental branch.
2018-02-16 14:57:50 +00:00
Ondřej SurýandStephen Morris f7ac41757a [rt46602] Add echo_i function to print I:<testname>:string 2018-02-16 14:57:50 +00:00
Ondřej SurýandStephen Morris cba162e70e [rt46602] Add serve-stale working files to .gitignore 2018-02-16 14:57:50 +00:00
Ondřej SurýandStephen Morris 992a2bafec [rt46602] Convert allow_query to dynamic port 2018-02-16 14:57:50 +00:00
Ondřej SurýandStephen Morris f83ebd34b9 [rt46602] Update server-stale test to run on port passed from run.sh script 2018-02-16 14:57:50 +00:00
Ondřej SurýandStephen Morris fb00f18005 [rt46602] Change the system tests script to support running individual tests on different ports
Resolved conflict in run.sh.
2018-02-16 14:57:50 +00:00
Ondřej Surý 6336ef1ef3 Remove hard copies of RFCs and I-D from BIND repository, the authoritative source is IETF, and our copies doesn't reflect any errata, expired-by, etc. 2018-02-16 15:55:58 +01:00
Michał Kępień c6b430745b Merge branch 'gitlab-ci-limit-runners' into 'master'
Limit the combination of architectures and distributions that are normally run

See merge request isc-projects/bind9!33
2018-02-16 06:36:12 -05:00
Michał Kępień 54823ea037 Merge branch 'fix-dnstap-output-file-rolling' into 'master'
Fix dnstap output file rolling

See merge request isc-projects/bind9!21
2018-02-16 05:20:41 -05:00
Ondřej Surý dfc2573f1c Limit the combination of architectures and distributions that are normally run 2018-02-16 10:35:12 +01:00
Michał Kępień 448eb98797 Add CHANGES entry
4894.	[bug]		named could crash while rolling a dnstap output file.
			[RT #46942]
2018-02-16 09:39:24 +01:00
Michał Kępień 02063cbae2 Make dns_dt_send() call dns_dt_reopen() asynchronously
Instead of checking current dnstap output file size and potentially
synchronously calling dns_dt_reopen() upon every call to dns_dt_send():

  - call dns_dt_reopen() asynchronously by queuing an event to the task
    specified at dnstap environment creation time,

  - ensure no roll event is outstanding before checking dnstap output
    file size and potentially queuing another roll event.

This causes dnstap output files to exceed their configured size limits,
but prevents any two threads from performing the roll simultaneously
(which causes crashes).
2018-02-16 09:39:24 +01:00
Michał Kępień 8e3c16175a Make dns_dt_reopen() request task-exclusive mode on its own
Instead of relying on the caller to set up task-exclusive mode, make
dns_dt_reopen() enforce task-exclusive mode itself, using the task
specified at dnstap environment creation time.
2018-02-16 09:39:24 +01:00
Michał Kępień f199a5a9ae Add dns_dt_create2()
Implement a new variant of dns_dt_create() to enable a dnstap
environment structure to hold the task in the context of which
dns_dt_reopen() will be executed.
2018-02-16 09:39:24 +01:00
Mark Andrews 522e5dd9bc 4893. [bug] Address various issues reported by cppcheck. [GL #51]
See merge request isc-projects/bind9!26
2018-02-15 21:24:39 -05:00
Tinderbox User b5079a1bda regen master 2018-02-16 01:09:12 +00:00
Mark Andrews fd2d8465a7 s/cppchecker/cppcheck 2018-02-16 11:24:29 +11:00
Mark Andrews 0d5eed53e8 add GL issue number 2018-02-16 11:21:16 +11:00
Evan Hunt 355c533936 [master] add missing release note 2018-02-15 16:19:25 -08:00
Mark Andrews b75627eacf add CHANGES note 2018-02-16 10:34:49 +11:00
Tinderbox User 033be0db8e newcopyrights 2018-02-15 23:30:12 +00:00
Mark Andrews f181b30918 add POST(len); 2018-02-16 10:20:39 +11:00
Mark Andrews 2e83674170 conditionally declare stacksize 2018-02-16 10:20:39 +11:00
Mark Andrews 801cef9684 add POST(len); 2018-02-16 10:20:39 +11:00
Mark Andrews 99d02c6531 Clarify calculation precedence for '&' and '?' 2018-02-16 10:20:39 +11:00
Mark Andrews a46e90b2b7 add POST(tl) 2018-02-16 10:20:39 +11:00
Mark Andrews a0720c9e56 return failure count 2018-02-16 10:20:39 +11:00
Mark Andrews 0ec66f5e51 conditionally declare strbuf 2018-02-16 10:20:39 +11:00
Mark Andrews acdecd4636 test for == 0 rather than <= as value is unsigned 2018-02-16 10:20:39 +11:00
Mark Andrews 99af4e7d52 add brackets 2018-02-16 10:20:39 +11:00
Mark Andrews 0b66d4a1c7 reorder test to silence cppcheck 2018-02-16 10:20:39 +11:00
Mark Andrews ca6faad2b6 remove event which is only used for sizeof 2018-02-16 10:20:39 +11:00
Mark Andrews 7e26e5cae7 remember the masters count 2018-02-16 10:20:39 +11:00
Mark Andrews 67eea245f5 reorder test to silence cppcheck 2018-02-16 10:20:39 +11:00
Mark Andrews a7eb3b3b76 use %u instead of %d 2018-02-16 10:20:39 +11:00
Mark Andrews 4528297486 use %u instead of %d 2018-02-16 10:20:39 +11:00
Mark Andrews 8f8ce953ce use %u instead of %d 2018-02-16 10:20:39 +11:00
Mark Andrews fc38731c85 use %u instead of %d 2018-02-16 10:20:39 +11:00
Mark Andrews 1eb1eaac94 use %u instead of %d 2018-02-16 10:20:39 +11:00
Mark Andrews b492700759 use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews 54275e8f5c use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews c7e848ce54 use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews 1cdb19eaae use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews 5bc9ede092 use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews e632696a6d case to unsigned; reorder expression 2018-02-16 10:20:38 +11:00
Mark Andrews 500248b6c1 simplify expression 2018-02-16 10:20:38 +11:00
Mark Andrews 97d4a1eaf5 use %u and preserve unsigned property 2018-02-16 10:20:38 +11:00
Mark Andrews b5167607ef make declaration and use of setnocookie fully conditional 2018-02-16 10:20:38 +11:00
Mark Andrews 6bd6bd6d62 cast to unsigned 2018-02-16 10:20:38 +11:00
Mark Andrews 78ad353491 preserve unsigned property 2018-02-16 10:20:38 +11:00
Mark Andrews 4745daafe0 use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews c23eef5ff1 make both arguments of & unsigned 2018-02-16 10:20:38 +11:00
Mark Andrews b513bbe9ff use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews 4955c45c94 use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews 64bc122d11 use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews 34a4d241c6 shift unsigned (~0U) rather than signed (~0) contant 2018-02-16 10:20:38 +11:00
Mark Andrews 75a291e541 use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews dc3951c800 unsigned constants 2018-02-16 10:20:38 +11:00
Mark Andrews 9520cf8559 unsigned constants 2018-02-16 10:20:38 +11:00
Mark Andrews 0f8b0dc5d4 use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews eaddb0c686 use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews b234797536 use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews 2b803b3463 prevent implict conversion to signed 2018-02-16 10:20:38 +11:00
Mark Andrews 4a3c1fb45e use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews 7d375efaea INSIST ipnum6 != NULL 2018-02-16 10:20:38 +11:00
Mark Andrews 898d7e99a9 use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews a8fa4a9e42 use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews b1b9257c8f test for >= 0 and use %d instead of %u 2018-02-16 10:20:38 +11:00
Mark Andrews 17d971a405 formally cast to int; use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews 8aff92c150 formally cast to int 2018-02-16 10:20:38 +11:00
Mark Andrews 1af3e7d7d5 use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews 372fbc06e7 use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews e247336199 use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews 865115f30c use %u instead of %d 2018-02-16 10:20:38 +11:00
Mark Andrews bbdd8e17d7 copyrights 2018-02-16 10:20:38 +11:00
Mark Andrews c4ca99c0d1 use %u instead of %d 2018-02-16 10:19:57 +11:00
Mark Andrews 5c017fd3f6 use %u instead of %d 2018-02-16 10:19:57 +11:00
Mark Andrews af7fd89305 use %u instead of %d 2018-02-16 10:19:57 +11:00
Mark Andrews f0981d9682 use %u instead of %d 2018-02-16 10:19:57 +11:00
Mark Andrews ee49362e33 make declarations consistent 2018-02-16 10:19:57 +11:00
Mark Andrews 6b74dcca71 report argument error in human form 2018-02-16 10:19:57 +11:00
Mark Andrews 4278230b33 use %u instead of %d 2018-02-16 10:19:57 +11:00
Mark Andrews 4ec06278cc use %u instead of %d 2018-02-16 10:19:57 +11:00
Mark Andrews c8d294470d use %u instead of %d 2018-02-16 10:19:57 +11:00
Mark Andrews 3034da1ec6 use %u instead of %d 2018-02-16 10:19:57 +11:00
Mark Andrews e08b3d3a48 use %u instead of %d 2018-02-16 10:19:57 +11:00
Mark Andrews f9a9ff57ce use %u instead of %i 2018-02-16 10:19:57 +11:00
Mark Andrews 3fb7b9827a use %u instead of %d 2018-02-16 10:19:57 +11:00
Mark Andrews f5ee6f7292 use %u rather than %d; pass a unsigned int pointer 2018-02-16 10:19:57 +11:00
Mark Andrews 89ff72bea0 clear *logp 2018-02-16 10:19:57 +11:00
Mark Andrews ea8e149f4d use %u instead of %d 2018-02-16 10:19:57 +11:00
Mark Andrews b060852a7c signed vs unsigned fixes 2018-02-16 10:19:57 +11:00
Michał Kępień 3abc7bf264 Merge branch 'fix-loadpending-handling' into 'master'
Fix DNS_ZONEFLG_LOADPENDING handling

See merge request isc-projects/bind9!22
2018-02-15 16:18:32 -05:00
Evan Hunt 883a9485e9 [master] copyrights 2018-02-15 11:56:13 -08:00
Michał Kępień 801dfe8f5d Add CHANGES entry
4892.	[bug]		named could leak memory when "rndc reload" was invoked
			before all zone loading actions triggered by a previous
			"rndc reload" command were completed. [RT #47076]
2018-02-15 20:32:11 +01:00
Michał Kępień f5079bb877 Do not recheck DNS_ZONEFLG_LOADPENDING in zone_asyncload()
Remove a block of code which dates back to commit 8a2ab2b920, when
dns_zone_asyncload() did not yet check DNS_ZONEFLG_LOADPENDING.
Currently, no race in accessing DNS_ZONEFLG_LOADPENDING is possible any
more, because:

  - dns_zone_asyncload() is still the only function which may queue
    zone_asyncload(),

  - dns_zone_asyncload() accesses DNS_ZONEFLG_LOADPENDING under a lock
    (and potentially queues an event under the same lock),

  - DNS_ZONEFLG_LOADPENDING is not cleared until the load actually
    completes.

Thus, the rechecking code can be safely removed from zone_asyncload().

Note that this also brings zone_asyncload() to a state in which the
completion callback is always invoked.  This is required to prevent
leaking memory in case something goes wrong in zone_asyncload() and a
zone table the zone belongs to is indefinitely left with a positive
reference count.
2018-02-15 20:31:54 +01:00
Michał Kępień b9e9361c7b Asynchronous zone load events have no way of getting canceled
Code handling cancellation of asynchronous zone load events was likely
copied over from other functions when asynchronous zone loading was
first implemented in commit 8a2ab2b920.  However, unlike those other
functions, asynchronous zone loading events currently have no way of
getting canceled once they get posted, which means the aforementioned
code is effectively dead.  Remove it to prevent confusion.
2018-02-15 20:31:53 +01:00
Michał Kępień 29b7efdd9f Only clear DNS_ZONEFLG_LOADPENDING in zone_asyncload() if zone loading is completed immediately
zone_load() is not always synchronous, it may only initiate an
asynchronous load and return DNS_R_CONTINUE, which means zone loading
has not yet been completed.  In such a case, zone_asyncload() must not
clear DNS_ZONEFLG_LOADPENDING immediately and leave that up to
zone_postload().
2018-02-15 20:31:51 +01:00
Michał Kępień 0e4fba2ced Lock zone before checking whether its asynchronous load is already pending
While this is not an issue in named, which only calls
dns_zone_asyncload() from task-exclusive mode, this function is exported
by libdns and thus may in theory be concurrently called for the same
zone by multiple threads.  It also does not hurt to be consistent
locking-wise with other DNS_ZONEFLG_LOADPENDING accesses.
2018-02-15 20:31:49 +01:00
Petr Menšík 2a70eae04f Reduce repeated detection of mysql lib directory.
Use common part once a bit later.
2018-02-15 12:48:56 +01:00
Petr Menšík e7a93321f0 Reuse new function from rt46864 for similar block elsewhere. 2018-02-15 12:42:33 +01:00
Ondřej Surý 3548061d03 Merge branch 'gitlab-ci-keep-artifacts' into 'master'
Archive the full bin/tests/ directory and bin/named/named binary on build/test failure in GitLab CI

See merge request isc-projects/bind9!24
2018-02-14 08:52:30 -05:00
Ondřej Surý 8876403b82 Archive the full bin/tests/ directory and bin/named/named binary on build/test failure. 2018-02-14 12:01:06 +01:00
Evan Hunt 1be4341ac8 Merge branch 'cherry-pick-d7975e30' into 'master'
placeholder

See merge request isc-projects/bind9!23
2018-02-13 21:26:44 -05:00
Evan Hunt fca7826d65 placeholder
(cherry picked from commit d7975e300ea1f9865bee92696aeb9ea59394152a)
2018-02-13 21:25:56 -05:00
Ondřej Surý 43306fa7e2 Merge branch 'update-libtool-2.4.6' into 'master'
Update libtool files to 2.4.6

See merge request isc-projects/bind9!4
2018-02-12 10:55:23 -05:00
Ondřej Surý 8cfcad3bb4 Merge branch 'gitlab-ci' into 'master'
Add support for running builds directly from Gitlab CI

See merge request isc-projects/bind9!20
2018-02-12 10:55:08 -05:00
Ondřej Surý 0ee2dbaaed Disable artifact uploading as it's not needed anymore with unified build and test 2018-02-12 15:01:54 +01:00
Ondřej Surý 98696f075c Run the network script in debugging mode 2018-02-12 15:01:54 +01:00
Ondřej Surý f52e8fb7c2 Check the address and routing information 2018-02-12 15:01:54 +01:00
Ondřej Surý 730e611377 Look a who am I 2018-02-12 15:01:54 +01:00
Ondřej Surý b54a2fb1c0 The interface setup needs sudo 2018-02-12 15:01:54 +01:00
Ondřej Surý 2f7ff2980f Merge build and test steps 2018-02-12 15:01:54 +01:00
Ondřej Surý a795dfdea3 Use external CI Docker images 2018-02-12 15:01:54 +01:00
Ondřej Surý 8bb97d6e04 Enforce overlay2 filesystem driver for docker builds 2018-02-12 15:01:54 +01:00
Ondřej Surý ad2788b6d9 Rename $CI_BUILD_TOKEN to $CI_JOB_TOKEN 2018-02-12 15:01:54 +01:00
Ondřej Surý 41f3423e87 Install libnet-dns-perl into Docker images to fix tests failures 2018-02-12 15:01:54 +01:00
Ondřej Surý 20d2d095a9 Install procps for /bin/kill into Debian and Ubuntu docker images 2018-02-12 15:01:54 +01:00
Ondřej Surý 3f798b3576 Add correct dependencies for test jobs to pull artifacts from build jobs 2018-02-12 15:01:54 +01:00
Ondřej Surý 69a185167d Add net-tools for ifconfig support 2018-02-12 15:01:54 +01:00
Ondřej Surý 00beaad868 Run the interface up script with 'bash' as it's not executable by itself directly 2018-02-12 15:01:54 +01:00
Ondřej Surý 618d1146f0 Add i386 as tested architecture 2018-02-12 15:01:54 +01:00
Ondřej Surý 20c50b9238 Enable private IP addresses for tests 2018-02-12 15:01:54 +01:00
Ondřej Surý f1a574b729 Build docker images only in master, triggers and/or tags 2018-02-12 15:01:54 +01:00
Ondřej Surý 37b196ea87 Enable Gitlab-CI for the project 2018-02-12 15:01:54 +01:00
Ondřej Surý e099ccbde8 Merge branch 'remove-ondestroy-callbacks' into 'master'
Remove ondestroy callbacks from libisc.

See merge request isc-projects/bind9!3
2018-02-12 08:54:42 -05:00
Ondřej Surý f7d62717ca Update CHANGES for isc-projects/bind9!3 2018-02-12 14:53:45 +01:00
Ondřej Surý 4ff2d36adc Remove whole unused ondestroy callback mechanism 2018-02-12 14:49:32 +01:00
Evan Hunt 313e73354d [master] copyrights 2018-02-10 16:30:21 -08:00
Tinderbox User 74651f35ef regen master 2018-02-10 01:12:12 +00:00
Mark Andrews faba523a40 check warning text
(cherry picked from commit c6cd108838)
2018-02-09 14:05:28 +11:00
Mark Andrews ae09500989 get the correct test file 2018-02-09 13:57:10 +11:00
Evan Hunt 79a2e86827 [master] fix test error 2018-02-08 18:45:46 -08:00
Evan HuntandMark Andrews b252549e5a [rt43670] more emphatic warning 2018-02-09 12:28:49 +11:00
Mark Andrews baef0ca988 4889. [func] Warn about the use of old root keys without the new
root key being present.  Warn about dlv.isc.org's
                        key being present. Warn about both managed and
                        trusted root keys being present. [RT #43670]
2018-02-09 12:04:45 +11:00
Evan Hunt 5d2b48f270 [master] fix typo 2018-02-08 16:15:43 -08:00
Tinderbox User 02ce048c91 update copyright notice / whitespace 2018-02-08 23:46:17 +00:00
Tinderbox User 87083c7e9b newcopyrights 2018-02-08 23:30:12 +00:00
Mark AndrewsandEvan Hunt 6757dc6488 [master] fix nsupdate test on windows
4888.	[test]		Initialize sockets correctly in sample-update so
			that nsupdate system test will will run on Windows.
			[RT #47097]
2018-02-08 13:34:43 -08:00
Mark AndrewsandEvan Hunt ecf6dcc5c6 [master] fix rpzrecurse test on windows
4887.	[test]		Enable the rpzrecurse test to run on Windows.
			[RT #47093]
2018-02-08 13:28:40 -08:00
Tony FinchandMukund Sivaraman cc82b5aa3c Document dig -u in manpage (#47150) 2018-02-09 00:50:51 +05:30
Tinderbox User da4e8d88d4 regen master 2018-02-08 01:11:20 +00:00
Tinderbox User 2fac9b0be6 update copyright notice / whitespace 2018-02-07 23:45:53 +00:00
Tinderbox User 49c0a94f78 newcopyrights 2018-02-07 23:30:44 +00:00
Mark Andrews ff8f2a584d add note for update-policy rules changes 2018-02-07 14:03:33 +11:00
Mark Andrews ec771bbdc8 4885. [security] update-policy rules that otherwise ignore the name
field now require that it be set to "." to ensure
                        that any type list present is properly interpreted.
                        [RT #47126]
2018-02-07 13:34:02 +11:00
Tinderbox User b3fc795f4d update copyright notice / whitespace 2018-02-05 23:46:13 +00:00
Tinderbox User 0e9bcf0318 newcopyrights 2018-02-05 23:30:08 +00:00
Michał Kępień af1937c35a [master] Prevent crashing due to a race during server shutdown
4884.	[bug]		named could crash on shutdown due to a race between
			shutdown_server() and ns__client_request(). [RT #47120]
2018-02-05 20:24:14 +01:00
Mark Andrews 4fcc550877 look for #! to determine if the file is PYTHON or PYTHON-BIN 2018-02-05 11:39:43 +11:00
Tinderbox User 31d0b7e909 regen master 2018-02-03 01:11:31 +00:00
Evan Hunt c34680cf3b [master] spelling, release note 2018-02-02 10:32:17 -08:00
Tinderbox User 5fdca0da2f update copyright notice / whitespace 2018-02-01 23:46:26 +00:00
Mark Andrews a97ca00ce8 Update license to 'MPL' [RT #47101] 2018-02-02 10:37:54 +11:00
Tinderbox User b675979c68 newcopyrights 2018-02-01 23:30:07 +00:00
Michał Kępień a3c2b8831e [master] Silence compiler warnings about comparisons between signed and unsigned integers [RT #46980] 2018-02-01 21:28:47 +01:00
Tinderbox User 46d7d8717a update copyright notice / whitespace 2018-01-31 23:45:54 +00:00
Tinderbox User f8143baf1b newcopyrights 2018-01-31 23:30:16 +00:00
Evan Hunt d36b7f86fb [master] improve debugging output from dnssec-cds
4883.	[cleanup]	Improved debugging output from dnssec-cds. [RT #47026]

Patch submitted by Tony Finch (dot@dotat.at)
2018-01-31 10:23:01 -08:00
Tinderbox User ffac31097d update copyright notice / whitespace 2018-01-30 23:45:59 +00:00
Tinderbox User b847078b1e newcopyrights 2018-01-30 23:30:29 +00:00
Mark Andrews a2c693ab3b handle different eol coventions 2018-01-31 10:05:40 +11:00
Evan Hunt bc89b287c9 [master] use 'command' instead of 'type' to find atf-run and kyua paths 2018-01-30 10:33:08 -08:00
Evan Hunt 7bc5e6a749 [master] typo 2018-01-30 09:12:54 -08:00
Mark Andrews 7817caa3c7 4882. [bug] Address potential memory leak in
dns_update_signaturesinc. [RT #47084]
2018-01-30 15:27:22 +11:00
Mark Andrews a64503c736 4881. [bug] Only include dst_openssl.h when OpenSSL is required.
[RT #47068]
2018-01-30 15:21:02 +11:00
Mark Andrews d26f90241d 4880. [bug] Named wasn't returning the target of a cross zone
CNAME between to served zones when recursion was
                        desired and available (RD=1, RA=1). Don't return
                        the CNAME target otherwise to prevent accidental
                        cache poisoning. [RT #47078]
2018-01-30 13:10:06 +11:00
Mark Andrews 3ae586b857 4879. [bug] dns_rdata_caa:value_len is was small. [RT #47086] 2018-01-30 10:58:56 +11:00
Tinderbox User a96d7083bc update copyright notice / whitespace 2018-01-29 23:45:56 +00:00
Tinderbox User 13c14bc874 newcopyrights 2018-01-29 23:30:08 +00:00
Mark Andrews 8d1b3f5e6a dns_dnssec_findmatchingkeys warning test requires crytpo to be supported 2018-01-29 16:35:56 +11:00
Mark Andrews 6e08af82ed 4878. [bug] List 'ply' as a requirement for the 'isc' python
package. [RT #47065]
2018-01-29 13:21:33 +11:00
Tinderbox User a7bc00e413 regen master 2018-01-26 01:10:11 +00:00
Tinderbox User 5399337474 update copyright notice / whitespace 2018-01-25 23:46:24 +00:00
Tinderbox User f37b6e1434 newcopyrights 2018-01-25 23:30:11 +00:00
Evan Hunt cbd46e23cb [master] clarify dnssec-cds man page 2018-01-25 10:21:24 -08:00
Mark Andrews 63440f61ae remove Bv9ARM.ch13.html 2018-01-25 11:00:55 +11:00
Tinderbox User 47d13972e9 update copyright notice / whitespace 2018-01-24 23:46:02 +00:00
Tinderbox User 7fa465be5f newcopyrights 2018-01-24 23:30:06 +00:00
Evan Hunt 52043a7204 [master] change uint to isc_uint 2018-01-24 11:03:05 -08:00
Evan Hunt 7dd2d7f329 [master] update 9.11 api range 2018-01-24 10:22:59 -08:00
Mark AndrewsandEvan Hunt 8b440753b6 [master] address overflow in retry backoff
4877.	[bug]		Address integer overflow when exponentially
			backing off retry intervals. [RT #47041]
2018-01-24 09:45:01 -08:00
Mark Andrews b575c4ec42 4876. [bug] Address deadlock with accessing a keytable. [RT #47000] 2018-01-24 18:55:56 +11:00
Mark Andrews 99178b6329 4875. [bug] Address compile failures on older systems. [RT #47015] 2018-01-24 13:10:14 +11:00
Tinderbox User ca12949aeb regen master 2018-01-24 01:08:12 +00:00
Tinderbox User c6d2beca68 newcopyrights 2018-01-23 23:30:05 +00:00
Mark Andrews 83d005de61 4874. [bug] Wrong time display when reporting new keywarntime.
[RT #47042]
2018-01-24 07:59:07 +11:00
Evan Hunt 8d9433bf4f [master] renumber chapters now that the former chapter 5 is gone 2018-01-23 17:52:04 +00:00
Tinderbox User 6b83f7aa82 regen master 2018-01-23 00:38:08 +00:00
Tinderbox User 3fda67b596 update copyright notice / whitespace 2018-01-22 23:46:02 +00:00
Tinderbox User dc2add38f6 newcopyrights 2018-01-22 23:38:29 +00:00
Mark Andrews 7f4dfa539c doc/misc/*.zoneopt are X 2018-01-23 10:36:05 +11:00
Evan Hunt ebdeea564c [master] fix test failure by sorting "type" to the top of zone clauses 2018-01-22 13:18:50 -08:00
Evan Hunt 0405014c66 [master] silence warning 2018-01-22 13:07:24 -08:00
Evan Hunt a2a90a71a3 [master] fix unresolved externals for win32 2018-01-22 11:45:33 -08:00
Evan Hunt 129c4414cb [master] automatically generate named.conf grammars for the ARM
4873.	[doc]		Grammars for named.conf included in the ARM are now
			automatically generated by the configuration parser
			itself.  As a side effect of the work needed to
			separate zone type grammars from each other, this
			also makes checking of zone statements in
			named-checkconf more correct and consistent.
			[RT #36957]
2018-01-22 11:06:32 -08:00
Evan Hunt 4d6800942c [master] remove dangling doc reference to the lightweight resolver 2018-01-22 10:58:20 -08:00
Mukund Sivaraman 8a4ce20172 Don't permit loading meta RR types such as TKEY from master files (#47009) 2018-01-22 14:26:04 +05:30
Mukund Sivaraman 63d0c6a3fc Fix configure issue detecting stdatomic.h support (#46959) 2018-01-22 13:35:29 +05:30
Mark Andrews 54c4adef80 remove old entries 2018-01-22 11:25:54 +11:00
Tinderbox User 38a9d9ba76 update copyright notice / whitespace 2018-01-21 23:45:57 +00:00
Tinderbox User a2ca0077d5 newcopyrights 2018-01-21 23:30:50 +00:00
Mark Andrews 23d77c8747 4870. [test] Update included ATF library to atf-0.21 preserving
the ATF tool. [RT #46967]
2018-01-22 09:58:50 +11:00
Mark Andrews af034ef188 silence clang static analyser warning. [RT #46881] 2018-01-22 09:47:53 +11:00
Mark Andrews fdd8838bf9 4869. [bug] Address some cases where NULL with zero length could
be passed to memmove which is undefined behaviour and
                        can lead to bad optimisation. [RT #46888]
2018-01-22 09:36:12 +11:00
Tinderbox User 88fd438a0f newcopyrights 2018-01-20 23:30:04 +00:00
Tinderbox User 630d1a9ba0 regen master 2018-01-20 01:10:44 +00:00
Tinderbox User 19b7c0494e update copyright notice / whitespace 2018-01-19 23:45:58 +00:00
Tinderbox User 9b08b03769 newcopyrights 2018-01-19 23:30:05 +00:00
Evan Hunt 80788e72d0 [master] remove HMAC support from dnssec-keygen
4868.	[func]		dnssec-keygen can no longer generate HMAC keys.
			Use tsig-keygen instead. [RT #46404]
2018-01-18 17:29:28 -08:00
Tinderbox User f10a1c0acf regen master 2018-01-19 01:08:25 +00:00
Tinderbox User 5e9585c8ad update copyright notice / whitespace 2018-01-18 23:46:05 +00:00
Tinderbox User 16bbe61f14 newcopyrights 2018-01-18 23:30:07 +00:00
Evan Hunt cf8f4241e7 [master] normalize rndc on/off commands
4867.	[cleanup]	Normalize rndc on/off commands (validation,
			querylog, serve-stale) so they all accept the
			same synonyms for on/off (yes/no, true/false,
			enable/disable). Thanks to Tony Finch. [RT #47022]
2018-01-18 10:50:13 -08:00
Tinderbox User bcc21e99e1 regen master 2018-01-18 01:07:47 +00:00
Tinderbox User 8b8c2990d6 update copyright notice / whitespace 2018-01-17 23:45:56 +00:00
Tinderbox User 05fce3ecc5 newcopyrights 2018-01-17 23:30:05 +00:00
Francis Dupont 30e96c7709 bcmp -> memcmp 2018-01-17 15:31:33 +01:00
Francis Dupont 1f33a98962 Applied #46125 fix (hardcoded "pkcs11") 2018-01-17 15:19:31 +01:00
Francis Dupont 614d838acf Merged rt46864 (check MD5 amd SHA1 support) 2018-01-17 14:33:21 +01:00
Tinderbox User 3d2a6c9949 update copyright notice / whitespace 2018-01-16 23:45:57 +00:00
Tinderbox User 2836a56729 newcopyrights 2018-01-16 23:30:03 +00:00
Michał Kępień 73819362d8 [master] Simplify handling isc_socket_sendto2() return values when flags == 0
4865.	[cleanup]	Simplify handling isc_socket_sendto2() return values.
			[RT #46986]
2018-01-16 08:33:30 +01:00
Tinderbox User ed9fea3a6e update copyright notice / whitespace 2018-01-15 23:46:16 +00:00
Tinderbox User a9452918d5 newcopyrights 2018-01-15 23:30:03 +00:00
Michał Kępień ae51a676c9 [master] Ensure all master definitions in a catalog zone contain an IP address
4864.	[bug]		named acting as a slave for a catalog zone crashed if
			the latter contained a master definition without an IP
			address. [RT #45999]
2018-01-15 20:50:09 +01:00
Mark Andrews fa22351a7c silence coverity false positive. [RT #46841] 2018-01-15 12:02:41 +11:00
Tinderbox User 6d1f45ed81 update copyright notice / whitespace 2018-01-13 23:46:00 +00:00
Tinderbox User d9ee7a6345 newcopyrights 2018-01-13 23:30:04 +00:00
Mark Andrews 69c4c987f6 ret was not being set to 1 on dig error. [RT #46990] 2018-01-13 13:14:42 +11:00
Tinderbox User 5ce167be2e update copyright notice / whitespace 2018-01-12 23:45:54 +00:00
Tinderbox User 8b138db9eb newcopyrights 2018-01-12 23:30:03 +00:00
Mukund Sivaraman f96133826e Fix various bugs reported by valgrind --tool=memcheck (#46978) 2018-01-13 00:33:35 +05:30
Tinderbox User 1883d11ca2 update copyright notice / whitespace 2018-01-11 23:45:53 +00:00
Tinderbox User c189636ca9 newcopyrights 2018-01-11 23:30:03 +00:00
Evan Hunt 0c061ce614 [master] go three section levels deep in the ARM table of contents 2018-01-11 13:40:41 -08:00
Mark Andrews 2fca8cbdff memset the remainder of sendcmsgbuf to 0 in a attempt to silence valgrind; msg->msg_control was not being set when it should have been; be consistent when setting msg->msg_control 2018-01-11 16:19:00 +11:00
Tinderbox User 4b48e307e0 update copyright notice / whitespace 2018-01-10 23:46:37 +00:00
Tinderbox User 8be7acc624 newcopyrights 2018-01-10 23:30:08 +00:00
Mark Andrews a35b95acb1 grammar 2018-01-11 09:53:21 +11:00
Mark Andrews 7befb67af4 4862. [bug] The rdata flags for RRSIG was not being properly set
when constructing a rdataslab. [RT #46978]
2018-01-11 09:51:52 +11:00
Tinderbox User 099a9efd82 update copyright notice / whitespace 2018-01-09 23:45:45 +00:00
Tinderbox User 21401216aa newcopyrights 2018-01-09 23:30:01 +00:00
Mark Andrews 0ce212b9f5 4861. [bug] The isc_crc64 unit test was not endian independent.
[RT #46973]
2018-01-10 09:46:08 +11:00
Mark Andrews 21f708c88c 4860. [bug] isc_int8_t should be signed char. [RT #46973] 2018-01-10 08:41:26 +11:00
Tinderbox User 47f617f8b2 update copyright notice / whitespace 2018-01-08 23:45:54 +00:00
Tinderbox User 639534d5d6 newcopyrights 2018-01-08 23:30:02 +00:00
Mark Andrews 3a4ea455ed add ns5/ 2018-01-08 16:28:04 +11:00
Mark Andrews 02d3f1e855 write nextpart to disk so that it is available when tests fail 2018-01-08 16:20:38 +11:00
Tinderbox User cd37694da8 newcopyrights 2018-01-05 23:30:01 +00:00
Mark Andrews 67faaa41c9 test devent->sigrdataset rather than devent->rdataset before calling query_putrdataset 2018-01-05 12:36:21 +11:00
Mark Andrews a922385850 mem.c failed to compile if ISC_MEM_CHECKOVERRUN=0 2018-01-05 12:13:17 +11:00
Tinderbox User 9fecd013fe regen master 2018-01-05 01:08:34 +00:00
Tinderbox User 10e49fc83b update copyright notice / whitespace 2018-01-04 23:45:32 +00:00
Tinderbox User bcdf3ec450 newcopyrights 2018-01-04 23:30:09 +00:00
Mark Andrews a0e66ef6dd unconditionally typedef summarystat_t for coverity 2018-01-05 10:10:34 +11:00
Evan Hunt 79112cec7d [master] typo 2018-01-03 19:29:59 -08:00
Evan Hunt 053b51c4db [master] block validator deadlock and prevent use-after-free
4859.	[bug]		A loop was possible when attempting to validate
			unsigned CNAME responses from secure zones;
			this caused a delay in returning SERVFAIL and
			also increased the chances of encountering
			CVE-2017-3145. [RT #46839]

4858.	[security]	Addresses could be referenced after being freed
			in resolver.c, causing an assertion failure.
			(CVE-2017-3145) [RT #46839]
2018-01-03 19:11:18 -08:00
Mark Andrews 9e6b394410 use RESTORE rather than SAVE as is better describes the operation 2018-01-04 13:11:28 +11:00
Mark Andrews eed2f6cef0 4857. [bug] Maintain attach/detach semantics for event->db,
event->node, event->rdataset and event->sigrdataset
                        in query.c. [RT #46891]
2018-01-04 10:48:18 +11:00
Tinderbox User a280a7871d update copyright notice / whitespace 2018-01-03 23:45:29 +00:00
Tinderbox User b415606012 newcopyrights 2018-01-03 23:30:01 +00:00
Mark Andrews 0b27aa0712 4856. [bug] 'rndc zonestatus' reported the wrong underlying type
for a inline slave zone. [RT #46875]
2018-01-04 10:10:05 +11:00
Mark Andrews 1e10ef06ce 4855. [bug] isc_time_formatshorttimestamp produced incorrect
output. [RT #46938]
2018-01-04 09:57:40 +11:00
Mark Andrews 7258b852cf missing newline in comment 2018-01-03 17:11:12 +11:00
Mark Andrews 4674127443 wait for status: line to be readable, before checking status 2018-01-03 13:54:26 +11:00
Tinderbox User 7bba3a7c44 update copyright notice / whitespace 2018-01-02 23:45:28 +00:00
Tinderbox User 3483e91d8c newcopyrights 2018-01-02 23:30:02 +00:00
Mark Andrews c9ee9718ae 4854. [bug] query_synthcnamewildcard should stop generating the
response if query_synthwildcard fails. [RT #46939]
2018-01-03 10:07:42 +11:00
Tinderbox User 05612f43a9 regen master 2018-01-02 01:08:47 +00:00
Mark Andrews 0645f8f1ce 4853. [bug] Add REQUIRE's and INSIST's to isc_time_formatISO8601L
and isc_time_formatISO8601Lms. [RT #46916]
2018-01-02 10:57:31 +11:00
Mark Andrews 7770e0b069 4852. [bug] Handle strftime() failing in isc_time_formatISO8601ms.
Add REQUIRE's and INSIST's to isc_time_formattimestamp,
                        isc_time_formathttptimestamp, isc_time_formatISO8601,
                        isc_time_formatISO8601ms. [RT #46892]
2018-01-02 10:48:08 +11:00
Tinderbox User d2ff6f0f07 update copyright notice / whitespace 2018-01-01 23:45:27 +00:00
Tinderbox User af5fb26180 newcopyrights 2018-01-01 23:30:04 +00:00
Mark Andrews ccb5678066 4851. [port] Support using kyua as well as atf-run to run the unit
tests. [RT #46853]
2018-01-02 10:20:58 +11:00
Tinderbox User e55ecaf8d8 newcopyrights 2017-12-29 23:30:25 +00:00
Mark Andrews fa0caa1f85 X Kyuafile's 2017-12-29 13:33:08 +11:00
Tinderbox User 903662d5c3 regen master 2017-12-29 01:44:18 +00:00
Tinderbox User 015c017dfa regen master 2017-12-29 01:04:39 +00:00
Mark Andrews 9bec7facfb 4850. [bug] Named failed to restart with multiple added zones in
lmdb database. [RT #46889]
2017-12-27 16:24:33 +11:00
Mark Andrews f5d429e7c3 save why ydump.py failed 2017-12-22 16:02:39 +11:00
Mark Andrews f933be6d45 silence clang static analysis 2017-12-22 13:08:39 +11:00
Mark Andrews 9f61f6b46b initalize sigsize to zero; ATF_CHECK_EQ(sigsize, tsig.siglen); 2017-12-22 08:58:20 +11:00
Mark Andrews be5a0eaa7a add POST(argc); 2017-12-22 08:48:38 +11:00
Mark Andrews d11ada1376 add POST(argv); and POST(argc); 2017-12-22 08:43:49 +11:00
Tinderbox User 9597687aba regen master 2017-12-21 01:08:42 +00:00
Mark Andrews 05a0d21490 lowercase m in macOS
(cherry picked from commit 2cc7c4d62c)
2017-12-21 10:55:38 +11:00
Tinderbox User dcc059e2c9 update copyright notice / whitespace 2017-12-20 23:45:50 +00:00
Tinderbox User 9826bebc85 newcopyrights 2017-12-20 23:30:16 +00:00
Mark Andrews 2d7f89b9c7 4849. [bug] Duplicate zones could appear in the .nzf file if
addzone failed. [RT #46435]
2017-12-20 17:13:58 +11:00
Tinderbox User ec91dfaf80 regen master 2017-12-20 01:08:42 +00:00
Mark Andrews 66ff891bf1 set AC_INIT to 9.13 2017-12-20 09:24:36 +11:00
Francis Dupont 36dccc165e Fixed embedded atf code warning (RT 46833) 2017-12-18 16:11:45 +01:00
Tinderbox User 9448aacadb regen master 2017-12-16 01:09:51 +00:00
Tinderbox User 5637645847 update copyright notice / whitespace 2017-12-15 23:45:36 +00:00
Tinderbox User 376b1e8fec newcopyrights 2017-12-15 23:30:10 +00:00
Evan Hunt 6b2e5cd28c [master] fixed ixfr-from-difference error in previous commit 2017-12-15 10:01:07 -08:00
Evan Hunt 79c2400d91 [master] allow primary/secondary as synonyms for master/slave
4848.	[func]		Zone types "primary" and "secondary" can now be used
			as synonyms for "master" and "slave" in named.conf.
			[RT #46713]
2017-12-15 01:47:05 -08:00
Evan Hunt d40f4c9885 [master] clear out release notes so they can be repopulated for 9.13 2017-12-15 01:40:16 -08:00
Mark Andrews 68a2932f75 fix case 2017-12-15 14:53:54 +11:00
Mark Andrews 13508261e0 add MacOS to contents 2017-12-15 14:45:01 +11:00
Mark Andrews bb61861315 update for 9.13 2017-12-15 14:43:31 +11:00
Mark Andrews 91e4700bcc add MacOS note 2017-12-15 14:38:09 +11:00
Tinderbox User ab6f49d969 regen master 2017-12-15 01:08:34 +00:00
Mark Andrews eb733e20ae 9.13.0-dev 2017-12-14 14:36:30 +11:00
Ondřej Surý fe06778be7 Update libtool files to 2.4.6 2017-10-30 14:47:50 +01:00
4215 changed files with 94435 additions and 364362 deletions
+2 -1
View File
@@ -21,9 +21,10 @@ ans.run
named.run
named.memstats
gen.dSYM/
.libs/
.ccache/
.deps/
.dirstamp
.libs/
unit/atf-src/atf-c++/atf-c++.pc
unit/atf-src/atf-c/atf-c.pc
unit/atf-src/atf-c/defs.h
+221
View File
@@ -0,0 +1,221 @@
variables:
DEBIAN_FRONTEND: noninteractive
LC_ALL: C
DOCKER_DRIVER: overlay2
CI_REGISTRY_IMAGE: oerdnj/bind9
CCACHE_DIR: "/ccache"
stages:
- precheck
- build
- test
.debian-jessie-amd64: &debian_jessie_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64"
tags:
- linux
- docker
.debian-jessie-i386: &debian_jessie_i386_image
image: "$CI_REGISTRY_IMAGE:debian-jessie-i386"
tags:
- linux
- docker
.debian-stretch-amd64: &debian_stretch_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
tags:
- linux
- docker
.debian-stretch-i386:: &debian_stretch_i386_image
image: "$CI_REGISTRY_IMAGE:debian-stretch-i386"
tags:
- linux
- docker
.debian-buster-amd64: &debian_buster_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-buster-amd64"
tags:
- linux
- docker
.debian-buster-i386:: &debian_buster_i386_image
image: "$CI_REGISTRY_IMAGE:debian-buster-i386"
tags:
- linux
- docker
.debian-sid-amd64: &debian_sid_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
tags:
- linux
- docker
.debian-sid-i386: &debian_sid_i386_image
image: "$CI_REGISTRY_IMAGE:debian-sid-i386"
tags:
- linux
- docker
.ubuntu-trusty-amd64: &ubuntu_trusty_amd64_image
image: "$CI_REGISTRY_IMAGE:ubuntu-trusty-amd64"
tags:
- linux
- docker
.ubuntu-trusty-i386: &ubuntu_trusty_i386_image
image: "$CI_REGISTRY_IMAGE:ubuntu-trusty-i386"
tags:
- linux
- docker
.ubuntu-xenial-amd64: &ubuntu_xenial_amd64_image
image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-amd64"
tags:
- linux
- docker
.ubuntu-xenial-i386: &ubuntu_xenial_i386_image
image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-i386"
tags:
- linux
- docker
.build: &build_job
stage: build
before_script:
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
- ./autogen.sh
script:
- ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr/local --with-libidn2
- make -j${PARALLEL_JOBS_BUILD:-1} -k all V=1
artifacts:
expire_in: '1 hour'
untracked: true
.system_test: &system_test_job
stage: test
before_script:
- 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 )
- test -s bin/tests/system/systests.output
artifacts:
untracked: true
expire_in: '1 week'
when: on_failure
.unit_test: &unit_test_job
stage: test
before_script:
- export KYUA_RESULT="$CI_PROJECT_DIR/kyua.results"
script:
- make unit
after_script:
- kyua report-html --force --results-file kyua.results --results-filter "" --output kyua_html
artifacts:
paths:
- atf.out
- kyua.log
- kyua.results
- kyua_html/
expire_in: '1 week'
when: on_failure
precheck:debian:sid:amd64:
<<: *debian_sid_amd64_image
stage: precheck
script:
- perl util/check-changes CHANGES
- perl -w util/merge_copyrights
- diff -urNap util/copyrights util/newcopyrights
- rm util/newcopyrights
artifacts:
paths:
- util/newcopyrights
expire_in: '1 week'
when: on_failure
#build:debian:jessie:amd64:
# <<: *debian_jessie_amd64_image
# <<: *build_job
#
#build:debian:jessie:i386:
# <<: *debian_jessie_i386_image
# <<: *build_job
#
#build:debian:stretch:amd64:
# <<: *debian_stretch_amd64_image
# <<: *build_job
#
#build:debian:buster:i386:
# <<: *debian_buster_i386_image
# <<: *build_job
#
#build:ubuntu:trusty:amd64:
# <<: *ubuntu_trusty_amd64_image
# <<: *build_job
#
#build:ubuntu:xenial:i386:
# <<: *ubuntu_xenial_i386_image
# <<: *build_job
build:clang:debian:sid:amd64:
variables:
CC: clang
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
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
unittest:debian:sid:amd64:
<<: *debian_sid_amd64_image
<<: *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
dependencies:
- build:debian:sid:i386
systemtest:debian:sid:amd64:
<<: *debian_sid_amd64_image
<<: *system_test_job
dependencies:
- build:debian:sid:amd64
systemtest:debian:sid:i386:
<<: *debian_sid_i386_image
<<: *system_test_job
dependencies:
- build:debian:sid:i386
+42
View File
@@ -0,0 +1,42 @@
<!--
If the bug you are reporting is potentially security-related - for example,
if it involves an assertion failure or other crash in `named` that can be
triggered repeatedly - then please do *NOT* report it here, but send an
email to [security-officer@isc.org](security-officer@isc.org).
-->
### Summary
(Summarize the bug encountered concisely.)
### Steps to reproduce
(How one can reproduce the issue - this is very important.)
### What is the current *bug* behavior?
(What actually happens.)
### What is the expected *correct* behavior?
(What you should see instead.)
### Relevant configuration files
(Paste any relevant configuration files - please use code blocks (```)
to format console output. If submitting the contents of your
configuration file in a non-confidential Issue, it is advisable to
obscure key secrets: this can be done automatically by using
`named-checkconf -px`.)
### Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console
output, logs, and code, as it's very hard to read otherwise.)
### Possible fixes
(If you can, link to the line of code that might be responsible for the
problem.)
/label ~bug
@@ -0,0 +1,11 @@
### Description
(Describe the problem, use cases, benefits, and/or goals.)
### Request
(Describe the solution you'd like to see.)
### Links / references
/label ~"feature request"
+291 -1
View File
@@ -1,4 +1,294 @@
4847. [bug] dnssec-dnskey-kskonly was not being honoured for
4931. [func] Removed the "rbtdb64" database implementation.
[GL #217]
4930. [bug] Remove a bogus check in nslookup command line
argument processing. [GL #206]
4929. [func] Add the ability to set RA and TC in queries made by
dig (+[no]raflag, +[no]tcflag). [GL #213]
4928. [func] The "dnskey-sig-validity" option allows
"sig-validity-interval" to be overriden for signatures
covering DNSKEY RRsets. [GL #145]
4927. [placeholder]
4926. [func] Add root key sentinel support. To disable, add
'root-key-sentinel no;' to named.conf. [GL #37]
4925. [func] Several configuration options that define intervals
can now take TTL value suffixes (for example, 2h or 1d)
in addition to integer parameters. These include
max-cache-ttl, max-ncache-ttl, max-policy-ttl,
fstrm-set-reopen-interval, interface-interval, and
min-update-interval. [GL #203]
4924. [cleanup] Clean up the isc_string_* namespace and leave
only strlcpy and strlcat. [GL #178]
4923. [cleanup] Refactor socket and socket event options into
enum types. [GL !135]
4922. [bug] dnstap: Log the destination address of client
packets rather than the interface address.
[GL #197]
4921. [cleanup] Add dns_fixedname_initname() and refactor the caller
code to make usage of the new function, as a part of
refactoring dns_fixedname_*() macros were turned into
functions. [GL #183]
4920. [cleanup] Clean up libdns removing most of the backwards
compatibility wrappers.
4919. [cleanup] Clean up the isc_hash_* namespace and leave only
the FNV-1a hash implementation. [GL #178]
4918. [bug] Fix double free after keygen error in dnssec-keygen
when OpenSSL >= 1.1.0 is used and RSA_generate_key_ex
fails. [GL #109]
4917. [func] Support 64 RPZ policy zones by default. [GL #123]
4916. [func] Remove IDNA2003 support and the bundled idnkit-1.0
library.
4915. [func] Implement IDNA2008 support in dig by adding support
for libidn2. New dig option +idnin has been added,
which allows to process invalid domain names much
like dig without IDN support. libidn2 version 2.0
or higher is needed for +idnout enabled by default.
4914. [bug] 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]
4913. [test] Re-implemented older unit tests in bin/tests as ATF,
removed the lib/tests unit testing library. [GL #115]
4912. [test] Improved the reliability of the 'cds' system test.
[GL #136]
4911. [test] Improved the reliability of the 'mkeys' system test.
[GL #128]
4910. [func] Update util/check-changes to work on release branches.
[GL #113]
4909. [bug] named-checkconf did not detect in-view zone collisions.
[GL #125]
4908. [test] Eliminated unnecessary waiting in the allow_query
system test. Also changed its name to allow-query.
[GL #81]
4907. [test] Improved the reliability of the 'notify' system
test. [GL #59]
4906. [func] Replace getquad() with inet_pton(), completing
change #4900. [GL #56]
4905. [bug] irs_resconf_load() ignored resolv.conf syntax errors
when "domain" or "search" options were present in that
file. [GL #110]
4904. [bug] Temporarily revert change #4859. [GL #124]
4903. [bug] "check-mx fail;" did not prevent MX records containing
IP addresses from being added to a zone by a dynamic
update. [GL #112]
4902. [test] Improved the reliability of the 'ixfr' system
test. [GL #66]
4901. [func] "dig +nssearch" now lists the name servers
for a domain that time out, as well as the servers
that respond. [GL #64]
4900. [func] Remove all uses of inet_aton(). As a result of this
change, IPv4 addresses are now only accepted in
dotted-quad format. [GL #13]
4899. [test] Convert most of the remaining system tests to be able
to run in parallel, continuing the work from change
#4895. To take advantage of this, use "make -jN check",
where N is the number of processors to use. [GL #91]
4898. [func] Remove libseccomp based system-call filtering. [GL #93]
4897. [test] Update to rpz system test so that it doesn't recurse.
[GL #68]
4896. [test] cacheclean system test was not robust. [GL #82]
4895. [test] Allow some system tests to run in parallel.
[RT #46602]
4894. [bug] named could crash while rolling a dnstap output file.
[RT #46942]
4893. [bug] Address various issues reported by cppcheck. [GL #51]
4892. [bug] named could leak memory when "rndc reload" was invoked
before all zone loading actions triggered by a previous
"rndc reload" command were completed. [RT #47076]
4891. [placeholder]
4890. [func] Remove unused ondestroy callback from libisc.
[isc-projects/bind9!3]
4889. [func] Warn about the use of old root keys without the new
root key being present. Warn about dlv.isc.org's
key being present. Warn about both managed and
trusted root keys being present. [RT #43670]
4888. [test] Initialize sockets correctly in sample-update so
that the nsupdate system test will run on Windows.
[RT #47097]
4887. [test] Enable the rpzrecurse test to run on Windows.
[RT #47093]
4886. [doc] Document dig -u in manpage. [RT #47150]
4885. [security] update-policy rules that otherwise ignore the name
field now require that it be set to "." to ensure
that any type list present is properly interpreted.
[RT #47126]
4884. [bug] named could crash on shutdown due to a race between
shutdown_server() and ns__client_request(). [RT #47120]
4883. [cleanup] Improved debugging output from dnssec-cds. [RT #47026]
4882. [bug] Address potential memory leak in
dns_update_signaturesinc. [RT #47084]
4881. [bug] Only include dst_openssl.h when OpenSSL is required.
[RT #47068]
4880. [bug] Named wasn't returning the target of a cross-zone
CNAME between two served zones when recursion was
desired and available (RD=1, RA=1). (When this is
not the case, the CNAME target is deliberately
withheld to prevent accidental cache poisoning.)
[RT #47078]
4879. [bug] dns_rdata_caa:value_len field was too small.
[RT #47086]
4878. [bug] List 'ply' as a requirement for the 'isc' python
package. [RT #47065]
4877. [bug] Address integer overflow when exponentially
backing off retry intervals. [RT #47041]
4876. [bug] Address deadlock with accessing a keytable. [RT #47000]
4875. [bug] Address compile failures on older systems. [RT #47015]
4874. [bug] Wrong time display when reporting new keywarntime.
[RT #47042]
4873. [doc] Grammars for named.conf included in the ARM are now
automatically generated by the configuration parser
itself. As a side effect of the work needed to
separate zone type grammars from each other, this
also makes checking of zone statements in
named-checkconf more correct and consistent.
[RT #36957]
4872. [bug] Don't permit loading meta RR types such as TKEY
from master files. [RT #47009]
4871. [bug] Fix configure glitch in detecting stdatomic.h
support on systems with multiple compilers.
[RT #46959]
4870. [test] Update included ATF library to atf-0.21 preserving
the ATF tool. [RT #46967]
4869. [bug] Address some cases where NULL with zero length could
be passed to memmove which is undefined behavior and
can lead to bad optimization. [RT #46888]
4868. [func] dnssec-keygen can no longer generate HMAC keys.
Use tsig-keygen instead. [RT #46404]
4867. [cleanup] Normalize rndc on/off commands (validation,
querylog, serve-stale) so they all accept the
same synonyms for on/off (yes/no, true/false,
enable/disable). Thanks to Tony Finch. [RT #47022]
4866. [port] DST library initialization verifies MD5 (when MD5
was not disabled) and SHA-1 hash and HMAC support.
[RT #46764]
4865. [cleanup] Simplify handling isc_socket_sendto2() return values.
[RT #46986]
4864. [bug] named acting as a slave for a catalog zone crashed if
the latter contained a master definition without an IP
address. [RT #45999]
4863. [bug] Fix various other bugs reported by Valgrind's
memcheck tool. [RT #46978]
4862. [bug] The rdata flags for RRSIG were not being properly set
when constructing a rdataslab. [RT #46978]
4861. [bug] The isc_crc64 unit test was not endian independent.
[RT #46973]
4860. [bug] isc_int8_t should be signed char. [RT #46973]
4859. [bug] A loop was possible when attempting to validate
unsigned CNAME responses from secure zones;
this caused a delay in returning SERVFAIL and
also increased the chances of encountering
CVE-2017-3145. [RT #46839]
4858. [security] Addresses could be referenced after being freed
in resolver.c, causing an assertion failure.
(CVE-2017-3145) [RT #46839]
4857. [bug] Maintain attach/detach semantics for event->db,
event->node, event->rdataset and event->sigrdataset
in query.c. [RT #46891]
4856. [bug] 'rndc zonestatus' reported the wrong underlying type
for a inline slave zone. [RT #46875]
4855. [bug] isc_time_formatshorttimestamp produced incorrect
output. [RT #46938]
4854. [bug] query_synthcnamewildcard should stop generating the
response if query_synthwildcard fails. [RT #46939]
4853. [bug] Add REQUIRE's and INSIST's to isc_time_formatISO8601L
and isc_time_formatISO8601Lms. [RT #46916]
4852. [bug] Handle strftime() failing in isc_time_formatISO8601ms.
Add REQUIRE's and INSIST's to isc_time_formattimestamp,
isc_time_formathttptimestamp, isc_time_formatISO8601,
isc_time_formatISO8601ms. [RT #46892]
4851. [port] Support using kyua as well as atf-run to run the unit
tests. [RT #46853]
4850. [bug] Named failed to restart with multiple added zones in
lmdb database. [RT #46889]
4849. [bug] Duplicate zones could appear in the .nzf file if
addzone failed. [RT #46435]
4848. [func] Zone types "primary" and "secondary" can now be used
as synonyms for "master" and "slave" in named.conf.
[RT #46713]
4847. [bug] dnssec-dnskey-kskonly was not being honored for
CDS and CDNSKEY. [RT #46755]
4846. [test] Adjust timing values in runtime system test. Address
+186
View File
@@ -0,0 +1,186 @@
BIND Source Access and Contributor Guidelines
Feb 22, 2018
Contents
1. Access to source code
2. Reporting bugs
3. Contributing code
Introduction
Thank you for using BIND!
BIND is open source software that implements the Domain Name System (DNS)
protocols for the Internet. It is a reference implementation of those
protocols, but it is also production-grade software, suitable for use in
high-volume and high-reliability applications. It is by far the most
widely used DNS software, providing a robust and stable platform on top of
which organizations can build distributed computing systems with the
knowledge that those systems are fully compliant with published DNS
standards.
BIND is and will always remain free and openly available. It can be used
and modified in any way by anyone.
BIND is maintained by the Internet Systems Consortium, a public-benefit
501(c)(3) nonprofit, using a "managed open source" approach: anyone can
see the source, but only ISC employees have commit access. Until recently,
the source could only be seen once ISC had published a release: read
access to the source repository was restricted just as commit access was.
That's now changing, with the opening of a public git mirror to the BIND
source tree (see below).
Access to source code
Public BIND releases are always available from the ISC FTP site.
A public-access GIT repository is also available at https://gitlab.isc.org
. This repository is a mirror, updated several times per day, of the
source repository maintained by ISC. It contains all the public release
branches; upcoming releases can be viewed in their current state at any
time. It does not contain development branches or unreviewed work in
progress. Commits which address security vulnerablilities are withheld
until after public disclosure.
You can browse the source online via https://gitlab.isc.org/isc-projects/
bind9
To clone the repository, use:
$ git clone https://gitlab.isc.org/isc-projects/bind9.git
Release branch names are of the form v9_X, where X represents the second
number in the BIND 9 version number. So, to check out the BIND 9.12
branch, use:
$ git checkout v9_12
Whenever a branch is ready for publication, a tag will be placed of the
form v9_X_Y. The 9.12.0 release, for instance, is tagged as v9_12_0.
The branch in which the next major release is being developed is called
master.
Reporting bugs
Reports of flaws in the BIND package, including software bugs, errors in
the documentation, missing files in the tarball, suggested changes or
requests for new features, etc, can be filed using https://gitlab.isc.org/
isc-projects/bind9/issues.
Due to a large ticket backlog, we are sometimes slow to respond,
especially if a bug is cosmetic or if a feature request is vague or low in
priority, but we will try at least to acknowledge legitimate bug reports
within a week.
ISC's ticketing system is publicly readable; however, you must have an
account to file a new issue. You can either register locally or use
credentials from an existing account at GitHub, GitLab, Google, Twitter,
or Facebook.
Reporting possible security issues
If you think you may be seeing a potential security vulnerability in BIND
(for example, a crash with REQUIRE, INSIST, or ASSERT failure), please
report it immediately by emailing to security-officer@isc.org. Plain-text
e-mail is not a secure choice for communications concerning undisclosed
security issues so please encrypt your communications to us if possible,
using the ISC Security Officer public key.
Do not discuss undisclosed security vulnerabilites on any public mailing
list. ISC has a long history of handling reported vulnerabilities promptly
and effectively and we respect and acknowledge responsible reporters.
ISC's Security Vulnerability Disclosure Policy is documented at https://
kb.isc.org/article/AA-00861/0.
If you have a crash, you may want to consult ?What to do if your BIND or
DHCP server has crashed.?
Contributing code
BIND is licensed under the Mozilla Public License 2.0. Earier versions
(BIND 9.10 and earlier) were licensed under the ISC License
ISC does not require an explicit copyright assignment for patch
contributions. However, by submitting a patch to ISC, you implicitly
certify that you are the author of the code, that you intend to reliquish
exclusive copyright, and that you grant permission to publish your work
under the open source license used for the BIND version(s) to which your
patch will be applied.
BIND code
Patches for BIND may be submitted directly via merge requests in ISC's
Gitlab source repository for BIND.
Patches can also be submitted as diffs against a specific version of BIND
-- preferably the current top of the master branch. Diffs may be generated
using either git format-patch or git diff.
Those wanting to write code for BIND may be interested in the developer
information page, which includes information about BIND design and coding
practices, including discussion of internal APIs and overall system
architecture. (This is a work in progress, and still quite preliminary.)
Every patch submitted will be reviewed by ISC engineers following our code
review process before it is merged.
It may take considerable time to review patch submissions, especially if
they don't meet ISC style and quality guidelines. If a patch is a good
idea, we can and will do additional work to bring it up to par, but if
we're busy with other work, it may take us a long time to get to it.
To ensure your patch is acted on as promptly as possible, please:
* Try to adhere to the BIND 9 coding style.
* Run make check to ensure your change hasn't caused any functional
regressions.
* Document your work, both in the patch itself and in the accompanying
email.
* In patches that make non-trivial functional changes, include system
tests if possible; when introducing or substantially altering a
library API, include unit tests. See Testing for more information.
Changes to configure
If you need to make changes to configure, you should not edit it directly;
instead, edit configure.in, then run autoconf. Similarly, instead of
editing config.h.in directly, edit configure.in and run autoheader.
When submitting a patch as a diff, it's fine to omit the configure diffs
to save space. Just send the configure.in diffs and we'll generate the new
configure during the review process.
Documentation
All functional changes should be documented. There are three types of
documentation in the BIND source tree:
* Man pages are kept alongside the source code for the commands they
document, in files ending in .docbook; for example, the named man page
is bin/named/named.docbook.
* The BIND 9 Administrator Reference Manual is mostly in doc/arm/
Bv9ARM-book.xml, plus a few other XML files that are included in it.
* API documentation is in the header file describing the API, in
Doxygen-formatted comments.
It is not necessary to edit any documentation files other than these; all
PDF, HTML, and nroff-format man page files will be updated automatically
from the docbook and XML files after merging.
Patches to improve existing documentation are also very welcome!
Tests
BIND is a large and complex project. We rely heavily on continuous
automated testing and cannot merge new code without adequate test
coverage. Please see the 'Testing' section of doc/dev/dev.md for more
information.
Thanks
Thank you for your interest in contributing to the ongoing development of
BIND.
+201
View File
@@ -0,0 +1,201 @@
<!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
## BIND Source Access and Contributor Guidelines
*Feb 22, 2018*
### Contents
1. [Access to source code](#access)
1. [Reporting bugs](#bugs)
1. [Contributing code](#contrib)
### Introduction
Thank you for using BIND!
BIND is open source software that implements the Domain Name System (DNS)
protocols for the Internet. It is a reference implementation of those
protocols, but it is also production-grade software, suitable for use in
high-volume and high-reliability applications. It is by far the most
widely used DNS software, providing a robust and stable platform on top of
which organizations can build distributed computing systems with the
knowledge that those systems are fully compliant with published DNS
standards.
BIND is and will always remain free and openly available. It can be
used and modified in any way by anyone.
BIND is maintained by the [Internet Systems Consortium](https://www.isc.org),
a public-benefit 501(c)(3) nonprofit, using a "managed open source" approach:
anyone can see the source, but only ISC employees have commit access.
Until recently, the source could only be seen once ISC had published
a release: read access to the source repository was restricted just
as commit access was. That's now changing, with the opening of a
public git mirror to the BIND source tree (see below).
### <a name="access"></a>Access to source code
Public BIND releases are always available from the
[ISC FTP site](ftp://ftp.isc.org/isc/bind9).
A public-access GIT repository is also available at
[https://gitlab.isc.org](https://gitlab.isc.org).
This repository is a mirror, updated several times per day, of the
source repository maintained by ISC. It contains all the public release
branches; upcoming releases can be viewed in their current state at any
time. It does *not* contain development branches or unreviewed work in
progress. Commits which address security vulnerablilities are withheld
until after public disclosure.
You can browse the source online via
[https://gitlab.isc.org/isc-projects/bind9](https://gitlab.isc.org/isc-projects/bind9)
To clone the repository, use:
> $ git clone https://gitlab.isc.org/isc-projects/bind9.git
Release branch names are of the form `v9_X`, where X represents the second
number in the BIND 9 version number. So, to check out the BIND 9.12
branch, use:
> $ git checkout v9_12
Whenever a branch is ready for publication, a tag will be placed of the
form `v9_X_Y`. The 9.12.0 release, for instance, is tagged as `v9_12_0`.
The branch in which the next major release is being developed is called
`master`.
### <a name="bugs"></a>Reporting bugs
Reports of flaws in the BIND package, including software bugs, errors
in the documentation, missing files in the tarball, suggested changes
or requests for new features, etc, can be filed using
[https://gitlab.isc.org/isc-projects/bind9/issues](https://gitlab.isc.org/isc-projects/bind9/issues).
Due to a large ticket backlog, we are sometimes slow to respond,
especially if a bug is cosmetic or if a feature request is vague or
low in priority, but we will try at least to acknowledge legitimate
bug reports within a week.
ISC's ticketing system is publicly readable; however, you must have
an account to file a new issue. You can either register locally or
use credentials from an existing account at GitHub, GitLab, Google,
Twitter, or Facebook.
### Reporting possible security issues
If you think you may be seeing a potential security vulnerability in BIND
(for example, a crash with REQUIRE, INSIST, or ASSERT failure), please
report it immediately by emailing to security-officer@isc.org. Plain-text
e-mail is not a secure choice for communications concerning undisclosed
security issues so please encrypt your communications to us if possible,
using the [ISC Security Officer public key](https://www.isc.org/downloads/software-support-policy/openpgp-key/).
Do not discuss undisclosed security vulnerabilites on any public mailing list.
ISC has a long history of handling reported vulnerabilities promptly and
effectively and we respect and acknowledge responsible reporters.
ISC's Security Vulnerability Disclosure Policy is documented at [https://kb.isc.org/article/AA-00861/0](https://kb.isc.org/article/AA-00861/0).
If you have a crash, you may want to consult
[What to do if your BIND or DHCP server has crashed.](https://kb.isc.org/article/AA-00340/89/What-to-do-if-your-BIND-or-DHCP-server-has-crashed.html)
### <a name="bugs"></a>Contributing code
BIND is licensed under the
[Mozilla Public License 2.0](http://www.isc.org/downloads/software-support-policy/isc-license/).
Earier versions (BIND 9.10 and earlier) were licensed under the [ISC License](http://www.isc.org/downloads/software-support-policy/isc-license/)
ISC does not require an explicit copyright assignment for patch
contributions. However, by submitting a patch to ISC, you implicitly
certify that you are the author of the code, that you intend to reliquish
exclusive copyright, and that you grant permission to publish your work
under the open source license used for the BIND version(s) to which your
patch will be applied.
#### <a name="bind"></a>BIND code
Patches for BIND may be submitted directly via merge requests in
[ISC's Gitlab](https://gitlab.isc.org/isc-projects/bind9/) source
repository for BIND.
Patches can also be submitted as diffs against a specific version of
BIND -- preferably the current top of the `master` branch. Diffs may
be generated using either `git format-patch` or `git diff`.
Those wanting to write code for BIND may be interested in the
[developer information](doc/dev/dev.md) page, which includes information
about BIND design and coding practices, including discussion of internal
APIs and overall system architecture. (This is a work in progress, and
still quite preliminary.)
Every patch submitted will be reviewed by ISC engineers following our
[code review process](doc/dev/dev.md#reviews) before it is merged.
It may take considerable time to review patch submissions, especially if
they don't meet ISC style and quality guidelines. If a patch is a good
idea, we can and will do additional work to bring it up to par, but if
we're busy with other work, it may take us a long time to get to it.
To ensure your patch is acted on as promptly as possible, please:
* Try to adhere to the [BIND 9 coding style](doc/dev/style.md).
* Run `make` `check` to ensure your change hasn't caused any
functional regressions.
* Document your work, both in the patch itself and in the
accompanying email.
* In patches that make non-trivial functional changes, include system
tests if possible; when introducing or substantially altering a
library API, include unit tests. See [Testing](doc/dev/dev.md#testing)
for more information.
##### Changes to `configure`
If you need to make changes to `configure`, you should not edit it
directly; instead, edit `configure.in`, then run `autoconf`. Similarly,
instead of editing `config.h.in` directly, edit `configure.in` and run
`autoheader`.
When submitting a patch as a diff, it's fine to omit the `configure`
diffs to save space. Just send the `configure.in` diffs and we'll
generate the new `configure` during the review process.
##### Documentation
All functional changes should be documented. There are three types
of documentation in the BIND source tree:
* Man pages are kept alongside the source code for the commands
they document, in files ending in `.docbook`; for example, the
`named` man page is `bin/named/named.docbook`.
* The *BIND 9 Administrator Reference Manual* is mostly in
`doc/arm/Bv9ARM-book.xml`, plus a few other XML files that are included
in it.
* API documentation is in the header file describing the API, in
Doxygen-formatted comments.
It is not necessary to edit any documentation files other than these;
all PDF, HTML, and `nroff`-format man page files will be updated
automatically from the `docbook` and `XML` files after merging.
Patches to improve existing documentation are also very welcome!
##### Tests
BIND is a large and complex project. We rely heavily on continuous
automated testing and cannot merge new code without adequate test coverage.
Please see [the 'Testing' section of doc/dev/dev.md](doc/dev/dev.md#testing)
for more information.
#### Thanks
Thank you for your interest in contributing to the ongoing development
of BIND.
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (C) 1996-2017 Internet Systems Consortium, Inc. ("ISC")
Copyright (C) 1996-2018 Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
+4 -1
View File
@@ -1,9 +1,12 @@
<!--
- Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
### Functional enhancements from prior major releases of BIND 9
+4
View File
@@ -0,0 +1,4 @@
syntax(2)
test_suite('bind9')
include('lib/Kyuafile')
+21 -8
View File
@@ -1,12 +1,16 @@
# Copyright (C) 1998-2002, 2004-2009, 2011-2017 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VERSION=@BIND9_VERSION@
@@ -18,7 +22,7 @@ MANPAGES = isc-config.sh.1
HTMLPAGES = isc-config.sh.html
MANOBJS = README HISTORY OPTIONS ${MANPAGES} ${HTMLPAGES}
MANOBJS = README HISTORY OPTIONS CONTRIBUTING ${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@
@@ -70,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; \
@@ -86,22 +90,31 @@ force-test: test-force
test-force:
status=0; \
(cd bin/tests && ${MAKE} ${MAKEDEFS} test) || status=1; \
(test -f unit/unittest.sh && $(SHELL) unit/unittest.sh) || status=1; \
(test -f ${top_builddir}/unit/unittest.sh && \
$(SHELL) ${top_builddir}/unit/unittest.sh) || status=1; \
exit $$status
README: README.md
${PANDOC} --email-obfuscation=none -s -t html README.md | \
${W3M} -dump -cols 75 -O ascii -T text/html > $@
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
HISTORY: HISTORY.md
${PANDOC} --email-obfuscation=none -s -t html HISTORY.md | \
${W3M} -dump -cols 75 -O ascii -T text/html > $@
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
OPTIONS: OPTIONS.md
${PANDOC} --email-obfuscation=none -s -t html OPTIONS.md | \
${W3M} -dump -cols 75 -O ascii -T text/html > $@
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
CONTRIBUTING: CONTRIBUTING.md
${PANDOC} --email-obfuscation=none -s -t html CONTRIBUTING.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
unit::
sh ${top_srcdir}/unit/unittest.sh
sh ${top_builddir}/unit/unittest.sh
clean::
-3
View File
@@ -19,9 +19,6 @@ Setting Description
named-checkzone
-DNS_RUN_PID_DIR=0 Create default PID files in ${localstatedir}/run
rather than ${localstatedir}/run/named/
Increase the maximum number of configurable
-DNS_RPZ_MAX_ZONES=64 response policy zones from 32 to 64; this is the
highest possible setting
Disable the use of inline functions to implement
-DISC_BUFFER_USEINLINE=0 the isc_buffer API: this reduces performance but
may be useful when debugging
+4 -2
View File
@@ -1,9 +1,12 @@
<!--
- Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
Setting the `STD_CDEFINES` environment variable before running `configure`
can be used to enable certain compile-time options that are not explicitly
@@ -20,6 +23,5 @@ Some of these settings are:
|`-DCHECK_SIBLING=0`|Don't check sibling glue in `named-checkzone`|
|`-DCHECK_LOCAL=0`|Don't check out-of-zone addresses in `named-checkzone`|
|`-DNS_RUN_PID_DIR=0`|Create default PID files in `${localstatedir}/run` rather than `${localstatedir}/run/named/`|
|`-DNS_RPZ_MAX_ZONES=64`|Increase the maximum number of configurable response policy zones from 32 to 64; this is the highest possible setting|
|`-DISC_BUFFER_USEINLINE=0`|Disable the use of inline functions to implement the `isc_buffer` API: this reduces performance but may be useful when debugging |
|`-DISC_HEAP_CHECK`|Test heap consistency after every heap operation; used when debugging|
+46 -57
View File
@@ -5,13 +5,14 @@ Contents
1. Introduction
2. Reporting bugs and getting help
3. Contributing to BIND
4. BIND 9.12 features
4. BIND 9.13 features
5. Building BIND
6. Compile-time options
7. Automated testing
8. Documentation
9. Change log
10. Acknowledgments
6. macOS
7. Compile-time options
8. Automated testing
9. Documentation
10. Change log
11. Acknowledgments
Introduction
@@ -49,19 +50,21 @@ bind9/releasenotes
Reporting bugs and getting help
Please report assertion failure errors and suspected security issues to
security-officer@isc.org.
To report non-security-sensitive bugs or request new features, you may
open an Issue in the BIND 9 project on the ISC GitLab server at https://
gitlab.isc.org/isc-projects/bind9.
General bug reports can be sent to bind9-bugs@isc.org.
Please note that, unless you explicitly mark the newly created Issue as
"confidential", it will be publicly readable. Please do not include any
information in bug reports that you consider to be confidential unless the
issue has been marked as such. In particular, if submitting the contents
of your configuration file in a non-confidential Issue, it is advisable to
obscure key secrets: this can be done automatically by using
named-checkconf -px.
Feature requests can be sent to bind-suggest@isc.org.
Please note that, while tickets submitted to ISC's ticketing system are
not initially publicly readable by default, they can be made publicly
acessible afterward. Please do not include information in bug reports that
you consider to be confidential. In particular, when sending the contents
of your configuration file, it is advisable to obscure key secrets: this
can be done automatically by using named-checkconf -px.
If the bug you are reporting is a potential security issue, such as an
assertion failure or other crash in named, please do NOT use GitLab to
report it. Instead, please send mail to security-officer@isc.org.
Professional support and training for BIND are available from ISC at
https://www.isc.org/support.
@@ -76,52 +79,31 @@ mailman/listinfo/bind-workers.
Contributing to BIND
ISC maintains a public git repository for BIND; details can be found at
http://www.isc.org/git/, and also on Github at https://github.com/
isc-projects.
http://www.isc.org/git/.
Information for BIND contributors can be found in the following files: -
General information: doc/dev/contrib.md - BIND 9 code style: doc/dev/
style.md - BIND architecture and developer guide: doc/dev/dev.md
General information: CONTRIBUTING.md - BIND 9 code style: doc/dev/style.md
- BIND architecture and developer guide: doc/dev/dev.md
Patches for BIND may be submitted either as Github pull requests or via
email. When submitting a patch via email, please prepend the subject
header with "[PATCH]" so it will be easier for us to find. If your patch
introduces a new feature in BIND, please submit it to bind-suggest@isc.org
; if it fixes a bug, please submit it to bind9-bugs@isc.org.
Patches for BIND may be submitted as Merge Requests in the ISC GitLab
server at at https://gitlab.isc.org/isc-projects/bind9/merge_requests.
BIND 9.12 features
By default, external contributors don't have ability to fork BIND in the
GitLab server, but if you wish to contribute code to BIND, you may request
permission to do so. Thereafter, you can create git branches and directly
submit requests that they be reviewed and merged.
BIND 9.12.0 is the newest development branch of BIND 9. It includes a
number of changes from BIND 9.11 and earlier releases. New features
If you prefer, you may also submit code by opening a GitLab Issue and
including your patch as an attachment, preferably generated by git
format-patch.
BIND 9.13 features
BIND 9.13.0 is the newest development branch of BIND 9. It includes a
number of changes from BIND 9.12 and earlier releases. New features
include:
* named and related libraries have been substantially refactored for
improved query performance -- particularly on delegation heavy zones
-- and for improved readability, maintainability, and testability.
* Code implementing the name server query processing logic has been
moved into a new libns library, for easier testing and use in tools
other than named.
* Cached, validated NSEC and other records can now be used to synthesize
NXDOMAIN responses.
* The DNS Response Policy Service API (DNSRPS) is now supported.
* Setting 'max-journal-size default' now limits the size of journal
files to twice the size of the zone.
* dnstap-read -x prints a hex dump of the wire format of each logged DNS
message.
* dnstap output files can now be configured to roll automatically when
reaching a given size.
* Log file timestamps can now also be formatted in ISO 8601 (local) or
ISO 8601 (UTC) formats.
* Logging channels and dnstap output files can now be configured to use
a timestamp as the suffix when rolling to a new file.
* 'named-checkconf -l' lists zones found in named.conf.
* Added support for the EDNS Padding and Keepalive options.
* 'new-zones-directory' option sets the location where the configuration
data for zones added by rndc addzone is stored.
* The default key algorithm in rndc-confgen is now hmac-sha256.
* filter-aaaa-on-v4 and filter-aaaa-on-v6 options are now available by
default without a configure option.
* The obsolete isc-hmac-fixup command has been removed.
* TBD
Building BIND
@@ -165,6 +147,14 @@ BUILD_CPPFLAGS
BUILD_LDFLAGS
BUILD_LIBS
macOS
Building on macOS assumes that the "Command Tools for Xcode" is installed.
This can be downloaded from https://developer.apple.com/download/more/ or
if you have Xcode already installed you can run "xcode-select --install".
This will add /usr/include to the system and install the compiler and
other tools so that they can be easily found.
Compile-time options
To see a full list of configuration options, run configure --help.
@@ -342,4 +332,3 @@ Acknowledgments
(eay@cryptsoft.com)
* This product includes software written by Tim Hudson
(tjh@cryptsoft.com)
+51 -55
View File
@@ -1,9 +1,12 @@
<!--
- Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
# BIND 9
@@ -12,8 +15,9 @@
1. [Introduction](#intro)
1. [Reporting bugs and getting help](#help)
1. [Contributing to BIND](#contrib)
1. [BIND 9.12 features](#features)
1. [BIND 9.13 features](#features)
1. [Building BIND](#build)
1. [macOS](#macos)
1. [Compile-time options](#opts)
1. [Automated testing](#testing)
1. [Documentation](#doc)
@@ -57,22 +61,24 @@ For up-to-date release notes and errata, see
### <a name="help"/> Reporting bugs and getting help
Please report assertion failure errors and suspected security issues to
To report non-security-sensitive bugs or request new features, you may
open an Issue in the BIND 9 project on the
[ISC GitLab server](https://gitlab.isc.org) at
[https://gitlab.isc.org/isc-projects/bind9](https://gitlab.isc.org/isc-projects/bind9).
Please note that, unless you explicitly mark the newly created Issue as
"confidential", it will be publicly readable. Please do not include any
information in bug reports that you consider to be confidential unless
the issue has been marked as such. In particular, if submitting the
contents of your configuration file in a non-confidential Issue, it is
advisable to obscure key secrets: this can be done automatically by
using `named-checkconf -px`.
If the bug you are reporting is a potential security issue, such as an
assertion failure or other crash in `named`, please do *NOT* use GitLab to
report it. Instead, please send mail to
[security-officer@isc.org](mailto:security-officer@isc.org).
General bug reports can be sent to
[bind9-bugs@isc.org](mailto:bind9-bugs@isc.org).
Feature requests can be sent to
[bind-suggest@isc.org](mailto:bind-suggest@isc.org).
Please note that, while tickets submitted to ISC's ticketing system
are not initially publicly readable by default, they can be made publicly
acessible afterward. Please do not include information in bug reports that
you consider to be confidential. In particular, when sending the contents of
your configuration file, it is advisable to obscure key secrets: this can
be done automatically by using `named-checkconf -px`.
Professional support and training for BIND are available from
ISC at [https://www.isc.org/support](https://www.isc.org/support).
@@ -86,54 +92,35 @@ may also want to join the __BIND Workers__ mailing list, at
### <a name="contrib"/> Contributing to BIND
ISC maintains a public git repository for BIND; details can be found
at [http://www.isc.org/git/](http://www.isc.org/git/), and also on Github
at [https://github.com/isc-projects](https://github.com/isc-projects).
at [http://www.isc.org/git/](http://www.isc.org/git/).
Information for BIND contributors can be found in the following files:
- General information: [doc/dev/contrib.md](doc/dev/contrib.md)
- General information: [CONTRIBUTING.md](CONTRIBUTING)
- BIND 9 code style: [doc/dev/style.md](doc/dev/style.md)
- BIND architecture and developer guide: [doc/dev/dev.md](doc/dev/dev.md)
Patches for BIND may be submitted either as Github pull requests
or via email. When submitting a patch via email, please prepend the
subject header with "`[PATCH]`" so it will be easier for us to find.
If your patch introduces a new feature in BIND, please submit it to
[bind-suggest@isc.org](mailto:bind-suggest@isc.org); if it fixes a bug,
please submit it to [bind9-bugs@isc.org](mailto:bind9-bugs@isc.org).
Patches for BIND may be submitted as
[Merge Requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests)
in the [ISC GitLab server](https://gitlab.isc.org) at
at [https://gitlab.isc.org/isc-projects/bind9/merge_requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests).
### <a name="features"/> BIND 9.12 features
By default, external contributors don't have ability to fork BIND in the
GitLab server, but if you wish to contribute code to BIND, you may request
permission to do so. Thereafter, you can create git branches and directly
submit requests that they be reviewed and merged.
BIND 9.12.0 is the newest development branch of BIND 9. It includes a
number of changes from BIND 9.11 and earlier releases. New features
If you prefer, you may also submit code by opening a
[GitLab Issue](https://gitlab.isc.org/isc-projects/bind9/issues) and
including your patch as an attachment, preferably generated by
`git format-patch`.
### <a name="features"/> BIND 9.13 features
BIND 9.13.0 is the newest development branch of BIND 9. It includes a
number of changes from BIND 9.12 and earlier releases. New features
include:
* `named` and related libraries have been substantially refactored for
improved query performance -- particularly on delegation heavy zones --
and for improved readability, maintainability, and testability.
* Code implementing the name server query processing logic has been moved
into a new `libns` library, for easier testing and use in tools other
than `named`.
* Cached, validated NSEC and other records can now be used to synthesize
NXDOMAIN responses.
* The DNS Response Policy Service API (DNSRPS) is now supported.
* Setting `'max-journal-size default'` now limits the size of journal files
to twice the size of the zone.
* `dnstap-read -x` prints a hex dump of the wire format of each logged
DNS message.
* `dnstap` output files can now be configured to roll automatically when
reaching a given size.
* Log file timestamps can now also be formatted in ISO 8601 (local) or ISO
8601 (UTC) formats.
* Logging channels and `dnstap` output files can now be configured to use a
timestamp as the suffix when rolling to a new file.
* `'named-checkconf -l'` lists zones found in `named.conf`.
* Added support for the EDNS Padding and Keepalive options.
* 'new-zones-directory' option sets the location where the configuration
data for zones added by rndc addzone is stored.
* The default key algorithm in `rndc-confgen` is now hmac-sha256.
* `filter-aaaa-on-v4` and `filter-aaaa-on-v6` options are now available
by default without a configure option.
* The obsolete `isc-hmac-fixup` command has been removed.
* TBD
### <a name="build"/> Building BIND
@@ -171,6 +158,15 @@ affect compilation:
|`BUILD_LDFLAGS`||
|`BUILD_LIBS`||
#### <a name="macos"> macOS
Building on macOS assumes that the "Command Tools for Xcode" is installed.
This can be downloaded from https://developer.apple.com/download/more/
or if you have Xcode already installed you can run "xcode-select --install".
This will add /usr/include to the system and install the compiler and other
tools so that they can be easily found.
#### <a name="opts"/> Compile-time options
To see a full list of configuration options, run `configure --help`.
+4 -3
View File
@@ -1,13 +1,14 @@
/*
* Copyright (C) 1999-2005, 2007, 2008, 2012, 2014, 2016 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/* $Id: acconfig.h,v 1.53 2008/12/01 23:47:44 tbox Exp $ */
/*! \file */
/***
+4 -1
View File
@@ -1,10 +1,13 @@
#!/bin/sh
#
# Copyright (C) 2015, 2016 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# Run this script after modifying configure.in to generate configure
autoreconf -i
+6 -5
View File
@@ -1,17 +1,18 @@
# Copyright (C) 1998-2001, 2004, 2007, 2009, 2012-2014, 2016 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# $Id: Makefile.in,v 1.29 2009/10/05 12:07:08 fdupont Exp $
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
SUBDIRS = named rndc dig delv dnssec tools tests nsupdate \
check confgen @NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@
SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen \
@NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ tests
TARGETS =
@BIND9_MAKE_RULES@
+4 -1
View File
@@ -1,8 +1,11 @@
# Copyright (C) 2000-2007, 2009, 2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
srcdir = @srcdir@
VPATH = @srcdir@
+19 -19
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2000-2002, 2004-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/* $Id: check-tool.c,v 1.44 2011/12/22 07:32:39 each Exp $ */
@@ -96,18 +99,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.
@@ -587,8 +589,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));
@@ -683,12 +684,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));
@@ -698,7 +699,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);
@@ -761,8 +761,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);
+6 -3
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2000-2002, 2004, 2005, 2007, 2010, 2011, 2013, 2014, 2016 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/* $Id: check-tool.h,v 1.18 2011/12/09 23:47:02 tbox Exp $ */
@@ -19,6 +22,7 @@
#include <dns/masterdump.h>
#include <dns/types.h>
#include <dns/zone.h>
ISC_LANG_BEGINDECLS
@@ -46,8 +50,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
+17 -15
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 1999-2002, 2004-2007, 2009-2016 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/* $Id: named-checkconf.c,v 1.56 2011/03/12 04:59:46 tbox Exp $ */
@@ -18,7 +21,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>
@@ -126,8 +128,13 @@ get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
element = cfg_list_next(element)) {
value = cfg_listelt_value(element);
type = cfg_tuple_get(value, "type");
if (strcasecmp(cfg_obj_asstring(type), "master") != 0)
if ((strcasecmp(cfg_obj_asstring(type),
"primary") != 0) &&
(strcasecmp(cfg_obj_asstring(type),
"master") != 0))
{
continue;
}
*obj = cfg_tuple_get(value, "mode");
return (ISC_TRUE);
}
@@ -243,11 +250,14 @@ configure_zone(const char *vclass, const char *view,
* Skip loading checks for any type other than
* master and redirect
*/
if (strcasecmp(cfg_obj_asstring(typeobj), "hint") == 0)
if (strcasecmp(cfg_obj_asstring(typeobj), "hint") == 0) {
return (configure_hint(zfile, zclass, mctx));
else if ((strcasecmp(cfg_obj_asstring(typeobj), "master") != 0) &&
(strcasecmp(cfg_obj_asstring(typeobj), "redirect") != 0))
} else if ((strcasecmp(cfg_obj_asstring(typeobj), "primary") != 0) &&
(strcasecmp(cfg_obj_asstring(typeobj), "master") != 0) &&
(strcasecmp(cfg_obj_asstring(typeobj), "redirect") != 0))
{
return (ISC_R_SUCCESS);
}
/*
* Is the redirect zone configured as a slave?
@@ -397,7 +407,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,
@@ -528,7 +538,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;
@@ -644,10 +653,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);
@@ -678,9 +683,6 @@ main(int argc, char **argv) {
isc_log_destroy(&logc);
isc_hash_destroy();
isc_entropy_detach(&ectx);
isc_mem_destroy(&mctx);
#ifdef _WIN32
+5 -1
View File
@@ -1,11 +1,14 @@
<!DOCTYPE book [
<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
@@ -36,6 +39,7 @@
<year>2014</year>
<year>2015</year>
<year>2016</year>
<year>2018</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+5 -9
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 1999-2016 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/* $Id: named-checkzone.c,v 1.65.32.2 2012/02/07 02:45:21 each Exp $ */
@@ -17,7 +20,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>
@@ -44,7 +46,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;
@@ -257,7 +258,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') {
@@ -519,9 +520,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();
@@ -553,8 +551,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();
+5 -1
View File
@@ -1,9 +1,12 @@
<!--
- Copyright (C) 2000-2002, 2004-2007, 2009-2016 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
@@ -39,6 +42,7 @@
<year>2014</year>
<year>2015</year>
<year>2016</year>
<year>2018</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+4 -1
View File
@@ -1,8 +1,11 @@
# Copyright (C) 2009, 2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
srcdir = @srcdir@
VPATH = @srcdir@
+9 -10
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2009, 2011, 2014, 2016 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
@@ -23,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>
@@ -64,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",
@@ -75,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);
}
@@ -92,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;
@@ -165,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)
@@ -232,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)
+5 -1
View File
@@ -1,9 +1,12 @@
<!--
- Copyright (C) 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
@@ -33,6 +36,7 @@
<year>2014</year>
<year>2015</year>
<year>2016</year>
<year>2018</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+4 -1
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2009, 2016 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/* $Id: os.h,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
+11 -41
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2009, 2012-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/* $Id: keygen.c,v 1.4 2009/11/12 14:02:38 marka Exp $ */
@@ -17,7 +20,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>
@@ -111,17 +113,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];
@@ -148,31 +145,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));
@@ -183,17 +161,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();
}
+6 -3
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2009, 2016 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/* $Id: keygen.h,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
@@ -17,8 +20,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,
+7 -7
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2001, 2003-2005, 2007-2009, 2011, 2013, 2014, 2016, 2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
@@ -26,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>
@@ -67,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\
@@ -75,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",
@@ -92,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;
@@ -162,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;
@@ -214,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,
+5 -1
View File
@@ -1,9 +1,12 @@
<!--
- Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
@@ -40,6 +43,7 @@
<year>2015</year>
<year>2016</year>
<year>2017</year>
<year>2018</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+4 -1
View File
@@ -1,8 +1,11 @@
# Copyright (C) 2009, 2012, 2016 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# 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 $
+4 -1
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2009, 2016 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/* $Id: os.c,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
+4 -1
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2009, 2015, 2016 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/* $Id: util.c,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
+4 -1
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2009, 2016 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/* $Id: util.h,v 1.4 2009/09/29 15:06:05 fdupont Exp $ */
+4 -1
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2009, 2016 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/* $Id: os.c,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
+4 -1
View File
@@ -1,8 +1,11 @@
# Copyright (C) 2014-2017 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
srcdir = @srcdir@
VPATH = @srcdir@
+23 -36
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2014-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#include <config.h>
@@ -518,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;
@@ -547,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) {
@@ -941,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) {
@@ -972,23 +962,21 @@ 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;
isc_boolean_t state = ISC_TRUE;
strlcpy(option_store, option, sizeof(option_store));
ptr = option_store;
cmd = next_token(&ptr,"=");
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); \
@@ -1535,9 +1523,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);
@@ -1621,8 +1608,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));
+5 -1
View File
@@ -1,11 +1,14 @@
<!DOCTYPE book [
<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2014-2017 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
@@ -35,6 +38,7 @@
<year>2015</year>
<year>2016</year>
<year>2017</year>
<year>2018</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+7 -4
View File
@@ -1,8 +1,11 @@
# Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2012-2017 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
srcdir = @srcdir@
VPATH = @srcdir@
@@ -16,7 +19,7 @@ READLINE_LIB = @READLINE_LIB@
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \
${BIND9_INCLUDES} ${ISC_INCLUDES} \
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @DST_OPENSSL_INC@
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @DST_OPENSSL_INC@
CDEFINES = -DVERSION=\"${VERSION}\" @CRYPTO@
CWARNINGS =
@@ -38,10 +41,10 @@ DEPLIBS = ${DNSDEPLIBS} ${IRSDEPLIBS} ${BIND9DEPLIBS} \
${ISCDEPLIBS} ${ISCCFGDEPLIBS}
LIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
${ISCLIBS} @IDNLIBS@ @LIBS@
${ISCLIBS} @LIBIDN2_LIBS@ @LIBS@
NOSYMLIBS = ${DNSLIBS} ${IRSLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
${ISCNOSYMLIBS} @IDNLIBS@ @LIBS@
${ISCNOSYMLIBS} @LIBIDN2_LIBS@ @LIBS@
SUBDIRS =
+7 -2
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2000-2011, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000-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
@@ -219,6 +219,11 @@ ixfr=N\&. The incremental zone transfer will contain the changes made to the zon
\fIN\fR\&.
.RE
.PP
\-u
.RS 4
Print query times in microseconds instead of milliseconds\&.
.RE
.PP
\-v
.RS 4
Print the version number and exit\&.
@@ -795,5 +800,5 @@ There are probably too many query options\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2000-2011, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2000-2011, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
.br
+99 -83
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2000-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
@@ -187,7 +190,8 @@ help(void) {
" +[no]fail (Don't try next server on SERVFAIL)\n"
" +[no]header-only (Send query without a question section)\n"
" +[no]identify (ID responders in short answers)\n"
" +[no]idnout (convert IDN response)\n"
" +[no]idnin (Parse IDN names)\n"
" +[no]idnout (Convert IDN response)\n"
" +[no]ignore (Don't revert to TCP for TC responses.)\n"
" +[no]keepalive (Request EDNS TCP keepalive)\n"
" +[no]keepopen (Keep the TCP socket open between queries)\n"
@@ -201,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"
@@ -213,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"
@@ -233,7 +239,7 @@ help(void) {
* Callback from dighost.c to print the received message.
*/
static void
received(int bytes, isc_sockaddr_t *from, dig_query_t *query) {
received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
isc_uint64_t diff;
time_t tnow;
struct tm tmnow;
@@ -281,12 +287,12 @@ received(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("");
@@ -476,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) {
@@ -725,28 +731,25 @@ 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, *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);
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 { \
@@ -1002,8 +1005,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;
@@ -1042,13 +1046,29 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
lookup->identify = state;
break;
case 'n':
FULLCHECK("idnout");
#ifndef WITH_IDN
fprintf(stderr, ";; IDN support not enabled\n");
switch (cmd[3]) {
case 'i':
FULLCHECK("idnin");
#ifndef WITH_IDN_SUPPORT
fprintf(stderr, ";; IDN input support"
" not enabled\n");
#else
lookup->idnout = state;
lookup->idnin = state;
#endif
break;
case 'o':
FULLCHECK("idnout");
#ifndef WITH_IDN_OUT_SUPPORT
fprintf(stderr, ";; IDN output support"
" not enabled\n");
#else
lookup->idnout = state;
#endif
break;
default:
goto invalid_option;
}
break;
default:
goto invalid_option;
}
@@ -1222,6 +1242,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;
@@ -1311,11 +1335,11 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
result = parse_uint(&splitwidth, value,
1023, "split");
if (splitwidth % 4 != 0) {
if ((splitwidth % 4) != 0U) {
splitwidth = ((splitwidth + 3) / 4) * 4;
fprintf(stderr, ";; Warning, split must be "
"a multiple of 4; adjusting "
"to %d\n", splitwidth);
"to %u\n", splitwidth);
}
/*
* There is an adjustment done in the
@@ -1365,10 +1389,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 */
@@ -1504,7 +1538,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;
@@ -1718,15 +1752,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;
@@ -1738,6 +1770,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);
@@ -1839,10 +1872,9 @@ 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;
char *last;
isc_boolean_t need_clone = ISC_TRUE;
/*
@@ -1872,33 +1904,23 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
homedir = getenv("HOME");
if (homedir != NULL) {
unsigned int n;
n = snprintf(rcfile, sizeof(rcfile), "%s/.digrc",
homedir);
if (n < sizeof(rcfile))
n = snprintf(rcfile, sizeof(rcfile), "%s/.digrc", homedir);
if (n < sizeof(rcfile)) {
batchfp = fopen(rcfile, "r");
}
}
if (batchfp != NULL) {
while (fgets(batchline, sizeof(batchline),
batchfp) != 0) {
while (fgets(batchline, sizeof(batchline), batchfp) != 0) {
debug("config line %s", batchline);
bargc = 1;
input = batchline;
bargv[bargc] = next_token(&input, " \t\r\n");
while ((bargv[bargc] != NULL) &&
(bargc < 62)) {
bargc++;
bargv[bargc] =
next_token(&input, " \t\r\n");
for (bargc = 1, bargv[bargc] = strtok_r(batchline, " \t\r\n", &last);
bargc < 62 && bargv[bargc];
bargv[++bargc] = strtok_r(NULL, " \t\r\n", &last))
{
debug(".digrc argv %d: %s", bargc, bargv[bargc]);
}
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);
}
@@ -1909,8 +1931,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;
@@ -2082,18 +2105,15 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
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 ((bargv[bargc] != NULL) && (bargc < 14)) {
bargc++;
bargv[bargc] = next_token(&input, " \t\r\n");
for (bargc = 1, bargv[bargc] = strtok_r(batchline, " \t\r\n", &last);
(bargc < 14) && bargv[bargc];
bargc++, bargv[bargc] = strtok_r(NULL, " \t\r\n", &last)) {
debug("batch argv %d: %s", bargc, bargv[bargc]);
}
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;
}
@@ -2132,8 +2152,7 @@ query_finished(void) {
char batchline[MXNAME];
int bargc;
char *bargv[16];
char *input;
int i;
char *last;
if (batchname == NULL) {
isc_app_shutdown();
@@ -2151,18 +2170,15 @@ 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 ((bargv[bargc] != NULL) && (bargc < 14)) {
bargc++;
bargv[bargc] = next_token(&input, " \t\r\n");
for (bargc = 1, bargv[bargc] = strtok_r(batchline, " \t\r\n", &last);
bargc < 14 && bargv[bargc];
bargc++, bargv[bargc] = strtok_r(NULL, " \t\r\n", &last))
{
debug("batch argv %d: %s", bargc, bargv[bargc]);
}
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 {
+52 -6
View File
@@ -1,11 +1,14 @@
<!DOCTYPE book [
<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2000-2011, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
@@ -48,6 +51,7 @@
<year>2015</year>
<year>2016</year>
<year>2017</year>
<year>2018</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
@@ -349,6 +353,15 @@
</listitem>
</varlistentry>
<varlistentry>
<term>-u</term>
<listitem>
<para>
Print query times in microseconds instead of milliseconds.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-v</term>
<listitem>
@@ -763,6 +776,17 @@
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]idnin</option></term>
<listitem>
<para>
Process [do not process] IDN domain names on input.
This requires IDN SUPPORT to have been enabled at
compile time. The default is to process IDN input.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]idnout</option></term>
<listitem>
@@ -864,7 +888,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.
</para>
</listitem>
</varlistentry>
@@ -928,6 +953,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>
@@ -1071,6 +1107,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>
@@ -1274,10 +1321,9 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
<command>dig</command> appropriately converts character encoding of
domain name before sending a request to DNS server or displaying a
reply from the server.
If you'd like to turn off the IDN support for some reason, defines
the <envar>IDN_DISABLE</envar> environment variable.
The IDN support is disabled if the variable is set when
<command>dig</command> runs.
If you'd like to turn off the IDN support for some reason, use
parameters <parameter>+noidnin</parameter> and
<parameter>+noidnout</parameter>.
</para>
</refsection>
+7 -1
View File
@@ -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-2011, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-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
@@ -290,6 +290,12 @@
<em class="parameter"><code>N</code></em>.
</p>
</dd>
<dt><span class="term">-u</span></dt>
<dd>
<p>
Print query times in microseconds instead of milliseconds.
</p>
</dd>
<dt><span class="term">-v</span></dt>
<dd>
<p>
+214 -181
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2000-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file
@@ -21,17 +24,18 @@
#include <unistd.h>
#include <string.h>
#include <limits.h>
#include <errno.h>
#ifdef HAVE_LOCALE_H
#include <locale.h>
#endif
#ifdef WITH_IDN
#include <idn/result.h>
#include <idn/log.h>
#include <idn/resconf.h>
#include <idn/api.h>
#ifdef WITH_IDN_SUPPORT
#ifdef WITH_LIBIDN2
#include <idn2.h>
#endif
#endif /* WITH_IDN_SUPPORT */
#include <dns/byaddr.h>
#include <dns/fixedname.h>
@@ -53,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>
@@ -131,18 +134,23 @@ int lookup_counter = 0;
static char servercookie[256];
#ifdef WITH_IDN
static void initialize_idn(void);
static isc_result_t output_filter(isc_buffer_t *buffer,
unsigned int used_org,
isc_boolean_t absolute);
static idn_result_t append_textname(char *name, const char *origin,
size_t namesize);
static void idn_check_result(idn_result_t r, const char *msg);
#ifdef WITH_IDN_SUPPORT
static void idn_initialize(void);
static isc_result_t idn_locale_to_ace(const char *from,
char *to,
size_t tolen);
#endif /* WITH_IDN_SUPPORT */
#define MAXDLEN 256
int idnoptions = 0;
#endif
#ifdef WITH_IDN_OUT_SUPPORT
static isc_result_t idn_ace_to_locale(const char *from,
char *to,
size_t tolen);
static isc_result_t output_filter(isc_buffer_t *buffer,
unsigned int used_org,
isc_boolean_t absolute);
#define MAXDLEN 256
#endif /* WITH_IDN_OUT_SUPPORT */
isc_socket_t *keep = NULL;
isc_sockaddr_t keepaddr;
@@ -167,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;
@@ -202,7 +209,7 @@ isc_result_t
isc_boolean_t headers);
void
(*dighost_received)(int bytes, isc_sockaddr_t *from, dig_query_t *query);
(*dighost_received)(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query);
void
(*dighost_trying)(char *frm, dig_lookup_t *lookup);
@@ -233,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;
@@ -266,7 +261,7 @@ hex_dump(isc_buffer_t *b) {
isc_buffer_usedregion(b, &r);
printf("%d bytes\n", r.length);
printf("%u bytes\n", r.length);
for (len = 0; len < r.length; len++) {
printf("%02x ", r.base[len]);
if (len % 16 == 15) {
@@ -344,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);
@@ -437,7 +431,7 @@ debug(const char *format, ...) {
fflush(stdout);
if (debugtiming) {
TIME_NOW(&t);
fprintf(stderr, "%d.%06d: ", isc_time_seconds(&t),
fprintf(stderr, "%u.%06u: ", isc_time_seconds(&t),
isc_time_nanoseconds(&t) / 1000);
}
va_start(args, format);
@@ -643,7 +637,12 @@ make_empty_lookup(void) {
looknew->ttlunits = ISC_FALSE;
looknew->ttlunits = ISC_FALSE;
looknew->qr = ISC_FALSE;
#ifdef WITH_IDN
#ifdef WITH_IDN_SUPPORT
looknew->idnin = ISC_TRUE;
#else
looknew->idnin = ISC_FALSE;
#endif
#ifdef WITH_IDN_OUT_SUPPORT
looknew->idnout = ISC_TRUE;
#else
looknew->idnout = ISC_FALSE;
@@ -654,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;
@@ -788,6 +789,7 @@ clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers) {
looknew->nocrypto = lookold->nocrypto;
looknew->ttlunits = lookold->ttlunits;
looknew->qr = lookold->qr;
looknew->idnin = lookold->idnin;
looknew->idnout = lookold->idnout;
looknew->udpsize = lookold->udpsize;
looknew->edns = lookold->edns;
@@ -795,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;
@@ -899,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);
@@ -1192,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));
@@ -1291,18 +1295,27 @@ setup_system(isc_boolean_t ipv4only, isc_boolean_t ipv6only) {
irs_resconf_destroy(&resconf);
#ifdef WITH_IDN
initialize_idn();
#ifdef HAVE_SETLOCALE
/* Set locale */
(void)setlocale(LC_ALL, "");
#endif
#ifdef WITH_IDN_SUPPORT
idn_initialize();
#endif
#ifdef WITH_IDN_OUT_SUPPORT
/* Set domain name -> text post-conversion filter. */
result = dns_name_settotextfilter(output_filter);
check_result(result, "dns_name_settotextfilter");
#endif
if (keyfile[0] != 0)
setup_file_key();
else if (keysecret[0] != 0)
setup_text_key();
result = isc_entropy_getdata(entp, cookie_secret,
sizeof(cookie_secret), NULL, 0);
if (result != ISC_R_SUCCESS)
fatal("unable to generate cookie secret");
isc_random_buf(cookie_secret, sizeof(cookie_secret));
}
/*%
@@ -1371,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;
@@ -1860,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) {
@@ -1907,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 &&
@@ -2023,12 +2032,13 @@ setup_lookup(dig_lookup_t *lookup) {
char store[MXNAME];
char ecsbuf[20];
char cookiebuf[256];
#ifdef WITH_IDN
idn_result_t mr;
char utf8_textname[MXNAME], utf8_origin[MXNAME], idn_textname[MXNAME];
char *origin = NULL;
char *textname = NULL;
#ifdef WITH_IDN_SUPPORT
char idn_origin[MXNAME], idn_textname[MXNAME];
#endif
#ifdef WITH_IDN
#ifdef WITH_IDN_OUT_SUPPORT
result = dns_name_settotextfilter(lookup->idnout ?
output_filter : NULL);
check_result(result, "dns_name_settotextfilter");
@@ -2061,15 +2071,19 @@ setup_lookup(dig_lookup_t *lookup) {
isc_buffer_init(&lookup->onamebuf, lookup->oname_space,
sizeof(lookup->oname_space));
#ifdef WITH_IDN
/*
* We cannot convert `textname' and `origin' separately.
* `textname' doesn't contain TLD, but local mapping needs
* TLD.
*/
mr = idn_encodename(IDN_LOCALCONV | IDN_DELIMMAP, lookup->textname,
utf8_textname, sizeof(utf8_textname));
idn_check_result(mr, "convert textname to UTF-8");
textname = lookup->textname;
#ifdef WITH_IDN_SUPPORT
if (lookup->idnin) {
result = idn_locale_to_ace(textname, idn_textname, sizeof(idn_textname));
check_result(result, "convert textname to IDN encoding");
debug("idn_textname: %s", idn_textname);
textname = idn_textname;
}
#endif
/*
@@ -2080,8 +2094,8 @@ setup_lookup(dig_lookup_t *lookup) {
* is TRUE or we got a domain line in the resolv.conf file.
*/
if (lookup->new_search) {
#ifdef WITH_IDN
if ((count_dots(utf8_textname) >= ndots) || !usesearch) {
if ((count_dots(textname) >= ndots) || !usesearch)
{
lookup->origin = NULL; /* Force abs lookup */
lookup->done_as_is = ISC_TRUE;
lookup->need_search = usesearch;
@@ -2089,33 +2103,8 @@ setup_lookup(dig_lookup_t *lookup) {
lookup->origin = ISC_LIST_HEAD(search_list);
lookup->need_search = ISC_FALSE;
}
#else
if ((count_dots(lookup->textname) >= ndots) || !usesearch) {
lookup->origin = NULL; /* Force abs lookup */
lookup->done_as_is = ISC_TRUE;
lookup->need_search = usesearch;
} else if (lookup->origin == NULL && usesearch) {
lookup->origin = ISC_LIST_HEAD(search_list);
lookup->need_search = ISC_FALSE;
}
#endif
}
#ifdef WITH_IDN
if (lookup->origin != NULL) {
mr = idn_encodename(IDN_LOCALCONV | IDN_DELIMMAP,
lookup->origin->origin, utf8_origin,
sizeof(utf8_origin));
idn_check_result(mr, "convert origin to UTF-8");
mr = append_textname(utf8_textname, utf8_origin,
sizeof(utf8_textname));
idn_check_result(mr, "append origin to textname");
}
mr = idn_encodename(idnoptions | IDN_LOCALMAP | IDN_NAMEPREP |
IDN_IDNCONV | IDN_LENCHECK, utf8_textname,
idn_textname, sizeof(idn_textname));
idn_check_result(mr, "convert UTF-8 textname to IDN encoding");
#else
if (lookup->origin != NULL) {
debug("trying origin %s", lookup->origin->origin);
result = dns_message_gettempname(lookup->sendmsg,
@@ -2123,8 +2112,17 @@ setup_lookup(dig_lookup_t *lookup) {
check_result(result, "dns_message_gettempname");
dns_name_init(lookup->oname, NULL);
/* XXX Helper funct to conv char* to name? */
len = (unsigned int) strlen(lookup->origin->origin);
isc_buffer_init(&b, lookup->origin->origin, len);
origin = lookup->origin->origin;
#ifdef WITH_IDN_SUPPORT
if (lookup->idnin) {
result = idn_locale_to_ace(origin, idn_origin, sizeof(idn_origin));
check_result(result, "convert origin to IDN encoding");
debug("trying idn origin %s", idn_origin);
origin = idn_origin;
}
#endif
len = (unsigned int) strlen(origin);
isc_buffer_init(&b, origin, len);
isc_buffer_add(&b, len);
result = dns_name_fromtext(lookup->oname, &b, dns_rootname,
0, &lookup->onamebuf);
@@ -2134,7 +2132,7 @@ setup_lookup(dig_lookup_t *lookup) {
dns_message_puttempname(lookup->sendmsg,
&lookup->oname);
fatal("'%s' is not in legal name syntax (%s)",
lookup->origin->origin,
origin,
isc_result_totext(result));
}
if (lookup->trace && lookup->trace_root) {
@@ -2143,10 +2141,9 @@ setup_lookup(dig_lookup_t *lookup) {
dns_fixedname_t fixed;
dns_name_t *name;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
len = (unsigned int) strlen(lookup->textname);
isc_buffer_init(&b, lookup->textname, len);
name = dns_fixedname_initname(&fixed);
len = (unsigned int) strlen(textname);
isc_buffer_init(&b, textname, len);
isc_buffer_add(&b, len);
result = dns_name_fromtext(name, &b, NULL, 0, NULL);
if (result == ISC_R_SUCCESS &&
@@ -2171,28 +2168,17 @@ setup_lookup(dig_lookup_t *lookup) {
}
}
dns_message_puttempname(lookup->sendmsg, &lookup->oname);
} else
#endif
{
} else {
debug("using root origin");
if (lookup->trace && lookup->trace_root)
dns_name_clone(dns_rootname, lookup->name);
else {
#ifdef WITH_IDN
len = (unsigned int) strlen(idn_textname);
isc_buffer_init(&b, idn_textname, len);
len = (unsigned int) strlen(textname);
isc_buffer_init(&b, textname, len);
isc_buffer_add(&b, len);
result = dns_name_fromtext(lookup->name, &b,
dns_rootname, 0,
&lookup->namebuf);
#else
len = (unsigned int) strlen(lookup->textname);
isc_buffer_init(&b, lookup->textname, len);
isc_buffer_add(&b, len);
result = dns_name_fromtext(lookup->name, &b,
dns_rootname, 0,
&lookup->namebuf);
#endif
}
if (result != ISC_R_SUCCESS) {
dns_message_puttempname(lookup->sendmsg,
@@ -2212,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;
@@ -2246,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;
@@ -2283,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");
}
@@ -2980,7 +2976,15 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
check_next_lookup(l);
}
} else {
if (!l->ns_search_only) {
if (l->ns_search_only) {
isc_netaddr_t netaddr;
char buf[ISC_NETADDR_FORMATSIZE];
isc_netaddr_fromsockaddr(&netaddr, &query->sockaddr);
isc_netaddr_format(&netaddr, buf, sizeof(buf));
printf(";; no response from %s\n", buf);
} else {
fputs(l->cmdline, stdout);
printf(";; connection timed out; no servers could be "
"reached\n");
@@ -3642,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,
@@ -3651,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;
@@ -3738,7 +3742,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
*/
if (l->comments)
printf(";; BADVERS, retrying with EDNS version %u.\n",
newedns);
(unsigned int)newedns);
l->edns = newedns;
n = requeue_lookup(l, ISC_TRUE);
if (l->trace && l->trace_root)
@@ -3827,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",
@@ -4142,7 +4146,7 @@ cancel_all(void) {
*/
void
destroy_libs(void) {
#ifdef WITH_IDN
#ifdef WITH_IDN_SUPPORT
isc_result_t result;
#endif
@@ -4176,7 +4180,7 @@ destroy_libs(void) {
clear_searchlist();
#ifdef WITH_IDN
#ifdef WITH_IDN_SUPPORT
result = dns_name_settotextfilter(NULL);
check_result(result, "dns_name_settotextfilter");
#endif
@@ -4194,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);
@@ -4206,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);
@@ -4223,27 +4223,7 @@ destroy_libs(void) {
isc_mem_destroy(&mctx);
}
#ifdef WITH_IDN
static void
initialize_idn(void) {
idn_result_t r;
isc_result_t result;
#ifdef HAVE_SETLOCALE
/* Set locale */
(void)setlocale(LC_ALL, "");
#endif
/* Create configuration context. */
r = idn_nameinit(1);
if (r != idn_success)
fatal("idn api initialization failed: %s",
idn_result_tostring(r));
/* Set domain name -> text post-conversion filter. */
result = dns_name_settotextfilter(output_filter);
check_result(result, "dns_name_settotextfilter");
}
#ifdef WITH_IDN_OUT_SUPPORT
static isc_result_t
output_filter(isc_buffer_t *buffer, unsigned int used_org,
isc_boolean_t absolute)
@@ -4251,6 +4231,7 @@ output_filter(isc_buffer_t *buffer, unsigned int used_org,
char tmp1[MAXDLEN], tmp2[MAXDLEN];
size_t fromlen, tolen;
isc_boolean_t end_with_dot;
isc_result_t result;
/*
* Copy contents of 'buffer' to 'tmp1', supply trailing dot
@@ -4259,6 +4240,7 @@ output_filter(isc_buffer_t *buffer, unsigned int used_org,
fromlen = isc_buffer_usedlength(buffer) - used_org;
if (fromlen >= MAXDLEN)
return (ISC_R_SUCCESS);
memmove(tmp1, (char *)isc_buffer_base(buffer) + used_org, fromlen);
end_with_dot = (tmp1[fromlen - 1] == '.') ? ISC_TRUE : ISC_FALSE;
if (absolute && !end_with_dot) {
@@ -4267,58 +4249,109 @@ output_filter(isc_buffer_t *buffer, unsigned int used_org,
return (ISC_R_SUCCESS);
tmp1[fromlen - 1] = '.';
}
tmp1[fromlen] = '\0';
/*
* Convert contents of 'tmp1' to local encoding.
*/
if (idn_decodename(IDN_DECODE_APP, tmp1, tmp2, MAXDLEN) != idn_success)
result = idn_ace_to_locale(tmp1, tmp2, sizeof(tmp2));
if (result != ISC_R_SUCCESS) {
return (ISC_R_SUCCESS);
strlcpy(tmp1, tmp2, MAXDLEN);
}
/*
* Copy the converted contents in 'tmp1' back to 'buffer'.
* If we have appended trailing dot, remove it.
*/
tolen = strlen(tmp1);
if (absolute && !end_with_dot && tmp1[tolen - 1] == '.')
tolen = strlen(tmp2);
if (absolute && !end_with_dot && tmp2[tolen - 1] == '.')
tolen--;
if (isc_buffer_length(buffer) < used_org + tolen)
return (ISC_R_NOSPACE);
isc_buffer_subtract(buffer, isc_buffer_usedlength(buffer) - used_org);
memmove(isc_buffer_used(buffer), tmp1, tolen);
memmove(isc_buffer_used(buffer), tmp2, tolen);
isc_buffer_add(buffer, (unsigned int)tolen);
return (ISC_R_SUCCESS);
}
#endif
static idn_result_t
append_textname(char *name, const char *origin, size_t namesize) {
size_t namelen = strlen(name);
size_t originlen = strlen(origin);
/* Already absolute? */
if (namelen > 0 && name[namelen - 1] == '.')
return (idn_success);
/* Append dot and origin */
if (namelen + 1 + originlen >= namesize)
return (idn_buffer_overflow);
if (*origin != '.')
name[namelen++] = '.';
(void)strlcpy(name + namelen, origin, namesize - namelen);
return (idn_success);
}
#ifdef WITH_IDN_SUPPORT
#ifdef WITH_LIBIDN2
static void
idn_check_result(idn_result_t r, const char *msg) {
if (r != idn_success) {
exitcode = 1;
fatal("%s: %s", msg, idn_result_tostring(r));
}
idn_initialize(void) {
}
#endif /* WITH_IDN */
static isc_result_t
idn_locale_to_ace(const char *from, char *to, size_t tolen) {
int res;
char *tmp_str = NULL;
res = idn2_to_ascii_lz(from, &tmp_str, IDN2_NONTRANSITIONAL|IDN2_NFC_INPUT);
if (res == IDN2_DISALLOWED) {
res = idn2_to_ascii_lz(from, &tmp_str, IDN2_TRANSITIONAL|IDN2_NFC_INPUT);
}
if (res == IDN2_OK) {
/*
* idn2_to_ascii_lz() normalizes all strings to lowerl case,
* but we generally don't want to lowercase all input strings;
* make sure to return the original case if the two strings
* differ only in case
*/
if (!strcasecmp(from, tmp_str)) {
if (strlen(from) >= tolen) {
debug("from string is too long");
idn2_free(tmp_str);
return ISC_R_NOSPACE;
}
idn2_free(tmp_str);
(void) strlcpy(to, from, tolen);
return ISC_R_SUCCESS;
}
/* check the length */
if (strlen(tmp_str) >= tolen) {
debug("ACE string is too long");
idn2_free(tmp_str);
return ISC_R_NOSPACE;
}
(void) strlcpy(to, tmp_str, tolen);
idn2_free(tmp_str);
return ISC_R_SUCCESS;
}
fatal("'%s' is not a legal IDN name (%s), use +noidnin", from, idn2_strerror(res));
return ISC_R_FAILURE;
}
#ifdef WITH_IDN_OUT_SUPPORT
static isc_result_t
idn_ace_to_locale(const char *from, char *to, size_t tolen) {
int res;
char *tmp_str = NULL;
res = idn2_to_unicode_8zlz(from, &tmp_str,
IDN2_NONTRANSITIONAL|IDN2_NFC_INPUT);
if (res == IDN2_OK) {
/* check the length */
if (strlen(tmp_str) >= tolen) {
debug("encoded ASC string is too long");
idn2_free(tmp_str);
return ISC_R_FAILURE;
}
(void) strlcpy(to, tmp_str, tolen);
idn2_free(tmp_str);
return ISC_R_SUCCESS;
}
fatal("'%s' is not a legal IDN name (%s), use +noidnout", from, idn2_strerror(res));
return ISC_R_FAILURE;
}
#endif /* WITH_IDN_OUT_SUPPORT */
#endif /* WITH_LIBIDN2 */
#endif /* WITH_IDN_SUPPORT */
+6 -27
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2000-2007, 2009-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
@@ -16,13 +19,6 @@
#include <locale.h>
#endif
#ifdef WITH_IDN
#include <idn/result.h>
#include <idn/log.h>
#include <idn/resconf.h>
#include <idn/api.h>
#endif
#include <isc/app.h>
#include <isc/commandline.h>
#include <isc/netaddr.h>
@@ -169,7 +165,7 @@ host_shutdown(void) {
}
static void
received(int bytes, isc_sockaddr_t *from, dig_query_t *query) {
received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
isc_time_t now;
int diff;
@@ -456,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));
@@ -718,9 +713,6 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
lookup->rdtype != dns_rdatatype_axfr)
lookup->rdtype = rdtype;
lookup->rdtypeset = ISC_TRUE;
#ifdef WITH_IDN
idnoptions = 0;
#endif
if (rdtype == dns_rdatatype_axfr) {
/* -l -t any -v */
list_type = dns_rdatatype_any;
@@ -733,13 +725,6 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
} else if (rdtype == dns_rdatatype_any) {
if (!lookup->tcp_mode_set)
lookup->tcp_mode = ISC_TRUE;
#ifdef WITH_IDN
} else if (rdtype == dns_rdatatype_a ||
rdtype == dns_rdatatype_aaaa ||
rdtype == dns_rdatatype_mx) {
idnoptions = IDN_ASCCHECK;
list_type = rdtype;
#endif
} else
list_type = rdtype;
list_addresses = ISC_FALSE;
@@ -768,9 +753,6 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
if (!lookup->rdtypeset ||
lookup->rdtype != dns_rdatatype_axfr)
lookup->rdtype = dns_rdatatype_any;
#ifdef WITH_IDN
idnoptions = 0;
#endif
list_type = dns_rdatatype_any;
list_addresses = ISC_FALSE;
lookup->rdtypeset = ISC_TRUE;
@@ -882,9 +864,6 @@ main(int argc, char **argv) {
ISC_LIST_INIT(search_list);
fatalexit = 1;
#ifdef WITH_IDN
idnoptions = IDN_ASCCHECK;
#endif
/* setup dighost callbacks */
dighost_printmessage = printmessage;
+5 -1
View File
@@ -1,11 +1,14 @@
<!DOCTYPE book [
<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
@@ -43,6 +46,7 @@
<year>2015</year>
<year>2016</year>
<year>2017</year>
<year>2018</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+9 -9
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2000-2009, 2011-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#ifndef DIG_H
@@ -91,6 +94,8 @@ struct dig_lookup {
aaonly,
adflag,
cdflag,
raflag,
tcflag,
zflag,
trace, /*% dig +trace */
trace_root, /*% initial query for either +trace or +nssearch */
@@ -126,6 +131,7 @@ struct dig_lookup {
use_usec,
nocrypto,
ttlunits,
idnin,
idnout,
qr;
char textname[MXNAME]; /*% Name we're going to be looking up */
@@ -253,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;
@@ -265,9 +271,6 @@ extern char *progname;
extern int tries;
extern int fatalexit;
extern isc_boolean_t verbose;
#ifdef WITH_IDN
extern int idnoptions;
#endif
/*
* Routines in dighost.c.
@@ -368,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
@@ -382,7 +382,7 @@ extern isc_result_t
*/
extern void
(*dighost_received)(int bytes, isc_sockaddr_t *from, dig_query_t *query);
(*dighost_received)(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query);
/*%<
* Print a message about where and when the response
* was received from, like the final comment in the
+22 -20
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2000-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#include <config.h>
@@ -387,7 +390,7 @@ detailsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
}
static void
received(int bytes, isc_sockaddr_t *from, dig_query_t *query)
received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query)
{
UNUSED(bytes);
UNUSED(from);
@@ -472,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));
@@ -549,7 +551,7 @@ show_settings(isc_boolean_t full, isc_boolean_t serv_only) {
printf(" %s\t\t%s\n",
usesearch ? "search" : "nosearch",
recurse ? "recurse" : "norecurse");
printf(" timeout = %d\t\tretry = %d\tport = %d\tndots = %d\n",
printf(" timeout = %u\t\tretry = %d\tport = %u\tndots = %d\n",
timeout, tries, port, ndots);
printf(" querytype = %-8s\tclass = %s\n", deftype, defclass);
printf(" srchlist = ");
@@ -707,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]);
@@ -811,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);
+5 -1
View File
@@ -1,9 +1,12 @@
<!--
- Copyright (C) 2004-2007, 2010, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!--
@@ -67,6 +70,7 @@
<year>2015</year>
<year>2016</year>
<year>2017</year>
<year>2018</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+4 -1
View File
@@ -1,8 +1,11 @@
# Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2012-2017 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
srcdir = @srcdir@
VPATH = @srcdir@
+8 -3
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2017, 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
@@ -44,7 +44,8 @@ dnssec-cds \- change DS records for a child zone based on CDS/CDNSKEY
.PP
The
\fBdnssec\-cds\fR
command changes DS records at a delegation point based on CDS or CDNSKEY records published in the child zone\&. If both CDS and CDNSKEY records are present in the child zone, the CDS is preferred\&.
command changes DS records at a delegation point based on CDS or CDNSKEY records published in the child zone\&. If both CDS and CDNSKEY records are present in the child zone, the CDS is preferred\&. This enables a child zone to inform its parent of upcoming changes to its key\-signing keys; by polling periodically with
\fBdnssec\-cds\fR, the parent can keep the DS records up to date and enable automatic rolling of KSKs\&.
.PP
Two input files are required\&. The
\fB\-f \fR\fB\fIchild\-file\fR\fR
@@ -57,6 +58,10 @@ file generated by
\fBdnssec\-dsfromkey\fR, or the output of a previous run of
\fBdnssec\-cds\fR\&.
.PP
The
\fBdnssec\-cds\fR
command uses special DNSSEC validation logic specified by RFC 7344\&. It requires that the CDS and/or CDNSKEY records are validly signed by a key represented in the existing DS records\&. This will typicially be the pre\-existing key\-signing key (KSK)\&.
.PP
For protection against replay attacks, the signatures on the child records must not be older than they were on a previous run of
\fBdnssec\-cds\fR\&. This time is obtained from the modification time of the
dsset\-
@@ -288,5 +293,5 @@ RFC 7344\&.
.RE
.SH "COPYRIGHT"
.br
Copyright \(co 2017 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2017, 2018 Internet Systems Consortium, Inc. ("ISC")
.br
+34 -27
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*
@@ -20,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>
@@ -69,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
@@ -85,7 +86,7 @@ static dns_rdataclass_t rdclass = dns_rdataclass_in;
*/
static isc_uint8_t dtype[8];
static const char *startstr = NULL; /* from which we derive notbefore */
static const char *startstr = NULL; /* from which we derive notbefore */
static isc_stdtime_t notbefore = 0; /* restrict sig inception times */
static dns_rdata_rrsig_t oldestsig; /* for recording inception time */
@@ -170,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));
@@ -251,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));
@@ -376,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);
@@ -521,6 +521,13 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
}
}
vbprintf(1, "no matching %s for %s %d %d\n",
dsset->type == dns_rdatatype_cds
? "CDS" : "DS",
ki->rdata.type == dns_rdatatype_cdnskey
? "CDNSKEY" : "DNSKEY",
ki->tag, ki->algo);
return (ISC_FALSE);
}
@@ -647,17 +654,28 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
for (i = 0; i < nkey; i++) {
keyinfo_t *ki = &keytbl[i];
if (ki->dst == NULL ||
sig.keyid != ki->tag ||
if (sig.keyid != ki->tag ||
sig.algorithm != ki->algo ||
!dns_name_equal(&sig.signer, name))
{
continue;
}
if (ki->dst == NULL) {
vbprintf(1, "skip RRSIG by key %d:"
" no matching (C)DS\n",
sig.keyid);
continue;
}
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));
continue;
}
@@ -1213,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");
@@ -1376,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);
}
+17 -2
View File
@@ -1,9 +1,12 @@
<!--
- Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.dnssec-cds">
@@ -36,6 +39,7 @@
<docinfo>
<copyright>
<year>2017</year>
<year>2018</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
@@ -64,7 +68,11 @@
The <command>dnssec-cds</command> command changes DS records at
a delegation point based on CDS or CDNSKEY records published in
the child zone. If both CDS and CDNSKEY records are present in
the child zone, the CDS is preferred.
the child zone, the CDS is preferred. This enables a child zone
to inform its parent of upcoming changes to its key-signing keys;
by polling periodically with <command>dnssec-cds</command>, the
parent can keep the DS records up to date and enable automatic
rolling of KSKs.
</para>
<para>
Two input files are required. The
@@ -79,6 +87,13 @@
<command>dnssec-dsfromkey</command>, or the output of a previous
run of <command>dnssec-cds</command>.
</para>
<para>
The <command>dnssec-cds</command> command uses special DNSSEC
validation logic specified by RFC 7344. It requires that the CDS
and/or CDNSKEY records are validly signed by a key represented in the
existing DS records. This will typicially be the pre-existing
key-signing key (KSK).
</para>
<para>
For protection against replay attacks, the signatures on the
child records must not be older than they were on a previous run
+13 -2
View File
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2017, 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
@@ -55,7 +55,11 @@
The <span class="command"><strong>dnssec-cds</strong></span> command changes DS records at
a delegation point based on CDS or CDNSKEY records published in
the child zone. If both CDS and CDNSKEY records are present in
the child zone, the CDS is preferred.
the child zone, the CDS is preferred. This enables a child zone
to inform its parent of upcoming changes to its key-signing keys;
by polling periodically with <span class="command"><strong>dnssec-cds</strong></span>, the
parent can keep the DS records up to date and enable automatic
rolling of KSKs.
</p>
<p>
Two input files are required. The
@@ -70,6 +74,13 @@
<span class="command"><strong>dnssec-dsfromkey</strong></span>, or the output of a previous
run of <span class="command"><strong>dnssec-cds</strong></span>.
</p>
<p>
The <span class="command"><strong>dnssec-cds</strong></span> command uses special DNSSEC
validation logic specified by RFC 7344. It requires that the CDS
and/or CDNSKEY records are validly signed by a key represented in the
existing DS records. This will typicially be the pre-existing
key-signing key (KSK).
</p>
<p>
For protection against replay attacks, the signatures on the
child records must not be older than they were on a previous run
+8 -18
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2008-2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
@@ -14,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>
@@ -64,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));
@@ -111,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));
@@ -203,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");
@@ -358,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;
@@ -474,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);
@@ -545,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);
+5 -1
View File
@@ -1,9 +1,12 @@
<!--
- Copyright (C) 2008-2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
@@ -37,6 +40,7 @@
<year>2014</year>
<year>2015</year>
<year>2016</year>
<year>2018</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+9 -19
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2013-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
@@ -14,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>
@@ -69,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));
@@ -116,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));
@@ -178,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");
@@ -296,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;
@@ -403,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);
@@ -456,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);
+5 -1
View File
@@ -1,9 +1,12 @@
<!--
- Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
@@ -34,6 +37,7 @@
<year>2014</year>
<year>2015</year>
<year>2016</year>
<year>2018</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+13 -13
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2007-2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
@@ -15,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>
@@ -143,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;
@@ -344,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));
@@ -362,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]));
@@ -609,9 +606,13 @@ main(int argc, char **argv) {
isc_buffer_init(&buf, filename, sizeof(filename) - 1);
/* associate the key */
ret = dst_key_fromlabel(name, alg, flags, protocol,
rdclass, "pkcs11", label, NULL, mctx, &key);
isc_entropy_stopcallbacksources(ectx);
ret = dst_key_fromlabel(name, alg, flags, protocol, rdclass,
#ifdef PKCS11CRYPTO
"pkcs11",
#else
engine,
#endif
label, NULL, mctx, &key);
if (ret != ISC_R_SUCCESS) {
char namestr[DNS_NAME_FORMATSIZE];
@@ -730,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)
+5 -1
View File
@@ -1,9 +1,12 @@
<!--
- Copyright (C) 2008-2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
@@ -39,6 +42,7 @@
<year>2015</year>
<year>2016</year>
<year>2017</year>
<year>2018</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+10 -10
View File
@@ -1,4 +1,4 @@
.\" Copyright (C) 2000-2005, 2007-2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
.\" Copyright (C) 2000-2005, 2007-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
@@ -66,19 +66,19 @@ must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA51
\fB\-T KEY\fR
option as well\&.
.sp
TSIG keys can also be generated by setting the value to one of HMAC\-MD5, HMAC\-SHA1, HMAC\-SHA224, HMAC\-SHA256, HMAC\-SHA384, or HMAC\-SHA512\&. As with DH, specifying these values will automatically set
\fB\-T KEY\fR\&. Note, however, that
\fBtsig\-keygen\fR
produces TSIG keys in a more useful format\&. These algorithms have been deprecated in
\fBdnssec\-keygen\fR, and will be removed in a future release\&.
.sp
These values are case insensitive\&. In some cases, abbreviations are supported, such as ECDSA256 for ECDSAP256SHA256 and ECDSA384 for ECDSAP384SHA384\&. If RSASHA1 or DSA is specified along with the
\fB\-3\fR
option, then NSEC3RSASHA1 or NSEC3DSA will be used instead\&.
.sp
As of BIND 9\&.12\&.0, this option is mandatory except when using the
This parameter
\fImust\fR
be specified except when using the
\fB\-S\fR
option, which copies the algorithm from the predecessor key\&. Previously, the default for newly generated keys was RSASHA1\&.
option, which copies the algorithm from the predecessor key\&.
.sp
In prior releases, HMAC algorithms could be generated for use as TSIG keys, but that feature has been removed as of BIND 9\&.13\&.0\&. Use
\fBtsig\-keygen\fR
to generate TSIG keys\&.
.RE
.PP
\-b \fIkeysize\fR
@@ -369,5 +369,5 @@ RFC 4034\&.
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2000-2005, 2007-2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
Copyright \(co 2000-2005, 2007-2012, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
.br
+37 -144
View File
@@ -1,11 +1,14 @@
/*
* Portions Copyright (C) 1999-2017 Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Portions Copyright (C) 1995-2000 by Network Associates, Inc.
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*
* Portions Copyright (C) Network Associates, Inc.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -30,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>
@@ -79,10 +81,7 @@ usage(void) {
" | NSEC3DSA |\n");
fprintf(stderr, " RSASHA256 | RSASHA512 | ECCGOST |\n");
fprintf(stderr, " ECDSAP256SHA256 | ECDSAP384SHA384 |\n");
fprintf(stderr, " ED25519 | ED448 | DH |\n");
fprintf(stderr, " HMAC-MD5 | HMAC-SHA1 | HMAC-SHA224 | "
"HMAC-SHA256 | \n");
fprintf(stderr, " HMAC-SHA384 | HMAC-SHA512\n");
fprintf(stderr, " ED25519 | ED448 | DH\n");
fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
fprintf(stderr, " -b <key size in bits>:\n");
fprintf(stderr, " RSAMD5:\t[1024..%d]\n", MAX_RSA);
@@ -99,12 +98,6 @@ usage(void) {
fprintf(stderr, " ECDSAP384SHA384:\tignored\n");
fprintf(stderr, " ED25519:\tignored\n");
fprintf(stderr, " ED448:\tignored\n");
fprintf(stderr, " HMAC-MD5:\t[1..512]\n");
fprintf(stderr, " HMAC-SHA1:\t[1..160]\n");
fprintf(stderr, " HMAC-SHA224:\t[1..224]\n");
fprintf(stderr, " HMAC-SHA256:\t[1..256]\n");
fprintf(stderr, " HMAC-SHA384:\t[1..384]\n");
fprintf(stderr, " HMAC-SHA512:\t[1..512]\n");
fprintf(stderr, " (key size defaults are set according to\n"
" algorithm and usage (ZSK or KSK)\n");
fprintf(stderr, " -n <nametype>: ZONE | HOST | ENTITY | "
@@ -127,7 +120,7 @@ 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, " -r <randomdev>: DEPRECATED and ignored\n");
fprintf(stderr, " -s <strength>: strength value this key signs DNS "
"records with (default: 0)\n");
fprintf(stderr, " -T <rrtype>: DNSKEY | KEY (default: DNSKEY; "
@@ -224,7 +217,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
@@ -371,7 +363,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,
@@ -500,10 +493,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));
@@ -519,8 +509,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]));
@@ -542,8 +531,6 @@ main(int argc, char **argv) {
"\"-a RSAMD5\"\n");
INSIST(freeit == NULL);
return (1);
} else if (strcasecmp(algname, "HMAC-MD5") == 0) {
alg = DST_ALG_HMACMD5;
#else
fprintf(stderr,
"The use of RSA (RSAMD5) was disabled\n");
@@ -553,47 +540,26 @@ main(int argc, char **argv) {
fprintf(stderr, "The use of RSAMD5 was disabled\n");
INSIST(freeit == NULL);
return (1);
} else if (strcasecmp(algname, "HMAC-MD5") == 0) {
fprintf(stderr,
"The use of HMAC-MD5 was disabled\n");
return (1);
#endif
} else if (strcasecmp(algname, "HMAC-SHA1") == 0)
alg = DST_ALG_HMACSHA1;
else if (strcasecmp(algname, "HMAC-SHA224") == 0)
alg = DST_ALG_HMACSHA224;
else if (strcasecmp(algname, "HMAC-SHA256") == 0)
alg = DST_ALG_HMACSHA256;
else if (strcasecmp(algname, "HMAC-SHA384") == 0)
alg = DST_ALG_HMACSHA384;
else if (strcasecmp(algname, "HMAC-SHA512") == 0)
alg = DST_ALG_HMACSHA512;
else {
} else {
r.base = algname;
r.length = strlen(algname);
ret = dns_secalg_fromtext(&alg, &r);
if (ret != ISC_R_SUCCESS)
if (ret != ISC_R_SUCCESS) {
fatal("unknown algorithm %s", algname);
if (alg == DST_ALG_DH)
}
if (alg == DST_ALG_DH) {
options |= DST_TYPE_KEY;
}
}
#ifdef PK11_MD5_DISABLE
INSIST((alg != DNS_KEYALG_RSAMD5) && (alg != DST_ALG_HMACMD5));
INSIST((alg != DNS_KEYALG_RSAMD5));
#endif
if (alg == DST_ALG_HMACMD5 || alg == DST_ALG_HMACSHA1 ||
alg == DST_ALG_HMACSHA224 || alg == DST_ALG_HMACSHA256 ||
alg == DST_ALG_HMACSHA384 || alg == DST_ALG_HMACSHA512)
{
fprintf(stderr,
"Use of dnssec-keygen for HMAC keys is "
"deprecated: use tsig-keygen\n");
}
if (!dst_algorithm_supported(alg))
if (!dst_algorithm_supported(alg)) {
fatal("unsupported algorithm: %d", alg);
}
if (use_nsec3) {
switch (alg) {
@@ -620,20 +586,20 @@ main(int argc, char **argv) {
}
if (type != NULL && (options & DST_TYPE_KEY) != 0) {
if (strcasecmp(type, "NOAUTH") == 0)
if (strcasecmp(type, "NOAUTH") == 0) {
flags |= DNS_KEYTYPE_NOAUTH;
else if (strcasecmp(type, "NOCONF") == 0)
} else if (strcasecmp(type, "NOCONF") == 0) {
flags |= DNS_KEYTYPE_NOCONF;
else if (strcasecmp(type, "NOAUTHCONF") == 0) {
} else if (strcasecmp(type, "NOAUTHCONF") == 0) {
flags |= (DNS_KEYTYPE_NOAUTH |
DNS_KEYTYPE_NOCONF);
if (size < 0)
size = 0;
}
else if (strcasecmp(type, "AUTHCONF") == 0)
} else if (strcasecmp(type, "AUTHCONF") == 0) {
/* nothing */;
else
} else {
fatal("invalid type %s", type);
}
}
if (size < 0) {
@@ -803,78 +769,18 @@ main(int argc, char **argv) {
case DST_ALG_ED448:
size = 456;
break;
case DST_ALG_HMACMD5:
options |= DST_TYPE_KEY;
if (size < 1 || size > 512)
fatal("HMAC-MD5 key size %d out of range", size);
if (dbits != 0 && (dbits < 80 || dbits > 128))
fatal("HMAC-MD5 digest bits %d out of range", dbits);
if ((dbits % 8) != 0)
fatal("HMAC-MD5 digest bits %d not divisible by 8",
dbits);
break;
case DST_ALG_HMACSHA1:
options |= DST_TYPE_KEY;
if (size < 1 || size > 160)
fatal("HMAC-SHA1 key size %d out of range", size);
if (dbits != 0 && (dbits < 80 || dbits > 160))
fatal("HMAC-SHA1 digest bits %d out of range", dbits);
if ((dbits % 8) != 0)
fatal("HMAC-SHA1 digest bits %d not divisible by 8",
dbits);
break;
case DST_ALG_HMACSHA224:
options |= DST_TYPE_KEY;
if (size < 1 || size > 224)
fatal("HMAC-SHA224 key size %d out of range", size);
if (dbits != 0 && (dbits < 112 || dbits > 224))
fatal("HMAC-SHA224 digest bits %d out of range", dbits);
if ((dbits % 8) != 0)
fatal("HMAC-SHA224 digest bits %d not divisible by 8",
dbits);
break;
case DST_ALG_HMACSHA256:
options |= DST_TYPE_KEY;
if (size < 1 || size > 256)
fatal("HMAC-SHA256 key size %d out of range", size);
if (dbits != 0 && (dbits < 128 || dbits > 256))
fatal("HMAC-SHA256 digest bits %d out of range", dbits);
if ((dbits % 8) != 0)
fatal("HMAC-SHA256 digest bits %d not divisible by 8",
dbits);
break;
case DST_ALG_HMACSHA384:
options |= DST_TYPE_KEY;
if (size < 1 || size > 384)
fatal("HMAC-384 key size %d out of range", size);
if (dbits != 0 && (dbits < 192 || dbits > 384))
fatal("HMAC-SHA384 digest bits %d out of range", dbits);
if ((dbits % 8) != 0)
fatal("HMAC-SHA384 digest bits %d not divisible by 8",
dbits);
break;
case DST_ALG_HMACSHA512:
options |= DST_TYPE_KEY;
if (size < 1 || size > 512)
fatal("HMAC-SHA512 key size %d out of range", size);
if (dbits != 0 && (dbits < 256 || dbits > 512))
fatal("HMAC-SHA512 digest bits %d out of range", dbits);
if ((dbits % 8) != 0)
fatal("HMAC-SHA512 digest bits %d not divisible by 8",
dbits);
break;
}
if (alg != DNS_KEYALG_DH && generator != 0)
fatal("specified DH generator for a non-DH key");
if (nametype == NULL) {
if ((options & DST_TYPE_KEY) != 0) /* KEY / HMAC */
if ((options & DST_TYPE_KEY) != 0) /* KEY */
fatal("no nametype specified");
flags |= DNS_KEYOWNER_ZONE; /* DNSKEY */
} else if (strcasecmp(nametype, "zone") == 0)
flags |= DNS_KEYOWNER_ZONE;
else if ((options & DST_TYPE_KEY) != 0) { /* KEY / HMAC */
else if ((options & DST_TYPE_KEY) != 0) { /* KEY */
if (strcasecmp(nametype, "host") == 0 ||
strcasecmp(nametype, "entity") == 0)
flags |= DNS_KEYOWNER_ENTITY;
@@ -890,7 +796,7 @@ main(int argc, char **argv) {
if (directory == NULL)
directory = ".";
if ((options & DST_TYPE_KEY) != 0) /* KEY / HMAC */
if ((options & DST_TYPE_KEY) != 0) /* KEY */
flags |= signatory;
else if ((flags & DNS_KEYOWNER_ZONE) != 0) { /* DNSKEY */
flags |= kskflag;
@@ -911,12 +817,11 @@ main(int argc, char **argv) {
}
if ((flags & DNS_KEYFLAG_OWNERMASK) == DNS_KEYOWNER_ZONE &&
(alg == DNS_KEYALG_DH || alg == DST_ALG_HMACMD5 ||
alg == DST_ALG_HMACSHA1 || alg == DST_ALG_HMACSHA224 ||
alg == DST_ALG_HMACSHA256 || alg == DST_ALG_HMACSHA384 ||
alg == DST_ALG_HMACSHA512))
alg == DNS_KEYALG_DH)
{
fatal("a key with algorithm '%s' cannot be a zone key",
algname);
}
switch(alg) {
case DNS_KEYALG_RSAMD5:
@@ -939,15 +844,6 @@ main(int argc, char **argv) {
case DST_ALG_ED25519:
case DST_ALG_ED448:
show_progress = ISC_TRUE;
/* fall through */
case DST_ALG_HMACMD5:
case DST_ALG_HMACSHA1:
case DST_ALG_HMACSHA224:
case DST_ALG_HMACSHA256:
case DST_ALG_HMACSHA384:
case DST_ALG_HMACSHA512:
param = 0;
break;
}
@@ -961,19 +857,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];
@@ -1126,7 +1020,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)
+14 -15
View File
@@ -1,9 +1,12 @@
<!--
- Copyright (C) 2000-2005, 2007-2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
@@ -46,6 +49,7 @@
<year>2015</year>
<year>2016</year>
<year>2017</year>
<year>2018</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
@@ -126,16 +130,6 @@
his value will automatically set the <option>-T KEY</option>
option as well.
</para>
<para>
TSIG keys can also be generated by setting the value to
one of HMAC-MD5, HMAC-SHA1, HMAC-SHA224, HMAC-SHA256,
HMAC-SHA384, or HMAC-SHA512. As with DH, specifying these
values will automatically set <option>-T KEY</option>. Note,
however, that <command>tsig-keygen</command> produces TSIG keys
in a more useful format. These algorithms have been deprecated
in <command>dnssec-keygen</command>, and will be removed in a
future release.
</para>
<para>
These values are case insensitive. In some cases, abbreviations
are supported, such as ECDSA256 for ECDSAP256SHA256 and
@@ -144,10 +138,15 @@
or NSEC3DSA will be used instead.
</para>
<para>
As of BIND 9.12.0, this option is mandatory except when using
the <option>-S</option> option, which copies the algorithm from
the predecessor key. Previously, the default for newly
generated keys was RSASHA1.
This parameter <emphasis>must</emphasis> be specified except
when using the <option>-S</option> option, which copies the
algorithm from the predecessor key.
</para>
<para>
In prior releases, HMAC algorithms could be generated for
use as TSIG keys, but that feature has been removed as of
BIND 9.13.0. Use <command>tsig-keygen</command> to generate
TSIG keys.
</para>
</listitem>
</varlistentry>
+10 -15
View File
@@ -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-2005, 2007-2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) 2000-2005, 2007-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
@@ -107,16 +107,6 @@
his value will automatically set the <code class="option">-T KEY</code>
option as well.
</p>
<p>
TSIG keys can also be generated by setting the value to
one of HMAC-MD5, HMAC-SHA1, HMAC-SHA224, HMAC-SHA256,
HMAC-SHA384, or HMAC-SHA512. As with DH, specifying these
values will automatically set <code class="option">-T KEY</code>. Note,
however, that <span class="command"><strong>tsig-keygen</strong></span> produces TSIG keys
in a more useful format. These algorithms have been deprecated
in <span class="command"><strong>dnssec-keygen</strong></span>, and will be removed in a
future release.
</p>
<p>
These values are case insensitive. In some cases, abbreviations
are supported, such as ECDSA256 for ECDSAP256SHA256 and
@@ -125,10 +115,15 @@
or NSEC3DSA will be used instead.
</p>
<p>
As of BIND 9.12.0, this option is mandatory except when using
the <code class="option">-S</code> option, which copies the algorithm from
the predecessor key. Previously, the default for newly
generated keys was RSASHA1.
This parameter <span class="emphasis"><em>must</em></span> be specified except
when using the <code class="option">-S</code> option, which copies the
algorithm from the predecessor key.
</p>
<p>
In prior releases, HMAC algorithms could be generated for
use as TSIG keys, but that feature has been removed as of
BIND 9.13.0. Use <span class="command"><strong>tsig-keygen</strong></span> to generate
TSIG keys.
</p>
</dd>
<dt><span class="term">-b <em class="replaceable"><code>keysize</code></em></span></dt>
+5 -13
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2009-2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
@@ -15,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>
@@ -84,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;
@@ -177,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,
@@ -268,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)
+5 -1
View File
@@ -1,9 +1,12 @@
<!--
- Copyright (C) 2009, 2011, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
@@ -34,6 +37,7 @@
<year>2014</year>
<year>2015</year>
<year>2016</year>
<year>2018</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+5 -13
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2009-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
@@ -17,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>
@@ -136,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;
@@ -375,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;
@@ -669,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);
+5 -1
View File
@@ -1,9 +1,12 @@
<!--
- Copyright (C) 2009-2011, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
@@ -36,6 +39,7 @@
<year>2015</year>
<year>2016</year>
<year>2017</year>
<year>2018</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+50 -77
View File
@@ -1,11 +1,14 @@
/*
* Portions Copyright (C) 1999-2017 Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Portions Copyright (C) 1995-2000 by Network Associates, Inc.
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*
* Portions Copyright (C) Network Associates, Inc.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -31,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>
@@ -127,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;
@@ -279,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));
@@ -292,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 {
@@ -453,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 {
@@ -846,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)
@@ -902,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);
}
@@ -1233,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);
@@ -1403,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);
@@ -1454,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) {
@@ -1489,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))
@@ -1733,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;
@@ -2148,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);
@@ -2209,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;
@@ -2456,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",
@@ -2467,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));
@@ -2513,11 +2503,11 @@ loadzonekeys(isc_boolean_t preserve_keys, isc_boolean_t load_public) {
goto cleanup;
if (set_keyttl && keyttl != rdataset.ttl) {
fprintf(stderr, "User-specified TTL %d conflicts "
fprintf(stderr, "User-specified TTL %u conflicts "
"with existing DNSKEY RRset TTL.\n",
keyttl);
fprintf(stderr, "Imported keys will use the RRSet "
"TTL %d instead.\n",
"TTL %u instead.\n",
rdataset.ttl);
}
keyttl = rdataset.ttl;
@@ -2633,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;
}
@@ -2805,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);
@@ -2895,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);
@@ -2982,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);
@@ -3079,8 +3068,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");
@@ -3128,12 +3115,12 @@ print_stats(isc_time_t *timer_start, isc_time_t *timer_finish,
isc_uint64_t sig_ms; /* Signatures per millisecond */
FILE *out = output_stdout ? stderr : stdout;
fprintf(out, "Signatures generated: %10d\n", nsigned);
fprintf(out, "Signatures retained: %10d\n", nretained);
fprintf(out, "Signatures dropped: %10d\n", ndropped);
fprintf(out, "Signatures successfully verified: %10d\n", nverified);
fprintf(out, "Signatures generated: %10u\n", nsigned);
fprintf(out, "Signatures retained: %10u\n", nretained);
fprintf(out, "Signatures dropped: %10u\n", ndropped);
fprintf(out, "Signatures successfully verified: %10u\n", nverified);
fprintf(out, "Signatures unsuccessfully "
"verified: %10d\n", nverifyfailed);
"verified: %10u\n", nverifyfailed);
time_us = isc_time_microdiff(sign_finish, sign_start);
time_ms = time_us / 1000;
@@ -3170,13 +3157,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;
@@ -3361,8 +3346,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)");
@@ -3406,7 +3390,7 @@ main(int argc, char *argv[]) {
break;
case 'p':
pseudorandom = ISC_TRUE;
fatal("The -p option has been deprecated.\n");
break;
case 'Q':
@@ -3418,7 +3402,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':
@@ -3494,21 +3478,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) {
@@ -3634,8 +3608,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;
@@ -3646,8 +3620,8 @@ main(int argc, char *argv[]) {
get_soa_ttls();
if (set_maxttl && set_keyttl && keyttl > maxttl) {
fprintf(stderr, "%s: warning: Specified key TTL %d "
"exceeds maximum zone TTL; reducing to %d\n",
fprintf(stderr, "%s: warning: Specified key TTL %u "
"exceeds maximum zone TTL; reducing to %u\n",
program, keyttl, maxttl);
keyttl = maxttl;
}
@@ -3742,6 +3716,8 @@ main(int argc, char *argv[]) {
if (nsec3iter > max)
fatal("NSEC3 iterations too big for weakest DNSKEY "
"strength. Maximum iterations allowed %u.", max);
} else {
hashlist_init(&hashlist, 0, 0); /* silence clang */
}
gversion = NULL;
@@ -3877,9 +3853,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");
}
@@ -3903,8 +3879,7 @@ main(int argc, char *argv[]) {
dns_db_closeversion(gdb, &gversion, ISC_FALSE);
dns_db_detach(&gdb);
if (IS_NSEC3)
hashlist_free(&hashlist);
hashlist_free(&hashlist);
while (!ISC_LIST_EMPTY(keylist)) {
key = ISC_LIST_HEAD(keylist);
@@ -3921,9 +3896,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);
+5 -1
View File
@@ -1,9 +1,12 @@
<!--
- Copyright (C) 2000-2009, 2011-2017 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
@@ -46,6 +49,7 @@
<year>2015</year>
<year>2016</year>
<year>2017</year>
<year>2018</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+7 -16
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
@@ -16,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>
@@ -70,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 */
@@ -94,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",
@@ -105,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:
@@ -275,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);
@@ -337,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);
+5 -1
View File
@@ -1,9 +1,12 @@
<!--
- Copyright (C) 2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
@@ -33,6 +36,7 @@
<year>2014</year>
<year>2015</year>
<year>2016</year>
<year>2018</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
+19 -88
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2000, 2001, 2003-2005, 2007, 2009-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
@@ -24,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>
@@ -70,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
@@ -209,69 +202,14 @@ cleanup_logging(isc_log_t **logp) {
REQUIRE(logp != NULL);
log = *logp;
*logp = NULL;
if (log == NULL)
return;
isc_log_destroy(&log);
isc_log_setcontext(NULL);
dns_log_setcontext(NULL);
logp = 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
@@ -501,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;
@@ -510,19 +449,11 @@ key_collision(dst_key_t *dstkey, dns_name_t *name, const char *dir,
alg = dst_key_alg(dstkey);
/*
* For HMAC and Diffie Hellman just check if there is a
* direct collision as they can't be revoked. Additionally
* dns_dnssec_findmatchingkeys only handles DNSKEY which is
* not used for HMAC.
* For Diffie Hellman just check if there is a direct collision as
* they can't be revoked. Additionally dns_dnssec_findmatchingkeys
* only handles DNSKEY which is not used for HMAC.
*/
switch (alg) {
case DST_ALG_HMACMD5:
case DST_ALG_HMACSHA1:
case DST_ALG_HMACSHA224:
case DST_ALG_HMACSHA256:
case DST_ALG_HMACSHA384:
case DST_ALG_HMACSHA512:
case DST_ALG_DH:
if (alg == DST_ALG_DH) {
isc_buffer_init(&fileb, filename, sizeof(filename));
result = dst_key_buildfilename(dstkey, DST_TYPE_PRIVATE,
dir, &fileb);
@@ -532,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);
@@ -627,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);
}
@@ -1717,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);
+4 -7
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2000, 2001, 2003, 2004, 2007-2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/* $Id: dnssectool.h,v 1.33 2011/10/20 23:46:51 tbox Exp $ */
@@ -53,12 +56,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
+4 -1
View File
@@ -1,8 +1,11 @@
# Copyright (C) 1998-2002, 2004-2017 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
srcdir = @srcdir@
VPATH = @srcdir@
+4 -1
View File
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (C) 2006-2009, 2012-2017 Internet Systems Consortium, Inc. ("ISC")
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
+4 -1
View File
@@ -5,11 +5,14 @@
static char xslmsg[] =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!--\n"
" - Copyright (C) 2006-2009, 2012-2017 Internet Systems Consortium, Inc. (\"ISC\")\n"
" - Copyright (C) Internet Systems Consortium, Inc. (\"ISC\")\n"
" -\n"
" - This Source Code Form is subject to the terms of the Mozilla Public\n"
" - License, v. 2.0. If a copy of the MPL was not distributed with this\n"
" - file, You can obtain one at http://mozilla.org/MPL/2.0/.\n"
" -\n"
" - See the COPYRIGHT file distributed with this work for additional\n"
" - information regarding copyright ownership.\n"
"-->\n"
"\n"
"<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns=\"http://www.w3.org/1999/xhtml\" version=\"1.0\">\n"
+4 -1
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2001-2005, 2007, 2009-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/* $Id: builtin.c,v 1.26 2012/01/21 19:44:18 each Exp $ */
+19 -14
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2001-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
@@ -85,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\
@@ -192,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\
@@ -244,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\
@@ -422,18 +422,23 @@ named_config_getzonetype(const cfg_obj_t *zonetypeobj) {
const char *str;
str = cfg_obj_asstring(zonetypeobj);
if (strcasecmp(str, "master") == 0)
if (strcasecmp(str, "primary") == 0 ||
strcasecmp(str, "master") == 0)
{
ztype = dns_zone_master;
else if (strcasecmp(str, "slave") == 0)
} else if (strcasecmp(str, "secondary") == 0 ||
strcasecmp(str, "slave") == 0)
{
ztype = dns_zone_slave;
else if (strcasecmp(str, "stub") == 0)
} else if (strcasecmp(str, "stub") == 0) {
ztype = dns_zone_stub;
else if (strcasecmp(str, "static-stub") == 0)
} else if (strcasecmp(str, "static-stub") == 0) {
ztype = dns_zone_staticstub;
else if (strcasecmp(str, "redirect") == 0)
} else if (strcasecmp(str, "redirect") == 0) {
ztype = dns_zone_redirect;
else
} else {
INSIST(0);
}
return (ztype);
}
+6 -2
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2001-2007, 2009-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/* $Id: control.c,v 1.49 2012/01/31 23:47:31 tbox Exp $ */
@@ -114,7 +117,8 @@ named_control_docommand(isccc_sexpr_t *message, isc_boolean_t readonly,
/*
* Compare the 'command' parameter against all known control commands.
*/
if (command_compare(command, NAMED_COMMAND_NULL) ||
if ((command_compare(command, NAMED_COMMAND_NULL) &&
strlen(cmdline) == 4) ||
command_compare(command, NAMED_COMMAND_STATUS))
{
log_level = ISC_LOG_DEBUG(1);
+7 -6
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2001-2008, 2011-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
@@ -227,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);
@@ -322,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;
@@ -344,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;
@@ -456,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
+4 -1
View File
@@ -1,10 +1,13 @@
#!/usr/bin/env perl
#
# Copyright (C) 2006-2008, 2012, 2014, 2016 Internet Systems Consortium, Inc. ("ISC")
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# 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 $
+4 -1
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2016, 2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#include "config.h"
+4 -1
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2013, 2014, 2016, 2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
+4 -1
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2011, 2016 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/* $Id: dlz_dlopen_driver.h,v 1.4 2011/03/17 09:25:53 fdupont Exp $ */
+4 -1
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2001, 2004, 2005, 2007, 2016, 2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#ifndef NAMED_BUILTIN_H
+4 -1
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2001, 2002, 2004-2007, 2009, 2013, 2016, 2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/* $Id: config.h,v 1.16 2009/06/11 23:47:55 tbox Exp $ */
+4 -1
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2001-2007, 2009-2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#ifndef NAMED_CONTROL_H
+4 -1
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2016, 2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#include <isc/fuzz.h>
+4 -1
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2013, 2016, 2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#ifndef _GEOIP_H
+4 -3
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 1999-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#ifndef NAMED_GLOBALS_H
@@ -45,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
+4 -1
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 1999-2002, 2004, 2005, 2007, 2009, 2015-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#ifndef NAMED_LOG_H
+4 -1
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 1999-2001, 2004-2007, 2016, 2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/* $Id: logconf.h,v 1.17 2007/06/19 23:46:59 tbox Exp $ */
+4 -1
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 1999-2002, 2004, 2005, 2007, 2009, 2013, 2015-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#ifndef NAMED_MAIN_H
-245
View File
@@ -1,245 +0,0 @@
/*
* Copyright (C) 2014, 2016, 2017 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
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef NAMED_SECCOMP_H
#define NAMED_SECCOMP_H 1
/*! \file */
#ifdef HAVE_LIBSECCOMP
#include <sys/types.h>
#include <sys/resource.h>
#include <unistd.h>
#include <seccomp.h>
#include <isc/platform.h>
/*%
* For each architecture, the scmp_syscalls and
* scmp_syscall_names arrays MUST be kept in sync.
*/
#ifdef __x86_64__
int scmp_syscalls[] = {
SCMP_SYS(access),
SCMP_SYS(open),
SCMP_SYS(openat),
SCMP_SYS(lseek),
SCMP_SYS(clock_gettime),
SCMP_SYS(time),
SCMP_SYS(read),
SCMP_SYS(write),
SCMP_SYS(close),
SCMP_SYS(brk),
SCMP_SYS(poll),
SCMP_SYS(select),
SCMP_SYS(madvise),
SCMP_SYS(mmap),
SCMP_SYS(munmap),
SCMP_SYS(exit_group),
SCMP_SYS(rt_sigprocmask),
SCMP_SYS(rt_sigaction),
SCMP_SYS(fsync),
SCMP_SYS(rt_sigreturn),
SCMP_SYS(setsid),
SCMP_SYS(chdir),
SCMP_SYS(futex),
SCMP_SYS(stat),
SCMP_SYS(rt_sigsuspend),
SCMP_SYS(fstat),
SCMP_SYS(epoll_ctl),
SCMP_SYS(gettimeofday),
SCMP_SYS(getpid),
#ifdef HAVE_GETRANDOM
SCMP_SYS(getrandom),
#endif
SCMP_SYS(rename),
SCMP_SYS(unlink),
SCMP_SYS(socket),
SCMP_SYS(sendto),
#ifndef ISC_PLATFORM_USETHREADS
SCMP_SYS(bind),
SCMP_SYS(accept),
SCMP_SYS(connect),
SCMP_SYS(listen),
SCMP_SYS(fcntl),
SCMP_SYS(sendmsg),
SCMP_SYS(recvmsg),
SCMP_SYS(uname),
SCMP_SYS(setrlimit),
SCMP_SYS(getrlimit),
SCMP_SYS(setsockopt),
SCMP_SYS(getsockopt),
SCMP_SYS(getsockname),
SCMP_SYS(lstat),
SCMP_SYS(getgid),
SCMP_SYS(getegid),
SCMP_SYS(getuid),
SCMP_SYS(geteuid),
SCMP_SYS(setresgid),
SCMP_SYS(setresuid),
SCMP_SYS(setgid),
SCMP_SYS(setuid),
SCMP_SYS(prctl),
SCMP_SYS(epoll_wait),
SCMP_SYS(getdents),
SCMP_SYS(utimes),
SCMP_SYS(dup),
#endif
};
const char *scmp_syscall_names[] = {
"access",
"open",
"openat",
"lseek",
"clock_gettime",
"time",
"read",
"write",
"close",
"brk",
"poll",
"select",
"madvise",
"mmap",
"munmap",
"exit_group",
"rt_sigprocmask",
"rt_sigaction",
"fsync",
"rt_sigreturn",
"setsid",
"chdir",
"futex",
"stat",
"rt_sigsuspend",
"fstat",
"epoll_ctl",
"gettimeofday",
"getpid",
#ifdef HAVE_GETRANDOM
"getrandom",
#endif
"rename",
"unlink",
"socket",
"sendto",
#ifndef ISC_PLATFORM_USETHREADS
"bind",
"accept",
"connect",
"listen",
"fcntl",
"sendmsg",
"recvmsg",
"uname",
"setrlimit",
"getrlimit",
"setsockopt",
"getsockopt",
"getsockname",
"lstat",
"getgid",
"getegid",
"getuid",
"geteuid",
"setresgid",
"setresuid",
"setgid",
"setuid",
"prctl",
"epoll_wait",
"getdents",
"utimes",
"dup",
#endif
};
#endif /* __x86_64__ */
#ifdef __i386__
int scmp_syscalls[] = {
SCMP_SYS(access),
SCMP_SYS(open),
SCMP_SYS(clock_gettime),
SCMP_SYS(time),
SCMP_SYS(read),
SCMP_SYS(write),
SCMP_SYS(close),
SCMP_SYS(brk),
SCMP_SYS(poll),
SCMP_SYS(_newselect),
SCMP_SYS(select),
SCMP_SYS(madvise),
SCMP_SYS(mmap2),
SCMP_SYS(mmap),
SCMP_SYS(munmap),
SCMP_SYS(exit_group),
SCMP_SYS(rt_sigprocmask),
SCMP_SYS(sigprocmask),
SCMP_SYS(rt_sigaction),
SCMP_SYS(socketcall),
SCMP_SYS(fsync),
SCMP_SYS(sigreturn),
SCMP_SYS(setsid),
SCMP_SYS(chdir),
SCMP_SYS(futex),
SCMP_SYS(stat64),
SCMP_SYS(rt_sigsuspend),
SCMP_SYS(fstat64),
SCMP_SYS(epoll_ctl),
SCMP_SYS(gettimeofday),
SCMP_SYS(getpid),
#ifdef HAVE_GETRANDOM
SCMP_SYS(getrandom),
#endif
SCMP_SYS(unlink),
#ifndef ISC_PLATFORM_USETHREADS
SCMP_SYS(fcntl64),
#endif
};
const char *scmp_syscall_names[] = {
"access",
"open",
"clock_gettime",
"time",
"read",
"write",
"close",
"brk",
"poll",
"_newselect",
"select",
"madvise",
"mmap2",
"mmap",
"munmap",
"exit_group",
"rt_sigprocmask",
"sigprocmask",
"rt_sigaction",
"socketcall",
"fsync",
"sigreturn",
"setsid",
"chdir",
"futex",
"stat64",
"rt_sigsuspend",
"fstat64",
"epoll_ctl",
"gettimeofday",
"getpid",
#ifdef HAVE_GETRANDOM
"getrandom",
#endif
"unlink",
#ifndef ISC_PLATFORM_USETHREADS
"fcntl64",
#endif
};
#endif /* __i386__ */
#endif /* HAVE_LIBSECCOMP */
#endif /* NAMED_SECCOMP_H */
+4 -1
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 1999-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#ifndef NAMED_SERVER_H
+4 -1
View File
@@ -1,9 +1,12 @@
/*
* Copyright (C) 2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#ifndef NAMED_SMF_GLOBALS_H

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