Compare commits

..
Author SHA1 Message Date
Evan Hunt 0442ad4a59 remove ISC_NET_RECVOVERFLOW, as it appears to be unused 2018-05-14 19:29:57 -07:00
Ondřej Surý ee83b59e5e Merge branch '9-remove-dolar-ids-and-other-cruft' into 'master'
Remove $Id$s and other cruft in a batch

See merge request isc-projects/bind9!263
2018-05-11 08:18:32 -04:00
Ondřej Surý 55a10b7acd Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
Ondřej Surý 93f2d25a9a Merge branch 'redirect-stderr-to-dev-null' into 'master'
Use 2>/dev/null instead of '>&-'

See merge request isc-projects/bind9!262
2018-05-11 07:10:42 -04:00
Ondřej Surý 3f66b8acb0 Update tests to not use '>&-' that closes file descriptor, but instead use correct redirection to '>/dev/null' 2018-05-11 12:44:27 +02:00
Michał Kępień 0ea363746e Merge branch '239-don-t-use-null-as-a-argument-to-a-varargs-function-as-it-may-not-be-promoted-properly' into 'master'
Resolve "don't use NULL as a argument to a varargs function as it may not be promoted properly"

Closes #239

See merge request isc-projects/bind9!228
2018-05-11 02:20:43 -04:00
Mark AndrewsandMichał Kępień 6aae115d15 silence cppcheck portability warning 2018-05-11 08:12:17 +02:00
Mark Andrews 53fbf143db Merge branch '248-named-9-12-uses-too-much-memory-with-tuning-large-regression-vs-9-11' into 'master'
Resolve "named 9.12 uses too much memory with `--tuning=large` (regression vs. 9.11)"

Closes #248

See merge request isc-projects/bind9!251
2018-05-10 21:27:10 -04:00
Mark Andrews 30e58374a3 add CHANGES note 2018-05-11 11:17:48 +10:00
Mukund SivaramanandMark Andrews 3adcc033f6 Don't keep around debuglist structs when done 2018-05-11 11:17:14 +10:00
Mukund SivaramanandMark Andrews b9886abd86 Reduce number of buckets in tracklines debuglink table
With 1044 res contexts, each with 65536 debuglink structs of 16 bytes
each, the debuglink table itself was consuming 1GB+ of memory.
2018-05-11 11:17:14 +10:00
Mark Andrews 56f17ab3d0 Merge branch '196-clang-scan-build-reporting-possible-null-pointer-dereferences' into 'master'
Resolve "clang scan-build reporting possible null pointer dereferences"

Closes #196

See merge request isc-projects/bind9!230
2018-05-10 21:02:50 -04:00
Mark Andrews 92e540df1e Silence clang static analyzer warnings; Consolidate multiple instances of splitting of batchline in dig into a single function. 2018-05-11 10:54:21 +10:00
Michał Kępień 770235900e Merge branch '249-address-gcc-8-compilation-warnings' into 'master'
Address GCC 8 compilation warnings

Closes #249

See merge request isc-projects/bind9!252
2018-05-10 04:51:23 -04:00
Ondřej SurýandMichał Kępień 9845c4c4a7 Address GCC 8 -Wstringop-truncation warning 2018-05-10 10:35:01 +02:00
Michał Kępień 172d0c401e Address GCC 8 -Wformat-truncation warnings 2018-05-10 10:35:01 +02:00
Michał Kępień e93a950b70 Merge branch 'refactor-update-sigs' into 'master'
Refactor update_sigs()

See merge request isc-projects/bind9!10
2018-05-10 03:54:53 -04:00
Michał Kępień 65975a3b5f Add CHANGES entry
4940.	[cleanup]	Extract the loop in dns__zone_updatesigs() into
			separate functions to improve code readability.
			[GL #135]
2018-05-10 09:43:38 +02:00
Michał Kępień 0ee14aa594 Use a while loop instead of a for loop in dns__zone_updatesigs()
Replace the outer for loop with a while loop to emphasize it keeps
processing the first element of diff->tuples, which changes on each
iteration due to tuples being removed from diff->tuples by
move_matching_tuples().
2018-05-10 09:43:38 +02:00
Michał Kępień 15afdf94ef Remove redundant assertions
The ENSURE assertion at the end of dns_diff_appendminimal() is not
needed because it is placed right after code which resets *tuplep to
NULL if it is not NULL already.

The INSIST assertion in move_matching_tuples() checks the same pointer
again.
2018-05-10 09:43:38 +02:00
Michał Kępień 1bd5f61c60 Look for the next matching tuple in a separate function
Extract the portion of the do-while loop responsible for finding the
next tuple with the same name and type into a separate function to
improve code clarity.
2018-05-10 09:43:38 +02:00
Michał Kępień 31cdf770a4 Extract the do-while loop in dns__zone_updatesigs() into a separate function
The do-while loop in dns__zone_updatesigs() is hard to follow due to
heavy nesting and the 'tuple' variable also being used in the outer for
loop.  Add a comment to explain the purpose of the do-while loop.
Extract it into a separate function to decrease indentation and prevent
using 'tuple' in two different loops.
2018-05-10 09:43:38 +02:00
Ondřej Surý 3c40aa004a Merge branch 'gitlab-ci-amd64' into 'master'
Tag docker images with appropriate architectures

See merge request isc-projects/bind9!254
2018-05-10 03:21:08 -04:00
Ondřej SurýandOndřej Surý ab112d2c4f Tag docker images with appropriate architectures 2018-05-10 02:57:23 -04:00
Evan Hunt e07f78d76e Merge branch '135-add-basic-unit-tests-for-update_sigs' into 'master'
Add basic unit tests for update_sigs()

Closes #135

See merge request isc-projects/bind9!112
2018-05-09 22:10:47 -04:00
Michał Kępień 4885809eb9 Add CHANGES entry
4939.	[test]		Add basic unit tests for update_sigs(). [GL #135]
2018-05-09 13:32:11 +02:00
Michał Kępień 8b9d2c27b4 Define basic test cases for dns__zone_updatesigs()
Add some basic test cases ensuring dns__zone_updatesigs() behaves as
expected.
2018-05-09 13:32:11 +02:00
Michał Kępień 1f10186476 Add a framework for dns__zone_updatesigs() unit tests
Add a new ATF test, sigs_test, containing everything required to start
defining test cases for dns__zone_updatesigs().  The framework is
written in a way which ensures that changes to zone database applied by
any dns__zone_updatesigs() invocation are preserved between subsequent
checks.
2018-05-09 13:32:09 +02:00
Michał Kępień d7143986b1 Move find_zone_keys() to lib/dns/zone_p.h
Rename find_zone_keys() to dns__zone_findkeys() and move it to
lib/dns/zone_p.h, so that it can be used in unit tests.  Add a comment
describing the purpose of this function.
2018-05-09 13:21:02 +02:00
Michał Kępień b1947cee82 Move update_sigs() to lib/dns/zone_p.h
Rename update_sigs() to dns__zone_updatesigs() and move it to
lib/dns/zone_p.h, so that it can be unit tested.  Add a comment
describing the purpose of this function.
2018-05-09 13:21:02 +02:00
Michał Kępień ace465a9f9 Move zonediff_t to lib/dns/zone_p.h
Rename zonediff_t to dns__zonediff_t and move it to lib/dns/zone_p.h, so
that unit tests can be written for functions taking pointers to
structures of this type as arguments.
2018-05-09 13:21:02 +02:00
Michał Kępień c1bc3be806 Add lib/dns/zone_p.h
Add a new private header file, lib/dns/zone_p.h, which will hold type
definitions and function prototypes not meant to be exported by libdns,
but required by zone-related unit tests.
2018-05-09 13:21:02 +02:00
Michał Kępień 3c22af0d35 Add a helper function to facilitate preparing dns_diff_t structures
Implement dns_test_difffromchanges(), a function which enables preparing
a dns_diff_t structure from a mostly-textual representation of zone
database changes to be applied.  This will improve readability of test
case definitions by allowing contents of a dns_diff_t structure, passed
e.g. to update_sigs(), to be represented in a human-friendly manner.
2018-05-09 13:21:01 +02:00
Michał Kępień 2980cbd55f Rename dns_test_rdata_fromstring() to dns_test_rdatafromstring()
Remove the underscore from "rdata_fromstring" so that all helper
functions for libdns tests use a common naming covention.
2018-05-09 13:14:24 +02:00
Michał Kępień bfbeef3609 Rework dns_test_makezone()
The dns_test_makezone() helper function always assigns the created zone
to some view, which is not always necessary and complicates cleanup of
non-managed zones as they are required not to be assigned to any view.

Rework dns_test_makezone() in order to make it easier to use in unit
tests operating on non-managed zones.  Use dns_name_fromstring() instead
of dns_name_fromtext() to simplify code.  Do not use the CHECK() macro
and add comments to make code flow simpler to follow.  Use
dns_test_makeview() instead of dns_view_create().

Adjust existing unit tests using this function so that they still pass.
2018-05-08 12:26:53 +02:00
Michał Kępień dc1ac23b9f Merge branch 'use-clang-6.0' into 'master'
Use clang 6.0 in clang CI jobs

See merge request isc-projects/bind9!250
2018-05-08 04:46:59 -04:00
Michał Kępień 7e650ebee4 Use clang 6.0 in clang CI jobs 2018-05-08 10:36:52 +02:00
Evan Hunt f0d3fe5d95 Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!248
2018-05-04 20:51:14 -04:00
Evan Hunt a27b1d4d32 placeholder 2018-05-04 17:50:17 -07:00
Ondřej Surý 63c3a6444b Merge branch '219-new-coverity-warnings' into 'master'
Resolve "New Coverity Warnings"

Closes #219

See merge request isc-projects/bind9!225
2018-05-03 11:18:28 -04:00
Mark AndrewsandOndřej Surý 5613c3441f if _headers is NULL don't process If-Modified-Since 2018-05-03 11:08:59 -04:00
Mark AndrewsandOndřej Surý 8801c65a4b insist option != NULL and initalise last to NULL 2018-05-03 11:08:59 -04:00
Mark AndrewsandOndřej Surý 7f2863196f check that order is non NULL before calling strtok_r 2018-05-03 11:08:59 -04:00
Ondřej Surý cd8245077c Merge branch '236-silence-cppcheck-issues-in-lib-dns-dst_parse-c' into 'master'
Resolve "silence cppcheck issues in lib/dns/dst_parse.c"

Closes #236

See merge request isc-projects/bind9!223
2018-05-03 11:03:35 -04:00
Mark AndrewsandOndřej Surý 22fab3199f simplify mask construction 2018-05-03 10:56:32 -04:00
Ondřej Surý 08050d6524 Merge branch '234-add-prerequisite-check-to-rootkeysentinel-for-dnssec-support' into 'master'
Resolve "add prerequisite check to rootkeysentinel for dnssec support"

Closes #234

See merge request isc-projects/bind9!222
2018-05-03 10:36:20 -04:00
Mark AndrewsandOndřej Surý 0fedfcafb5 add bin/tests/system/rootkeysentinel/prereq.sh 2018-05-03 10:27:50 -04:00
Mark AndrewsandOndřej Surý e713f83064 add dnssec prerequisite test to rootkeysentinel 2018-05-03 10:27:50 -04:00
Ondřej Surý 65320aa38d Merge branch '191-remove-openssl-0.9.x-support' into 'master'
Remove OpenSSL 0.9.x support

Closes #191

See merge request isc-projects/bind9!175
2018-05-03 10:20:56 -04:00
Ondřej Surý f10e43ac94 Add CHANGES entries
4937.   [func]          Remove support for OpenSSL < 1.0.0 [GL #191]
2018-05-03 16:00:37 +02:00
Ondřej Surý ea95e83f5c Add release notes about removed support for OpenSSL 0.9.x 2018-05-03 15:55:45 +02:00
Ondřej Surý 61da2bf028 Remove support for OpenSSL < 1.0.0 2018-05-03 15:55:39 +02:00
Ondřej Surý 16e352248d Merge branch '191-misc-improvements' into 'master'
Miscelaneous improvements found when working on #191

See merge request isc-projects/bind9!236
2018-05-03 09:52:33 -04:00
Ondřej Surý 8d648e7a8a Use standard OPENSSL_NO_ENGINE instead of custom USE_ENGINE define 2018-05-03 15:32:43 +02:00
Ondřej Surý 8bf192b4d1 Use BN_hex2bn instead of custom BN_fromhex function 2018-05-03 15:22:15 +02:00
Ondřej Surý 35d2dbb9f5 Fix extra ] in configure.in 2018-05-03 15:22:15 +02:00
Ondřej Surý f1722ff512 Merge branch '165-always-use-crypto-provider-for-random-data' into 'master'
Always use OpenSSL or PKCS#11 random data providers

Closes #165

See merge request isc-projects/bind9!208
2018-05-03 09:13:00 -04:00
Ondřej Surý 115fbc3540 Add CHANGES entries
4936.   [func]          Always use OpenSSL or PKCS#11 random data providers and
                        remove the configure option --{enable,disable}-crypto-rand.
                        [GL #165]
2018-05-03 15:03:46 +02:00
Evan HuntandOndřej Surý 0795dceda7 remove dangling references to --enable-crypto-rand in doc and comments 2018-05-03 15:03:46 +02:00
Ondřej Surý 9a3a257374 Always use random data from the crypto provider 2018-05-03 15:03:46 +02:00
Ondřej Surý 6a49d41c5b Merge branch 'random-test-improvement' into 'master'
Improve random_test to also test the high bound of the confidence interval

See merge request isc-projects/bind9!210
2018-05-03 09:02:09 -04:00
Ondřej SurýandOndřej Surý 8d3220643c Also test the higher part of the confidence interval 2018-05-03 08:30:31 -04:00
Ondřej Surý 9d1e9ce4bd Merge branch '191-add-LibreSSL-2.7-support' into 'master'
Add LibreSSL 2.7.0 support

Closes #210

See merge request isc-projects/bind9!233
2018-05-03 08:25:40 -04:00
Ondřej Surý 30488dddf0 Add CHANGES entry
4935.   [func]          Add support for LibreSSL >= 2.7.0 (some OpenSSL 1.1.0
                        call were added). [GL #191]
2018-05-03 14:17:17 +02:00
Ondřej Surý 6b9e3b7b06 Workaround LibreSSL 2.7.0-2.7.2 quirk in DH_set0_key 2018-05-03 14:13:32 +02:00
Ondřej Surý 29ff62a149 Add support for LibreSSL 2.7 2018-05-03 14:13:20 +02:00
Evan Hunt f9f09069a8 Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!229
2018-05-01 21:04:13 -04:00
Evan Hunt f78bfda4b8 placeholder 2018-05-01 16:14:23 -07:00
Evan Hunt 16dea1c577 Merge branch '208-dig-doc' into 'master'
Resolve "Added -t TYPEnn description to dig"

Closes #208

See merge request isc-projects/bind9!221
2018-04-27 02:24:07 -04:00
Paul HoffmanandEvan Hunt 2d957c6b9f add -t type### description to the dig man page 2018-04-27 02:16:51 -04:00
Evan Hunt 9212a1b401 Merge branch 'date-test-error' into 'master'
Fix a testing error when using python3 on certain dates

See merge request isc-projects/bind9!220
2018-04-27 02:12:46 -04:00
Evan Hunt 30b988f09a Fix a testing error when using python3 on certain dates
Date conversion was broken in python3 for dates with
leading zeroes in both month and day.
2018-04-26 23:02:40 -07:00
Evan Hunt 6070c734f2 Merge branch '159-improve-handling-of-inline-signed-zones-with-missing-signing-keys' into 'master'
Improve handling of inline signed zones with missing signing keys

Closes #159

See merge request isc-projects/bind9!133
2018-04-25 15:07:47 -04:00
Michał KępieńandEvan Hunt 7d2c09c905 Add CHANGES entries
4916.	[bug]		Not creating signing keys for an inline signed zone
			prevented changes applied to the raw zone from being
			reflected in the secure zone until signing keys were
			made available. [GL #159]

4915.	[bug]		Bumped signed serial of an inline signed zone was
			logged even when an error occurred while updating
			signatures. [GL #159]
2018-04-25 12:00:31 -07:00
Michał KępieńandEvan Hunt 6acf326969 Apply raw zone deltas to yet unsigned secure zones
When inline signing is enabled for a zone without creating signing keys
for it, changes subsequently applied to the raw zone will not be
reflected in the secure zone due to the dns_update_signaturesinc() call
inside receive_secure_serial() failing.  Given that an inline zone will
be served (without any signatures) even with no associated signing keys
being present, keep applying raw zone deltas to the secure zone until
keys become available in an attempt to follow the principle of least
astonishment.
2018-04-25 12:00:31 -07:00
Michał KępieńandEvan Hunt cfbc8e264d Only log bumped signed serial after a successful secure zone update
If a raw zone is modified, but the dns_update_signaturesinc() call in
receive_secure_serial() fails, the corresponding secure zone's database
will not be modified, even though by that time a message containing the
bumped signed serial will already have been logged.  This creates
confusion, because a different secure zone version will be served than
the one announced in the logs.  Move the relevant dns_zone_log() call so
that it is only performed if the secure zone's database is modified.
2018-04-24 09:18:47 -07: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
1492 changed files with 5610 additions and 9688 deletions
+44 -5
View File
@@ -15,72 +15,84 @@ stages:
tags:
- linux
- docker
- amd64
.debian-jessie-i386: &debian_jessie_i386_image
image: "$CI_REGISTRY_IMAGE:debian-jessie-i386"
tags:
- linux
- docker
- i386
.debian-stretch-amd64: &debian_stretch_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
tags:
- linux
- docker
- amd64
.debian-stretch-i386:: &debian_stretch_i386_image
image: "$CI_REGISTRY_IMAGE:debian-stretch-i386"
tags:
- linux
- docker
- i386
.debian-buster-amd64: &debian_buster_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-buster-amd64"
tags:
- linux
- docker
- amd64
.debian-buster-i386:: &debian_buster_i386_image
image: "$CI_REGISTRY_IMAGE:debian-buster-i386"
tags:
- linux
- docker
- i386
.debian-sid-amd64: &debian_sid_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
tags:
- linux
- docker
- amd64
.debian-sid-i386: &debian_sid_i386_image
image: "$CI_REGISTRY_IMAGE:debian-sid-i386"
tags:
- linux
- docker
- i386
.ubuntu-trusty-amd64: &ubuntu_trusty_amd64_image
image: "$CI_REGISTRY_IMAGE:ubuntu-trusty-amd64"
tags:
- linux
- docker
- amd64
.ubuntu-trusty-i386: &ubuntu_trusty_i386_image
image: "$CI_REGISTRY_IMAGE:ubuntu-trusty-i386"
tags:
- linux
- docker
- i386
.ubuntu-xenial-amd64: &ubuntu_xenial_amd64_image
image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-amd64"
tags:
- linux
- docker
- amd64
.ubuntu-xenial-i386: &ubuntu_xenial_i386_image
image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-i386"
tags:
- linux
- docker
- i386
.build: &build_job
stage: build
@@ -100,7 +112,8 @@ stages:
- rm -rf .ccache
- bash -x bin/tests/system/ifconfig.sh up
script:
- cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1
- ( cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
- test -s bin/tests/system/systests.output
artifacts:
untracked: true
expire_in: '1 week'
@@ -161,11 +174,31 @@ precheck:debian:sid:amd64:
# <<: *ubuntu_xenial_i386_image
# <<: *build_job
build:debian:sid:amd64:
build:clang:debian:sid:amd64:
variables:
CC: clang-6.0
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
<<: *debian_sid_amd64_image
<<: *build_job
build:debian:sid:amd64:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
<<: *debian_sid_amd64_image
<<: *build_job
build:clang:debian:sid:i386:
variables:
CC: clang-6.0
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
<<: *debian_sid_i386_image
<<: *build_job
build:debian:sid:i386:
variables:
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g"
<<: *debian_sid_i386_image
<<: *build_job
@@ -174,7 +207,13 @@ unittest:debian:sid:amd64:
<<: *unit_test_job
dependencies:
- build:debian:sid:amd64
unittest:clang:debian:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- build:clang:debian:sid:amd64
unittest:debian:sid:i386:
<<: *debian_sid_i386_image
<<: *unit_test_job
@@ -186,7 +225,7 @@ systemtest:debian:sid:amd64:
<<: *system_test_job
dependencies:
- build:debian:sid:amd64
systemtest:debian:sid:i386:
<<: *debian_sid_i386_image
<<: *system_test_job
+91
View File
@@ -1,3 +1,94 @@
4944. [cleanup] Silence cppcheck portability warnings in
lib/isc/tests/buffer_test.c. [GL #239]
4943. [bug] Change 4687 consumed too much memory when running
system tests with --with-tuning=large. Reduced the
hash table size to 512 entries for 'named -m record'
restoring the previous memory footprint. [GL #248]
4942. [cleanup] Consolidate multiple instances of splitting of
batchline in dig into a single function. [GL #196]
4941. [cleanup] Silence clang static analyzer warnings. [GL #196]
4940. [cleanup] Extract the loop in dns__zone_updatesigs() into
separate functions to improve code readability.
[GL #135]
4939. [test] Add basic unit tests for update_sigs(). [GL #135]
4938. [placeholder]
4937. [func] Remove support for OpenSSL < 1.0.0 [GL #191]
4936. [func] Always use OpenSSL or PKCS#11 random data providers,
and remove the --{enable,disable}-crypto-rand configure
options. [GL #165]
4935. [func] Add support for LibreSSL >= 2.7.0 (some OpenSSL 1.1.0
call were added). [GL #191]
4934. [placeholder]
4933. [bug] Not creating signing keys for an inline signed zone
prevented changes applied to the raw zone from being
reflected in the secure zone until signing keys were
made available. [GL #159]
4932. [bug] Bumped signed serial of an inline signed zone was
logged even when an error occurred while updating
signatures. [GL #159]
4931. [func] Removed the "rbtdb64" database implementation.
[GL #217]
4930. [bug] Remove a bogus check in nslookup command line
argument processing. [GL #206]
4929. [func] Add the ability to set RA and TC in queries made by
dig (+[no]raflag, +[no]tcflag). [GL #213]
4928. [func] The "dnskey-sig-validity" option allows
"sig-validity-interval" to be overriden for signatures
covering DNSKEY RRsets. [GL #145]
4927. [placeholder]
4926. [func] Add root key sentinel support. To disable, add
'root-key-sentinel no;' to named.conf. [GL #37]
4925. [func] Several configuration options that define intervals
can now take TTL value suffixes (for example, 2h or 1d)
in addition to integer parameters. These include
max-cache-ttl, max-ncache-ttl, max-policy-ttl,
fstrm-set-reopen-interval, interface-interval, and
min-update-interval. [GL #203]
4924. [cleanup] Clean up the isc_string_* namespace and leave
only strlcpy and strlcat. [GL #178]
4923. [cleanup] Refactor socket and socket event options into
enum types. [GL !135]
4922. [bug] dnstap: Log the destination address of client
packets rather than the interface address.
[GL #197]
4921. [cleanup] Add dns_fixedname_initname() and refactor the caller
code to make usage of the new function, as a part of
refactoring dns_fixedname_*() macros were turned into
functions. [GL #183]
4920. [cleanup] Clean up libdns removing most of the backwards
compatibility wrappers.
4919. [cleanup] Clean up the isc_hash_* namespace and leave only
the FNV-1a hash implementation. [GL #178]
4918. [bug] Fix double free after keygen error in dnssec-keygen
when OpenSSL >= 1.1.0 is used and RSA_generate_key_ex
fails. [GL #109]
4917. [func] Support 64 RPZ policy zones by default. [GL #123]
4916. [func] Remove IDNA2003 support and the bundled idnkit-1.0
+1 -1
View File
@@ -74,7 +74,7 @@ tags:
find lib bin -name "*.[ch]" -print | @ETAGS@ -
test check:
@if test -n "`${PERL} ${top_srcdir}/bin/tests/system/testsock.pl 2>&- || echo fail`"; then \
@if test -n "`${PERL} ${top_srcdir}/bin/tests/system/testsock.pl 2>/dev/null || echo fail`"; then \
echo I: NOTE: The tests were not run because they require that; \
echo I: the IP addresses 10.53.0.1 through 10.53.0.8 are configured; \
echo I: as alias addresses on the loopback interface. Please run; \
+15 -19
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: check-tool.c,v 1.44 2011/12/22 07:32:39 each Exp $ */
/*! \file */
@@ -99,18 +98,17 @@ isc_boolean_t docheckmx = ISC_FALSE;
isc_boolean_t dochecksrv = ISC_FALSE;
isc_boolean_t docheckns = ISC_FALSE;
#endif
unsigned int zone_options = DNS_ZONEOPT_CHECKNS |
DNS_ZONEOPT_CHECKMX |
DNS_ZONEOPT_MANYERRORS |
DNS_ZONEOPT_CHECKNAMES |
DNS_ZONEOPT_CHECKINTEGRITY |
dns_zoneopt_t zone_options = DNS_ZONEOPT_CHECKNS |
DNS_ZONEOPT_CHECKMX |
DNS_ZONEOPT_MANYERRORS |
DNS_ZONEOPT_CHECKNAMES |
DNS_ZONEOPT_CHECKINTEGRITY |
#if CHECK_SIBLING
DNS_ZONEOPT_CHECKSIBLING |
DNS_ZONEOPT_CHECKSIBLING |
#endif
DNS_ZONEOPT_CHECKWILDCARD |
DNS_ZONEOPT_WARNMXCNAME |
DNS_ZONEOPT_WARNSRVCNAME;
unsigned int zone_options2 = 0;
DNS_ZONEOPT_CHECKWILDCARD |
DNS_ZONEOPT_WARNMXCNAME |
DNS_ZONEOPT_WARNSRVCNAME;
/*
* This needs to match the list in bin/named/log.c.
@@ -590,8 +588,7 @@ check_ttls(dns_zone_t *zone, dns_ttl_t maxttl) {
dns_rdataset_t rdataset;
dns_fixedname_t fname;
dns_name_t *name;
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
name = dns_fixedname_initname(&fname);
dns_rdataset_init(&rdataset);
CHECK(dns_zone_getdb(zone, &db));
@@ -686,12 +683,12 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
isc_buffer_constinit(&buffer, zonename, strlen(zonename));
isc_buffer_add(&buffer, strlen(zonename));
dns_fixedname_init(&fixorigin);
origin = dns_fixedname_name(&fixorigin);
origin = dns_fixedname_initname(&fixorigin);
CHECK(dns_name_fromtext(origin, &buffer, dns_rootname, 0, NULL));
CHECK(dns_zone_setorigin(zone, origin));
CHECK(dns_zone_setdbtype(zone, 1, (const char * const *) dbtype));
CHECK(dns_zone_setfile2(zone, filename, fileformat));
CHECK(dns_zone_setfile(zone, filename, fileformat,
&dns_master_style_default));
if (journal != NULL)
CHECK(dns_zone_setjournal(zone, journal));
@@ -701,7 +698,6 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
dns_zone_setclass(zone, rdclass);
dns_zone_setoption(zone, zone_options, ISC_TRUE);
dns_zone_setoption2(zone, zone_options2, ISC_TRUE);
dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge);
dns_zone_setmaxttl(zone, maxttl);
@@ -764,8 +760,8 @@ dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
}
}
result = dns_zone_dumptostream3(zone, output, fileformat, style,
rawversion);
result = dns_zone_dumptostream(zone, output, fileformat, style,
rawversion);
if (output != stdout)
(void)isc_stdio_close(output);
+2 -3
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: check-tool.h,v 1.18 2011/12/09 23:47:02 tbox Exp $ */
#ifndef CHECK_TOOL_H
#define CHECK_TOOL_H
@@ -22,6 +21,7 @@
#include <dns/masterdump.h>
#include <dns/types.h>
#include <dns/zone.h>
ISC_LANG_BEGINDECLS
@@ -49,8 +49,7 @@ extern isc_boolean_t nomerge;
extern isc_boolean_t docheckmx;
extern isc_boolean_t docheckns;
extern isc_boolean_t dochecksrv;
extern unsigned int zone_options;
extern unsigned int zone_options2;
extern dns_zoneopt_t zone_options;
ISC_LANG_ENDDECLS
+1 -6
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: named-checkconf.c,v 1.56 2011/03/12 04:59:46 tbox Exp $ */
/*! \file */
@@ -408,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,
@@ -656,9 +655,6 @@ main(int argc, char **argv) {
RUNTIME_CHECK(setup_logging(mctx, stdout, &logc) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_entropy_create(mctx, &ectx) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE)
== ISC_R_SUCCESS);
dns_result_register();
RUNTIME_CHECK(cfg_parser_create(mctx, logc, &parser) == ISC_R_SUCCESS);
@@ -689,7 +685,6 @@ main(int argc, char **argv) {
isc_log_destroy(&logc);
isc_hash_destroy();
isc_entropy_detach(&ectx);
isc_mem_destroy(&mctx);
+1 -5
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: named-checkzone.c,v 1.65.32.2 2012/02/07 02:45:21 each Exp $ */
/*! \file */
@@ -260,7 +259,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') {
@@ -523,8 +522,6 @@ main(int argc, char **argv) {
RUNTIME_CHECK(setup_logging(mctx, errout, &lctx)
== ISC_R_SUCCESS);
RUNTIME_CHECK(isc_entropy_create(mctx, &ectx) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE)
== ISC_R_SUCCESS);
dns_result_register();
@@ -556,7 +553,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
-1
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: os.h,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
/*! \file */
+4 -7
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: keygen.c,v 1.4 2009/11/12 14:02:38 marka Exp $ */
/*! \file */
@@ -154,11 +153,9 @@ generate_key(isc_mem_t *mctx, const char *randomfile, dns_secalg_t 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;
@@ -170,12 +167,12 @@ generate_key(isc_mem_t *mctx, const char *randomfile, dns_secalg_t alg,
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, ectx, NULL, entropy_flags));
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));
-1
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: keygen.h,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
#ifndef RNDC_KEYGEN_H
#define RNDC_KEYGEN_H 1
-2
View File
@@ -7,8 +7,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# $Id: Makefile.in,v 1.3 2009/06/11 23:47:55 tbox Exp $
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
-1
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: os.c,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
/*! \file */
-1
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: util.c,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
/*! \file */
-1
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: util.h,v 1.4 2009/09/29 15:06:05 fdupont Exp $ */
#ifndef RNDC_UTIL_H
#define RNDC_UTIL_H 1
-1
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: os.c,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
#include <config.h>
+21 -35
View File
@@ -521,17 +521,17 @@ setup_style(dns_master_style_t **stylep) {
}
if (multiline || (nottl && noclass))
result = dns_master_stylecreate2(&style, styleflags,
24, 24, 24, 32, 80, 8,
splitwidth, mctx);
result = dns_master_stylecreate(&style, styleflags,
24, 24, 24, 32, 80, 8,
splitwidth, mctx);
else if (nottl || noclass)
result = dns_master_stylecreate2(&style, styleflags,
24, 24, 32, 40, 80, 8,
splitwidth, mctx);
result = dns_master_stylecreate(&style, styleflags,
24, 24, 32, 40, 80, 8,
splitwidth, mctx);
else
result = dns_master_stylecreate2(&style, styleflags,
24, 32, 40, 48, 80, 8,
splitwidth, mctx);
result = dns_master_stylecreate(&style, styleflags,
24, 32, 40, 48, 80, 8,
splitwidth, mctx);
if (result == ISC_R_SUCCESS)
*stylep = style;
@@ -550,8 +550,7 @@ convert_name(dns_fixedname_t *fn, dns_name_t **name, const char *text) {
isc_buffer_constinit(&b, text, len);
isc_buffer_add(&b, len);
dns_fixedname_init(fn);
n = dns_fixedname_name(fn);
n = dns_fixedname_initname(fn);
result = dns_name_fromtext(n, &b, dns_rootname, 0, NULL);
if (result != ISC_R_SUCCESS) {
@@ -944,18 +943,6 @@ cleanup:
return (result);
}
static char *
next_token(char **stringp, const char *delim) {
char *res;
do {
res = strsep(stringp, delim);
if (res == NULL)
break;
} while (*res == '\0');
return (res);
}
static isc_result_t
parse_uint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
const char *desc) {
@@ -975,23 +962,23 @@ parse_uint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
static void
plus_option(char *option) {
isc_result_t result;
char option_store[256];
char *cmd, *value, *ptr;
char *cmd, *value, *last = NULL;
isc_boolean_t state = ISC_TRUE;
strlcpy(option_store, option, sizeof(option_store));
ptr = option_store;
cmd = next_token(&ptr,"=");
INSIST(option != NULL);
cmd = strtok_r(option, "=", &last);
if (cmd == NULL) {
printf(";; Invalid option %s\n", option_store);
printf(";; Invalid option %s\n", option);
return;
}
value = ptr;
if (strncasecmp(cmd, "no", 2)==0) {
cmd += 2;
state = ISC_FALSE;
}
value = strtok_r(NULL, "\0", &last);
#define FULLCHECK(A) \
do { \
size_t _l = strlen(cmd); \
@@ -1538,9 +1525,8 @@ get_reverse(char *reverse, size_t len, char *value, isc_boolean_t strict) {
dns_name_t *name;
unsigned int options = 0;
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
result = dns_byaddr_createptrname2(&addr, options, name);
name = dns_fixedname_initname(&fname);
result = dns_byaddr_createptrname(&addr, options, name);
if (result != ISC_R_SUCCESS)
return (result);
dns_name_format(name, reverse, (unsigned int)len);
@@ -1624,8 +1610,8 @@ main(int argc, char *argv[]) {
/* Create client */
clopt = DNS_CLIENTCREATEOPT_USECACHE;
result = dns_client_createx2(mctx, actx, taskmgr, socketmgr, timermgr,
clopt, &client, srcaddr4, srcaddr6);
result = dns_client_createx(mctx, actx, taskmgr, socketmgr, timermgr,
clopt, &client, srcaddr4, srcaddr6);
if (result != ISC_R_SUCCESS) {
delv_log(ISC_LOG_ERROR, "dns_client_create: %s",
isc_result_totext(result));
+82 -82
View File
@@ -205,6 +205,7 @@ help(void) {
" +padding=### (Set padding block size [0])\n"
" +[no]qr (Print question before sending)\n"
" +[no]question (Control display of question section)\n"
" +[no]raflag (Set RA flag in query (+[no]raflag))\n"
" +[no]rdflag (Recursive mode (+[no]recurse))\n"
" +[no]recurse (Recursive mode (+[no]rdflag))\n"
" +retry=### (Set number of UDP retries) [2]\n"
@@ -217,6 +218,7 @@ help(void) {
" +[no]split=## (Split hex/base64 fields into chunks)\n"
" +[no]stats (Control display of statistics)\n"
" +subnet=addr (Set edns-client-subnet option)\n"
" +[no]tcflag (Set TC flag in query (+[no]tcflag))\n"
" +[no]tcp (TCP mode (+[no]vc))\n"
" +timeout=### (Set query timeout) [5]\n"
" +[no]trace (Trace delegation down from root [+dnssec])\n"
@@ -285,12 +287,12 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
} else {
printf(";; MSG SIZE rcvd: %u\n", bytes);
}
if (key != NULL) {
if (tsigkey != NULL) {
if (!validated)
puts(";; WARNING -- Some TSIG could not "
"be validated");
}
if ((key == NULL) && (keysecret[0] != 0)) {
if ((tsigkey == NULL) && (keysecret[0] != 0)) {
puts(";; WARNING -- TSIG key was not used.");
}
puts("");
@@ -480,17 +482,17 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
}
if (query->lookup->multiline ||
(query->lookup->nottl && query->lookup->noclass))
result = dns_master_stylecreate2(&style, styleflags,
24, 24, 24, 32, 80, 8,
splitwidth, mctx);
result = dns_master_stylecreate(&style, styleflags,
24, 24, 24, 32, 80, 8,
splitwidth, mctx);
else if (query->lookup->nottl || query->lookup->noclass)
result = dns_master_stylecreate2(&style, styleflags,
24, 24, 32, 40, 80, 8,
splitwidth, mctx);
result = dns_master_stylecreate(&style, styleflags,
24, 24, 32, 40, 80, 8,
splitwidth, mctx);
else
result = dns_master_stylecreate2(&style, styleflags,
24, 32, 40, 48, 80, 8,
splitwidth, mctx);
result = dns_master_stylecreate(&style, styleflags,
24, 32, 40, 48, 80, 8,
splitwidth, mctx);
check_result(result, "dns_master_stylecreate");
if (query->lookup->cmdline[0] != 0) {
@@ -729,28 +731,27 @@ printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
*/
static void
plus_option(const char *option, isc_boolean_t is_batchfile,
plus_option(char *option, isc_boolean_t is_batchfile,
dig_lookup_t *lookup)
{
isc_result_t result;
char option_store[256];
char *cmd, *value, *ptr, *code;
char *cmd, *value, *last = NULL, *code, *extra;
isc_uint32_t num;
isc_boolean_t state = ISC_TRUE;
size_t n;
strlcpy(option_store, option, sizeof(option_store));
ptr = option_store;
cmd = next_token(&ptr, "=");
if (cmd == NULL) {
printf(";; Invalid option %s\n", option_store);
INSIST(option != NULL);
if ((cmd = strtok_r(option, "=", &last)) == NULL) {
printf(";; Invalid option %s\n", option);
return;
}
value = ptr;
if (strncasecmp(cmd, "no", 2)==0) {
cmd += 2;
state = ISC_FALSE;
}
/* parse the rest of the string */
value = strtok_r(NULL, "", &last);
#define FULLCHECK(A) \
do { \
@@ -1006,8 +1007,9 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
"specified");
goto exit_or_usage;
}
code = next_token(&value, ":");
save_opt(lookup, code, value);
code = strtok_r(value, ":", &last);
extra = strtok_r(NULL, "\0", &last);
save_opt(lookup, code, extra);
break;
default:
goto invalid_option;
@@ -1051,7 +1053,7 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
FULLCHECK("idnin");
#ifndef WITH_IDN_SUPPORT
fprintf(stderr, ";; IDN input support"
" not enabled\n");
" not enabled\n");
#else
lookup->idnin = state;
#endif
@@ -1060,7 +1062,7 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
FULLCHECK("idnout");
#ifndef WITH_IDN_OUT_SUPPORT
fprintf(stderr, ";; IDN output support"
" not enabled\n");
" not enabled\n");
#else
lookup->idnout = state;
#endif
@@ -1242,6 +1244,10 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
break;
case 'r':
switch (cmd[1]) {
case 'a': /* raflag */
FULLCHECK("raflag");
lookup->raflag = state;
break;
case 'd': /* rdflag */
FULLCHECK("rdflag");
lookup->recurse = state;
@@ -1385,10 +1391,20 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
case 't':
switch (cmd[1]) {
case 'c': /* tcp */
FULLCHECK("tcp");
if (!is_batchfile) {
lookup->tcp_mode = state;
lookup->tcp_mode_set = ISC_TRUE;
switch (cmd[2]) {
case 'f':
FULLCHECK("tcflag");
lookup->tcflag = state;
break;
case 'p':
FULLCHECK("tcp");
if (!is_batchfile) {
lookup->tcp_mode = state;
lookup->tcp_mode_set = ISC_TRUE;
}
break;
default:
goto invalid_option;
}
break;
case 'i': /* timeout */
@@ -1524,7 +1540,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
isc_boolean_t config_only, int argc, char **argv,
isc_boolean_t *firstarg)
{
char opt, *value, *ptr, *ptr2, *ptr3;
char opt, *value, *ptr, *ptr2, *ptr3, *last;
isc_result_t result;
isc_boolean_t value_from_next;
isc_textregion_t tr;
@@ -1738,15 +1754,13 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
value);
return (value_from_next);
case 'y':
ptr = next_token(&value, ":"); /* hmac type or name */
if (ptr == NULL) {
if ((ptr = strtok_r(value, ":", &last)) == NULL) {
usage();
}
ptr2 = next_token(&value, ":"); /* name or secret */
if (ptr2 == NULL)
if ((ptr2 = strtok_r(NULL, ":", &last)) == NULL) { /* name or secret */
usage();
ptr3 = next_token(&value, ":"); /* secret or NULL */
if (ptr3 != NULL) {
}
if ((ptr3 = strtok_r(NULL, ":", &last)) != NULL) { /* secret or NULL */
parse_hmac(ptr);
ptr = ptr2;
ptr2 = ptr3;
@@ -1758,6 +1772,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
#endif
digestbits = 0;
}
/* XXXONDREJ: FIXME */
strlcpy(keynametext, ptr, sizeof(keynametext));
strlcpy(keysecret, ptr2, sizeof(keysecret));
return (value_from_next);
@@ -1841,6 +1856,22 @@ preparse_args(int argc, char **argv) {
}
}
static int
split_batchline(char *batchline, char **bargv, int len, const char *msg) {
int bargc;
char *last = NULL;
REQUIRE(batchline != NULL);
for (bargc = 1, bargv[bargc] = strtok_r(batchline, " \t\r\n", &last);
bargc < len && bargv[bargc];
bargv[++bargc] = strtok_r(NULL, " \t\r\n", &last))
{
debug("%s %d: %s", msg, bargc, bargv[bargc]);
}
return (bargc);
}
static void
parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
int argc, char **argv)
@@ -1859,10 +1890,8 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
char **rv;
#ifndef NOPOSIX
char *homedir;
char rcfile[256];
char rcfile[PATH_MAX];
#endif
char *input;
int i;
isc_boolean_t need_clone = ISC_TRUE;
/*
@@ -1894,30 +1923,21 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
unsigned int n;
n = snprintf(rcfile, sizeof(rcfile), "%s/.digrc",
homedir);
if (n < sizeof(rcfile))
if (n < sizeof(rcfile)) {
batchfp = fopen(rcfile, "r");
}
}
if (batchfp != NULL) {
while (fgets(batchline, sizeof(batchline),
batchfp) != 0) {
batchfp) != 0)
{
debug("config line %s", batchline);
bargc = 1;
input = batchline;
bargv[bargc] = next_token(&input, " \t\r\n");
while ((bargc < 62) && (bargv[bargc] != NULL)) {
bargc++;
bargv[bargc] =
next_token(&input, " \t\r\n");
}
bargc = split_batchline(batchline, bargv, 62,
".digrc argv");
bargv[0] = argv[0];
argv0 = argv[0];
for(i = 0; i < bargc; i++)
debug(".digrc argv %d: %s",
i, bargv[i]);
parse_args(ISC_TRUE, ISC_TRUE, bargc,
(char **)bargv);
parse_args(ISC_TRUE, ISC_TRUE,
bargc, (char **)bargv);
}
fclose(batchfp);
}
@@ -1928,8 +1948,9 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
/* Processing '-f batchfile'. */
lookup = clone_lookup(default_lookup, ISC_TRUE);
need_clone = ISC_FALSE;
} else
} else {
lookup = default_lookup;
}
rc = argc;
rv = argv;
@@ -2096,23 +2117,14 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
/* XXX Remove code dup from shutdown code */
next_line:
if (fgets(batchline, sizeof(batchline), batchfp) != 0) {
bargc = 1;
debug("batch line %s", batchline);
if (batchline[0] == '\r' || batchline[0] == '\n'
|| batchline[0] == '#' || batchline[0] == ';')
if (batchline[0] == '\r' || batchline[0] == '\n' ||
batchline[0] == '#' || batchline[0] == ';')
goto next_line;
input = batchline;
bargv[bargc] = next_token(&input, " \t\r\n");
while ((bargc < 14) && (bargv[bargc] != NULL)) {
bargc++;
bargv[bargc] = next_token(&input, " \t\r\n");
}
bargc = split_batchline(batchline, bargv, 14,
"batch argv");
bargv[0] = argv[0];
argv0 = argv[0];
for(i = 0; i < bargc; i++)
debug("batch argv %d: %s", i, bargv[i]);
parse_args(ISC_TRUE, ISC_FALSE, bargc, (char **)bargv);
return;
}
@@ -2151,8 +2163,6 @@ query_finished(void) {
char batchline[MXNAME];
int bargc;
char *bargv[16];
char *input;
int i;
if (batchname == NULL) {
isc_app_shutdown();
@@ -2170,18 +2180,8 @@ query_finished(void) {
if (fgets(batchline, sizeof(batchline), batchfp) != 0) {
debug("batch line %s", batchline);
bargc = 1;
input = batchline;
bargv[bargc] = next_token(&input, " \t\r\n");
while ((bargc < 14) && (bargv[bargc] != NULL)) {
bargc++;
bargv[bargc] = next_token(&input, " \t\r\n");
}
bargc = split_batchline(batchline, bargv, 14, "batch argv");
bargv[0] = argv0;
for(i = 0; i < bargc; i++)
debug("batch argv %d: %s", i, bargv[i]);
parse_args(ISC_TRUE, ISC_FALSE, bargc, (char **)bargv);
start_lookup();
} else {
+44 -15
View File
@@ -275,9 +275,9 @@
<term>-i</term>
<listitem>
<para>
Do reverse IPv6 lookups using the obsolete RFC1886 IP6.INT
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6.INT
domain, which is no longer in use. Obsolete bit string
label queries (RFC2874) are not attempted.
label queries (RFC 2874) are not attempted.
</para>
</listitem>
</varlistentry>
@@ -338,11 +338,12 @@
<term>-t <replaceable class="parameter">type</replaceable></term>
<listitem>
<para>
The resource record type to query. It can be any valid query type
which is
supported in BIND 9. The default query type is "A", unless the
<option>-x</option> option is supplied to indicate a reverse lookup.
A zone transfer can be requested by specifying a type of AXFR. When
The resource record type to query. It can be any valid query
type. If it is a resource record type supported in BIND 9, it
can be given by the type mnemonic (such as "NS" or "AAAA").
The default query type is "A", unless the <option>-x</option>
option is supplied to indicate a reverse lookup. A zone
transfer can be requested by specifying a type of AXFR. When
an incremental zone transfer (IXFR) is required, set the
<parameter>type</parameter> to <literal>ixfr=N</literal>.
The incremental zone transfer will contain the changes
@@ -350,6 +351,12 @@
record was
<parameter>N</parameter>.
</para>
<para>
All resource record types can be expressed as "TYPEnn", where
"nn" is the number of the type. If the resource record type is
not supported in BIND 9, the result will be displayed as
described in RFC 3597.
</para>
</listitem>
</varlistentry>
@@ -953,6 +960,17 @@
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]raflag</option></term>
<listitem>
<para>
Set [do not set] the RA (Recursion Available) bit in
the query. The default is +noraflag. This bit should
be ignored by the server for QUERY.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]rdflag</option></term>
<listitem>
@@ -1044,7 +1062,7 @@
<listitem>
<para>
This feature is now obsolete and has been removed;
use <command>delv</command> instead.
use <command>delv</command> instead.
</para>
</listitem>
</varlistentry>
@@ -1096,6 +1114,17 @@
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]tcflag</option></term>
<listitem>
<para>
Set [do not set] the TC (TrunCation) bit in the query.
The default is +notcflag. This bit should be ignored
by the server for QUERY.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>+[no]tcp</option></term>
<listitem>
@@ -1129,8 +1158,8 @@
<listitem>
<para>
This feature is related to <command>dig +sigchase</command>,
which is obsolete and has been removed. Use
<command>delv</command> instead.
which is obsolete and has been removed. Use
<command>delv</command> instead.
</para>
</listitem>
</varlistentry>
@@ -1175,9 +1204,9 @@
<listitem>
<para>
Formerly specified trusted keys for use with
<command>dig +sigchase</command>. This feature is now
obsolete and has been removed; use
<command>delv</command> instead.
<command>dig +sigchase</command>. This feature is now
obsolete and has been removed; use
<command>delv</command> instead.
</para>
</listitem>
</varlistentry>
@@ -1299,7 +1328,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
<command>dig</command> appropriately converts character encoding of
domain name before sending a request to DNS server or displaying a
reply from the server.
If you'd like to turn off the IDN support for some reason, use
If you'd like to turn off the IDN support for some reason, use
parameters <parameter>+noidnin</parameter> and
<parameter>+noidnout</parameter>.
</para>
@@ -1327,7 +1356,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
<citerefentry>
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citetitle>RFC1035</citetitle>.
<citetitle>RFC 1035</citetitle>.
</para>
</refsection>
+61 -51
View File
@@ -176,7 +176,7 @@ 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;
@@ -242,18 +242,6 @@ check_next_lookup(dig_lookup_t *lookup);
static isc_boolean_t
next_origin(dig_lookup_t *oldlookup);
char *
next_token(char **stringp, const char *delim) {
char *res;
do {
res = strsep(stringp, delim);
if (res == NULL)
break;
} while (*res == '\0');
return (res);
}
static int
count_dots(char *string) {
char *s;
@@ -353,9 +341,8 @@ get_reverse(char *reverse, size_t len, char *value, isc_boolean_t ip6_int,
if (ip6_int)
options |= DNS_BYADDROPT_IPV6INT;
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
result = dns_byaddr_createptrname2(&addr, options, name);
name = dns_fixedname_initname(&fname);
result = dns_byaddr_createptrname(&addr, options, name);
if (result != ISC_R_SUCCESS)
return (result);
dns_name_format(name, reverse, (unsigned int)len);
@@ -668,6 +655,8 @@ make_empty_lookup(void) {
looknew->aaonly = ISC_FALSE;
looknew->adflag = ISC_FALSE;
looknew->cdflag = ISC_FALSE;
looknew->raflag = ISC_FALSE;
looknew->tcflag = ISC_FALSE;
looknew->print_unknown_format = ISC_FALSE;
looknew->zflag = ISC_FALSE;
looknew->ns_search_only = ISC_FALSE;
@@ -810,6 +799,8 @@ clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers) {
looknew->aaonly = lookold->aaonly;
looknew->adflag = lookold->adflag;
looknew->cdflag = lookold->cdflag;
looknew->raflag = lookold->raflag;
looknew->tcflag = lookold->tcflag;
looknew->print_unknown_format = lookold->print_unknown_format;
looknew->zflag = lookold->zflag;
looknew->ns_search_only = lookold->ns_search_only;
@@ -914,13 +905,13 @@ setup_text_key(void) {
result = dns_tsigkey_create(&keyname, hmacname, secretstore,
(int)secretsize, ISC_FALSE, NULL, 0, 0,
mctx, NULL, &key);
mctx, NULL, &tsigkey);
failure:
if (result != ISC_R_SUCCESS)
printf(";; Couldn't create key %s: %s\n",
keynametext, isc_result_totext(result));
else
dst_key_setbits(key->key, digestbits);
dst_key_setbits(tsigkey->key, digestbits);
isc_mem_free(mctx, secretstore);
dns_name_invalidate(&keyname);
@@ -1207,7 +1198,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));
@@ -1400,7 +1391,7 @@ setup_libs(void) {
result = isc_entropy_create(mctx, &entp);
check_result(result, "isc_entropy_create");
result = dst_lib_init(mctx, entp, 0);
result = dst_lib_init(mctx, entp, NULL, 0);
check_result(result, "dst_lib_init");
is_dst_up = ISC_TRUE;
@@ -1933,8 +1924,7 @@ next_origin(dig_lookup_t *oldlookup) {
/*
* Check for a absolute name or ndots being met.
*/
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
result = dns_name_fromstring2(name, oldlookup->textname, NULL,
0, NULL);
if (result == ISC_R_SUCCESS &&
@@ -2096,8 +2086,7 @@ setup_lookup(dig_lookup_t *lookup) {
textname = lookup->textname;
#ifdef WITH_IDN_SUPPORT
if (lookup->idnin) {
result = idn_locale_to_ace(lookup->textname, idn_textname,
sizeof(idn_textname));
result = idn_locale_to_ace(textname, idn_textname, sizeof(idn_textname));
check_result(result, "convert textname to IDN encoding");
debug("idn_textname: %s", idn_textname);
textname = idn_textname;
@@ -2133,8 +2122,7 @@ setup_lookup(dig_lookup_t *lookup) {
origin = lookup->origin->origin;
#ifdef WITH_IDN_SUPPORT
if (lookup->idnin) {
result = idn_locale_to_ace(lookup->origin->origin,
idn_origin, sizeof(idn_origin));
result = idn_locale_to_ace(origin, idn_origin, sizeof(idn_origin));
check_result(result, "convert origin to IDN encoding");
debug("trying idn origin %s", idn_origin);
origin = idn_origin;
@@ -2160,8 +2148,7 @@ setup_lookup(dig_lookup_t *lookup) {
dns_fixedname_t fixed;
dns_name_t *name;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
len = (unsigned int) strlen(textname);
isc_buffer_init(&b, textname, len);
isc_buffer_add(&b, len);
@@ -2252,6 +2239,16 @@ setup_lookup(dig_lookup_t *lookup) {
lookup->sendmsg->flags |= DNS_MESSAGEFLAG_CD;
}
if (lookup->raflag) {
debug("RA query");
lookup->sendmsg->flags |= DNS_MESSAGEFLAG_RA;
}
if (lookup->tcflag) {
debug("TC query");
lookup->sendmsg->flags |= DNS_MESSAGEFLAG_TC;
}
if (lookup->zflag) {
debug("Z query");
lookup->sendmsg->flags |= 0x0040U;
@@ -2289,9 +2286,9 @@ setup_lookup(dig_lookup_t *lookup) {
/* XXX Insist this? */
lookup->tsigctx = NULL;
lookup->querysig = NULL;
if (key != NULL) {
if (tsigkey != NULL) {
debug("initializing keys");
result = dns_message_settsigkey(lookup->sendmsg, key);
result = dns_message_settsigkey(lookup->sendmsg, tsigkey);
check_result(result, "dns_message_settsigkey");
}
@@ -3656,7 +3653,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
result = dns_message_create(mctx, DNS_MESSAGE_INTENTPARSE, &msg);
check_result(result, "dns_message_create");
if (key != NULL) {
if (tsigkey != NULL) {
if (l->querysig == NULL) {
debug("getting initial querysig");
result = dns_message_getquerytsig(l->sendmsg, mctx,
@@ -3665,7 +3662,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
}
result = dns_message_setquerytsig(msg, l->querysig);
check_result(result, "dns_message_setquerytsig");
result = dns_message_settsigkey(msg, key);
result = dns_message_settsigkey(msg, tsigkey);
check_result(result, "dns_message_settsigkey");
msg->tsigctx = l->tsigctx;
l->tsigctx = NULL;
@@ -3841,7 +3838,7 @@ recv_done(isc_task_t *task, isc_event_t *event) {
}
}
if (key != NULL) {
if (tsigkey != NULL) {
result = dns_tsig_verify(&query->recvbuf, msg, NULL, NULL);
if (result != ISC_R_SUCCESS) {
printf(";; Couldn't verify signature: %s\n",
@@ -4208,9 +4205,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);
@@ -4273,21 +4270,19 @@ output_filter(isc_buffer_t *buffer, unsigned int used_org,
if (result != ISC_R_SUCCESS) {
return (ISC_R_SUCCESS);
}
strlcpy(tmp1, tmp2, MAXDLEN);
/*
* Copy the converted contents in 'tmp1' back to 'buffer'.
* If we have appended trailing dot, remove it.
*/
tolen = strlen(tmp1);
if (absolute && !end_with_dot && tmp1[tolen - 1] == '.')
tolen = strlen(tmp2);
if (absolute && !end_with_dot && tmp2[tolen - 1] == '.')
tolen--;
if (isc_buffer_length(buffer) < used_org + tolen)
return (ISC_R_NOSPACE);
isc_buffer_subtract(buffer, isc_buffer_usedlength(buffer) - used_org);
memmove(isc_buffer_used(buffer), tmp1, tolen);
memmove(isc_buffer_used(buffer), tmp2, tolen);
isc_buffer_add(buffer, (unsigned int)tolen);
return (ISC_R_SUCCESS);
@@ -4305,11 +4300,28 @@ idn_locale_to_ace(const char *from, char *to, size_t tolen) {
int res;
char *tmp_str = NULL;
res = idn2_lookup_ul(from, &tmp_str, IDN2_NONTRANSITIONAL);
if (res == IDN2_DISALLOWED)
res = idn2_lookup_ul(from, &tmp_str, IDN2_TRANSITIONAL);
res = idn2_to_ascii_lz(from, &tmp_str, IDN2_NONTRANSITIONAL|IDN2_NFC_INPUT);
if (res == IDN2_DISALLOWED) {
res = idn2_to_ascii_lz(from, &tmp_str, IDN2_TRANSITIONAL|IDN2_NFC_INPUT);
}
if (res == IDN2_OK) {
/*
* idn2_to_ascii_lz() normalizes all strings to lowerl case,
* but we generally don't want to lowercase all input strings;
* make sure to return the original case if the two strings
* differ only in case
*/
if (!strcasecmp(from, tmp_str)) {
if (strlen(from) >= tolen) {
debug("from string is too long");
idn2_free(tmp_str);
return ISC_R_NOSPACE;
}
idn2_free(tmp_str);
(void) strlcpy(to, from, tolen);
return ISC_R_SUCCESS;
}
/* check the length */
if (strlen(tmp_str) >= tolen) {
debug("ACE string is too long");
@@ -4322,7 +4334,7 @@ idn_locale_to_ace(const char *from, char *to, size_t tolen) {
return ISC_R_SUCCESS;
}
fatal("idn2_lookup_ul failed: %s", idn2_strerror(res));
fatal("'%s' is not a legal IDN name (%s), use +noidnin", from, idn2_strerror(res));
return ISC_R_FAILURE;
}
@@ -4333,7 +4345,7 @@ idn_ace_to_locale(const char *from, char *to, size_t tolen) {
char *tmp_str = NULL;
res = idn2_to_unicode_8zlz(from, &tmp_str,
IDN2_NONTRANSITIONAL|IDN2_NFC_INPUT);
IDN2_NONTRANSITIONAL|IDN2_NFC_INPUT);
if (res == IDN2_OK) {
/* check the length */
@@ -4343,14 +4355,12 @@ idn_ace_to_locale(const char *from, char *to, size_t tolen) {
return ISC_R_FAILURE;
}
(void) strncpy(to, tmp_str, tolen);
free(tmp_str);
(void) strlcpy(to, tmp_str, tolen);
idn2_free(tmp_str);
return ISC_R_SUCCESS;
} else {
debug("idn2_to_unicode_8zlz failed: %s",
idn2_strerror(res));
}
fatal("'%s' is not a legal IDN name (%s), use +noidnout", from, idn2_strerror(res));
return ISC_R_FAILURE;
}
#endif /* WITH_IDN_OUT_SUPPORT */
+1 -2
View File
@@ -452,8 +452,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
dns_name_t *name;
/* Add AAAA and MX lookups. */
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
dns_name_copy(query->lookup->name, name, NULL);
chase_cnamechain(msg, name);
dns_name_format(name, namestr, sizeof(namestr));
+3 -4
View File
@@ -94,6 +94,8 @@ struct dig_lookup {
aaonly,
adflag,
cdflag,
raflag,
tcflag,
zflag,
trace, /*% dig +trace */
trace_root, /*% initial query for either +trace or +nssearch */
@@ -257,7 +259,7 @@ extern char keyfile[MXNAME];
extern char keysecret[MXNAME];
extern const dns_name_t *hmacname;
extern unsigned int digestbits;
extern dns_tsigkey_t *key;
extern dns_tsigkey_t *tsigkey;
extern isc_boolean_t validated;
extern isc_taskmgr_t *taskmgr;
extern isc_task_t *global_task;
@@ -369,9 +371,6 @@ destroy_libs(void);
void
set_search_domain(char *domain);
char *
next_token(char **stringp, const char *delim);
/*
* Routines to be defined in dig.c, host.c, and nslookup.c. and
* then assigned to the appropriate function pointer
+16 -17
View File
@@ -475,8 +475,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
dns_name_t *name;
/* Add AAAA lookup. */
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
dns_name_copy(query->lookup->name, name, NULL);
chase_cnamechain(msg, name);
dns_name_format(name, namestr, sizeof(namestr));
@@ -710,31 +709,31 @@ setoption(char *opt) {
usesearch = ISC_TRUE;
} else if (CHECKOPT("nodefname", 5)) {
usesearch = ISC_FALSE;
} else if (CHECKOPT("vc", 2) == 0) {
} else if (CHECKOPT("vc", 2)) {
tcpmode = ISC_TRUE;
tcpmode_set = ISC_TRUE;
} else if (CHECKOPT("novc", 4) == 0) {
} else if (CHECKOPT("novc", 4)) {
tcpmode = ISC_FALSE;
tcpmode_set = ISC_TRUE;
} else if (CHECKOPT("debug", 3) == 0) {
} else if (CHECKOPT("debug", 3)) {
short_form = ISC_FALSE;
showsearch = ISC_TRUE;
} else if (CHECKOPT("nodebug", 5) == 0) {
} else if (CHECKOPT("nodebug", 5)) {
short_form = ISC_TRUE;
showsearch = ISC_FALSE;
} else if (CHECKOPT("d2", 2) == 0) {
} else if (CHECKOPT("d2", 2)) {
debugging = ISC_TRUE;
} else if (CHECKOPT("nod2", 4) == 0) {
} else if (CHECKOPT("nod2", 4)) {
debugging = ISC_FALSE;
} else if (CHECKOPT("search", 3) == 0) {
} else if (CHECKOPT("search", 3)) {
usesearch = ISC_TRUE;
} else if (CHECKOPT("nosearch", 5) == 0) {
} else if (CHECKOPT("nosearch", 5)) {
usesearch = ISC_FALSE;
} else if (CHECKOPT("sil", 3) == 0) {
} else if (CHECKOPT("sil", 3)) {
/* deprecation_msg = ISC_FALSE; */
} else if (CHECKOPT("fail", 3) == 0) {
} else if (CHECKOPT("fail", 3)) {
nofail=ISC_FALSE;
} else if (CHECKOPT("nofail", 5) == 0) {
} else if (CHECKOPT("nofail", 5)) {
nofail=ISC_TRUE;
} else if (strncasecmp(opt, "ndots=", 6) == 0) {
set_ndots(&opt[6]);
@@ -814,12 +813,12 @@ addlookup(char *opt) {
static void
do_next_command(char *input) {
char *ptr, *arg;
char *ptr, *arg, *last;
ptr = next_token(&input, " \t\r\n");
if (ptr == NULL)
if ((ptr = strtok_r(input, " \t\r\n", &last)) == NULL) {
return;
arg = next_token(&input, " \t\r\n");
}
arg = strtok_r(NULL, " \t\r\n", &last);
if ((strcasecmp(ptr, "set") == 0) &&
(arg != NULL))
setoption(arg);
+12 -15
View File
@@ -173,8 +173,7 @@ initname(char *setname) {
isc_result_t result;
isc_buffer_t buf;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
namestr = setname;
isc_buffer_init(&buf, setname, strlen(setname));
@@ -254,8 +253,8 @@ load_db(const char *filename, dns_db_t **dbp, dns_dbnode_t **nodep) {
rdclass, 0, NULL, dbp);
check_result(result, "dns_db_create()");
result = dns_db_load3(*dbp, filename,
dns_masterformat_text, DNS_MASTER_HINT);
result = dns_db_load(*dbp, filename,
dns_masterformat_text, DNS_MASTER_HINT);
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE) {
fatal("can't load %s: %s", filename,
isc_result_totext(result));
@@ -379,9 +378,9 @@ formatset(dns_rdataset_t *rdataset) {
* which just separates fields with spaces. The huge tab stop width
* eliminates any tab characters.
*/
result = dns_master_stylecreate2(&style, styleflags,
0, 0, 0, 0, 0, 1000000, 0,
mctx);
result = dns_master_stylecreate(&style, styleflags,
0, 0, 0, 0, 0, 1000000, 0,
mctx);
check_result(result, "dns_master_stylecreate2 failed");
result = isc_buffer_allocate(mctx, &buf, MAX_CDS_RDATA_TEXT_SIZE);
@@ -671,8 +670,11 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
}
result = dns_dnssec_verify(name, rdataset, ki->dst,
ISC_FALSE, mctx, &sigrdata);
if (result != ISC_R_SUCCESS) {
ISC_FALSE, 0, mctx,
&sigrdata, NULL);
if (result != ISC_R_SUCCESS &&
result != DNS_R_FROMWILDCARD) {
vbprintf(1, "skip RRSIG by key %d:"
" verification failed: %s\n",
sig.keyid, isc_result_totext(result));
@@ -1234,11 +1236,7 @@ main(int argc, char *argv[]) {
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,
result = dst_lib_init(mctx, ectx, NULL,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
if (result != ISC_R_SUCCESS) {
fatal("could not initialize dst: %s",
@@ -1394,7 +1392,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);
+4 -10
View File
@@ -67,8 +67,7 @@ initname(char *setname) {
isc_result_t result;
isc_buffer_t buf;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
isc_buffer_init(&buf, setname, strlen(setname));
isc_buffer_add(&buf, strlen(setname));
@@ -114,7 +113,7 @@ loadset(const char *filename, dns_rdataset_t *rdataset) {
db_load_from_stream(db, stdin);
filename = "input";
} else {
result = dns_db_load(db, filename);
result = dns_db_load(db, filename, dns_masterformat_text, 0);
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
fatal("can't load %s: %s", filename,
isc_result_totext(result));
@@ -206,8 +205,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");
@@ -479,14 +477,11 @@ main(int argc, char **argv) {
if (ectx == NULL)
setup_entropy(mctx, NULL, &ectx);
result = dst_lib_init(mctx, ectx,
result = dst_lib_init(mctx, ectx, NULL,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
if (result != ISC_R_SUCCESS)
fatal("could not initialize dst: %s",
isc_result_totext(result));
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
if (result != ISC_R_SUCCESS)
fatal("could not initialize hash");
isc_entropy_stopcallbacksources(ectx);
setup_logging(mctx, &log);
@@ -548,7 +543,6 @@ 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();
+5 -11
View File
@@ -72,8 +72,7 @@ initname(char *setname) {
isc_result_t result;
isc_buffer_t buf;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
isc_buffer_init(&buf, setname, strlen(setname));
isc_buffer_add(&buf, strlen(setname));
@@ -119,8 +118,8 @@ loadset(const char *filename, dns_rdataset_t *rdataset) {
db_load_from_stream(db, stdin);
filename = "input";
} else {
result = dns_db_load3(db, filename, dns_masterformat_text,
DNS_MASTER_NOTTL);
result = dns_db_load(db, filename, dns_masterformat_text,
DNS_MASTER_NOTTL);
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
fatal("can't load %s: %s", filename,
isc_result_totext(result));
@@ -181,8 +180,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");
@@ -408,14 +406,11 @@ main(int argc, char **argv) {
if (ectx == NULL)
setup_entropy(mctx, NULL, &ectx);
result = dst_lib_init(mctx, ectx,
result = dst_lib_init(mctx, ectx, NULL,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
if (result != ISC_R_SUCCESS)
fatal("could not initialize dst: %s",
isc_result_totext(result));
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
if (result != ISC_R_SUCCESS)
fatal("could not initialize hash");
isc_entropy_stopcallbacksources(ectx);
setup_logging(mctx, &log);
@@ -459,7 +454,6 @@ 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();
+3 -4
View File
@@ -349,8 +349,8 @@ 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, ectx, engine,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
if (ret != ISC_R_SUCCESS)
fatal("could not initialize dst: %s",
isc_result_totext(ret));
@@ -365,8 +365,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]));
+9 -10
View File
@@ -496,8 +496,8 @@ 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, ectx, engine,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
if (ret != ISC_R_SUCCESS)
fatal("could not initialize dst: %s",
isc_result_totext(ret));
@@ -513,8 +513,7 @@ main(int argc, char **argv) {
if (argc > isc_commandline_index + 1)
fatal("extraneous arguments");
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
name = dns_fixedname_initname(&fname);
isc_buffer_init(&buf, argv[isc_commandline_index],
strlen(argv[isc_commandline_index]));
isc_buffer_add(&buf, strlen(argv[isc_commandline_index]));
@@ -862,15 +861,15 @@ 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);
+2 -6
View File
@@ -182,14 +182,11 @@ 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, ectx, engine,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
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,
@@ -271,7 +268,6 @@ main(int argc, char **argv) {
cleanup:
dst_key_free(&key);
isc_hash_destroy();
dst_lib_destroy();
cleanup_entropy(&ectx);
if (verbose > 10)
+2 -6
View File
@@ -380,14 +380,11 @@ 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, ectx, engine,
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
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) {
@@ -672,7 +669,6 @@ 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)
+30 -47
View File
@@ -295,8 +295,8 @@ signwithkey(dns_name_t *name, dns_rdataset_t *rdataset, dst_key_t *key,
if (tryverify) {
result = dns_dnssec_verify(name, rdataset, key,
ISC_TRUE, mctx, &trdata);
if (result == ISC_R_SUCCESS) {
ISC_TRUE, 0, mctx, &trdata, NULL);
if (result == ISC_R_SUCCESS || result == DNS_R_FROMWILDCARD) {
vbprintf(3, "\tsignature verified\n");
INCSTAT(nverified);
} else {
@@ -456,8 +456,9 @@ setverifies(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
dns_rdata_t *rrsig)
{
isc_result_t result;
result = dns_dnssec_verify(name, set, key, ISC_FALSE, mctx, rrsig);
if (result == ISC_R_SUCCESS) {
result = dns_dnssec_verify(name, set, key, ISC_FALSE, 0, mctx, rrsig,
NULL);
if (result == ISC_R_SUCCESS || result == DNS_R_FROMWILDCARD) {
INCSTAT(nverified);
return (ISC_TRUE);
} else {
@@ -849,8 +850,7 @@ addnowildcardhash(hashlist_t *l, /*const*/ dns_name_t *name,
isc_result_t result;
char namestr[DNS_NAME_FORMATSIZE];
dns_fixedname_init(&fixed);
wild = dns_fixedname_name(&fixed);
wild = dns_fixedname_initname(&fixed);
result = dns_name_concatenate(dns_wildcardname, name, wild, NULL);
if (result == ISC_R_NOSPACE)
@@ -905,7 +905,7 @@ opendb(const char *prefix, dns_name_t *name, dns_rdataclass_t rdclass,
rdclass, 0, NULL, dbp);
check_result(result, "dns_db_create()");
result = dns_db_load3(*dbp, filename, inputformat, DNS_MASTER_HINT);
result = dns_db_load(*dbp, filename, inputformat, DNS_MASTER_HINT);
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
dns_db_detach(dbp);
}
@@ -1236,8 +1236,7 @@ get_soa_ttls(void) {
isc_result_t result;
dns_rdata_t rdata = DNS_RDATA_INIT;
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
name = dns_fixedname_initname(&fname);
dns_rdataset_init(&soaset);
result = dns_db_find(gdb, gorigin, gversion, dns_rdatatype_soa,
0, 0, NULL, name, &soaset, NULL);
@@ -1406,8 +1405,7 @@ signapex(void) {
dns_name_t *name;
isc_result_t result;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
result = dns_dbiterator_seek(gdbiter, gorigin);
check_result(result, "dns_dbiterator_seek()");
result = dns_dbiterator_current(gdbiter, &node, name);
@@ -1457,8 +1455,7 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
fname = isc_mem_get(mctx, sizeof(dns_fixedname_t));
if (fname == NULL)
fatal("out of memory");
dns_fixedname_init(fname);
name = dns_fixedname_name(fname);
name = dns_fixedname_initname(fname);
node = NULL;
found = ISC_FALSE;
while (!found) {
@@ -1492,8 +1489,7 @@ assignwork(isc_task_t *task, isc_task_t *worker) {
(zonecut == NULL ||
!dns_name_issubdomain(name, zonecut))) {
if (is_delegation(gdb, gversion, gorigin, name, node, NULL)) {
dns_fixedname_init(&fzonecut);
zonecut = dns_fixedname_name(&fzonecut);
zonecut = dns_fixedname_initname(&fzonecut);
dns_name_copy(name, zonecut, NULL);
if (!OPTOUT(nsec3flags) ||
secure(name, node))
@@ -1736,10 +1732,8 @@ nsecify(void) {
isc_uint32_t nsttl = 0;
dns_rdataset_init(&rdataset);
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
dns_fixedname_init(&fnextname);
nextname = dns_fixedname_name(&fnextname);
name = dns_fixedname_initname(&fname);
nextname = dns_fixedname_initname(&fnextname);
dns_fixedname_init(&fzonecut);
zonecut = NULL;
@@ -2151,8 +2145,7 @@ cleanup_zone(void) {
dns_diff_init(mctx, &add);
dns_diff_init(mctx, &del);
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
name = dns_fixedname_initname(&fname);
dns_rdataset_init(&rdataset);
result = dns_db_createiterator(gdb, 0, &dbiter);
@@ -2212,10 +2205,8 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
unsigned int count, nlabels;
dns_rdataset_init(&rdataset);
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
dns_fixedname_init(&fnextname);
nextname = dns_fixedname_name(&fnextname);
name = dns_fixedname_initname(&fname);
nextname = dns_fixedname_initname(&fnextname);
dns_fixedname_init(&fzonecut);
zonecut = NULL;
@@ -2459,8 +2450,7 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) {
isc_buffer_init(&b, origin, len);
isc_buffer_add(&b, len);
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
name = dns_fixedname_initname(&fname);
result = dns_name_fromtext(name, &b, dns_rootname, 0, NULL);
if (result != ISC_R_SUCCESS)
fatal("failed converting name '%s' to dns format: %s",
@@ -2470,7 +2460,7 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) {
rdclass, 0, NULL, db);
check_result(result, "dns_db_create()");
result = dns_db_load2(*db, file, inputformat);
result = dns_db_load(*db, file, inputformat, 0);
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
fatal("failed loading zone from '%s': %s",
file, isc_result_totext(result));
@@ -2636,7 +2626,7 @@ build_final_keylist(void) {
* Find keys that match this zone in the key repository.
*/
result = dns_dnssec_findmatchingkeys(gorigin, directory,
mctx, &matchkeys);
now, mctx, &matchkeys);
if (result == ISC_R_NOTFOUND) {
result = ISC_R_SUCCESS;
}
@@ -2808,8 +2798,7 @@ set_nsec3params(isc_boolean_t update, isc_boolean_t set_salt,
* (This assumes all NSEC3 records agree.)
*/
dns_fixedname_init(&fname);
hashname = dns_fixedname_name(&fname);
hashname = dns_fixedname_initname(&fname);
result = dns_nsec3_hashname(&fname, NULL, NULL,
gorigin, gorigin, dns_hash_sha1,
orig_iter, orig_salt, orig_saltlen);
@@ -2898,8 +2887,7 @@ writeset(const char *prefix, dns_rdatatype_t type) {
unsigned int labels;
dns_name_init(&tname, NULL);
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
labels = dns_name_countlabels(gorigin);
dns_name_getlabelsequence(gorigin, 0, labels - 1, &tname);
result = dns_name_concatenate(&tname, dlv, name, NULL);
@@ -2985,7 +2973,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);
@@ -3364,8 +3353,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)");
@@ -3503,15 +3491,11 @@ main(int argc, char *argv[]) {
if (!pseudorandom)
eflags |= ISC_ENTROPY_GOODONLY;
result = dst_lib_init2(mctx, ectx, engine, eflags);
result = dst_lib_init(mctx, ectx, engine, eflags);
if (result != ISC_R_SUCCESS)
fatal("could not initialize dst: %s",
isc_result_totext(result));
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
if (result != ISC_R_SUCCESS)
fatal("could not create hash context");
isc_stdtime_get(&now);
if (startstr != NULL) {
@@ -3637,8 +3621,8 @@ main(int argc, char *argv[]) {
if (output_dnssec_only && set_maxttl)
fatal("option -D cannot be used with -M");
result = dns_master_stylecreate(&dsstyle, DNS_STYLEFLAG_NO_TTL,
0, 24, 0, 0, 0, 8, mctx);
result = dns_master_stylecreate(&dsstyle, DNS_STYLEFLAG_NO_TTL,
0, 24, 0, 0, 0, 8, 0xffffffff, mctx);
check_result(result, "dns_master_stylecreate");
gdb = NULL;
@@ -3882,9 +3866,9 @@ main(int argc, char *argv[]) {
header.flags = DNS_MASTERRAW_SOURCESERIALSET;
header.sourceserial = serialnum;
}
result = dns_master_dumptostream3(mctx, gdb, gversion,
masterstyle, outputformat,
&header, outfp);
result = dns_master_dumptostream(mctx, gdb, gversion,
masterstyle, outputformat,
&header, outfp);
check_result(result, "dns_master_dumptostream3");
}
@@ -3925,7 +3909,6 @@ 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();
+3 -9
View File
@@ -97,8 +97,7 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) {
isc_buffer_init(&b, origin, len);
isc_buffer_add(&b, len);
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
name = dns_fixedname_initname(&fname);
result = dns_name_fromtext(name, &b, dns_rootname, 0, NULL);
if (result != ISC_R_SUCCESS)
fatal("failed converting name '%s' to dns format: %s",
@@ -108,7 +107,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:
@@ -281,15 +280,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, ectx, engine, ISC_ENTROPY_BLOCKING);
if (result != ISC_R_SUCCESS)
fatal("could not initialize dst: %s",
isc_result_totext(result));
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
if (result != ISC_R_SUCCESS)
fatal("could not create hash context");
isc_stdtime_get(&now);
rdclass = strtoclass(classname);
@@ -340,7 +335,6 @@ main(int argc, char *argv[]) {
cleanup_logging(&log);
dst_lib_destroy();
isc_hash_destroy();
cleanup_entropy(&ectx);
dns_name_destroy();
if (verbose > 10)
+8 -9
View File
@@ -239,11 +239,9 @@ setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx) {
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;
@@ -506,6 +504,7 @@ key_collision(dst_key_t *dstkey, dns_name_t *name, const char *dir,
dns_secalg_t alg;
char filename[ISC_DIR_NAMEMAX];
isc_buffer_t fileb;
isc_stdtime_t now;
if (exact != NULL)
*exact = ISC_FALSE;
@@ -529,7 +528,8 @@ key_collision(dst_key_t *dstkey, dns_name_t *name, const char *dir,
}
ISC_LIST_INIT(matchkeys);
result = dns_dnssec_findmatchingkeys(name, dir, mctx, &matchkeys);
isc_stdtime_get(&now);
result = dns_dnssec_findmatchingkeys(name, dir, now, mctx, &matchkeys);
if (result == ISC_R_NOTFOUND)
return (ISC_FALSE);
@@ -624,10 +624,11 @@ goodsig(dns_name_t *origin, dns_rdata_t *sigrdata, dns_name_t *name,
continue;
}
result = dns_dnssec_verify(name, rdataset, dstkey, ISC_FALSE,
mctx, sigrdata);
0, mctx, sigrdata, NULL);
dst_key_free(&dstkey);
if (result == ISC_R_SUCCESS)
if (result == ISC_R_SUCCESS || result == DNS_R_FROMWILDCARD) {
return(ISC_TRUE);
}
}
return (ISC_FALSE);
}
@@ -1714,10 +1715,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);
-1
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: dnssectool.h,v 1.33 2011/10/20 23:46:51 tbox Exp $ */
#ifndef DNSSECTOOL_H
#define DNSSECTOOL_H 1
-1
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: builtin.c,v 1.26 2012/01/21 19:44:18 each Exp $ */
/*! \file
* \brief
+2 -4
View File
@@ -89,11 +89,7 @@ options {\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\
recursive-clients 1000;\n\
request-nsid false;\n\
@@ -195,6 +191,7 @@ options {\n\
resolver-nonbackoff-tries 3;\n\
resolver-retry-interval 800; /* in milliseconds */\n\
# rfc2308-type1 <obsolete>;\n\
root-key-sentinel yes;\n\
servfail-ttl 1;\n\
# sortlist <none>\n\
stale-answer-enable false;\n\
@@ -247,6 +244,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\
-1
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: control.c,v 1.49 2012/01/31 23:47:31 tbox Exp $ */
/*! \file */
+2 -1
View File
@@ -230,7 +230,8 @@ address_ok(isc_sockaddr_t *sockaddr, dns_acl_t *acl) {
isc_netaddr_fromsockaddr(&netaddr, sockaddr);
result = dns_acl_match(&netaddr, NULL, acl, env, &match, NULL);
result = dns_acl_match(&netaddr, NULL, NULL, 0, NULL, acl, env, &match,
NULL);
if (result != ISC_R_SUCCESS || match <= 0)
return (ISC_FALSE);
-2
View File
@@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# $Id: convertxsl.pl,v 1.14 2008/07/17 23:43:26 jinmei Exp $
use strict;
use warnings;
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: dlz_dlopen_driver.h,v 1.4 2011/03/17 09:25:53 fdupont Exp $ */
#ifndef DLZ_DLOPEN_DRIVER_H
#define DLZ_DLOPEN_DRIVER_H
-1
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: config.h,v 1.16 2009/06/11 23:47:55 tbox Exp $ */
#ifndef NAMED_CONFIG_H
#define NAMED_CONFIG_H 1
-1
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: logconf.h,v 1.17 2007/06/19 23:46:59 tbox Exp $ */
#ifndef NAMED_LOGCONF_H
#define NAMED_LOGCONF_H 1
+4 -19
View File
@@ -470,6 +470,7 @@ parse_command_line(int argc, char *argv[]) {
int ch;
int port;
const char *p;
char *last;
save_command_line(argc, argv);
@@ -607,14 +608,14 @@ parse_command_line(int argc, char *argv[]) {
else if (!strncmp(isc_commandline_argument,
"mkeytimers=", 11))
{
p = strtok(isc_commandline_argument + 11, "/");
p = strtok_r(isc_commandline_argument + 11, "/", &last);
if (p == NULL)
named_main_earlyfatal("bad mkeytimer");
dns_zone_mkey_hour = atoi(p);
if (dns_zone_mkey_hour == 0)
named_main_earlyfatal("bad mkeytimer");
p = strtok(NULL, "/");
p = strtok_r(NULL, "/", &last);
if (p == NULL) {
dns_zone_mkey_day =
(24 * dns_zone_mkey_hour);
@@ -626,7 +627,7 @@ parse_command_line(int argc, char *argv[]) {
if (dns_zone_mkey_day < dns_zone_mkey_hour)
named_main_earlyfatal("bad mkeytimer");
p = strtok(NULL, "/");
p = strtok_r(NULL, "/", &last);
if (p == NULL) {
dns_zone_mkey_month =
(30 * dns_zone_mkey_day);
@@ -852,15 +853,6 @@ create_managers(void) {
return (ISC_R_UNEXPECTED);
}
result = isc_hash_create(named_g_mctx, named_g_entropy,
DNS_NAME_MAXWIRE);
if (result != ISC_R_SUCCESS) {
UNEXPECTED_ERROR(__FILE__, __LINE__,
"isc_hash_create() failed: %s",
isc_result_totext(result));
return (ISC_R_UNEXPECTED);
}
return (ISC_R_SUCCESS);
}
@@ -872,13 +864,6 @@ destroy_managers(void) {
isc_taskmgr_destroy(&named_g_taskmgr);
isc_timermgr_destroy(&named_g_timermgr);
isc_socketmgr_destroy(&named_g_socketmgr);
/*
* isc_hash_destroy() cannot be called as long as a resolver may be
* running. Calling this after isc_taskmgr_destroy() ensures the
* call is safe.
*/
isc_hash_destroy();
}
static void
+73 -99
View File
@@ -656,8 +656,7 @@ configure_view_nametable(const cfg_obj_t *vconfig, const cfg_obj_t *config,
if (result != ISC_R_SUCCESS)
return (result);
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
for (element = cfg_list_first(obj);
element != NULL;
element = cfg_list_next(element)) {
@@ -869,8 +868,8 @@ load_view_keys(const cfg_obj_t *keys, const cfg_obj_t *vconfig,
* initializing key; that's why 'managed'
* is duplicated below.
*/
CHECK(dns_keytable_add2(secroots, managed,
managed, &dstkey));
CHECK(dns_keytable_add(secroots, managed,
managed, &dstkey));
}
}
@@ -1095,8 +1094,7 @@ mustbesecure(const cfg_obj_t *mbs, dns_resolver_t *resolver) {
isc_result_t result;
isc_buffer_t b;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
for (element = cfg_list_first(mbs);
element != NULL;
element = cfg_list_next(element))
@@ -1532,8 +1530,7 @@ disable_algorithms(const cfg_obj_t *disabled, dns_resolver_t *resolver) {
dns_name_t *name;
isc_buffer_t b;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
str = cfg_obj_asstring(cfg_tuple_get(disabled, "name"));
isc_buffer_constinit(&b, str, strlen(str));
isc_buffer_add(&b, strlen(str));
@@ -1578,8 +1575,7 @@ disable_ds_digests(const cfg_obj_t *disabled, dns_resolver_t *resolver) {
dns_name_t *name;
isc_buffer_t b;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
str = cfg_obj_asstring(cfg_tuple_get(disabled, "name"));
isc_buffer_constinit(&b, str, strlen(str));
isc_buffer_add(&b, strlen(str));
@@ -1620,8 +1616,7 @@ on_disable_list(const cfg_obj_t *disablelist, dns_name_t *zonename) {
const char *str;
isc_buffer_t b;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
for (element = cfg_list_first(disablelist);
element != NULL;
@@ -1815,8 +1810,7 @@ dns64_reverse(dns_view_t *view, isc_mem_t *mctx, isc_netaddr_t *na,
dns64_dbtype[2] = server;
if (contact != NULL)
dns64_dbtype[3] = contact;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
isc_buffer_constinit(&b, reverse, strlen(reverse));
isc_buffer_add(&b, strlen(reverse));
CHECK(dns_name_fromtext(name, &b, dns_rootname, 0, NULL));
@@ -3228,12 +3222,9 @@ create_empty_zone(dns_zone_t *zone, dns_name_t *name, dns_view_t *view,
int order;
unsigned int nlabels;
dns_fixedname_init(&fixed);
zname = dns_fixedname_name(&fixed);
dns_fixedname_init(&nsfixed);
ns = dns_fixedname_name(&nsfixed);
dns_fixedname_init(&cfixed);
contact = dns_fixedname_name(&cfixed);
zname = dns_fixedname_initname(&fixed);
ns = dns_fixedname_initname(&nsfixed);
contact = dns_fixedname_initname(&cfixed);
/*
* Look for forward "zones" beneath this empty zone and if so
@@ -3350,7 +3341,7 @@ create_empty_zone(dns_zone_t *zone, dns_name_t *name, dns_view_t *view,
dns_db_closeversion(db, &version, ISC_TRUE);
CHECK(dns_zone_replacedb(zone, db, ISC_FALSE));
}
dns_zone_setoption2(zone, DNS_ZONEOPT2_AUTOEMPTY, ISC_TRUE);
dns_zone_setoption(zone, DNS_ZONEOPT_AUTOEMPTY, ISC_TRUE);
dns_zone_setview(zone, view);
CHECK(dns_view_addzone(view, zone));
@@ -3552,7 +3543,7 @@ configure_dnstap(const cfg_obj_t **maps, dns_view_t *view) {
fstrm_iothr_options_set_reopen_interval(fopt, i);
}
CHECKM(dns_dt_create2(named_g_mctx, dmode, dpath,
CHECKM(dns_dt_create(named_g_mctx, dmode, dpath,
&fopt, named_g_server->task,
&named_g_server->dtenv),
"unable to create dnstap environment");
@@ -3615,8 +3606,8 @@ create_mapped_acl(void) {
if (result != ISC_R_SUCCESS)
return (result);
result = dns_iptable_addprefix2(acl->iptable, &addr, 96,
ISC_TRUE, ISC_FALSE);
result = dns_iptable_addprefix(acl->iptable, &addr, 96,
ISC_TRUE, ISC_FALSE);
if (result == ISC_R_SUCCESS)
dns_acl_attach(acl, &named_g_mapped);
dns_acl_detach(&acl);
@@ -4208,10 +4199,10 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
isc_mem_setname(cmctx, "cache", NULL);
CHECK(isc_mem_create(0, 0, &hmctx));
isc_mem_setname(hmctx, "cache_heap", NULL);
CHECK(dns_cache_create3(cmctx, hmctx, named_g_taskmgr,
named_g_timermgr, view->rdclass,
cachename, "rbt", 0, NULL,
&cache));
CHECK(dns_cache_create(cmctx, hmctx, named_g_taskmgr,
named_g_timermgr, view->rdclass,
cachename, "rbt", 0, NULL,
&cache));
isc_mem_detach(&cmctx);
isc_mem_detach(&hmctx);
}
@@ -4229,7 +4220,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
ISC_LINK_INIT(nsc, link);
ISC_LIST_APPEND(*cachelist, nsc, link);
}
dns_view_setcache2(view, cache, shared_cache);
dns_view_setcache(view, cache, shared_cache);
/*
* cache-file cannot be inherited if views are present, but this
@@ -4691,6 +4682,11 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
INSIST(result == ISC_R_SUCCESS);
view->trust_anchor_telemetry = cfg_obj_asboolean(obj);
obj = NULL;
result = named_config_get(maps, "root-key-sentinel", &obj);
INSIST(result == ISC_R_SUCCESS);
view->root_key_sentinel = cfg_obj_asboolean(obj);
CHECK(configure_view_acl(vconfig, config, named_g_config,
"allow-query-cache-on", NULL, actx,
named_g_mctx, &view->cacheonacl));
@@ -5030,10 +5026,9 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
if (result == ISC_R_SUCCESS) {
dns_name_t *dlv, *iscdlv;
dns_fixedname_t f;
dns_fixedname_init(&f);
/* Also log a warning if manually configured to dlv.isc.org */
iscdlv = dns_fixedname_name(&f);
iscdlv = dns_fixedname_initname(&f);
CHECK(dns_name_fromstring(iscdlv, "dlv.isc.org", 0, NULL));
for (element = cfg_list_first(obj);
@@ -5103,8 +5098,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
dns_fixedname_t fixed;
dns_name_t *name;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
for (element = cfg_list_first(obj);
element != NULL;
element = cfg_list_next(element))
@@ -5179,8 +5173,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
int empty_dbtypec = 4;
dns_zonestat_level_t statlevel;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
obj = NULL;
result = named_config_get(maps, "empty-server", &obj);
@@ -5254,7 +5247,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist,
* empty zone for it.
*/
result = dns_fwdtable_find(view->fwdtable, name,
&dnsforwarders);
NULL, &dnsforwarders);
if (result == ISC_R_SUCCESS &&
dnsforwarders->fwdpolicy == dns_fwdpolicy_only)
continue;
@@ -5423,8 +5416,7 @@ configure_alternates(const cfg_obj_t *config, dns_view_t *view,
isc_buffer_constinit(&buffer, str, strlen(str));
isc_buffer_add(&buffer, strlen(str));
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
CHECK(dns_name_fromtext(name, &buffer, dns_rootname, 0,
NULL));
@@ -6145,7 +6137,8 @@ add_keydata_zone(dns_view_t *view, const char *directory, isc_mem_t *mctx) {
defaultview ? "managed-keys" : view->name,
defaultview ? "bind" : "mkeys",
filename, sizeof(filename)));
CHECK(dns_zone_setfile(zone, filename));
CHECK(dns_zone_setfile(zone, filename, dns_masterformat_text,
&dns_master_style_default));
dns_zone_setview(zone, view);
dns_zone_settype(zone, dns_zone_key);
@@ -6266,8 +6259,8 @@ add_listenelt(isc_mem_t *mctx, ns_listenlist_t *list, isc_sockaddr_t *addr,
if (result != ISC_R_SUCCESS)
return (result);
result = dns_iptable_addprefix(src_acl->iptable,
&netaddr, 128, ISC_TRUE);
result = dns_iptable_addprefix(src_acl->iptable, &netaddr,
128, ISC_TRUE, ISC_FALSE);
if (result != ISC_R_SUCCESS)
goto clean;
@@ -6537,8 +6530,7 @@ dotat(dns_keytable_t *keytable, dns_keynode_t *keynode, void *arg) {
}
isc_textregion_consume(&r, m);
}
dns_fixedname_init(&fixed);
tatname = dns_fixedname_name(&fixed);
tatname = dns_fixedname_initname(&fixed);
result = dns_name_fromstring2(tatname, label, name, 0, NULL);
if (result != ISC_R_SUCCESS) {
return;
@@ -6565,9 +6557,9 @@ dotat(dns_keytable_t *keytable, dns_keynode_t *keynode, void *arg) {
result = dns_resolver_createfetch(view->resolver, tatname,
dns_rdatatype_null, NULL, NULL,
NULL, 0, tat->task, tat_done, tat,
&tat->rdataset, &tat->sigrdataset,
&tat->fetch);
NULL, NULL, 0, 0, 0, NULL, tat->task,
tat_done, tat, &tat->rdataset,
&tat->sigrdataset, &tat->fetch);
if (result != ISC_R_SUCCESS) {
isc_task_detach(&tat->task);
@@ -6819,7 +6811,7 @@ generate_session_key(const char *filename, const char *keynamestr,
/* generate key */
result = dst_key_generate(keyname, algtype, bits, 1, 0,
DNS_KEYPROTO_ANY, dns_rdataclass_in,
mctx, &key);
mctx, &key, NULL);
if (result != ISC_R_SUCCESS)
return (result);
@@ -6915,10 +6907,9 @@ configure_session_key(const cfg_obj_t **maps, named_server_t *server,
result = named_config_get(maps, "session-keyname", &obj);
INSIST(result == ISC_R_SUCCESS);
keynamestr = cfg_obj_asstring(obj);
dns_fixedname_init(&fname);
isc_buffer_constinit(&buffer, keynamestr, strlen(keynamestr));
isc_buffer_add(&buffer, strlen(keynamestr));
keyname = dns_fixedname_name(&fname);
keyname = dns_fixedname_initname(&fname);
result = dns_name_fromtext(keyname, &buffer, dns_rootname, 0, NULL);
if (result != ISC_R_SUCCESS)
return (result);
@@ -7224,8 +7215,7 @@ configure_zone_setviewcommit(isc_result_t result, const cfg_obj_t *zconfig,
dns_zone_t *raw = NULL;
zname = cfg_obj_asstring(cfg_tuple_get(zconfig, "name"));
dns_fixedname_init(&fixorigin);
origin = dns_fixedname_name(&fixorigin);
origin = dns_fixedname_initname(&fixorigin);
result2 = dns_name_fromstring(origin, zname, 0, NULL);
if (result2 != ISC_R_SUCCESS) {
@@ -7573,8 +7563,7 @@ get_newzone_config(dns_view_t *view, const char *zonename,
/* Normalize zone name */
isc_buffer_constinit(&b, zonename, strlen(zonename));
isc_buffer_add(&b, strlen(zonename));
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
name = dns_fixedname_initname(&fname);
CHECK(dns_name_fromtext(name, &b, dns_rootname,
DNS_NAME_DOWNCASE, NULL));
dns_name_format(name, zname, sizeof(zname));
@@ -8547,18 +8536,7 @@ load_configuration(const char *filename, named_server_t *server,
}
}
if (randomdev == NULL) {
#ifdef ISC_PLATFORM_CRYPTORANDOM
isc_entropy_usehook(named_g_entropy, ISC_TRUE);
#else
if ((obj != NULL) && !cfg_obj_isvoid(obj))
level = ISC_LOG_INFO;
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
NAMED_LOGMODULE_SERVER, level,
"no source of entropy found");
if ((obj == NULL) || cfg_obj_isvoid(obj)) {
CHECK(ISC_R_FAILURE);
}
#endif
} else {
result = isc_entropy_createfilesource(named_g_entropy,
randomdev);
@@ -9012,7 +8990,7 @@ load_configuration(const char *filename, named_server_t *server,
{
dns_view_setviewrevert(view);
(void)dns_zt_apply(view->zonetable, ISC_FALSE,
removed, view);
NULL, removed, view);
}
dns_view_detach(&view);
}
@@ -9247,8 +9225,6 @@ run_server(isc_task_t *task, isc_event_t *event) {
CHECKFATAL(load_configuration(named_g_conffile, server, ISC_TRUE),
"loading configuration");
isc_hash_init();
CHECKFATAL(load_zones(server, ISC_TRUE, ISC_FALSE), "loading zones");
#ifdef ENABLE_AFL
named_g_run_done = ISC_TRUE;
@@ -9425,8 +9401,8 @@ named_server_create(isc_mem_t *mctx, named_server_t **serverp) {
server->in_roothints = NULL;
/* Must be first. */
CHECKFATAL(dst_lib_init2(named_g_mctx, named_g_entropy,
named_g_engine, ISC_ENTROPY_GOODONLY),
CHECKFATAL(dst_lib_init(named_g_mctx, named_g_entropy,
named_g_engine, ISC_ENTROPY_GOODONLY),
"initializing DST");
CHECKFATAL(dns_rootns_create(mctx, dns_rdataclass_in, NULL,
@@ -9912,8 +9888,7 @@ zone_from_args(named_server_t *server, isc_lex_t *lex, const char *zonetxt,
strlcpy(zonename, redirect ? "." : zonetxt,
DNS_NAME_FORMATSIZE);
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
name = dns_fixedname_initname(&fname);
CHECK(dns_name_fromstring(name, zonebuf, 0, NULL));
/* Look for the optional class name. */
@@ -10381,7 +10356,7 @@ add_view_tolist(struct dumpcontext *dctx, dns_view_t *view) {
ISC_LIST_INIT(vle->zonelist);
ISC_LIST_APPEND(dctx->viewlist, vle, link);
if (dctx->dumpzones)
result = dns_zt_apply(view->zonetable, ISC_TRUE,
result = dns_zt_apply(view->zonetable, ISC_TRUE, NULL,
add_zone_tolist, dctx);
return (result);
}
@@ -10878,7 +10853,7 @@ named_server_validation(named_server_t *server, isc_lex_t *lex,
{
if (ptr != NULL && strcasecmp(ptr, view->name) != 0)
continue;
CHECK(dns_view_flushcache(view));
CHECK(dns_view_flushcache(view, ISC_FALSE));
if (set) {
view->enablevalidation = enable;
@@ -10969,7 +10944,7 @@ named_server_flushcache(named_server_t *server, isc_lex_t *lex) {
if (ptr != NULL && !nsc->needflush)
continue;
nsc->needflush = ISC_TRUE;
result = dns_view_flushcache2(nsc->primaryview, ISC_FALSE);
result = dns_view_flushcache(nsc->primaryview, ISC_FALSE);
if (result != ISC_R_SUCCESS) {
flushed = ISC_FALSE;
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
@@ -11000,7 +10975,7 @@ named_server_flushcache(named_server_t *server, isc_lex_t *lex) {
nsc = ISC_LIST_NEXT(nsc, link)) {
if (!nsc->needflush || nsc->cache != view->cache)
continue;
result = dns_view_flushcache2(view, ISC_TRUE);
result = dns_view_flushcache(view, ISC_TRUE);
if (result != ISC_R_SUCCESS) {
flushed = ISC_FALSE;
isc_log_write(named_g_lctx,
@@ -11073,8 +11048,7 @@ named_server_flushnode(named_server_t *server, isc_lex_t *lex,
strlcpy(target, ptr, DNS_NAME_FORMATSIZE);
isc_buffer_constinit(&b, target, strlen(target));
isc_buffer_add(&b, strlen(target));
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
result = dns_name_fromtext(name, &b, dns_rootname, 0, NULL);
if (result != ISC_R_SUCCESS)
return (result);
@@ -11299,8 +11273,7 @@ delete_keynames(dns_tsig_keyring_t *ring, char *target,
dns_tsigkey_t *tkey;
dns_name_init(&foundname, NULL);
dns_fixedname_init(&fixedorigin);
origin = dns_fixedname_name(&fixedorigin);
origin = dns_fixedname_initname(&fixedorigin);
again:
dns_rbtnodechain_init(&chain, ring->mctx);
@@ -11418,8 +11391,7 @@ list_keynames(dns_view_t *view, dns_tsig_keyring_t *ring, isc_buffer_t **text,
viewname = "(global)";
dns_name_init(&foundname, NULL);
dns_fixedname_init(&fixedorigin);
origin = dns_fixedname_name(&fixedorigin);
origin = dns_fixedname_initname(&fixedorigin);
dns_rbtnodechain_init(&chain, ring->mctx);
result = dns_rbtnodechain_first(&chain, ring->keys, &foundname,
origin);
@@ -11623,7 +11595,7 @@ named_server_sync(named_server_t *server, isc_lex_t *lex, isc_buffer_t **text) {
view != NULL;
view = ISC_LIST_NEXT(view, link)) {
result = dns_zt_apply(view->zonetable, ISC_FALSE,
synczone, &cleanup);
NULL, synczone, &cleanup);
if (result != ISC_R_SUCCESS &&
tresult == ISC_R_SUCCESS)
tresult = result;
@@ -12364,8 +12336,7 @@ migrate_nzf(dns_view_t *view) {
/* Normalize zone name */
isc_buffer_constinit(&b, origin, strlen(origin));
isc_buffer_add(&b, strlen(origin));
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
name = dns_fixedname_initname(&fname);
CHECK(dns_name_fromtext(name, &b, dns_rootname,
DNS_NAME_DOWNCASE, NULL));
dns_name_format(name, zname, sizeof(zname));
@@ -12577,8 +12548,7 @@ delete_zoneconf(dns_view_t *view, cfg_parser_t *pctx,
DE_CONST(&zl->value.list, list);
dns_fixedname_init(&myfixed);
myname = dns_fixedname_name(&myfixed);
myname = dns_fixedname_initname(&myfixed);
for (elt = ISC_LIST_HEAD(*list);
elt != NULL;
@@ -13055,8 +13025,7 @@ named_server_changezone(named_server_t *server, char *command,
isc_buffer_constinit(&buf, zonename, strlen(zonename));
isc_buffer_add(&buf, strlen(zonename));
dns_fixedname_init(&fname);
dnsname = dns_fixedname_name(&fname);
dnsname = dns_fixedname_initname(&fname);
CHECK(dns_name_fromtext(dnsname, &buf, dns_rootname, 0, NULL));
if (redirect) {
@@ -13434,10 +13403,8 @@ find_name_in_list_from_map(const cfg_obj_t *config,
isc_result_t result;
if (strcmp(map_key_for_list, "zone") == 0) {
dns_fixedname_init(&fixed1);
dns_fixedname_init(&fixed2);
name1 = dns_fixedname_name(&fixed1);
name2 = dns_fixedname_name(&fixed2);
name1 = dns_fixedname_initname(&fixed1);
name2 = dns_fixedname_initname(&fixed2);
result = dns_name_fromstring(name1, name, 0, NULL);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
}
@@ -13869,7 +13836,8 @@ named_server_zonestatus(named_server_t *server, isc_lex_t *lex,
const char *type, *file;
char zonename[DNS_NAME_FORMATSIZE];
isc_uint32_t serial, signed_serial, nodes;
char serbuf[16], sserbuf[16], nodebuf[16], resignbuf[512];
char serbuf[16], sserbuf[16], nodebuf[16];
char resignbuf[DNS_NAME_FORMATSIZE + DNS_RDATATYPE_FORMATSIZE + 2];
char lbuf[ISC_FORMATHTTPTIMESTAMP_SIZE];
char xbuf[ISC_FORMATHTTPTIMESTAMP_SIZE];
char rbuf[ISC_FORMATHTTPTIMESTAMP_SIZE];
@@ -13938,10 +13906,18 @@ named_server_zonestatus(named_server_t *server, isc_lex_t *lex,
}
/* Serial number */
serial = dns_zone_getserial(mayberaw);
result = dns_zone_getserial(mayberaw, &serial);
/* XXXWPK TODO this is to mirror old behavior with dns_zone_getserial */
if (result != ISC_R_SUCCESS) {
serial = 0;
}
snprintf(serbuf, sizeof(serbuf), "%u", serial);
if (hasraw) {
signed_serial = dns_zone_getserial(zone);
result = dns_zone_getserial(zone, &signed_serial);
/* XXXWPK TODO ut supra */
if (result != ISC_R_SUCCESS) {
serial = 0;
}
snprintf(sserbuf, sizeof(sserbuf), "%u", signed_serial);
}
@@ -13999,8 +13975,7 @@ named_server_zonestatus(named_server_t *server, isc_lex_t *lex,
dns_rdataset_t next;
dns_rdataset_init(&next);
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
result = dns_db_getsigningtime(db, &next, name);
if (result == ISC_R_SUCCESS) {
@@ -14182,8 +14157,7 @@ named_server_nta(named_server_t *server, isc_lex_t *lex,
UNUSED(force);
dns_fixedname_init(&fn);
fname = dns_fixedname_name(&fn);
fname = dns_fixedname_initname(&fn);
/* Skip the command name. */
ptr = next_token(lex, text);
+46 -27
View File
@@ -100,7 +100,7 @@ user_zonetype( dns_zone_t *zone ) {
};
const struct zt *tp;
if ((dns_zone_getoptions2(zone) & DNS_ZONEOPT2_AUTOEMPTY) != 0)
if ((dns_zone_getoptions(zone) & DNS_ZONEOPT_AUTOEMPTY) != 0)
return ("builtin");
view = dns_zone_getview(zone);
@@ -1494,7 +1494,7 @@ zone_xmlrender(dns_zone_t *zone, void *arg) {
TRY0(xmlTextWriterEndElement(writer)); /* type */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "serial"));
if (dns_zone_getserial2(zone, &serial) == ISC_R_SUCCESS)
if (dns_zone_getserial(zone, &serial) == ISC_R_SUCCESS)
TRY0(xmlTextWriterWriteFormatString(writer, "%u", serial));
else
TRY0(xmlTextWriterWriteString(writer, ISC_XMLCHAR "-"));
@@ -1916,7 +1916,7 @@ generatexml(named_server_t *server, isc_uint32_t flags,
TRY0(xmlTextWriterStartElement(writer,
ISC_XMLCHAR "zones"));
result = dns_zt_apply(view->zonetable, ISC_TRUE,
zone_xmlrender, writer);
NULL, zone_xmlrender, writer);
if (result != ISC_R_SUCCESS)
goto error;
TRY0(xmlTextWriterEndElement(writer)); /* /zones */
@@ -2271,7 +2271,7 @@ zone_jsonrender(dns_zone_t *zone, void *arg) {
dns_rdataclass_format(rdclass, classbuf, sizeof(classbuf));
class_only = classbuf;
if (dns_zone_getserial2(zone, &serial) != ISC_R_SUCCESS)
if (dns_zone_getserial(zone, &serial) != ISC_R_SUCCESS)
zoneobj = addzone(zone_name_only, class_only,
user_zonetype(zone), 0, ISC_FALSE);
else
@@ -2609,8 +2609,10 @@ generatejson(named_server_t *server, size_t *msglen,
CHECKMEM(za);
if ((flags & STATS_JSON_ZONES) != 0) {
result = dns_zt_apply(view->zonetable, ISC_TRUE,
zone_jsonrender, za);
result = dns_zt_apply(view->zonetable,
ISC_TRUE,
NULL, zone_jsonrender,
za);
if (result != ISC_R_SUCCESS) {
goto error;
}
@@ -3104,6 +3106,7 @@ render_xsl(const char *url, isc_httpdurl_t *urlinfo,
isc_httpdfree_t **freecb, void **freecb_args)
{
isc_result_t result;
char *_headers = NULL;
UNUSED(url);
UNUSED(querystring);
@@ -3115,30 +3118,45 @@ render_xsl(const char *url, isc_httpdurl_t *urlinfo,
if (urlinfo->isstatic) {
isc_time_t when;
char *p = strcasestr(headers, "If-Modified-Since: ");
char *line, *saveptr;
const char *if_modified_since = "If-Modified-Since: ";
_headers = strdup(headers);
if (p != NULL) {
time_t t1, t2;
p += strlen("If-Modified-Since: ");
result = isc_time_parsehttptimestamp(p, &when);
if (result != ISC_R_SUCCESS)
goto send;
if (_headers == NULL) {
goto send;
}
result = isc_time_secondsastimet(&when, &t1);
if (result != ISC_R_SUCCESS)
goto send;
saveptr = NULL;
for (line = strtok_r(_headers, "\n", &saveptr);
line;
line = strtok_r(NULL, "\n", &saveptr)) {
if (strncasecmp(line, if_modified_since,
strlen(if_modified_since)) == 0) {
time_t t1, t2;
line += strlen(if_modified_since);
result = isc_time_parsehttptimestamp(line, &when);
if (result != ISC_R_SUCCESS) {
goto send;
}
result = isc_time_secondsastimet(&urlinfo->loadtime,
&t2);
if (result != ISC_R_SUCCESS)
goto send;
result = isc_time_secondsastimet(&when, &t1);
if (result != ISC_R_SUCCESS) {
goto send;
}
if (t1 < t2)
goto send;
result = isc_time_secondsastimet(&urlinfo->loadtime, &t2);
if (result != ISC_R_SUCCESS) {
goto send;
}
*retcode = 304;
*retmsg = "Not modified";
return (ISC_R_SUCCESS);
if (t1 < t2) {
goto send;
}
*retcode = 304;
*retmsg = "Not modified";
goto end;
}
}
}
@@ -3147,7 +3165,8 @@ render_xsl(const char *url, isc_httpdurl_t *urlinfo,
*retmsg = "OK";
isc_buffer_reinit(b, xslmsg, strlen(xslmsg));
isc_buffer_add(b, strlen(xslmsg));
end:
free(_headers);
return (ISC_R_SUCCESS);
}
@@ -3177,7 +3196,7 @@ client_ok(const isc_sockaddr_t *fromaddr, void *arg) {
isc_netaddr_fromsockaddr(&netaddr, fromaddr);
LOCK(&listener->lock);
if (dns_acl_match(&netaddr, NULL, listener->acl, env,
if (dns_acl_match(&netaddr, NULL, NULL, 0, NULL, listener->acl, env,
&match, NULL) == ISC_R_SUCCESS && match > 0)
{
UNLOCK(&listener->lock);
+3 -7
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: tkeyconf.c,v 1.33 2010/12/20 23:47:20 tbox Exp $ */
/*! \file */
@@ -69,8 +68,7 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
n = cfg_obj_asuint32(cfg_tuple_get(obj, "keyid"));
isc_buffer_constinit(&b, s, strlen(s));
isc_buffer_add(&b, strlen(s));
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
name = dns_fixedname_initname(&fname);
RETERR(dns_name_fromtext(name, &b, dns_rootname, 0, NULL));
type = DST_TYPE_PUBLIC|DST_TYPE_PRIVATE|DST_TYPE_KEY;
RETERR(dst_key_fromfile(name, (dns_keytag_t) n, DNS_KEYALG_DH,
@@ -83,8 +81,7 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
s = cfg_obj_asstring(obj);
isc_buffer_constinit(&b, s, strlen(s));
isc_buffer_add(&b, strlen(s));
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
name = dns_fixedname_initname(&fname);
RETERR(dns_name_fromtext(name, &b, dns_rootname, 0, NULL));
tctx->domain = isc_mem_get(mctx, sizeof(dns_name_t));
if (tctx->domain == NULL) {
@@ -102,8 +99,7 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
isc_buffer_constinit(&b, s, strlen(s));
isc_buffer_add(&b, strlen(s));
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
name = dns_fixedname_initname(&fname);
RETERR(dns_name_fromtext(name, &b, dns_rootname, 0, NULL));
RETERR(dst_gssapi_acquirecred(name, ISC_FALSE, &tctx->gsscred));
}
-1
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: tsigconf.c,v 1.35 2011/01/11 23:47:12 tbox Exp $ */
/*! \file */
-2
View File
@@ -7,8 +7,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# $Id: Makefile.in,v 1.15 2011/03/10 23:47:49 tbox Exp $
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
-1
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id$ */
#include <config.h>
+7 -19
View File
@@ -1003,36 +1003,24 @@ named_os_gethostname(char *buf, size_t len) {
return ((n == 0) ? ISC_R_SUCCESS : ISC_R_FAILURE);
}
static char *
next_token(char **stringp, const char *delim) {
char *res;
do {
res = strsep(stringp, delim);
if (res == NULL)
break;
} while (*res == '\0');
return (res);
}
void
named_os_shutdownmsg(char *command, isc_buffer_t *text) {
char *input, *ptr;
char *last, *ptr;
pid_t pid;
input = command;
/* Skip the command name. */
ptr = next_token(&input, " \t");
if (ptr == NULL)
if ((ptr = strtok_r(command, " \t", &last)) == NULL) {
return;
}
ptr = next_token(&input, " \t");
if (ptr == NULL)
if ((ptr = strtok_r(NULL, " \t", &last)) == NULL) {
return;
}
if (strcmp(ptr, "-p") != 0)
if (strcmp(ptr, "-p") != 0) {
return;
}
#ifdef HAVE_LINUXTHREADS
pid = mainpid;
-1
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: dlz_dlopen_driver.c,v 1.5 2011/10/14 00:52:32 marka Exp $ */
#include <config.h>
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: ntservice.h,v 1.6 2007/06/19 23:46:59 tbox Exp $ */
#ifndef NTSERVICE_H
#define NTSERVICE_H
-4
View File
@@ -9,8 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: ntservice.c,v 1.16 2011/01/13 08:50:29 tbox Exp $ */
#include <config.h>
#include <stdio.h>
@@ -48,8 +46,6 @@ ntservice_init(void) {
if (!hServiceStatus) {
named_main_earlyfatal(
"could not register service control handler");
UpdateSCM(SERVICE_STOPPED);
exit(1);
}
UpdateSCM(SERVICE_RUNNING);
} else {
-1
View File
@@ -54,7 +54,6 @@ named_paths_init(void) {
if (!Initialized)
isc_ntpaths_init();
named_g_conffile = isc_ntpaths_get(NAMED_CONF_PATH);
named_g_conffile = isc_ntpaths_get(NAMED_CONF_PATH);
named_g_defaultpidfile = isc_ntpaths_get(NAMED_PID_PATH);
named_g_defaultlockfile = isc_ntpaths_get(NAMED_LOCK_PATH);
+13 -8
View File
@@ -499,8 +499,7 @@ configure_staticstub_servernames(const cfg_obj_t *zconfig, dns_zone_t *zone,
obj = cfg_listelt_value(element);
str = cfg_obj_asstring(obj);
dns_fixedname_init(&fixed_name);
nsname = dns_fixedname_name(&fixed_name);
nsname = dns_fixedname_initname(&fixed_name);
isc_buffer_constinit(&b, str, strlen(str));
isc_buffer_add(&b, strlen(str));
@@ -1049,21 +1048,21 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
size_t signedlen = strlen(filename) + sizeof(SIGNED);
char *signedname;
RETERR(dns_zone_setfile3(raw, filename,
masterformat, masterstyle));
RETERR(dns_zone_setfile(raw, filename,
masterformat, masterstyle));
signedname = isc_mem_get(mctx, signedlen);
if (signedname == NULL)
return (ISC_R_NOMEMORY);
(void)snprintf(signedname, signedlen, "%s" SIGNED, filename);
result = dns_zone_setfile3(zone, signedname,
dns_masterformat_raw, NULL);
result = dns_zone_setfile(zone, signedname,
dns_masterformat_raw, NULL);
isc_mem_put(mctx, signedname, signedlen);
if (result != ISC_R_SUCCESS)
return (result);
} else
RETERR(dns_zone_setfile3(zone, filename,
masterformat, masterstyle));
RETERR(dns_zone_setfile(zone, filename,
masterformat, masterstyle));
obj = NULL;
result = cfg_map_get(zoptions, "journal", &obj);
@@ -1441,6 +1440,12 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
if (ztype == dns_zone_master || raw != NULL) {
isc_boolean_t allow = ISC_FALSE, maint = ISC_FALSE;
obj = NULL;
result = named_config_get(maps, "dnskey-sig-validity", &obj);
INSIST(result == ISC_R_SUCCESS && obj != NULL);
seconds = cfg_obj_asuint32(obj) * 86400;
dns_zone_setkeyvalidityinterval(zone, seconds);
obj = NULL;
result = named_config_get(maps, "sig-validity-interval", &obj);
INSIST(result == ISC_R_SUCCESS && obj != NULL);
+41 -62
View File
@@ -276,11 +276,9 @@ setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx) {
randomfile = NULL;
}
#ifdef ISC_PLATFORM_CRYPTORANDOM
if (randomfile == NULL) {
isc_entropy_usehook(*ectx, ISC_TRUE);
}
#endif
result = isc_entropy_usebestsource(*ectx, &source, randomfile,
usekeyboard);
@@ -565,8 +563,7 @@ setup_keystr(void) {
const dns_name_t *hmacname = NULL;
isc_uint16_t digestbits = 0;
dns_fixedname_init(&fkeyname);
mykeyname = dns_fixedname_name(&fkeyname);
mykeyname = dns_fixedname_initname(&fkeyname);
debug("Creating key...");
@@ -971,9 +968,6 @@ setup_system(void) {
if (entropy == NULL)
setup_entropy(gmctx, NULL, &entropy);
result = isc_hash_create(gmctx, entropy, DNS_NAME_MAXWIRE);
check_result(result, "isc_hash_create");
result = dns_dispatchmgr_create(gmctx, entropy, &dispatchmgr);
check_result(result, "dns_dispatchmgr_create");
@@ -992,13 +986,10 @@ setup_system(void) {
result = isc_task_onshutdown(global_task, shutdown_program, NULL);
check_result(result, "isc_task_onshutdown");
result = dst_lib_init(gmctx, entropy, 0);
result = dst_lib_init(gmctx, entropy, NULL, 0);
check_result(result, "dst_lib_init");
is_dst_up = ISC_TRUE;
/* moved after dst_lib_init() */
isc_hash_init();
attrmask = DNS_DISPATCHATTR_UDP | DNS_DISPATCHATTR_TCP;
attrmask |= DNS_DISPATCHATTR_IPV4 | DNS_DISPATCHATTR_IPV6;
@@ -1652,8 +1643,7 @@ evaluate_key(char *cmdline) {
return (STATUS_SYNTAX);
}
dns_fixedname_init(&fkeyname);
mykeyname = dns_fixedname_name(&fkeyname);
mykeyname = dns_fixedname_initname(&fkeyname);
n = strchr(namestr, ':');
if (n != NULL) {
@@ -1724,8 +1714,7 @@ evaluate_zone(char *cmdline) {
return (STATUS_SYNTAX);
}
dns_fixedname_init(&fuserzone);
userzone = dns_fixedname_name(&fuserzone);
userzone = dns_fixedname_initname(&fuserzone);
isc_buffer_init(&b, word, strlen(word));
isc_buffer_add(&b, strlen(word));
result = dns_name_fromtext(userzone, &b, dns_rootname, 0, NULL);
@@ -1994,8 +1983,7 @@ update_addordelete(char *cmdline, isc_boolean_t isdelete) {
goto failure;
}
dns_fixedname_init(&fixed);
bad = dns_fixedname_name(&fixed);
bad = dns_fixedname_initname(&fixed);
if (!dns_rdata_checknames(rdata, name, bad)) {
char namebuf[DNS_NAME_FORMATSIZE];
@@ -2499,11 +2487,11 @@ send_update(dns_name_t *zone, isc_sockaddr_t *master) {
if (updatemsg->tsigname)
updatemsg->tsigname->attributes |= DNS_NAMEATTR_NOCOMPRESS;
result = dns_request_createvia3(requestmgr, updatemsg, srcaddr,
master, options, tsigkey, timeout,
udp_timeout, udp_retries, global_task,
update_completed, NULL, &request);
check_result(result, "dns_request_createvia3");
result = dns_request_createvia(requestmgr, updatemsg, srcaddr,
master, -1, options, tsigkey, timeout,
udp_timeout, udp_retries, global_task,
update_completed, NULL, &request);
check_result(result, "dns_request_createvia");
if (debugging)
show_message(stdout, updatemsg, "Outgoing update query:");
@@ -2608,13 +2596,13 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
else
srcaddr = localaddr4;
result = dns_request_createvia3(requestmgr, soaquery, srcaddr,
addr, 0, NULL,
FIND_TIMEOUT * 20,
FIND_TIMEOUT, 3,
global_task, recvsoa, reqinfo,
&request);
check_result(result, "dns_request_createvia3");
result = dns_request_createvia(requestmgr, soaquery, srcaddr,
addr, -1, 0, NULL,
FIND_TIMEOUT * 20,
FIND_TIMEOUT, 3,
global_task, recvsoa, reqinfo,
&request);
check_result(result, "dns_request_createvia");
requests++;
return;
}
@@ -2709,8 +2697,7 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
* Save the zone name in case we need to try a second
* address.
*/
dns_fixedname_init(&fzname);
zname = dns_fixedname_name(&fzname);
zname = dns_fixedname_initname(&fzname);
dns_name_copy(name, zname, NULL);
}
@@ -2811,11 +2798,11 @@ sendrequest(isc_sockaddr_t *destaddr, dns_message_t *msg,
else
srcaddr = localaddr4;
result = dns_request_createvia3(requestmgr, msg, srcaddr, destaddr, 0,
default_servers ? NULL : tsigkey,
FIND_TIMEOUT * 20, FIND_TIMEOUT, 3,
global_task, recvsoa, reqinfo, request);
check_result(result, "dns_request_createvia3");
result = dns_request_createvia(requestmgr, msg, srcaddr, destaddr, -1,
0, default_servers ? NULL : tsigkey,
FIND_TIMEOUT * 20, FIND_TIMEOUT, 3,
global_task, recvsoa, reqinfo, request);
check_result(result, "dns_request_createvia");
requests++;
}
@@ -2916,40 +2903,36 @@ start_gssrequest(dns_name_t *master) {
memmove(kserver, &master_servers[master_inuse], sizeof(isc_sockaddr_t));
dns_fixedname_init(&fname);
servname = dns_fixedname_name(&fname);
servname = dns_fixedname_initname(&fname);
if (realm == NULL)
get_ticket_realm(gmctx);
result = isc_string_printf(servicename, sizeof(servicename),
"DNS/%s%s", namestr, realm ? realm : "");
if (result != ISC_R_SUCCESS)
fatal("isc_string_printf(servicename) failed: %s",
isc_result_totext(result));
result = snprintf(servicename, sizeof(servicename), "DNS/%s%s", namestr, realm ? realm : "");
RUNTIME_CHECK(result < sizeof(servicename));
isc_buffer_init(&buf, servicename, strlen(servicename));
isc_buffer_add(&buf, strlen(servicename));
result = dns_name_fromtext(servname, &buf, dns_rootname, 0, NULL);
if (result != ISC_R_SUCCESS)
if (result != ISC_R_SUCCESS) {
fatal("dns_name_fromtext(servname) failed: %s",
isc_result_totext(result));
}
dns_fixedname_init(&fkname);
keyname = dns_fixedname_name(&fkname);
keyname = dns_fixedname_initname(&fkname);
isc_random_get(&val);
result = isc_string_printf(mykeystr, sizeof(mykeystr), "%u.sig-%s",
val, namestr);
if (result != ISC_R_SUCCESS)
fatal("isc_string_printf(mykeystr) failed: %s",
isc_result_totext(result));
result = snprintf(mykeystr, sizeof(mykeystr), "%u.sig-%s", val, namestr);
RUNTIME_CHECK(result <= sizeof(mykeystr));
isc_buffer_init(&buf, mykeystr, strlen(mykeystr));
isc_buffer_add(&buf, strlen(mykeystr));
result = dns_name_fromtext(keyname, &buf, dns_rootname, 0, NULL);
if (result != ISC_R_SUCCESS)
if (result != ISC_R_SUCCESS) {
fatal("dns_name_fromtext(keyname) failed: %s",
isc_result_totext(result));
}
/* Windows doesn't recognize name compression in the key name. */
keyname->attributes |= DNS_NAMEATTR_NOCOMPRESS;
@@ -3009,11 +2992,11 @@ send_gssrequest(isc_sockaddr_t *destaddr, dns_message_t *msg,
else
srcaddr = localaddr4;
result = dns_request_createvia3(requestmgr, msg, srcaddr, destaddr,
options, tsigkey, FIND_TIMEOUT * 20,
FIND_TIMEOUT, 3, global_task, recvgss,
reqinfo, request);
check_result(result, "dns_request_createvia3");
result = dns_request_createvia(requestmgr, msg, srcaddr, destaddr,
-1, options, tsigkey, FIND_TIMEOUT * 20,
FIND_TIMEOUT, 3, global_task, recvgss,
reqinfo, request);
check_result(result, "dns_request_createvia");
if (debugging)
show_message(stdout, msg, "Outgoing update query:");
requests++;
@@ -3108,8 +3091,7 @@ recvgss(isc_task_t *task, isc_event_t *event) {
fatal("response to GSS-TSIG query was unsuccessful");
dns_fixedname_init(&fname);
servname = dns_fixedname_name(&fname);
servname = dns_fixedname_initname(&fname);
isc_buffer_init(&buf, servicename, strlen(servicename));
isc_buffer_add(&buf, strlen(servicename));
result = dns_name_fromtext(servname, &buf, dns_rootname, 0, NULL);
@@ -3305,9 +3287,6 @@ cleanup(void) {
ddebug("Shutting down timer manager");
isc_timermgr_destroy(&timermgr);
ddebug("Destroying hash context");
isc_hash_destroy();
ddebug("Destroying name state");
dns_name_destroy();
-1
View File
@@ -38,7 +38,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id: pkcs11-destroy.c,v 1.8 2010/01/13 21:19:52 fdupont Exp $ */
/*
* pkcs11-destroy [-m module] [-s $slot] [-i $id | -l $label]
-1
View File
@@ -33,7 +33,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id: pkcs11-list.c,v 1.7 2009/10/26 23:36:53 each Exp $ */
/* pkcs11-list [-P] [-m module] [-s slot] [-i $id | -l $label] [-p $pin] */
-1
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id$ */
/* pkcs11-tokens [-m module] */
-1
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: os.h,v 1.12 2009/06/10 00:27:21 each Exp $ */
/*! \file */
-4
View File
@@ -11,10 +11,6 @@
/*! \file */
/*
* Principal Author: DCL
*/
#include <config.h>
#include <stdlib.h>
-1
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: util.c,v 1.7 2007/06/19 23:46:59 tbox Exp $ */
/*! \file */
-1
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: util.h,v 1.12 2009/09/29 23:48:03 tbox Exp $ */
#ifndef RNDC_UTIL_H
#define RNDC_UTIL_H 1
-1
View File
@@ -9,7 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: cfg_test.c,v 1.25 2011/09/05 23:46:54 tbox Exp $ */
/*! \file */
-2
View File
@@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# $Id: headerdep_test.sh.in,v 1.8 2007/06/19 23:46:59 tbox Exp $
#
# Check the installed bind9 headers to make sure that no header
# depends on another header having been included first.
+4 -12
View File
@@ -40,7 +40,7 @@ isc_mem_t *mctx = NULL;
isc_log_t *lctx = NULL;
isc_entropy_t *ectx = NULL;
static isc_boolean_t hash_active = ISC_FALSE, dst_active = ISC_FALSE;
static isc_boolean_t dst_active = ISC_FALSE;
/*
* Logging categories: this needs to match the list in bin/named/log.c.
@@ -63,8 +63,7 @@ loadzone(dns_db_t **db, const char *origin, const char *filename) {
dns_fixedname_t fixed;
dns_name_t *name;
dns_fixedname_init(&fixed);
name = dns_fixedname_name(&fixed);
name = dns_fixedname_initname(&fixed);
result = dns_name_fromstring(name, origin, 0, NULL);
if (result != ISC_R_SUCCESS)
@@ -75,7 +74,7 @@ loadzone(dns_db_t **db, const char *origin, const char *filename) {
if (result != ISC_R_SUCCESS)
return (result);
result = dns_db_load(*db, filename);
result = dns_db_load(*db, filename, dns_masterformat_text, 0);
return (result);
}
@@ -101,12 +100,9 @@ main(int argc, char **argv) {
CHECK(isc_mem_create(0, 0, &mctx));
CHECK(isc_entropy_create(mctx, &ectx));
CHECK(dst_lib_init(mctx, ectx, ISC_ENTROPY_BLOCKING));
CHECK(dst_lib_init(mctx, ectx, NULL, ISC_ENTROPY_BLOCKING));
dst_active = ISC_TRUE;
CHECK(isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE));
hash_active = ISC_TRUE;
CHECK(isc_log_create(mctx, &lctx, &logconfig));
isc_log_registercategories(lctx, categories);
isc_log_setcontext(lctx);
@@ -153,10 +149,6 @@ main(int argc, char **argv) {
dst_lib_destroy();
dst_active = ISC_FALSE;
}
if (hash_active) {
isc_hash_destroy();
hash_active = ISC_FALSE;
}
if (ectx != NULL)
isc_entropy_detach(&ectx);
if (mctx != NULL)
-2
View File
@@ -9,8 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id: named.conf,v 1.60 2011/03/03 23:47:31 tbox Exp $ */
/*
* This is a worthless, nonrunnable example of a named.conf file that has
* every conceivable syntax element in use. We use it to test the parser.
+6 -8
View File
@@ -180,10 +180,11 @@ create_view(void) {
* Cache.
*/
cache = NULL;
result = dns_cache_create(mctx, taskmgr, timermgr, dns_rdataclass_in,
"rbt", 0, NULL, &cache);
result = dns_cache_create(mctx, mctx, taskmgr, timermgr,
dns_rdataclass_in, "", "rbt", 0, NULL,
&cache);
check_result(result, "dns_cache_create");
dns_view_setcache(view, cache);
dns_view_setcache(view, cache, ISC_FALSE);
dns_cache_detach(&cache);
{
@@ -258,7 +259,8 @@ lookup(const char *target) {
options |= DNS_ADBFIND_GLUEOK;
result = dns_adb_createfind(adb, t2, lookup_callback, client,
&client->name, dns_rootname, 0, options,
now, NULL, view->dstport, &client->find);
now, NULL, view->dstport, 0, NULL,
&client->find);
if (result != ISC_R_SUCCESS)
printf("DNS_ADB_CREATEFIND -> %s\n", dns_result_totext(result));
dns_adb_dumpfind(client->find, stderr);
@@ -306,9 +308,6 @@ main(int argc, char **argv) {
result = isc_entropy_create(mctx, &ectx);
check_result(result, "isc_entropy_create()");
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
check_result(result, "isc_hash_create()");
result = isc_log_create(mctx, &lctx, &lcfg);
check_result(result, "isc_log_create()");
isc_log_setcontext(lctx);
@@ -418,7 +417,6 @@ main(int argc, char **argv) {
isc_log_destroy(&lctx);
isc_hash_destroy();
isc_entropy_detach(&ectx);
isc_mempool_destroy(&cmp);
+3 -5
View File
@@ -10,8 +10,6 @@
*/
/*! \file
* \author
* Principal Author: Bob Halley
*/
#include <config.h>
@@ -132,8 +130,8 @@ main(int argc, char *argv[]) {
RUNTIME_CHECK(isc_socketmgr_create(mctx, &socketmgr) == ISC_R_SUCCESS);
cache = NULL;
RUNTIME_CHECK(dns_cache_create(mctx, taskmgr, timermgr,
dns_rdataclass_in, "rbt", 0, NULL,
RUNTIME_CHECK(dns_cache_create(mctx, mctx, taskmgr, timermgr,
dns_rdataclass_in, "", "rbt", 0, NULL,
&cache) == ISC_R_SUCCESS);
view = NULL;
@@ -205,7 +203,7 @@ main(int argc, char *argv[]) {
== ISC_R_SUCCESS);
}
dns_view_setcache(view, cache);
dns_view_setcache(view, cache, ISC_FALSE);
dns_view_freeze(view);
dns_cache_detach(&cache);
+4 -9
View File
@@ -10,8 +10,6 @@
*/
/*! \file
* \author
* Principal Author: Bob Halley
*/
#include <config.h>
@@ -120,7 +118,7 @@ do_find(isc_boolean_t want_event) {
dns_fixedname_name(&fixed),
dns_rootname, 0, options, 0,
dns_fixedname_name(&target), 0,
&find);
0, NULL, &find);
if (result == ISC_R_SUCCESS) {
if (!ISC_LIST_EMPTY(find->list)) {
/*
@@ -209,8 +207,6 @@ main(int argc, char *argv[]) {
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == 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);
while ((ch = isc_commandline_parse(argc, argv, "d:vw:")) != -1) {
switch (ch) {
@@ -252,8 +248,8 @@ main(int argc, char *argv[]) {
RUNTIME_CHECK(isc_socketmgr_create(mctx, &socketmgr) == ISC_R_SUCCESS);
cache = NULL;
RUNTIME_CHECK(dns_cache_create(mctx, taskmgr, timermgr,
dns_rdataclass_in, "rbt", 0, NULL,
RUNTIME_CHECK(dns_cache_create(mctx, mctx, taskmgr, timermgr,
dns_rdataclass_in, "", "rbt", 0, NULL,
&cache) == ISC_R_SUCCESS);
view = NULL;
@@ -324,7 +320,7 @@ main(int argc, char *argv[]) {
== ISC_R_SUCCESS);
}
dns_view_setcache(view, cache);
dns_view_setcache(view, cache, ISC_FALSE);
dns_view_freeze(view);
dns_cache_detach(&cache);
@@ -356,7 +352,6 @@ main(int argc, char *argv[]) {
isc_log_destroy(&lctx);
isc_hash_destroy();
isc_entropy_detach(&ectx);
if (verbose)
+6 -13
View File
@@ -10,8 +10,6 @@
*/
/*! \file
* \author
* Principal Author: Bob Halley
*/
#include <config.h>
@@ -121,8 +119,7 @@ select_db(char *origintext) {
len = strlen(origintext);
isc_buffer_init(&source, origintext, len);
isc_buffer_add(&source, len);
dns_fixedname_init(&forigin);
origin = dns_fixedname_name(&forigin);
origin = dns_fixedname_initname(&forigin);
result = dns_name_fromtext(origin, &source, dns_rootname, 0, NULL);
if (result != ISC_R_SUCCESS) {
print_result("bad name", result);
@@ -152,8 +149,7 @@ list(dbinfo *dbi, char *seektext) {
dns_name_t *seekname;
isc_buffer_t source;
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
name = dns_fixedname_initname(&fname);
if (dbi->dbiterator == NULL) {
INSIST(dbi->iversion == NULL);
@@ -171,8 +167,7 @@ list(dbinfo *dbi, char *seektext) {
len = strlen(seektext);
isc_buffer_init(&source, seektext, len);
isc_buffer_add(&source, len);
dns_fixedname_init(&fseekname);
seekname = dns_fixedname_name(&fseekname);
seekname = dns_fixedname_initname(&fseekname);
result = dns_name_fromtext(seekname, &source,
dns_db_origin(
dbi->db),
@@ -256,8 +251,7 @@ load(const char *filename, const char *origintext, isc_boolean_t cache) {
len = strlen(origintext);
isc_buffer_constinit(&source, origintext, len);
isc_buffer_add(&source, len);
dns_fixedname_init(&forigin);
origin = dns_fixedname_name(&forigin);
origin = dns_fixedname_initname(&forigin);
result = dns_name_fromtext(origin, &source, dns_rootname, 0, NULL);
if (result != ISC_R_SUCCESS) {
isc_mem_put(mctx, dbi, sizeof(*dbi));
@@ -274,7 +268,7 @@ load(const char *filename, const char *origintext, isc_boolean_t cache) {
}
printf("loading %s (%s)\n", filename, origintext);
result = dns_db_load(dbi->db, filename);
result = dns_db_load(dbi->db, filename, dns_masterformat_text, 0);
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE) {
dns_db_detach(&dbi->db);
isc_mem_put(mctx, dbi, sizeof(*dbi));
@@ -454,8 +448,7 @@ main(int argc, char *argv[]) {
/*
* Some final initialization...
*/
dns_fixedname_init(&foundname);
fname = dns_fixedname_name(&foundname);
fname = dns_fixedname_initname(&foundname);
dbi = NULL;
origin = dns_rootname;
version = NULL;
+8 -8
View File
@@ -52,8 +52,8 @@ use(dst_key_t *key, isc_mem_t *mctx) {
isc_buffer_add(&databuf, strlen(data));
isc_buffer_usedregion(&databuf, &datareg);
ret = dst_context_create3(key, mctx,
DNS_LOGCATEGORY_GENERAL, ISC_TRUE, &ctx);
ret = dst_context_create(key, mctx,
DNS_LOGCATEGORY_GENERAL, ISC_TRUE, 0, &ctx);
if (ret != ISC_R_SUCCESS) {
printf("contextcreate(%u) returned: %s\n", dst_key_alg(key),
isc_result_totext(ret));
@@ -73,8 +73,8 @@ use(dst_key_t *key, isc_mem_t *mctx) {
isc_buffer_forward(&sigbuf, 1);
isc_buffer_remainingregion(&sigbuf, &sigreg);
ret = dst_context_create3(key, mctx,
DNS_LOGCATEGORY_GENERAL, ISC_FALSE, &ctx);
ret = dst_context_create(key, mctx,
DNS_LOGCATEGORY_GENERAL, ISC_FALSE, 0, &ctx);
if (ret != ISC_R_SUCCESS) {
printf("contextcreate(%u) returned: %s\n", dst_key_alg(key),
isc_result_totext(ret));
@@ -214,7 +214,7 @@ generate(int alg, isc_mem_t *mctx) {
dst_key_t *key = NULL;
ret = dst_key_generate(dns_rootname, alg, 512, 0, 0, 0,
dns_rdataclass_in, mctx, &key);
dns_rdataclass_in, mctx, &key, NULL);
printf("generate(%d) returned: %s\n", alg, isc_result_totext(ret));
if (ret != ISC_R_SUCCESS)
return;
@@ -254,10 +254,10 @@ main(void) {
result = isc_entropy_createfilesource(ectx, "randomfile");
if (result != ISC_R_SUCCESS)
return (1);
dst_lib_init(mctx, ectx, ISC_ENTROPY_BLOCKING|ISC_ENTROPY_GOODONLY);
dst_lib_init(mctx, ectx, NULL,
ISC_ENTROPY_BLOCKING|ISC_ENTROPY_GOODONLY);
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
name = dns_fixedname_initname(&fname);
isc_buffer_constinit(&b, "test.", 5);
isc_buffer_add(&b, 5);
result = dns_name_fromtext(name, &b, NULL, 0, NULL);
+1 -1
View File
@@ -475,7 +475,7 @@ main(int argc, char *argv[]) {
RUNCHECK(isc_entropy_create(mctx, &ectx));
RUNCHECK(isc_entropy_createfilesource(ectx, "/dev/urandom"));
RUNCHECK(dst_lib_init(mctx, ectx, ISC_ENTROPY_GOODONLY));
RUNCHECK(dst_lib_init(mctx, ectx, NULL, ISC_ENTROPY_GOODONLY));
taskmgr = NULL;
RUNCHECK(isc_taskmgr_create(mctx, 1, 0, &taskmgr));
-2
View File
@@ -9,8 +9,6 @@
* information regarding copyright ownership.
*/
/* Principal Authors: DCL */
#include <config.h>
#include <stdlib.h>
+3 -2
View File
@@ -79,8 +79,9 @@ main(int argc, char *argv[]) {
callbacks.add = print_dataset;
result = dns_master_loadfile(argv[1], &origin, &origin,
dns_rdataclass_in, 0,
&callbacks, mctx);
dns_rdataclass_in, 0, 0,
&callbacks, NULL, NULL, mctx,
dns_masterformat_text, 0);
fprintf(stdout, "dns_master_loadfile: %s\n",
dns_result_totext(result));
}
+17 -20
View File
@@ -120,15 +120,16 @@ main(int argc, char *argv[]) {
isc_buffer_init(&source, argv[0], len);
isc_buffer_add(&source, len);
dns_fixedname_init(&oname);
result = dns_name_fromtext(&oname.name, &source,
dns_rootname, 0, NULL);
result = dns_name_fromtext(dns_fixedname_name(&oname),
&source, dns_rootname, 0,
NULL);
if (result != 0) {
fprintf(stderr,
"dns_name_fromtext() failed: %s\n",
dns_result_totext(result));
exit(1);
}
origin = &oname.name;
origin = dns_fixedname_name(&oname);
}
} else if (concatenate)
origin = NULL;
@@ -142,8 +143,7 @@ main(int argc, char *argv[]) {
len = strlen(argv[1]);
isc_buffer_init(&source, argv[1], len);
isc_buffer_add(&source, len);
dns_fixedname_init(&compname);
comp = &compname.name;
comp = dns_fixedname_initname(&compname);
result = dns_name_fromtext(comp, &source, origin,
0, NULL);
if (result != 0) {
@@ -156,8 +156,7 @@ main(int argc, char *argv[]) {
} else
comp = NULL;
dns_fixedname_init(&wname);
name = dns_fixedname_name(&wname);
name = dns_fixedname_initname(&wname);
dns_fixedname_init(&wname2);
while (fgets(s, sizeof(s), stdin) != NULL) {
len = strlen(s);
@@ -210,11 +209,12 @@ main(int argc, char *argv[]) {
if (concatenate) {
if (got_name) {
printf("Concatenating.\n");
result = dns_name_concatenate(&wname.name,
&wname2.name,
&wname2.name,
NULL);
name = &wname2.name;
result = dns_name_concatenate(
dns_fixedname_name(&wname),
dns_fixedname_name(&wname2),
dns_fixedname_name(&wname2),
NULL);
name = dns_fixedname_name(&wname2);
if (result == ISC_R_SUCCESS) {
if (check_absolute &&
dns_name_countlabels(name) > 0) {
@@ -267,8 +267,7 @@ main(int argc, char *argv[]) {
if (inplace) {
down = name;
} else {
dns_fixedname_init(&downname);
down = dns_fixedname_name(&downname);
down = dns_fixedname_initname(&downname);
}
result = dns_name_downcase(name, down, NULL);
INSIST(result == ISC_R_SUCCESS);
@@ -321,10 +320,8 @@ main(int argc, char *argv[]) {
labels = dns_name_countlabels(name);
if (want_split && split_label < labels) {
dns_fixedname_init(&fprefix);
prefix = dns_fixedname_name(&fprefix);
dns_fixedname_init(&fsuffix);
suffix = dns_fixedname_name(&fsuffix);
prefix = dns_fixedname_initname(&fprefix);
suffix = dns_fixedname_initname(&fsuffix);
printf("splitting at label %u: ", split_label);
dns_name_split(name, split_label, prefix, suffix);
printf("\n prefix = ");
@@ -335,9 +332,9 @@ main(int argc, char *argv[]) {
if (concatenate) {
if (got_name)
name = &wname2.name;
name = dns_fixedname_name(&wname2);
else
name = &wname.name;
name = dns_fixedname_name(&wname);
}
}
+3 -5
View File
@@ -118,10 +118,8 @@ nsecify(char *filename) {
dns_dbiterator_t *dbiter;
char newfilename[1024];
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);
origintext = strrchr(filename, '/');
if (origintext == NULL)
@@ -138,7 +136,7 @@ nsecify(char *filename) {
result = dns_db_create(mctx, "rbt", name, dns_dbtype_zone,
dns_rdataclass_in, 0, NULL, &db);
check_result(result, "dns_db_create()");
result = dns_db_load(db, filename);
result = dns_db_load(db, filename, dns_masterformat_text, 0);
if (result == DNS_R_SEENINCLUDE)
result = ISC_R_SUCCESS;
check_result(result, "dns_db_load()");
+5 -11
View File
@@ -110,13 +110,9 @@ detail(dns_rbt_t *rbt, dns_name_t *name) {
dns_rbtnodechain_init(&chain, mctx);
dns_fixedname_init(&fixedorigin);
dns_fixedname_init(&fixedfullname);
dns_fixedname_init(&fixedfoundname);
origin = dns_fixedname_name(&fixedorigin);
fullname = dns_fixedname_name(&fixedfullname);
foundname = dns_fixedname_name(&fixedfoundname);
origin = dns_fixedname_initname(&fixedorigin);
fullname = dns_fixedname_initname(&fixedfullname);
foundname = dns_fixedname_initname(&fixedfoundname);
node1 = node2 = NULL;
@@ -194,8 +190,7 @@ iterate(dns_rbt_t *rbt, isc_boolean_t forward) {
dns_rbtnodechain_init(&chain, mctx);
dns_name_init(&foundname, NULL);
dns_fixedname_init(&fixedorigin);
origin = dns_fixedname_name(&fixedorigin);
origin = dns_fixedname_initname(&fixedorigin);
if (forward) {
printf("iterating forward\n" );
@@ -363,9 +358,8 @@ main(int argc, char **argv) {
printf("searching for name %s ... ",
arg);
dns_fixedname_init(&fixedname);
foundname =
dns_fixedname_name(&fixedname);
dns_fixedname_initname(&fixedname);
data = NULL;
result = dns_rbt_findname(rbt, name, 0,
+2 -3
View File
@@ -225,7 +225,7 @@ main(int argc, char *argv[]) {
}
RUNTIME_CHECK(isc_entropy_create(mctx, &ent) == ISC_R_SUCCESS);
RUNTIME_CHECK(dst_lib_init(mctx, ent, 0) == ISC_R_SUCCESS);
RUNTIME_CHECK(dst_lib_init(mctx, ent, NULL, 0) == ISC_R_SUCCESS);
dns_result_register();
dst_result_register();
@@ -251,8 +251,7 @@ main(int argc, char *argv[]) {
inaddr.s_addr = htonl(INADDR_LOOPBACK);
isc_sockaddr_fromin(&address, &inaddr, port);
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
name = dns_fixedname_initname(&fname);
isc_buffer_constinit(&b, "child.example.", strlen("child.example."));
isc_buffer_add(&b, strlen("child.example."));
result = dns_name_fromtext(name, &b, dns_rootname, 0, NULL);
+5 -2
View File
@@ -107,7 +107,8 @@ setup(const char *zonename, const char *filename, const char *classname) {
result = dns_zone_setdbtype(zone, 1, &rbt);
ERRRET(result, "dns_zone_setdatabase");
result = dns_zone_setfile(zone, filename);
result = dns_zone_setfile(zone, filename, dns_masterformat_text,
&dns_master_style_default);
ERRRET(result, "dns_zone_setfile");
region.base = classname;
@@ -190,7 +191,9 @@ query(void) {
if (s != NULL)
*s = '\0';
if (strcmp(buf, "dump") == 0) {
dns_zone_dumptostream(zone, stdout);
dns_zone_dumptostream(zone, stdout,
dns_masterformat_text,
&dns_master_style_default, 0);
continue;
}
if (strlen(buf) == 0U)
-1
View File
@@ -33,7 +33,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id$ */
/* create [-m module] [-s $slot] [-p pin] [-t] [-n count] */
-1
View File
@@ -33,7 +33,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id$ */
/* genrsa [-m module] [-s $slot] [-p pin] [-t] [-b bits] [-n count] */
-1
View File
@@ -33,7 +33,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id$ */
/* login [-m module] [-s $slot] [-p pin] [-n count] */
-1
View File
@@ -33,7 +33,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id$ */
/* privrsa [-m module] [-s $slot] [-p pin] [-t] [-n count] */
-1
View File
@@ -33,7 +33,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id$ */
/* pubrsa [-m module] [-s $slot] [-p pin] [-t] [-n count] */
-1
View File
@@ -33,7 +33,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id$ */
/* random [-m module] [-s $slot] [-n count] */
-1
View File
@@ -33,7 +33,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id$ */
/* session [-m module] [-s $slot] [-n count] */
-1
View File
@@ -33,7 +33,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id$ */
/* sha1 [-m module] [-s $slot] [-n count] */
-1
View File
@@ -33,7 +33,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id$ */
/* signrsa [-m module] [-s $slot] [-p pin] [-t] [-n count] */
-1
View File
@@ -33,7 +33,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id$ */
/* verify [-m module] [-s $slot] [-p pin] [-t] [-n count] */
-1
View File
@@ -33,7 +33,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id$ */
/*
* pkcs11-hmacmd5
-1
View File
@@ -33,7 +33,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* $Id$ */
/*
* pkcs11-md5sum
-2
View File
@@ -9,7 +9,5 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# $Id: clean.sh,v 1.3 2011/09/02 23:46:31 tbox Exp $
rm -rf zones
rm -f named.conf
-1
View File
@@ -9,7 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# $Id: makenames.pl,v 1.3 2011/09/02 21:15:35 each Exp $
use strict;
die "Usage: makenames.pl <num> [<len>]" if (@ARGV == 0 || @ARGV > 2);
-1
View File
@@ -9,7 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# $Id: mkzonefile.pl,v 1.2 2011/09/02 21:15:35 each Exp $
use strict;
die "Usage: makenames.pl zonename num_records" if (@ARGV != 2);
-2
View File
@@ -9,8 +9,6 @@
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# $Id: setup.sh,v 1.4 2011/09/02 21:15:35 each Exp $
usage () {
echo "Usage: $0 [-s] <number of zones> [<records per zone>]"
echo " -s: use the same zone file all zones"
-2
View File
@@ -7,8 +7,6 @@
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
; $Id: smallzone.db,v 1.3 2011/07/07 23:47:49 tbox Exp $
$TTL 300 ; 5 minutes
@ IN SOA mname1. . (
2000042407 ; serial
+2 -2
View File
@@ -60,12 +60,12 @@ PARALLEL = rpzrecurse serve-stale dnssec \
dns64 @DNSTAP@ dscp dsdigest dyndb \
ednscompliance emptyzones \
fetchlimit filter-aaaa formerr forward \
geoip glue inline integrity ixfr keepalive \
geoip glue idna inline integrity ixfr keepalive \
legacy limits logfileconfig \
masterfile masterformat metadata mkeys \
names notify nslookup nsupdate nzd2nzf \
padding pending pipelined \
reclimit redirect resolver rndc rpz \
reclimit redirect resolver rndc rootkeysentinel rpz \
rrchecker rrl rrsetorder rsabigexponent runtime \
sfcache smartsign sortlist \
spf staticstub statistics statschannel stub synthfromdnssec \
-2
View File
@@ -7,8 +7,6 @@
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
; $Id: added.db,v 1.2 2010/08/11 18:14:18 each Exp $
;$ORIGIN added.example.
$TTL 300 ; 5 minutes
@ IN SOA mname1. . (
-2
View File
@@ -7,8 +7,6 @@
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
; $Id: root.hint,v 1.5 2007/06/19 23:47:01 tbox Exp $
$TTL 999999
. IN NS a.root-servers.nil.
a.root-servers.nil. IN A 10.53.0.1
-2
View File
@@ -7,8 +7,6 @@
; See the COPYRIGHT file distributed with this work for additional
; information regarding copyright ownership.
; $Id: normal.db,v 1.2 2010/08/11 18:14:19 each Exp $
$ORIGIN normal.example.
$TTL 300 ; 5 minutes
@ IN SOA mname1. . (

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