Compare commits

..

1378 Commits

Author SHA1 Message Date
Michał Kępień
20f1a402d1 Merge branch 'v9_14_12-release' into 'v9_14'
[CVE-2020-8616] [CVE-2020-8617] Merge 9.14.12 release branch

See merge request isc-projects/bind9!3564
2020-05-19 13:10:20 +00:00
Michał Kępień
f3dc26e898 Include util/check-make-install.in in tarball 2020-05-06 12:32:33 +02:00
Tinderbox User
89162cdcac Merge branch 'prep-release' into v9_14 2020-05-06 06:38:32 +00:00
Tinderbox User
43046e10fb prep 9.14.12 2020-05-06 06:38:18 +00:00
Mark Andrews
57d40f8d1d Merge branch '1388-confidential-issue-security-v9_14' into 'security-v9_14'
1388 confidential issue security v9 14

See merge request isc-private/bind9!152
2020-05-05 23:47:30 +02:00
Mark Andrews
c097015732 Add release notes entry 2020-05-05 23:47:28 +02:00
Mark Andrews
5040582843 Add CHANGES entry 2020-05-05 23:47:27 +02:00
Mark Andrews
943b274e2c Update the ARM to reflect that TLD and root servers are no longer exempt
from max-recursion-queries limits.
2020-05-05 23:47:23 +02:00
Mark Andrews
034b7e3452 Count queries to the root and TLD servers as well 2020-05-05 23:47:21 +02:00
Stephen Morris
b06df900b8 Add test for reduction in number of fetches
Add a system test that counts how many address fetches are made
for different numbers of NS records and checks that the number
are successfully limited.
2020-05-05 23:47:19 +02:00
Mark Andrews
25e2bca11e Merge branch '1703-tsig-verify-failure-security-v9_14' into 'security-v9_14'
1703 tsig verify failure security v9 14

See merge request isc-private/bind9!149
2020-05-05 23:47:16 +02:00
Mark Andrews
27f868f34c Reduce the number of fetches we make when looking up addresses
If there are more that 5 NS record for a zone only perform a
maximum of 4 address lookups for all the name servers.  This
limits the amount of remote lookup performed for server
addresses at each level for a given query.
2020-05-05 23:47:16 +02:00
Mark Andrews
ce1e502a74 Add release note entry 2020-05-05 23:47:14 +02:00
Mark Andrews
41df648a8e Add CHANGES entry 2020-05-05 23:46:19 +02:00
Mark Andrews
58199e954a Only look at tsig.error in responses 2020-05-05 23:45:57 +02:00
Mark Andrews
d18eb51380 Check that a 'BADTIME' response with 'QR=0' is handled as a request 2020-05-05 23:45:55 +02:00
Michał Kępień
d5835e162d Merge branch 'michal/prepare-release-notes-for-bind-9.14.12' into 'v9_14'
Prepare release notes for BIND 9.14.12

See merge request isc-projects/bind9!3496
2020-05-05 20:41:32 +00:00
Michał Kępień
951eb4cd37 Release notes: wording and formatting tweaks 2020-05-05 22:37:56 +02:00
Michał Kępień
af66005acd Add release notes for BIND 9.14.12 2020-05-05 22:37:56 +02:00
Michał Kępień
2d0e5ba92a Note there will be no more BIND 9.14.x releases 2020-05-05 22:37:56 +02:00
Michał Kępień
f0a266f05e Tweak and reword recent CHANGES entries 2020-05-05 22:37:56 +02:00
Mark Andrews
ea5fd177e5 Merge branch '1806-system-and-unit-clang-asan-have-incorrect-needs-v9_14' into 'v9_14'
Incorrect job in needs, gcc:asan -> clang:asan

See merge request isc-projects/bind9!3463
2020-04-30 08:48:39 +00:00
Mark Andrews
8f065bbee8 Incorrect job in needs, gcc:asan -> clang:asan
(cherry picked from commit 0adf9562fb)
2020-04-30 17:45:14 +10:00
Michał Kępień
86286a078b Merge branch 'michal/fix-srcid-on-windows-v9_14' into 'v9_14'
[v9_14] Fix "srcid" on Windows

See merge request isc-projects/bind9!3372
2020-04-15 09:42:57 +00:00
Michał Kępień
0d36832d60 Fix "srcid" on Windows
Windows BIND releases produced by GitLab CI are built from Git
repositories, not from release tarballs, which means the "srcid" file is
not present in the top source directory when MSBuild is invoked.  This
causes the Git commit hash for such builds to be set to "unset_id".
Enable win32utils/Configure to try determining the commit hash for a
build by invoking Git on the build host if the "srcid" file is not
present (which is what its Unix counterpart does).

(cherry picked from commit 05e13e7caf)
2020-04-15 11:39:50 +02:00
Ondřej Surý
546af0511a Merge branch '1574-confidential-issue-rebinding-protection-fail-in-forwarding-mode-v9_14' into 'v9_14'
Resolve "DNS rebinding protection is ineffective when BIND is configured as a forwarding DNS server"

See merge request isc-projects/bind9!3344
2020-04-08 09:04:30 +00:00
Ondřej Surý
163cc168e5 Add release notes 2020-04-08 09:45:32 +02:00
Ondřej Surý
d13a505d40 Add CHANGES 2020-04-08 09:45:32 +02:00
Diego Fronza
64c3c57b59 Add test for the proposed fix
This test asserts that option "deny-answer-aliases" works correctly
when forwarding requests.

As a matter of example, the behavior expected for a forwarder BIND
instance, having an option such as deny-answer-aliases { "domain"; }
is that when forwarding a request for *.anything-but-domain, it is
expected that it will return SERVFAIL if any answer received has a CNAME
for "*.domain".
2020-04-08 09:00:16 +02:00
Diego Fronza
6da142ff7f Fixed rebinding protection bug when using forwarder setups
BIND wasn't honoring option "deny-answer-aliases" when configured to
forward queries.

Before the fix it was possible for nameservers listed in "forwarders"
option to return CNAME answers pointing to unrelated domains of the
original query, which could be used as a vector for rebinding attacks.

The fix ensures that BIND apply filters even if configured as a forwarder
instance.
2020-04-08 09:00:16 +02:00
Ondřej Surý
2650ff19c7 Merge branch 'ondrej/scan-build-10-fixes-v9_14-2' into 'v9_14'
Fix new warnings reported by scan-build from LLVM/Clang 10 (v9.14) v2

See merge request isc-projects/bind9!3297
2020-03-26 12:51:49 +00:00
Ondřej Surý
2637a2ce9d Import parse_tsan.py file to v9_11 branch 2020-03-26 13:42:35 +01:00
Ondřej Surý
f3ba17fedc Fix 'Dereference of null pointer' from scan-build-10
These are mostly false positives, the clang-analyzer FAQ[1] specifies
why and how to fix it:

> The reason the analyzer often thinks that a pointer can be null is
> because the preceding code checked compared it against null. So if you
> are absolutely sure that it cannot be null, remove the preceding check
> and, preferably, add an assertion as well.

The 2 warnings reported are:

dnssec-cds.c:781:4: warning: Access to field 'base' results in a dereference of a null pointer (loaded from variable 'buf')
                        isc_buffer_availableregion(buf, &r);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builds/isc-projects/bind9/lib/isc/include/isc/buffer.h:996:36: note: expanded from macro 'isc_buffer_availableregion'
                                   ^
/builds/isc-projects/bind9/lib/isc/include/isc/buffer.h:821:16: note: expanded from macro 'ISC__BUFFER_AVAILABLEREGION'
                (_r)->base = isc_buffer_used(_b);              \
                             ^~~~~~~~~~~~~~~~~~~
/builds/isc-projects/bind9/lib/isc/include/isc/buffer.h:152:29: note: expanded from macro 'isc_buffer_used'
        ((void *)((unsigned char *)(b)->base + (b)->used)) /*d*/
                                   ^~~~~~~~~
1 warning generated.

--

./main.c:1254:9: warning: Access to field 'sctx' results in a dereference of a null pointer (loaded from variable 'named_g_server')
        sctx = named_g_server->sctx;
               ^~~~~~~~~~~~~~~~~~~~
1 warning generated.

References:
1. https://clang-analyzer.llvm.org/faq.html#null_pointer
2020-03-26 13:42:35 +01:00
Ondřej Surý
e3acfedbe3 Fix 'Dead nested assignment's from scan-build-10
The 1 warning reported is:

os.c:872:7: warning: Although the value stored to 'ptr' is used in the enclosing expression, the value is never actually read from 'ptr'
        if ((ptr = strtok_r(command, " \t", &last)) == NULL) {
             ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
2020-03-26 13:42:35 +01:00
Ondřej Surý
969cb06e15 Fix missing <inttypes.h> include 2020-03-26 13:42:35 +01:00
Michał Kępień
2b2872f3f4 Merge branch 'michal/misc-gitlab-ci-yml-cleanups-v9_14' into 'v9_14'
[v9_14] Miscellaneous .gitlab-ci.yml cleanups

See merge request isc-projects/bind9!3301
2020-03-26 10:45:18 +00:00
Michał Kępień
03f764f708 Remove unused YAML anchors
Some YAML anchors defined in .gitlab-ci.yml are not subsequently used.
Remove them to prevent confusion.

(cherry picked from commit 3d121ede6c)
2020-03-26 11:43:47 +01:00
Michał Kępień
7be0cc640f Do not install compiledb in cppcheck job
compiledb is already included in the Docker image used by the cppcheck
job.  Do not attempt installing it again.

(cherry picked from commit 3d264dbe81)
2020-03-26 11:43:47 +01:00
Michał Kępień
824204ae19 Include compiler name in all build/test job names
Most build/test job names already contain a "clang", "gcc", or "msvc"
prefix which indicates the compiler used for a given job.  Apply that
naming convention to all build/test job names.

(cherry picked from commit 0c898084cd)
2020-03-26 11:43:47 +01:00
Michał Kępień
91276d9a8c Refactor TSAN unit test job definitions
Multiple YAML keys have identical values for both TSAN unit test job
definitions.  Extract these common keys to a YAML anchor and use it in
TSAN unit test job definitions to reduce code duplication.

(cherry picked from commit 84463f33bf)
2020-03-26 11:43:47 +01:00
Michał Kępień
5e2428a545 Run "kyua report-html" for TSAN unit test jobs
Definitions of jobs running unit tests under TSAN contain an
"after_script" YAML key.  Since the "unit_test_job" anchor is included
in those job definitions before "after_script" is defined, the
job-specific value of that key overrides the one defined in the included
anchor.  This prevents "kyua report-html" from being run for TSAN unit
test jobs.  Moving the invocation of "kyua report-html" to the "script"
key in the "unit_test_job" anchor is not acceptable as it would cause
the exit code of that command to determine the result of all unit test
jobs and we need that to be the exit code of "make unit".  Instead, add
"kyua report-html" invocations to the "after_script" key of TSAN unit
test job definitions to address the problem without affecting other job
definitions.

(cherry picked from commit 6ebce9425e)
2020-03-26 11:43:47 +01:00
Michał Kępień
a46c97f36d Refactor TSAN system test job definitions
Multiple YAML keys have identical values for both TSAN system test job
definitions.  Extract these common keys to a YAML anchor and use it in
TSAN system test job definitions to reduce code duplication.

(cherry picked from commit a9aa295f1f)
2020-03-26 11:43:47 +01:00
Michał Kępień
5ba8fac351 Drop "before_script" key from TSAN job definitions
Both "system_test_job" and "unit_test_job" YAML anchors contain a
"before_script" key.  TSAN job definitions first specify their own value
of the "before_script" key and then include the aforementioned YAML
anchors, which results in the value of the "before_script" key being
overridden with the value specified by the included anchor.  Given this,
remove "before_script" definitions specific to TSAN jobs as they serve
no practical purpose.

(cherry picked from commit 8ef01c7b50)
2020-03-26 11:43:47 +01:00
Michał Kępień
4c8ce37e26 Define TSAN options in a global variable
All assignments for the TSAN_OPTIONS variable are identical across the
entire .gitlab-ci.yml file.  Define a global TSAN_OPTIONS_COMMON
variable and use it in job definitions to reduce code duplication.

(cherry picked from commit 6325c0993a)
2020-03-26 11:43:47 +01:00
Ondřej Surý
f51d6cc42b Merge branch 'ondrej/no-clang-on-debian-sid-v9_11-v9_14' into 'v9_14'
Rewrite .gitlab-ci.yml to have 'base_image' and other GitLab CI improvements (v9.14)

See merge request isc-projects/bind9!3291
2020-03-25 21:22:31 +00:00
Ondřej Surý
dd0fd4e7e9 Adjust the differences between v9_16 and v9_11 GitLab CI job configuration
(cherry picked from commit f801f0f926)
2020-03-25 18:33:57 +01:00
Ondřej Surý
696f0ecdf6 Replace clang:stretch:amd64 build with clang:buster:amd64 build (+ add missing system test)
(cherry picked from commit 281531d82b)
(cherry picked from commit 95d2d8399a)
2020-03-25 18:33:56 +01:00
Ondřej Surý
94d7daabb7 Replace bear with compiledb and drop MAKE_COMMAND because we don't need it
(cherry picked from commit ec72d1100d)
(cherry picked from commit 00f12220c0)
2020-03-25 18:33:53 +01:00
Ondřej Surý
a58f256c22 Adjust the GitLab CI jobs to match the new images
The custom builds (oot, asan, tsan) were mostly built using Debian sid
amd64 image.  The problem was that this image broke too easily, because
it's Debian "unstable" after all.

This commit introduces "base_image" that should be most stable with
extra bits on top (clang, coccinelle, cppcheck, ...).  Currently, that
would be Debian buster amd64.

Other changes introduced by this commit:

* Change the default clang version to 10
* Run both ASAN and TSAN with both gcc and clang compilers
* Remove Clang Debian stretch i386 job

(cherry picked from commit 5f5721aa11)
(cherry picked from commit 7398668e76)
2020-03-25 18:33:32 +01:00
Ondřej Surý
fc1bd06eac Merge branch 'ondrej/scan-build-10-fixes-v9_11-v9_14' into 'v9_14'
Fix new warnings reported by scan-build from LLVM/Clang 10 (v9.14)

See merge request isc-projects/bind9!3290
2020-03-25 17:28:28 +00:00
Ondřej Surý
0ff5c1f10d Fix 'Dereference of null pointer' from scan-build-10
These are mostly false positives, the clang-analyzer FAQ[1] specifies
why and how to fix it:

> The reason the analyzer often thinks that a pointer can be null is
> because the preceding code checked compared it against null. So if you
> are absolutely sure that it cannot be null, remove the preceding check
> and, preferably, add an assertion as well.

The 2 warnings reported are:

byname_test.c:308:34: warning: Access to field 'fwdtable' results in a dereference of a null pointer (loaded from variable 'view')
                RUNTIME_CHECK(dns_fwdtable_add(view->fwdtable, dns_rootname,
                                               ^~~~~~~~~~~~~~
/builds/isc-projects/bind9/lib/isc/include/isc/util.h:318:52: note: expanded from macro 'RUNTIME_CHECK'
                                                   ^~~~
/builds/isc-projects/bind9/lib/isc/include/isc/error.h:50:21: note: expanded from macro 'ISC_ERROR_RUNTIMECHECK'
        ((void)(ISC_LIKELY(cond) ||  \
                           ^~~~
/builds/isc-projects/bind9/lib/isc/include/isc/likely.h:23:43: note: expanded from macro 'ISC_LIKELY'
                                            ^
1 warning generated.

--

./rndc.c:255:6: warning: Dereference of null pointer (loaded from variable 'host')
        if (*host == '/') {
            ^~~~~
1 warning generated.

References:
1. https://clang-analyzer.llvm.org/faq.html#null_pointer

(cherry picked from commit ddd0d356e5)
(cherry picked from commit 9b76eea08f)
2020-03-25 18:27:08 +01:00
Ondřej Surý
2beca48289 Fix 'Dead nested assignment's from scan-build-10
The 3 warnings reported are:

os.c:872:7: warning: Although the value stored to 'ptr' is used in the enclosing expression, the value is never actually read from 'ptr'
        if ((ptr = strtok_r(command, " \t", &last)) == NULL) {
             ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

--

rpz.c:1117:10: warning: Although the value stored to 'zbits' is used in the enclosing expression, the value is never actually read from 'zbits'
        return (zbits &= x);
                ^        ~
1 warning generated.

--

openssleddsa_link.c:532:10: warning: Although the value stored to 'err' is used in the enclosing expression, the value is never actually read from 'err'
        while ((err = ERR_get_error()) != 0) {
                ^     ~~~~~~~~~~~~~~~
1 warning generated.

(cherry picked from commit 262f087bcf)
(cherry picked from commit 138dded9d9)
2020-03-25 18:27:08 +01:00
Michał Kępień
6389f36527 Merge branch 'ondrej/remove-debian-jessie-from-gitlab-ci-v9_14' into 'v9_14'
Remove Debian 8 ("Jessie") from the GitLab CI

See merge request isc-projects/bind9!3283
2020-03-25 06:21:18 +00:00
Ondřej Surý
900efca944 Remove Debian 8 ("Jessie") from the GitLab CI
There are several reason why remove Debian 8 from the CI:

* Debian 8 ("jessie") has been superseded by Debian 9 ("stretch").
* Regular security support updates have been discontinued as of
  June 17th, 2018.
* Jessie LTS is supported from 17th June 2018 to June 30, 2020.

In other words, it's no longer officially supported by Debian security
team, but by the volunteer/paid contributor composed LTS team.  And the
release will be discontinued in three months from now.  We can use the
freed CI resources to bring new platforms or just to make the jobs run a
bit faster.

(cherry picked from commit 75f46cc3d1)
2020-03-24 14:51:58 +01:00
Ondřej Surý
01605e97ce Merge branch '4-gitlab-ci.yml-improvement-v9_14' into 'v9_14'
Improve GitLab CI configuration (v9.14)

See merge request isc-projects/bind9!3260
2020-03-20 15:13:52 +00:00
Ondřej Surý
9be14d66cd Rename MAKE environment variable to MAKE_COMMAND
The environment variable MAKE has been replaced with MAKE_COMMAND,
because overriding MAKE variable also changed the definition of the MAKE
inside the Makefiles, and we want only a single wrapper around the whole
build process.

Previously, setting `MAKE` to `bear make` meant that `bear make` would
be run at every nested make invocation, which messed up the upcoming
automake transition as compile_commands.json would be generated in every
subdirectory instead of just having one central file at the top of the
build tree.

(cherry picked from commit de1a637a69)
2020-03-20 16:09:42 +01:00
Ondřej Surý
713b445baf Replace dependencies+needs with needs+artifacts in GitLabCI config
All jobs now use solely the newer needs configuration to declare
dependencies between jobs:

    needs:
      - job: <foo>
        artifacts: true

instead of combination of dependencies and needs which is deprecated.
This change completely unbundles the stages (alas the stages still needs
to stay because the job graph has to stay acyclic between the stages).

(cherry picked from commit 66ba808c1b)
2020-03-20 16:09:42 +01:00
Ondřej Surý
d90baa55bf Merge branch '1684-timer-test-build-v9_14' into 'v9_14'
fix a pointer-to-int cast error

See merge request isc-projects/bind9!3272
2020-03-20 15:09:16 +00:00
Evan Hunt
4e0ebd2e75 fix a pointer-to-int cast error
(cherry picked from commit 6b76646037)
2020-03-20 16:08:35 +01:00
Michał Kępień
76b1979e1e Merge branch 'michal/update-gitlab-ci-to-freebsd-12.1-v9_14' into 'v9_14'
[v9_14] Update GitLab CI to FreeBSD 12.1

See merge request isc-projects/bind9!3240
2020-03-16 19:05:31 +00:00
Michał Kępień
494a97e985 Move FreeBSD CI jobs to libvirt-based executors
To get rid of the currently used FreeBSD-specific executor, move FreeBSD
CI jobs to libvirt-based executors.  Make the necessary tag and variable
adjustments.

(cherry picked from commit 80618b5378)
2020-03-16 11:38:20 +01:00
Michał Kępień
6456402e0e Update GitLab CI to FreeBSD 12.1
Since FreeBSD 12.1 is the current FreeBSD 12.x release, replace FreeBSD
12.0 GitLab CI jobs with their up-to-date counterparts.

(cherry picked from commit 4c68b56246)
2020-03-16 11:38:18 +01:00
Michał Kępień
5319564d0d Merge branch 'michal/do-not-run-openbsd-system-test-jobs-for-tags-v9_14' into 'v9_14'
[v9_14] Do not run OpenBSD system test jobs for tags

See merge request isc-projects/bind9!3189
2020-03-09 13:36:10 +00:00
Michał Kępień
3ad4c32727 Do not run OpenBSD system test jobs for tags
OpenBSD virtual machines seem to affected particularly badly by other
activity happening on the host.  This causes trouble around release
time: when multiple tags are pushed to the repository, a large number of
jobs is started concurrently on all CI runners.  In extreme cases, this
causes the system test suite to run for about an hour (!) on OpenBSD
VMs, with multiple tests failing.  We investigated the test artifacts
for all such cases in the past and the outcome was always the same: test
failures were caused by extremely slow I/O on the guest.  We tried
various tricks to work around this problem, but nothing helped.

Given the above, stop running OpenBSD system test jobs for pending BIND
releases to prevent the results of these jobs from affecting the
assessment of a given release's readiness for publication.  This change
does not affect OpenBSD build jobs.  OpenBSD system test jobs will still
be run for scheduled and web-requested pipelines, to make sure we catch
any severe issues with test code on that platform sooner or later.

(cherry picked from commit 7b002cea83)
2020-03-09 14:34:26 +01:00
Mark Andrews
069249214e Merge branch '1628-release-process-failed-to-detect-that-header-file-was-not-installed-v9_14' into 'v9_14'
test installed header files

See merge request isc-projects/bind9!3176
2020-03-06 01:53:16 +00:00
Mark Andrews
c3bc4d2bf0 test installed header files
(cherry picked from commit a278b6bd84)
2020-03-06 12:10:30 +11:00
Mark Andrews
95493d5e2f Merge branch 'marka-sort-AC_CONFIG_FILES-v9_14' into 'v9_14'
sort AC_CONFIG_FILES

See merge request isc-projects/bind9!3169
2020-03-05 22:31:50 +00:00
Mark Andrews
fe4f56f665 sort AC_CONFIG_FILES
(cherry picked from commit fd0d4ba948)
2020-03-06 08:51:20 +11:00
Michal Nowak
b7c604cc19 Merge branch 'mnowak/respdiff-v9_14' into 'v9_14'
[v9_14] Add respdiff job

See merge request isc-projects/bind9!3165
2020-03-05 14:48:11 +00:00
Michal Nowak
7f3382015e Add respdiff job
This job leverages respdiff test from the private bind-qa repo.

(cherry picked from commit 04f8b65a8f)
2020-03-05 12:20:42 +01:00
Mark Andrews
53962ffd27 Merge branch 'marka-check-touched-v9_14' into 'v9_14'
Marka check touched v9 14

See merge request isc-projects/bind9!3148
2020-03-03 22:37:45 +00:00
Mark Andrews
d1c22a558e Add CHANGES entry
(cherry picked from commit 64474db14e)
2020-03-04 09:12:15 +11:00
Mark Andrews
08b625787b Restart zone maintenance if it had been stalled.
(cherry picked from commit f171347b5f)
2020-03-04 09:12:15 +11:00
Mark Andrews
1b7d6d219e Check inline master zones that are touched reload correctly.
(cherry picked from commit 50e079d6c3)
2020-03-04 09:12:14 +11:00
Mark Andrews
491936c992 Merge branch '1627-call-set_resigntime-and-zone_settimer-v9_14' into 'v9_14'
Resolve "inline re-signing stops"

See merge request isc-projects/bind9!3140
2020-03-03 06:15:15 +00:00
Mark Andrews
9bc9d41db9 add release note entry
(cherry picked from commit 23ce0f32e5)
2020-03-03 16:53:59 +11:00
Mark Andrews
928d53fc27 Add CHANGES note
(cherry picked from commit 905549f061)
2020-03-03 16:43:39 +11:00
Ondřej Surý
da0faf334d Adjust lock/unlock in zone_rekey()
(cherry picked from commit aaaa7e67fa)
2020-03-03 16:43:16 +11:00
Mark Andrews
0c861a7ba1 Ensure that resigintime and the zone timer are set
(cherry picked from commit a6626594aa)
2020-03-03 16:43:16 +11:00
Matthijs Mekking
0a20b7de1b Add more zone locks
Add more zone locks around code that touches zone timer setting
in failure modes.

(cherry picked from commit 143d1c9767)
2020-03-03 16:43:08 +11:00
Mark Andrews
c787f10d2e Always call set_resigntime with the zone lock held
(cherry picked from commit 7212961849)
2020-03-03 16:41:08 +11:00
Mark Andrews
f65514579c Always call zone_settimer()
zone_needdump() could potentially not call zone_settimer() so
explitly call zone_settimer() as zone->resigntime could have
gone backward.

(cherry picked from commit 5ec57f31b0)
2020-03-03 16:41:05 +11:00
Mark Andrews
1103f41fa0 Call set_resigntime() in receive_secure_serial()
With RRSIG records no longer being signed with the full
sig-validity-interval we need to ensure the zone->resigntime
as it may need to be set to a earlier time.

(cherry picked from commit 5d1611afdc)
2020-03-03 16:38:55 +11:00
Mark Andrews
93c6a3e2ee Merge branch 'marka-fix-signature-test-v9_14' into 'v9_14'
Fix code to generate the test signatues.

See merge request isc-projects/bind9!3103
2020-02-21 06:52:15 +00:00
Mark Andrews
5bf41b8133 Fix code to generate the test signatues.
* ctx needs to be destroyed before it is regenerated.
* emit the name of the signature to be replaced.
* cleanup memory before asserting so post longjump doesn't detect a
  memory leak.
* comment code.

(cherry picked from commit 3a8c8a2a31)
2020-02-21 17:41:52 +11:00
Michał Kępień
8a2c8852bc Merge branch 'michal/make-a-sed-script-in-doc-arm-makefile.in-portable-v9_14' into 'v9_14'
[v9_14] Make a sed script in doc/arm/Makefile.in portable

See merge request isc-projects/bind9!3098
2020-02-20 11:28:13 +00:00
Michał Kępień
309a14ee8a Make a sed script in doc/arm/Makefile.in portable
BSD sed does not recognize \s as a whitespace matching token.  Make the
sed script in doc/arm/Makefile.in which ensures GitLab identifiers are
not split across lines portable by replacing \s with [[:space:]].

(cherry picked from commit b25e6b51f6)
2020-02-20 12:24:23 +01:00
Michał Kępień
29ce63f23a Merge branch 'michal/increase-lifetime-of-docs-sid-amd64-artifacts-v9_14' into 'v9_14'
[v9_14] Increase lifetime of docs:sid:amd64 artifacts

See merge request isc-projects/bind9!3095
2020-02-20 10:57:37 +00:00
Michał Kępień
e1e6036a5e Increase lifetime of docs:sid:amd64 artifacts
Artifacts generated by the docs:sid:amd64 job need to be retained longer
than for other jobs as they are used for building bind.isc.org contents.
If these artifacts are removed too quickly, pipelines in the pages/bind
GitLab project start failing, preventing content updates from being
published.  Increase lifetime of the relevant job artifacts to prevent
this from happening.

(cherry picked from commit 9751ba5a75)
2020-02-20 11:53:23 +01:00
Ondřej Surý
098f68799b Merge branch 'ondrej/win32-stdatomic-fix-v9_14' into 'v9_14'
Stop requiring same memory ordering in win32 atomic_compare_exchange functions

See merge request isc-projects/bind9!3059
2020-02-13 14:21:40 +00:00
Ondřej Surý
a377780049 Stop requiring same memory ordering in win32 atomic_compare_exchange functions 2020-02-13 15:16:06 +01:00
Tinderbox User
596b94db38 Merge branch 'prep-release' into v9_14 2020-02-12 20:08:05 +00:00
Tinderbox User
d271d444aa prep v9.14.11 2020-02-12 20:07:41 +00:00
Michal Nowak
f1afaa80af Merge branch 'mnowak/coverity-disable-web-tag-v9_14' into 'v9_14'
[v9_14] Run Coverity Scan only when specific variables are present

See merge request isc-projects/bind9!3055
2020-02-12 14:58:10 +00:00
Michal Nowak
04a60beb25 Run Coverity Scan only when specific variables are present
Submissions to Coverity Scan should be limited to those originated from
release branches and only from a specific schedule which holds
COVERITY_SCAN_PROJECT_NAME and COVERITY_SCAN_TOKEN variables.

(cherry picked from commit 48530aa21395414b0f9788ea5ab158b2b09ab977)
2020-02-12 14:58:10 +00:00
Michał Kępień
744b819f14 Merge branch 'michal/prepare-release-notes-for-bind-9.14.11' into 'v9_14'
Prepare release notes for BIND 9.14.11

See merge request isc-projects/bind9!3051
2020-02-12 13:18:56 +00:00
Michał Kępień
38f3053694 Add release notes section for BIND 9.14.11 2020-02-12 13:50:21 +01:00
Michał Kępień
69425845c4 Merge branch 'michal/minor-README-tweaks-v9_14' into 'v9_14'
[v9_14] Minor README tweaks

See merge request isc-projects/bind9!3048
2020-02-12 10:38:22 +00:00
Michał Kępień
1aa9f58aba Minor CHANGES tweak
(cherry picked from commit a0349b18e0)
2020-02-12 11:27:28 +01:00
Stephen Morris
a5a358df87 Minor README tweaks
(cherry picked from commit bc539d48e7)
2020-02-12 11:26:59 +01:00
Michal Nowak
4bc64ad831 Merge branch 'mnowak/coverity2-v9_14' into 'v9_14'
[v9_14] Add Coverity Scan to CI

See merge request isc-projects/bind9!3046
2020-02-12 10:01:35 +00:00
Michal Nowak
27ff22ff37 Add Coverity Scan to CI
This job requires two CI variables to be set:

  - COVERITY_SCAN_PROJECT_NAME: project name, which is associated with
    the BIND branch for which this job is executed, e.g. "bind-master",

  - COVERITY_SCAN_TOKEN: project token.

(cherry picked from commit e8392e4bb911366b65cdc461ec907d9e1a68bf54)
2020-02-12 10:01:35 +00:00
Mark Andrews
dcf3e0684c Merge branch '1602-rpz-system-test-failed-because-protoype-responses-timed-out-v9_14' into 'v9_14'
spin waiting for prototype dig responses

See merge request isc-projects/bind9!3045
2020-02-12 09:34:23 +00:00
Mark Andrews
8bea078674 spin waiting for prototype dig responses
(cherry picked from commit c38752b07c)
2020-02-12 19:48:02 +11:00
Mark Andrews
94ebac1e45 Merge branch '1616-autosign-not-waiting-long-enough-for-zone-to-be-signed-v9_11-and-maybe-others-v9_14' into 'v9_14'
wait for apex NSEC3 to be generated

See merge request isc-projects/bind9!3041
2020-02-12 08:38:55 +00:00
Mark Andrews
d3f726cbef wait for apex NSEC3 to be generated
(cherry picked from commit c99ad5c8c7)
2020-02-12 19:12:40 +11:00
Ondřej Surý
12b44788bd Merge branch '1428-possible-data-race-in-rbtdb-happens-occasionally-on-ppc64le-v9_14' into 'v9_14'
Resolve "Possible data race in rbtdb, happens occasionally on ppc64le"

See merge request isc-projects/bind9!3035
2020-02-11 11:19:12 +00:00
Ondřej Surý
3c8a441a0e Convert all atomic operations in isc_rwlock to release-acquire memory ordering
The memory ordering in the rwlock was all wrong, I am copying excerpts
from the https://en.cppreference.com/w/c/atomic/memory_order#Relaxed_ordering
for the convenience of the reader:

  Relaxed ordering

  Atomic operations tagged memory_order_relaxed are not synchronization
  operations; they do not impose an order among concurrent memory
  accesses. They only guarantee atomicity and modification order
  consistency.

  Release-Acquire ordering

  If an atomic store in thread A is tagged memory_order_release and an
  atomic load in thread B from the same variable is tagged
  memory_order_acquire, all memory writes (non-atomic and relaxed atomic)
  that happened-before the atomic store from the point of view of thread
  A, become visible side-effects in thread B. That is, once the atomic
  load is completed, thread B is guaranteed to see everything thread A
  wrote to memory.

  The synchronization is established only between the threads releasing
  and acquiring the same atomic variable. Other threads can see different
  order of memory accesses than either or both of the synchronized
  threads.

Which basically means that we had no or weak synchronization between
threads using the same variables in the rwlock structure.  There should
not be a significant performance drop because the critical sections were
already protected by:

  while(1) {
    if (relaxed_atomic_operation) {
      break;
    }
    LOCK(lock);
    if (!relaxed_atomic_operation) {
      WAIT(sem, lock);
    }
    UNLOCK(lock)l
  }

I would add one more thing to "Don't do your own crypto, folks.":

  - Also don't do your own locking, folks.
2020-02-11 11:50:04 +01:00
Ondřej Surý
1da0994ea4 Make isc_rwlock.c thread-safe
The ThreadSanitizer found several possible data races in our rwlock
implementation.  This commit changes all the unprotected variables to atomic and
also changes the explicit memory ordering (atomic_<foo>_explicit(..., <order>)
functions to use our convenience macros (atomic_<foo>_<order>).
2020-02-11 11:49:01 +01:00
Ondřej Surý
50058a4bc8 Merge branch 'ondrej/remove-OpenSSL-engine-specification-in-label-v9_14' into 'v9_14'
[v9_14] Cleanup support for specifying PKCS#11 engine as part of the label

See merge request isc-projects/bind9!3033
2020-02-11 10:13:56 +00:00
Ondřej Surý
f172ecabda Remove reference to prepending label with engine in manpage
(cherry picked from commit 33fa3d5eb1)
2020-02-11 10:32:12 +01:00
Ondřej Surý
95130a379c Cleanup support for specifying PKCS#11 engine as part of the label
The code for specifying OpenSSL PKCS#11 engine as part of the label
(e.g. -l "pkcs11:token=..." instead of -E pkcs11 -l "token=...")
was non-functional.  This commit just cleans the related code.

(cherry picked from commit a5c87d9d18)
2020-02-11 10:32:11 +01:00
Ondřej Surý
e834548376 Merge branch 'ondrej/lgtm-narrow-vs-wider-type-comparison-in-a-loop-v9_14' into 'v9_14'
Fix comparison between type uint16_t and  wider type size_t in a loop

See merge request isc-projects/bind9!3030
2020-02-10 10:59:40 +00:00
Ondřej Surý
bffdf9c58d Fix comparison between type uint16_t and wider type size_t in a loop
Found by LGTM.com (see below for description), and while it should not
happen as EDNS OPT RDLEN is uint16_t, the fix is easy.  A little bit
of cleanup is included too.

> In a loop condition, comparison of a value of a narrow type with a value
> of a wide type may result in unexpected behavior if the wider value is
> sufficiently large (or small). This is because the narrower value may
> overflow. This can lead to an infinite loop.

(cherry picked from commit a9bd6f6ea6)
2020-02-10 02:42:50 -08:00
Evan Hunt
018e366f6b Merge branch '932-doc-query-error-logging-v9_14' into 'v9_14'
improve documentation of query logging

See merge request isc-projects/bind9!3027
2020-02-09 00:08:07 +00:00
Evan Hunt
d3c6e5d89c improve documentation of query logging
(cherry picked from commit 21bb9fa77f)
2020-02-08 16:07:01 -08:00
Ondřej Surý
ce202f4d17 Merge branch '1560-isc_httpd-and-isc_httpdmgr-structures-are-not-reference-counted-and-magic-v9_14' into 'v9_14'
Resolve "isc_httpd and isc_httpdmgr structures are not reference counted and magic"

See merge request isc-projects/bind9!2939
2020-02-08 20:23:56 +00:00
Ondřej Surý
3828d4e3e9 Clean the ENTER/EXIT/NOTICE debugging from production code
(cherry picked from commit 5b448996e5)
2020-02-08 11:37:42 -08:00
Ondřej Surý
5391187fd4 Refactor parts of isc_httpd and isc_httpd for better readability and safety
(cherry picked from commit 9643a62dd5)
2020-02-08 11:37:42 -08:00
Mark Andrews
f5be6c8877 add ISC_MAGIC and reference counting to httpd and httpdmgr
(cherry picked from commit 7c3f419d66)
2020-02-08 11:37:42 -08:00
Mark Andrews
5f0314c467 Merge branch '1596-echo_ic-should-be-used-for-continuations-v9_14' into 'v9_14'
Resolve "echo_ic should be used for continuations."

See merge request isc-projects/bind9!3021
2020-02-07 22:35:05 +00:00
Mark Andrews
4db05004ef indent failed: descriptions
(cherry picked from commit 1e4773f121)
2020-02-07 21:48:46 +00:00
Mark Andrews
cf40f76703 indent some test descriptions/continuation
(cherry picked from commit ec95bc6f2c)
2020-02-07 21:48:46 +00:00
Mark Andrews
1264cbc9b8 remove space before 'failed'
(cherry picked from commit 0d5ec0c7dc)
2020-02-07 21:48:46 +00:00
Mark Andrews
1df2df5706 ident continuation of test descriptions
(cherry picked from commit 059b16b991)
2020-02-07 21:48:46 +00:00
Mark Andrews
9804cdb5f2 remove space from before 'failed'; count errors
(cherry picked from commit 879c63b573)
2020-02-07 21:48:46 +00:00
Mark Andrews
def0570453 Merge branch '1559-dnssec-system-test-failed-reload-of-root-server-not-completed-in-time-v9_14' into 'v9_14'
wait for root server to complete reloading

See merge request isc-projects/bind9!3018
2020-02-07 21:37:03 +00:00
Mark Andrews
85d2a2c633 wait for root server to complete reloading
(cherry picked from commit 784e64f238)
2020-02-07 21:09:30 +00:00
Mark Andrews
75972ebdf3 Merge branch '1599-autosign-conversion-from-nsec3-to-nsec-can-take-more-than-2-seconds-v9_14' into 'v9_14'
wait a short while for no NSEC3PARAM

See merge request isc-projects/bind9!3016
2020-02-07 15:04:40 +00:00
Mark Andrews
5a559c3fcf wait a short while for no NSEC3PARAM
(cherry picked from commit e378241324)
2020-02-08 00:43:06 +11:00
Mark Andrews
f8f2b192a7 Merge branch 'marka-coverity-dns-db-find-v9_14' into 'v9_14'
Marka coverity dns db find v9 14

See merge request isc-projects/bind9!3014
2020-02-07 11:16:47 +00:00
Mark Andrews
76df419b27 Silence unchecked return of dns_db_find()
190        dns_rdataset_init(&rdataset);
   	3. Condition r == 0, taking true branch.
   	4. Condition result, taking false branch.

	CID 1452691 (#1 of 1): Unchecked return value (CHECKED_RETURN)
	5. check_return: Calling dns_db_find without checking return
	value (as is done elsewhere 39 out of 45 times).

191        check_assertion(dns_db_find(db1, dns_rootname, v2,
192                                    dns_rdatatype_soa, 0, 0, NULL,
193                                    name, &rdataset, NULL));

(cherry picked from commit e8bf82efc6)
2020-02-07 21:43:26 +11:00
Mark Andrews
a6f09283cd Fix indenting.
(cherry picked from commit 98d5109e82)
2020-02-07 21:43:26 +11:00
Mark Andrews
f015929d35 Correct logged function name.
(cherry picked from commit 550bbee427)
2020-02-07 21:43:26 +11:00
Michał Kępień
39701467a9 Merge branch 'michal/fix-the-dnssec-system-test-on-windows-v9_14' into 'v9_14'
[v9_14] Fix the "dnssec" system test on Windows

See merge request isc-projects/bind9!3012
2020-02-06 14:20:54 +00:00
Michał Kępień
6c5295ca09 Fix the "dnssec" system test on Windows
Make sure carriage return characters are stripped from awk input to
enable the "dnssec" system test to pass on Windows.

(cherry picked from commit 2f694f0b77)
2020-02-06 15:17:51 +01:00
Matthijs Mekking
eed59f521b Merge branch '914-forwarders-port-documentation-v9_14' into 'v9_14'
Document forwarders config port and dscp param

See merge request isc-projects/bind9!3008
2020-02-06 09:54:22 +00:00
Matthijs Mekking
5e1f3ae518 Document forwarders config port and dscp param
(cherry picked from commit be3a11029a)
2020-02-06 10:06:22 +01:00
Michal Nowak
64f6e8597b Merge branch 'mnowak/windows-raise-port-range-v9_14' into 'v9_14'
[v9_14] Windows: Prevent tools from clashing with named in system tests

See merge request isc-projects/bind9!3002
2020-02-05 11:07:18 +00:00
Michal Nowak
8a47de5110 Windows: Prevent tools from clashing with named in system tests
In system tests on Windows tool's local port can sometimes clash with
'named'. On Unix the system is poked for the minimal local port,
otherwise is set to 32768 as a sane minimum. For Windows we don't
poke but set a hardcoded limit; this change aligns the limit with
Unix and changes it to 32768.

(cherry picked from commit ed7fe5fae3b22d136f0a5a92ea3b67536b10a5ce)
2020-02-05 11:07:18 +00:00
Matthijs Mekking
cffc7c15f7 Merge branch 'cppcheck-1.90-warnings-v9_14' into 'v9_14'
Cppcheck 1.90 warnings v9 14

See merge request isc-projects/bind9!2997
2020-02-05 09:22:11 +00:00
Matthijs Mekking
6799f2208f more_frags: check for basic blocks != NULL 2020-02-05 09:08:35 +01:00
Matthijs Mekking
076585e611 Fix build
Restore cleanup: label in dns_client_startrequest because it still has one
goto for it.
2020-02-05 09:08:35 +01:00
Matthijs Mekking
6b9f9a0b52 Add a note on memory allocation
isc__memalloc_t must deal with memory allocation failure
and must never return NULL.

(cherry picked from commit b8be29fee6)
2020-02-05 09:08:35 +01:00
Ondřej Surý
d91cfbd67f Suppress unknownMacro directive which is currently broken with OpenSSL
(cherry picked from commit 2868eafc46)
2020-02-05 09:08:35 +01:00
Ondřej Surý
49edf175fe Suppress cppcheck false positive nullPointerArithmeticRedundantCheck
(cherry picked from commit c00def343f)
2020-02-05 09:08:35 +01:00
Ondřej Surý
5f4ca46d50 Change pk11_mem_get() so it cannot soft-fail
(cherry picked from commit 05ae2e48ab)
2020-02-05 09:08:35 +01:00
Ondřej Surý
1b9a7a17d9 Make the DbC checks to be consistent and cppcheck clean
(cherry picked from commit 478e4ac201)
2020-02-05 09:08:35 +01:00
Mark Andrews
da02ff9d08 isc_mem_get cannot fail
(cherry picked from commit bb65e57297)
2020-02-05 09:08:35 +01:00
Mark Andrews
c2ce468734 delay assignment until after REQUIRE
(cherry picked from commit d6de520bd1)
2020-02-05 09:08:35 +01:00
Mark Andrews
e515ac325e skip if first is NULL
(cherry picked from commit 704b9ee9d0)
2020-02-05 09:08:35 +01:00
Mark Andrews
71a55892eb delay assignment until after REQUIRE
(cherry picked from commit c65c06301c)
2020-02-05 09:08:35 +01:00
Mark Andrews
4217930699 make expression logical for cppcheck
(cherry picked from commit f17b9b8dd1)
2020-02-05 09:08:35 +01:00
Mark Andrews
8251141baa remove brackets
(cherry picked from commit 7b948c7335)
2020-02-05 09:08:35 +01:00
Mark Andrews
123371e1e7 simplify ISC_LIKELY/ISC_UNLIKELY for CPPCHECK
(cherry picked from commit 6c2e138d7a)
2020-02-05 09:08:35 +01:00
Mark Andrews
30492c2d40 simplify RUNTIME_CHECK for cppcheck
(cherry picked from commit 668a972d1e)
2020-02-05 09:08:35 +01:00
Mark Andrews
3cc180a12d Merge branch '1192-fix-serve-stale-test-v9_14' into 'v9_14'
Increase TTL in serve-stale test

See merge request isc-projects/bind9!2996
2020-02-05 01:45:26 +00:00
Matthijs Mekking
832763a7d7 Increase TTL in serve-stale test
Increase the short lived record TTL and negative SOA TTL to make
this test less vulnerable to timing issues. The drawback is that we
also have to sleep longer in this test.

(cherry picked from commit 2c0c333d16)
2020-02-04 14:06:39 +01:00
Michał Kępień
0255a381c4 Merge branch '1305-update-gitlab-ci-to-openbsd-6.6-v9_14' into 'v9_14'
[v9_14] Update GitLab CI to OpenBSD 6.6

See merge request isc-projects/bind9!2994
2020-02-04 10:46:20 +00:00
Michał Kępień
9e2cb82779 Update GitLab CI to OpenBSD 6.6
Since OpenBSD 6.6 is the current OpenBSD release, replace OpenBSD 6.5
GitLab CI jobs with their up-to-date counterparts.

As CI jobs for OpenBSD 6.6 will be run by a generalized libvirt executor
rather than an OpenBSD-specific one, make the necessary tag and variable
adjustments as well.

(cherry picked from commit 99ed3a0e13)
2020-02-04 11:43:44 +01:00
Evan Hunt
fa69de09c9 Merge branch '1592-catz-filename-v9_14' into 'v9_14'
Resolve "catalog zones fail if a zone name contains a slash"

See merge request isc-projects/bind9!2992
2020-02-04 03:47:13 +00:00
Evan Hunt
b2f56efcbd CHANGES
(cherry picked from commit 7a002c7ece)
2020-02-03 19:19:46 -08:00
Mark Andrews
c09d01c7da don't swallow backslash characters in test output
(cherry picked from commit fc4e44bd37)
2020-02-03 19:19:45 -08:00
Mark Andrews
c1754035cb test all the scenarios for hashed filenames together
(cherry picked from commit 8745043a86)
2020-02-03 19:19:45 -08:00
Evan Hunt
68eb6c1bb9 Correctly handle catalog zone entries containing slashes
- Add quotes before and after zone name when generating "addzone"
  input so avoid "unexpected token" errors.
- Use a hex digest for zone filenames when the zone or view name
  contains a slash.
- Test with a domain name containing a slash.
- Incidentally added 'catzhash.py' to contrib/scripts to generate
  hash labels for catalog zones, as it was needed to write the test.

(cherry picked from commit dba0163dac)
2020-02-03 19:19:45 -08:00
Michal Nowak
8793ff9343 Merge branch 'mnowak/drop-kyua-report-verbose-option-v9_14' into 'v9_14'
[v9_14] Drop kyua report's --verbose option

See merge request isc-projects/bind9!2982
2020-01-31 09:11:37 +00:00
Michal Nowak
6bdb48908a Drop kyua report's --verbose option
It prints far more than needed.

(cherry picked from commit 5d14ed8465ccb1cb35bdbdeba2e0143b62b5455c)
2020-01-31 09:11:37 +00:00
Mark Andrews
f3cf7ccaa1 Merge branch '1554-cds-cdnskey-consistency-checks-don-t-work-with-deletion-records-v9_14' into 'v9_14'
Resolve "CDS / CDNSKEY consistency checks don't work with deletion records"

See merge request isc-projects/bind9!2977
2020-01-30 23:08:02 +00:00
Mark Andrews
e79a87566d use anonomous constants
(cherry picked from commit 02c2fc5ad3)
2020-01-31 00:15:16 +11:00
Mark Andrews
5432e365d5 use enum
(cherry picked from commit 7c0d9dac9f)
2020-01-31 00:15:16 +11:00
Mark Andrews
ea5e1ad762 add more CDS / CDNSKEY deletion record tests
(cherry picked from commit d159fdf25d)
2020-01-31 00:15:16 +11:00
Mark Andrews
a7e5a14624 check CDS and CDNSKEY content
(cherry picked from commit 68a360772f)
2020-01-31 00:15:16 +11:00
Mark Andrews
7f079c4fa3 check kskonly key ids
(cherry picked from commit 379949cce4)
2020-01-31 00:15:16 +11:00
Mark Andrews
d403b3621d add CHANGES
(cherry picked from commit 272a31f758)
2020-01-31 00:15:16 +11:00
Mark Andrews
3a87b02b1a style
(cherry picked from commit 279f6b01de)
2020-01-31 00:15:16 +11:00
Mark Andrews
c2a2e1f454 return the correct error code for the type being checked
(cherry picked from commit a09c464a20)
2020-01-31 00:15:16 +11:00
Mark Andrews
735dfc1ab8 check that a CDNSKEY deletion record is accepted
(cherry picked from commit f91b3a69ce)
2020-01-31 00:15:16 +11:00
Mark Andrews
103cd665e1 handle CDS deletion record in consistancy checks
(cherry picked from commit 0adb4b25d3)
2020-01-31 00:15:15 +11:00
Michał Kępień
5338d34173 Merge branch 'michal/list-atypical-failures-in-system-test-summary-v9_14' into 'v9_14'
[v9_14] List atypical failures in system test summary

See merge request isc-projects/bind9!2974
2020-01-29 14:42:40 +00:00
Michał Kępień
6e9d3680f9 List atypical failures in system test summary
Each system test can be marked as failed not only due to some tested
component(s) not behaving as expected, but also because of core dumps,
assertion failures, and/or ThreadSanitizer reports being found among its
artifacts.  Make the system test summary list the tests which exhibit
such atypical symptoms to more clearly present the nature of problems
found.

(cherry picked from commit a8836b381f)
2020-01-29 14:50:42 +01:00
Mark Andrews
249fc48cbb Merge branch '1508-case-system-test-failed-v9_14' into 'v9_14'
wait longer for dynamic zone to be transfered

See merge request isc-projects/bind9!2971
2020-01-28 23:05:22 +00:00
Mark Andrews
7865f1e28a wait longer for dynamic zone to be transfered
(cherry picked from commit 7b0ba6eb10)
2020-01-29 08:24:42 +11:00
Evan Hunt
d4c5c36392 Merge branch 'each-merge-doc-v9_14_10' into 'v9_14'
merge doc from 9.14.10 release

See merge request isc-projects/bind9!2962
2020-01-27 22:43:14 +00:00
Tinderbox User
2b13e3ca3b regen v9_14 2020-01-27 11:06:04 -08:00
Tinderbox User
0ec9ae77a8 prep 9.14.10
Update the API files.
- lib/dns:
  - struct resolver has added elements, this is an interface change
    and thus LIBINTERFACE is incremented, and LIBREVISION is reset.
  - Since this also means an interface change since the last public
    release, also reset LIBAGE.
- lib/isccfg:
  - The library source code changed, so increment LIBREVISION.
- lib/ns:
  - The library source code changed, so increment LIBREVISION.

Update other files:
- No changes needed to the README, this is a small bugfix release.
2020-01-27 11:06:04 -08:00
Evan Hunt
e00f03a6cb Merge branch 'each-history-typo-v9_14' into 'v9_14'
fixed a typo

See merge request isc-projects/bind9!2961
2020-01-24 17:57:08 +00:00
Evan Hunt
1e5b7b52f8 fixed a typo
(cherry picked from commit 0147acd7b6)
2020-01-24 09:56:36 -08:00
Mark Andrews
d2f3295e0a Merge branch '1579-dnstap-system-test-appears-to-be-timing-sensitive-v9_14' into 'v9_14'
Resolve "dnstap system test appears to be timing sensitive"

See merge request isc-projects/bind9!2958
2020-01-23 21:50:26 +00:00
Mark Andrews
cb271dcef0 wait for the ./NS lookup to complete
(cherry picked from commit 9b6df37303)
2020-01-24 08:20:04 +11:00
Mark Andrews
c585221d10 check that all servers have finished loading before beginging tests
(cherry picked from commit 4a992c7a18)
2020-01-24 08:20:04 +11:00
Mark Andrews
9eeaaed160 Merge branch 'marka-signing-clear-notify-v9_14' into 'v9_14'
Send NOFITY messages after deleting private-type records.

See merge request isc-projects/bind9!2953
2020-01-23 13:34:24 +00:00
Tony Finch
bee4599f90 Send NOFITY messages after deleting private-type records.
The `rndc signing -clear` command cleans up the private-type records
that keep track of zone signing activity, but before this change it
did not tell the secondary servers that the zone has changed.

(cherry picked from commit f3f7b7df5d)
2020-01-24 00:02:44 +11:00
Mark Andrews
914e7a8199 Merge branch '1572-wait-for-mirror-zone-to-be-deleted-v9_14' into 'v9_14'
wait for log message before testing that mirror zone is correctly removed

See merge request isc-projects/bind9!2952
2020-01-23 05:46:53 +00:00
Mark Andrews
0336701524 wait for log message before testing that mirror zone is correctly removed
(cherry picked from commit c6ba51cfc4)
2020-01-23 16:19:38 +11:00
Mark Andrews
acd91d1241 Merge branch '1522-pad-system-test-is-timing-sensitive-v9_14' into 'v9_14'
address timing issues in padding system test

See merge request isc-projects/bind9!2951
2020-01-23 03:47:26 +00:00
Mark Andrews
a0505547ca address timing issues in padding system test
'rndc stats' is not instantaneous. Wait for the dump to complete
before looking at the content.

(cherry picked from commit b3f06729e5)
2020-01-23 14:19:41 +11:00
Evan Hunt
7a3c9c63c6 Merge branch '1540-bind-aborts-when-queried-for-non-existing-domain-in-chaos-class-v9_14' into 'v9_14'
Resolve "bind 9.14.8 and 9.14.9 aborts when queried for non-existing domain in chaos class"

See merge request isc-projects/bind9!2948
2020-01-22 21:12:24 +00:00
Evan Hunt
34e206eb07 CHANGES
(cherry picked from commit 42e1fb8322)
2020-01-22 12:25:50 -08:00
Diego Fronza
f506a40914 Added test for the proposed fix
Added test to ensure that NXDOMAIN is returned when BIND is queried for a
non existing domain in CH class (if a view of CHAOS class is configured)
and that it also doesn't crash anymore in those cases.

(cherry picked from commit 7417b79c7a)
2020-01-22 12:25:34 -08:00
Diego Fronza
150b98d185 Fixed crash when querying for non existing domain in chaos class
Function dns_view_findzonecut in view.c wasn't correctly handling
classes other than IN (chaos, hesiod, etc) whenever the name being
looked up wasn't in cache or in any of the configured zone views' database.

That resulted in a NULL fname being used in resolver.c:4900, which
in turn was triggering abort.

(cherry picked from commit 85555f29d7)
2020-01-22 12:25:33 -08:00
Michal Nowak
4b34e5a135 Merge branch 'mnowak/prevent-failing-grep-invocations-from-interrupting-mkeys-v9_14' into 'v9_14'
[v9_14] mkeys: Prevent failing grep invocations

See merge request isc-projects/bind9!2945
2020-01-22 14:56:15 +00:00
Michal Nowak
377e48e897 mkeys: Prevent failing grep invocations
Some 'grep' invocations were not guarded from interrupting the test
prematurely, e.g. when no text was matched.

(cherry picked from commit 6c4a2b602042d83450f0af50c25225efa8698750)
2020-01-22 15:54:19 +01:00
Mark Andrews
882ee0fd29 Merge branch 'marka-Psync-future-v9_14' into 'v9_14'
Marka psync future v9 14

See merge request isc-projects/bind9!2926
2020-01-21 23:04:16 +00:00
Mark Andrews
2db5a2539a dnssec: do not publish CDS records when -Psync is in the future
This is a bug I encountered when trying to schedule an algorithm
rollover. My plan, for a zone whose maximum TTL is 48h, was to sign
with the new algorithm and schedule a change of CDS records for more
than 48 hours in the future, roughly like this:

    $ dnssec-keygen -a 13 -fk -Psync now+50h $zone
    $ dnssec-keygen -a 13 $zone
    $ dnssec-settime -Dsync now+50h $zone_ksk_old

However the algorithm 13 CDS was published immediately, which could
have made the zone bogus.

To reveal the bug using the `smartsign` test, this change just adds a
KSK with all its times in the future, so it should not affect the
existing checks at all. But the final check (that there are no CDS or
CDSNSKEY records after -Dsync) fails with the old `syncpublish()`
logic, because the future key's sync records appear early. With the
new `syncpublish()` logic the future key does not affect the test, as
expected, and it now passes.

(cherry picked from commit 4227b7969b)
2020-01-21 23:04:16 +00:00
Michal Nowak
79c15d2c07 Merge branch 'mnowak/enhance_unit_test_debugging-v9_14' into 'v9_14'
[v9_14] Omit spurious string from unit test debugging efforts

See merge request isc-projects/bind9!2936
2020-01-21 17:46:57 +00:00
Michal Nowak
8056ea212d Omit spurious string from unit test debugging efforts
When both 'broken' and 'failed' test cases appear in unit test output

...
===> Broken tests
lib/isc/tests/socket_test:main  ->  broken: Test case timed out  [300.022s]
===> Failed tests
lib/isc/tests/time_test:main  ->  failed: 2 of 6 tests failed  [0.006s]
===> Summary
...

spurious '===>' string gets matched, that results in the following
error:

  Usage error for command debug: '===>' is not a test case identifier (missing ':'?).

Following change makes sure the string is omitted.

I checked on FreeBSD and OpenBSD that the AWK construct is supported.

(cherry picked from commit 9e6f6156f7)
2020-01-21 17:46:57 +00:00
Witold Krecicki
b3941d61cb Merge branch 'wpk/fix-inline-test-v9_14' into 'v9_14'
tests: add a missing log nextpart in inline test

See merge request isc-projects/bind9!2934
2020-01-21 14:34:37 +00:00
Witold Kręcicki
3f54e31d0c tests: add a missing log nextpart in inline test 2020-01-21 15:15:42 +01:00
Ondřej Surý
4fe14b1a9d Merge branch 'ondrej/lower-the-artifact-expiration-time-to-just-12-hours-v9_14' into 'v9_14'
Lower the artifact expiration time to just 1 day

See merge request isc-projects/bind9!2931
2020-01-21 12:11:00 +00:00
Ondřej Surý
3ae30df269 Lower the artifact expiration time to just 1 day
(cherry picked from commit 27a9be3034)
2020-01-21 13:08:57 +01:00
Mark Andrews
c83b14fea6 Merge branch 'marka-omit-spurious-newlines-v9_14' into 'v9_14'
Omit spurious newlines when reporting DNSKEY changes

See merge request isc-projects/bind9!2923
2020-01-21 05:49:50 +00:00
Tony Finch
5c2573c1ad Omit spurious newlines when reporting DNSKEY changes
These caused blank lines to appear in the logs.

(cherry picked from commit 3b1bd3f48b)
2020-01-21 16:28:24 +11:00
Mark Andrews
9816c0c3ca Merge branch 'marka-document-authors-bind-v9_14' into 'v9_14'
document that version also controls authors.bind

See merge request isc-projects/bind9!2920
2020-01-21 04:29:24 +00:00
Mark Andrews
f198545cc1 document that version also controls authors.bind
(cherry picked from commit 05c6a29c87)
2020-01-21 15:04:51 +11:00
Mark Andrews
619746390b Merge branch '1537-nslookup-manual-page-needs-update-for-default-querytype-a-and-aaaa-v9_14' into 'v9_14'
document that nslookup defaults to A + AAAA lookups

See merge request isc-projects/bind9!2916
2020-01-20 02:23:23 +00:00
Mark Andrews
1151df1715 document that nslookup defaults to A + AAAA lookups
(cherry picked from commit 938fc81493)
2020-01-20 10:47:54 +11:00
Mark Andrews
c4ba29de6a Merge branch 'marka-check-CHANGES-SE-in-CI-v9_14' into 'v9_14'
check that CHANGES.SE entries are correctly ordered and that whitespace is correct

See merge request isc-projects/bind9!2915
2020-01-19 23:12:27 +00:00
Mark Andrews
e0605f1ee2 check that CHANGES.SE entries are correctly ordered and that whitespace is correct
(cherry picked from commit 05f2ba973f)
2020-01-18 08:11:08 +11:00
Matthijs Mekking
350a8867bf Merge branch 'prepare-release-notes-for-bind-9-14.10' into 'v9_14'
Add release notes section for BIND 9.14.10

See merge request isc-projects/bind9!2905
2020-01-16 12:01:29 +00:00
Michał Kępień
169ffcb96e Add release notes section for BIND 9.14.10 2020-01-16 12:26:53 +01:00
Michał Kępień
3a6d3abc4d Merge branch 'michal/fix-the-dnssec-system-test-on-windows-v9_14' into 'v9_14'
[v9_14] Fix the "dnssec" system test on Windows

See merge request isc-projects/bind9!2903
2020-01-16 08:51:23 +00:00
Michał Kępień
bfedaa5a99 Fix the "dnssec" system test on Windows
Make sure carriage return characters are stripped from awk input to
enable the "dnssec" system test to pass on Windows.

(cherry picked from commit 451484b870)
2020-01-16 09:50:06 +01:00
Michał Kępień
ddaeb2ce14 Merge branch '1525-inline-system-test-failed-need-to-wait-for-zone-to-be-loaded-v9_14' into 'v9_14'
[v9_14] Resolve "inline system test failed, need to wait for zone to be loaded."

See merge request isc-projects/bind9!2890
2020-01-14 14:14:38 +00:00
Mark Andrews
0384fb7d92 address some timing issues in inline system test
(cherry picked from commit 2dc4d72fa9)
2020-01-14 14:36:35 +01:00
Michał Kępień
9a5b608ac2 Merge branch '1482-autosign-system-test-failed-v9_14' into 'v9_14'
[v9_14] Resolve "autosign system test failed"

See merge request isc-projects/bind9!2887
2020-01-14 13:34:54 +00:00
Mark Andrews
1327031232 Fix autosign system test issues.
* report when NSEC3PARAM is not yet present
* allow more time for NSEC3PARAM to become present
* adjust frequency failure message

(cherry picked from commit 17d25dbf47)
2020-01-14 13:24:19 +01:00
Michał Kępień
4c3c2a5296 Merge branch '1467-xfer-test-suppress-zone-transfer-when-we-are-going-to-retry-v9_14' into 'v9_14'
[v9_14] Resolve "xfer test: suppress zone transfer when we are going to retry."

See merge request isc-projects/bind9!2884
2020-01-14 11:52:28 +00:00
Mark Andrews
895f60d6f8 improve forensic logs
improve forensic logs by directing output to per sub-test named
files and reporting the sub-subtest number.

(cherry picked from commit 05aa45c602)
2020-01-14 11:57:40 +01:00
Mark Andrews
28695f1c92 suppress unnecessary zone transfer
suppressed unnecessary zone transfer in "test mapped zone with
out of zone data" sub-test.

(cherry picked from commit 9bd6720f58)
2020-01-14 11:54:58 +01:00
Mark Andrews
14ef8b10af Improve forensic logging in "testing basic zone transfer functionality"
Split the "testing basic zone transfer functionality" into primary and
secondary parts to improve forensic logging.

(cherry picked from commit 46982b414b)
2020-01-14 11:51:31 +01:00
Ondřej Surý
173d770bf3 Merge branch '1531-add-calls-to-dns_rdata_additionaldata-to-lib-dns-tests-rdata_test-c-v9_14' into 'v9_14'
Resolve "Add calls to dns_rdata_additionaldata to lib/dns/tests/rdata_test.c"

See merge request isc-projects/bind9!2878
2020-01-14 09:36:33 +00:00
Mark Andrews
2ec9d87b20 exercise dns_rdata_checknames
(cherry picked from commit b3c1b2a869)
2020-01-14 08:07:38 +00:00
Mark Andrews
ff4b0af279 exercise dns_rdata_additionaldata
(cherry picked from commit 649a34d628)
2020-01-14 08:07:38 +00:00
Mark Andrews
aa0ea40182 call dns_rdata_towire on valid output from dns_rdata_fromtext and dns_rdata_fromwire
(cherry picked from commit 5e74550740)
2020-01-14 08:07:38 +00:00
Ondřej Surý
56f149e1ea Merge branch '1443-threadsanitizer-data-race-lib-dns-rbtdb-c-1960-in-decrement_reference-2-v9_14' into 'v9_14'
Resolve "ThreadSanitizer: data race lib/dns/rbtdb.c:1960 in decrement_reference"

See merge request isc-projects/bind9!2873
2020-01-14 08:05:00 +00:00
Mark Andrews
067b9f8d31 Add is_leaf and send_to_prune_tree.
Add is_leaf and send_to_prune_tree to make the logic easier
to understand in cleanup_dead_nodes and decrement_reference.

(cherry picked from commit c6efc0e50f)
2020-01-14 08:36:02 +01:00
Mark Andrews
d7593feb46 Testing node->down requires the tree lock to be held.
In decrement_reference only test node->down if the tree lock
is held.  As node->down is not always tested in
decrement_reference we need to test that it is non NULL in
cleanup_dead_nodes prior to removing the node from the rbt
tree.  Additionally it is not always possible to aquire the
node lock and reactivate a node when adding parent nodes.
Reactivate such nodes in cleanup_dead_nodes if required.

(cherry picked from commit 176b23b6cd)
2020-01-14 08:36:02 +01:00
Mark Andrews
8bee7954c6 Merge branch 'u/fanf2/rndc-secroots-newlines-v9_14' into 'v9_14'
Fix line spacing in `rndc secroots`

See merge request isc-projects/bind9!2866
2020-01-13 19:51:53 +00:00
Tony Finch
6014fe13ff Fix line spacing in rndc secroots
Before this change, there was a missing blank line between the
negative trust anchors for one view, and the heading line for the next
view. This is because dns_ntatable_totext() omits the last newline.
There is an example of the incorrect output below; the fixed output
has a blank line before "Start view auth".

secure roots as of 21-Oct-2019 12:03:23.500:

 Start view rec
   Secure roots:

./RSASHA256/20326 ; managed

   Negative trust anchors:

example.com: expiry 21-Oct-2019 13:03:15.000
 Start view auth
   Secure roots:

./RSASHA256/20326 ; managed

   Negative trust anchors:

example.com: expiry 21-Oct-2019 13:03:07.000

(cherry picked from commit 5b600c2cd8)
2020-01-14 06:29:09 +11:00
Michal Nowak
339dce6f72 Merge branch 'mnowak/add-openSUSE-Tumblewed-image-v9_14' into 'v9_14'
[v9_14] Add openSUSE Tumbleweed image to the CI

See merge request isc-projects/bind9!2875
2020-01-13 16:27:21 +00:00
Michal Nowak
d48f7a9f48 Add openSUSE Tumbleweed image to the CI
Ensure BIND is continuously tested on Tumbleweed, a pure rolling release
version of openSUSE.  This will allow BIND incompatibilities with latest
upstream versions of its dependencies to be caught more quickly.

(cherry picked from commit bd5dd1b58c60edb372bc6fa4eb39e355c5c76de4)
2020-01-13 16:27:21 +00:00
Michał Kępień
952b6ad495 Merge branch '1552-properly-detect-mmdb-lookup-failures-v9_14' into 'v9_14'
[v9_14] Properly detect MMDB lookup failures

See merge request isc-projects/bind9!2871
2020-01-13 14:06:52 +00:00
Michał Kępień
a070defb18 Add CHANGES entry
5339.	[bug]		With some libmaxminddb versions, named could erroneously
			match an IP address not belonging to any subnet defined
			in a given GeoIP2 database to one of the existing
			entries in that database. [GL #1552]

(cherry picked from commit aa96ec25c8)
2020-01-13 14:37:16 +01:00
Michał Kępień
814da1c808 Properly detect MMDB lookup failures
Only comparing the value of the integer passed as the last argument to
MMDB_lookup_sockaddr() against MMDB_SUCCESS is not enough to ensure that
an MMDB lookup was successful - the 'found_entry' field of the
MMDB_lookup_result_s structure returned by that function also needs to
be true or else the remaining contents of that structure should be
ignored as the lookup failed.  Extend the relevant logical condition in
get_entry_for() to ensure the latter does not return incorrect MMDB
entries for IP addresses which do not belong to any subnet defined in a
given GeoIP2 database.

(cherry picked from commit ec8334fb74)
2020-01-13 14:36:58 +01:00
Michał Kępień
8c7faf623d Merge branch 'michal/update-gitlab-ci-to-alpine-linux-3.11-v9_14' into 'v9_14'
[v9_14] Update GitLab CI to Alpine Linux 3.11

See merge request isc-projects/bind9!2861
2020-01-10 11:43:00 +00:00
Michał Kępień
1132ae8886 Update GitLab CI to Alpine Linux 3.11
Since Alpine Linux 3.11 is the current Alpine Linux release, replace
Alpine Linux 3.10 GitLab CI jobs with their up-to-date counterparts.

(cherry picked from commit bebf353eb5)
2020-01-10 11:24:51 +01:00
Michał Kępień
3a8a9ef124 Merge branch 'ondrej/run-full-pipeline-on-schedule-v9_14' into 'v9_14'
[v9_14] Run all jobs on scheduled builds (including OpenBSD and Windows)

See merge request isc-projects/bind9!2859
2020-01-10 10:20:53 +00:00
Ondřej Surý
60ff0e97b5 Run all jobs on scheduled builds (including OpenBSD and Windows)
(cherry picked from commit 52773e226a)
2020-01-10 11:19:54 +01:00
Michał Kępień
f13cf700bf Merge branch 'ondrej/stop-retrying-system-tests-v9_14' into 'v9_14'
[v9_14] Stop retrying the system tests; we should fix the tests instead

See merge request isc-projects/bind9!2857
2020-01-10 10:15:02 +00:00
Ondřej Surý
6ea00b65da Stop retrying the system tests; we should fix the tests instead
(cherry picked from commit 8ad67f8b9f)
2020-01-10 11:13:58 +01:00
Michał Kępień
5f73947d34 Merge branch '1431-summary-sanitizer-grep-is-dangerous-v9_14' into 'v9_14'
[v9_14] Resolve ""SUMMARY: .*Sanitizer" grep is dangerous"

See merge request isc-projects/bind9!2855
2020-01-10 10:12:57 +00:00
Mark Andrews
3636b0d275 replace grep -r with 'find -type f | xargs'
(cherry picked from commit 36ce99d8a4)
2020-01-10 10:51:37 +01:00
Michał Kępień
3e1cb80650 Merge branch 'ondrej/keep-sanitizer-tainted-system-tests-files-v9_14' into 'v9_14'
[v9_14] Don't clean the system test temporary files if sanitizer reports were found inside

See merge request isc-projects/bind9!2853
2020-01-10 09:50:27 +00:00
Ondřej Surý
3bc834daae Don't clean the system test temporary files if sanitizer reports were found inside
(cherry picked from commit 7489e6e6f9)
2020-01-10 10:47:54 +01:00
Michał Kępień
13033c4527 Merge branch 'michal/fix-the-forward-system-test-on-windows-v9_14' into 'v9_14'
[v9_14] Fix the "forward" system test on Windows

See merge request isc-projects/bind9!2851
2020-01-10 09:45:17 +00:00
Michał Kępień
12f0f68742 Fix the "forward" system test on Windows
Make sure carriage return characters are stripped from sed input to
enable the "forward" system test to pass on Windows.

(cherry picked from commit 075613aea4)
2020-01-10 10:44:08 +01:00
Michał Kępień
2c5edb965a Merge branch '1479-_wait_for_rcode-adds-extraneous-query-v9_14' into 'v9_14'
[v9_14] Resolve "_wait_for_rcode adds extraneous query"

See merge request isc-projects/bind9!2849
2020-01-10 09:42:43 +00:00
Mark Andrews
05596de640 consume all arguments we have processed in shift
(cherry picked from commit 0ee0580fc9)
2020-01-10 10:41:23 +01:00
Michał Kępień
a59e76c658 Merge branch '1453-the-zero-system-test-timeouts-intermittently-v9_14' into 'v9_14'
[v9_14] Bail-out early if dig fails to finish successfully or takes too long

See merge request isc-projects/bind9!2847
2020-01-10 09:26:53 +00:00
Ondřej Surý
bea5bcff8d Bail-out early if dig fails to finish successfully or takes too long
Before, the zero system test could get stuck almost infinitely, because
the first test sends > 300 queries with 5 seconds timeout on each in
each pass.  If named crashed early, it would took the test more than 4
hours to properly timeout.

This commit introduces a "watchdog" on the dig commands running in the
background and failing the test on timeout, failing any test if any dig
command fails to return successfully, and making the tests.sh script
shellcheck clean.

(cherry picked from commit 2a65a47f39)
2020-01-10 10:04:12 +01:00
Michał Kępień
7c87878455 Merge branch '1458-intermittent-failure-in-the-forward-system-test-v9_14' into 'v9_14'
[v9_14] Resolve "Intermittent failure in the forward system test"

See merge request isc-projects/bind9!2845
2020-01-10 09:03:20 +00:00
Ondřej Surý
865fff9b5a Wait for named to forward the question before testing the validity
(cherry picked from commit fb03edacd8)
2020-01-10 09:10:46 +01:00
Ondřej Surý
b29efb0406 Make forward system test shellcheck clean
(cherry picked from commit 0e15cbb092)
2020-01-10 09:10:45 +01:00
Ondřej Surý
97985a2d4d Use $n to keep diagnostic output of every individual test separate
(cherry picked from commit 10f4cd066f)
2020-01-10 09:08:21 +01:00
Ondřej Surý
4cf83a956c Add the standard $n to each test
(cherry picked from commit 64df488e1e)
2020-01-10 09:06:13 +01:00
Michał Kępień
9cd291bbdc Merge branch '1425-intermittent-failure-in-the-addzone-system-test-v9_14' into 'v9_14'
[v9_14] Resolve "Intermittent failure in the addzone system test"

See merge request isc-projects/bind9!2842
2020-01-09 16:38:39 +00:00
Witold Kręcicki
d1afbda2f0 tests: addzone: retry when checking for things, to allow for timing problems
(cherry picked from commit 8885fd6966)
2020-01-09 15:13:42 +01:00
Mark Andrews
80a26c15be loop waiting for the redirect zone to load
(cherry picked from commit 9e8cd3ccc5)
2020-01-09 15:13:42 +01:00
Matthijs Mekking
6dfdd83040 Move wait_for_log to conf.sh.common
(cherry picked from cfaa631f65)
2020-01-09 15:13:30 +01:00
Michał Kępień
fe2d797bde Merge branch '1427-intermittent-failure-in-fetchlimit-system-test-v9_14' into 'v9_14'
[v9_14] Test for the hard fetchlimit instead of soft fetchlimit

See merge request isc-projects/bind9!2841
2020-01-09 13:31:21 +00:00
Ondřej Surý
b29059b391 Test for the hard fetchlimit instead of soft fetchlimit
Previously, the fetchlimit tested the recursive-clients soft limit
that's defined as 90% of the hard limit (the actual configured value).
This worked previously because the reaping of the oldest recursive
client was put on the same event queue as the current TCP client, thus
the cleaning has happened before the new TCP client established a new
connection.

With the change in BIND 9.14 that added a multiple event queues the
cleaning of the oldests clients is no longer synchronous and could
happen stochastically making the soft limit testing fail often.  The
situation became even worse with the new networking manager, thus we
change the system test to fail only if the hard limit bound is not
honored.

Changing the accounting of the already reaped TCP clients so the soft
limit testing is possible again is out of the scope for this change.

(cherry picked from commit c35a4e05fa)
2020-01-09 14:08:05 +01:00
Michał Kępień
042698cf72 Merge branch '1407-intermittent-failure-in-the-mkeys-system-test-v9_14' into 'v9_14'
[v9_14] Improve the error handling in mkeys test and use retry_quiet()

See merge request isc-projects/bind9!2839
2020-01-09 12:05:57 +00:00
Ondřej Surý
e6b303344a Wait for 'all zones loaded' message instead of zoneless 'loaded serial' message
(cherry picked from commit b0ad689e16)
2020-01-09 12:28:39 +01:00
Ondřej Surý
f81589f255 Save all rndc diagnostic output
(cherry picked from commit 3b63c51a64)
2020-01-09 12:28:39 +01:00
Ondřej Surý
031de5a857 Make mkeys system test shellcheck clean and run under set -e
(cherry picked from commit 4ff25c06c1)
2020-01-09 12:28:38 +01:00
Ondřej Surý
5d0732634a Improve the error handling in mkeys test and use retry_quiet()
(cherry picked from commit f239d67c1a)
2020-01-09 12:26:28 +01:00
Michał Kępień
b0ff750ef9 Merge branch '1410-intermittent-failure-in-the-resolver-test-v9_14' into 'v9_14'
[v9_14] Resolve "Intermittent failure in the resolver test"

See merge request isc-projects/bind9!2837
2020-01-09 11:15:44 +00:00
Diego Fronza
cbd4cc6242 Improved prefetch disabled test code
Using retry_quiet to test that prefetch is disabled instead of a
standard loop with sleep 1 between each iteration.

(cherry picked from commit 994fc2e822)
2020-01-09 11:28:34 +01:00
Diego Fronza
dd1b4007b8 Fix resolver tests: prefetch 40/41
These two tests were failing basically because in order for prefetching to
happen, the TTL for a given DNS record must be greater than or equal to
the prefetch config value + 9.

The previous TTL for both records was 10, while prefetch value in
configuration was 3, thus making only records with TTL >= 12 elligible
for prefetching.

TTL value for both records was adjusted to the value 13, and prefetch
value was set to 4 (inc by 1), so records with TTL (4 + 9) >= 13 are
elligible for prefetching.

Adjusting prefetch value to 4 gives the test 1 second more to avoid time
problems when sharing resources on a heavy loaded PC.

Also prefetch value in settings is now read by the script and used
by it to corrrectly calculate the amount of time needed to delay before
sending a request to trigger prefetch, adding a bit of flexibility to
fine tune the test in the future.

(cherry picked from commit a711d6f8c0)
2020-01-09 11:27:23 +01:00
Diego Fronza
e0c03d19a4 Fix resolver test: prefetch disabled
The previous test had two problems:
1. It wasn't written specifically for testing what it was supposed to:
prefetch disabled.
2. It could fail in some circunstances if the computer's load is too
high, due to sleeps not taking parallel tests and cpu load into account.

The new test is testing prefetch disabled as follows:
1. It asks for a txt record for a given domain and takes note of the
record's TTL (which is 10).
2. It sleeps for (TTL - 5) = 5 seconds, having a window of 5 seconds to
issue new queries before the record expires from cache.
3. Three(3) queries are executed in a row, with a interval of 1 second
between them, and for each query we verify that the TTL in response is
less than the previous one, thus ensuring that prefetch is disabled (if
it were enabled this record would have been refreshed already and TTL
would be >= the first TTL).

Having a window of 5 seconds to perform 3 queries with a interval of 1
second between them gives the test a reasonable amount of time
to not suffer from a machine with heavy load.

(cherry picked from commit dd524cc893)
2020-01-09 11:18:12 +01:00
Michał Kępień
d6d6be9a59 Merge branch '1401-intermittent-failures-in-the-catz-system-test-v9_14' into 'v9_14'
[v9_14] Debug "Intermittent failures in the catz system test"

See merge request isc-projects/bind9!2835
2020-01-09 10:15:45 +00:00
Mark Andrews
96aa3bb884 Increase wait_for_message attempts to 20.
(cherry picked from commit 4dd9ec8919)
2020-01-09 10:46:27 +01:00
Mark Andrews
d60ca30d2d save wait_for_message contents
(cherry picked from commit 1334daaec0)
2020-01-09 10:46:27 +01:00
Michał Kępień
89f34f0296 Merge branch 'michal/bind-to-random-port-numbers-in-unit-tests-v9_14' into 'v9_14'
[v9_14] Bind to random port numbers in unit tests

See merge request isc-projects/bind9!2832
2020-01-09 09:45:07 +00:00
Michał Kępień
11ff0537e1 Bind to random port numbers in unit tests
Some unit tests need various managers to be created before they are run.
The interface manager spawned during libns tests listens on a fixed port
number, which causes intermittent issues when multiple tests using an
interface manager are run concurrently.  Make the interface manager
listen on a randomized port number to greatly reduce the risk of
multiple unit tests using the same port concurrently.

(cherry picked from commit ea7bddb4ca)
2020-01-09 10:44:28 +01:00
Michal Nowak
4d80289abb Merge branch 'mnowak/1546-Add-out-of-tree-build-to-CI-v9_14' into 'v9_14'
[v9_14] Add out-of-tree build to the CI

See merge request isc-projects/bind9!2833
2020-01-09 09:42:36 +00:00
Michal Nowak
1258b8ccd9 Add out-of-tree build to the CI
Fixes #1546.

(cherry picked from commit 640dd566e9)
2020-01-09 09:42:36 +00:00
Michał Kępień
73f7f54575 Merge branch '1401-intermittent-failures-in-the-catz-system-test-v9_14' into 'v9_14'
[v9_14] Resolve "Intermittent failures in the catz system test"

See merge request isc-projects/bind9!2828
2020-01-08 14:13:12 +00:00
Ondřej Surý
557b051fc4 Use retry() and nextpart*() to simplify catz test
(cherry picked from commit 51b05189f7)
2020-01-08 14:11:29 +01:00
Witold Kręcicki
8cdad6bedf Fix timing issues in catz test
Make the log checks more precise and use the retry() function for
repeating the checks.

(cherry picked from commit 9b43e65c01)
2020-01-08 14:11:29 +01:00
Michał Kępień
64427406a7 Merge branch '1402-multiple-issues-in-the-runtime-system-test-v9_14' into 'v9_14'
[v9_14] Resolve "Multiple issues in the runtime system test"

See merge request isc-projects/bind9!2824
2020-01-08 09:11:31 +00:00
Ondřej Surý
4a6d9ea152 Fix multiple issues in named setuid check
(cherry picked from commit cd804158b4)
2020-01-08 09:31:13 +01:00
Evan Hunt
dc760867d8 fixed a test failure, some other shell cleanup
(cherry picked from commit 7a8269207d)
2020-01-08 09:30:00 +01:00
Ondřej Surý
355eb0c288 Instead of sleeping for a fixed time, wait for named to log specific message in a loop
(cherry picked from commit f020199925)
2020-01-08 09:29:24 +01:00
Ondřej Surý
57b6aeabd5 Make runtime/tests.sh shellcheck and set -e clean
This mostly comprises of:

* using $(...) instead of `...`
* changing the directories in subshell and not ignoring `cd` return code
* handling every error gracefully instead of ignoring the return code

(cherry picked from commit 340b1d2b6b)
2020-01-08 09:28:24 +01:00
Ondřej Surý
d26e7166a6 Further improve the runtime tests to look for a specific instead of generic error
(cherry picked from commit 8f539a8886)
2020-01-08 09:27:48 +01:00
Ondřej Surý
60f335204a Fix couple of no-op tests to actually test something (configuration files were missing)
(cherry picked from commit b5a18ac439)
2020-01-08 09:27:16 +01:00
Ondřej Surý
fe021299e0 runtime test: make the pidfiles match the names of configuration files
(cherry picked from commit ce86721bc3)
2020-01-08 09:24:49 +01:00
Ondřej Surý
e9d348bac5 runtime test: use helper function that kills named and waits for the finish
(cherry picked from commit e9fa7b831b)
2020-01-08 09:22:59 +01:00
Ondřej Surý
5261f3f9c8 Merge branch '1513-inline-system-test-failed-v9_14' into 'v9_14'
Address timing issues in 'inline' system test.

See merge request isc-projects/bind9!2821
2020-01-08 08:04:07 +00:00
Mark Andrews
546efbe2ee Address timing issues in 'inline' system test.
"rndc signing -serial <value>" could take longer than a second to
complete.  Loop waiting for update to succeed.

For tests where "rndc signing -serial <value>" is supposed to not
succeed, repeatedly test that we don't get the new serial, then
test that we have the old value.  This should prevent false negatives.

(cherry picked from commit 13fa80ede8)
2020-01-08 08:31:42 +01:00
Michał Kępień
9885fcc2a8 Merge branch 'ondrej/detect-cores-in-system-tests-on-FreeBSD-v9_14' into 'v9_14'
[v9_14] Detect cores on FreeBSD

See merge request isc-projects/bind9!2819
2020-01-07 15:00:47 +00:00
Ondřej Surý
ba2b616a4a Detect cores on FreeBSD
(cherry picked from commit 38277ddb0b)
2020-01-07 15:58:44 +01:00
Michał Kępień
bef6d2bc45 Merge branch '1380-autosign-jitter-test-fails-with-no-nsec3param-found-in-axfr-v9_14' into 'v9_14'
[v9_14] Tune the performance of the autosign test

See merge request isc-projects/bind9!2817
2020-01-07 14:50:40 +00:00
Ondřej Surý
48512e11be Reduce the minimal numbers of days in jitter test to 5
(cherry picked from commit 4b2911a45a)
2020-01-07 15:46:28 +01:00
Ondřej Surý
e359a954fc Tune the performance of CDS/CDNSKEY deletion test
(cherry picked from commit 76eac9a691)
2020-01-07 15:46:27 +01:00
Ondřej Surý
46403cff2c Tune the performance of oldsigs test
The oldsigs test was checking only for the validity of the A
a.oldsigs.example. resource record and associated DNSSEC signature while
the zone might not have been fully signed yet leading to validation
failures because of bogus signatures on the validation path.

This commit changes the test to test that all old signatures in the
oldsigs.example. zone were replaced and the zone is fully resigned
before running the main check.

(cherry picked from commit 519b047362)
2020-01-07 15:44:50 +01:00
Ondřej Surý
a6a19bb246 Tune the performance of the jitter test
(cherry picked from commit ffb7ae8beb)
2020-01-07 15:44:50 +01:00
Michał Kępień
8f5faf7084 Merge branch '1256-fix-the-jitter-test-2-v9_14' into 'v9_14'
[v9_14] Wait a little bit longer for autosign, bail out on not enough categories

See merge request isc-projects/bind9!2815
2020-01-07 14:41:26 +00:00
Ondřej Surý
2f57988483 Wait a little bit longer for autosign, bail out on not enough categories
(cherry picked from commit f1cbdc5498)
2020-01-07 15:37:40 +01:00
Ondřej Surý
8061971926 Adjust the jitter range to +-3*stddev
(cherry picked from commit d6f68fc4f0)
2020-01-07 15:37:40 +01:00
Michał Kępień
ef44037334 Merge branch '1256-fix-the-jitter-test-v9_14' into 'v9_14'
[v9_14] Check if the RRSIG jitter falls <mean-2.5*stddev;mean+2.5*stddev>

See merge request isc-projects/bind9!2813
2020-01-07 14:36:00 +00:00
Ondřej Surý
484d131137 Check if the RRSIG jitter falls into mean+-2.5*stddev range
(cherry picked from commit 0480a95ddf)
2020-01-07 15:34:33 +01:00
Michał Kępień
4ef6c818e3 Merge branch 'ondrej/get-the-backtraces-out-of-system-test-coredumps-v9_14' into 'v9_14'
[v9_14] Get the backtraces out of system test coredumps

See merge request isc-projects/bind9!2811
2020-01-07 14:00:41 +00:00
Ondřej Surý
3f68b0ee8e Get better stack traces
(cherry picked from commit d0a0c22433)
2020-01-07 14:45:03 +01:00
Ondřej Surý
002f908c2f Dump the backtrace to stdout when core is found in systest directory
(cherry picked from commit 512dadc8d1)
2020-01-07 14:42:06 +01:00
Michal Nowak
16ed33c0b6 Merge branch 'mnowak/get-the-backtraces-out-of-unit-test-coredumps-v9_14' into 'v9_14'
[v9_14] Gather debug info on broken unit tests

See merge request isc-projects/bind9!2806
2020-01-06 12:05:05 +00:00
Michal Nowak
ec59e49cc1 Gather debug info on broken unit tests
(cherry picked from commit 6a94e6ba73)
2020-01-06 12:05:04 +00:00
Michał Kępień
2af284cc9f Merge branch 'michal/misc-doc-fixes-v9_14' into 'v9_14'
[v9_14] Miscellaneous documentation fixes

See merge request isc-projects/bind9!2804
2020-01-03 08:26:00 +00:00
Michał Kępień
6862007939 Fix minor CHANGES issues
(cherry picked from commit 56f388cae1)
2020-01-03 09:08:09 +01:00
Michał Kępień
fbe12036df Fix whitespace in release notes
(cherry picked from commit b2f3eaf188)
2020-01-03 09:08:09 +01:00
Michał Kępień
635d915268 Prevent splitting GitLab identifiers across lines
GitLab issue and merge request numbers placed in release notes (in the
form of "#1234" for issues and "!5678" for merge requests) should not be
split across two lines.  Extend the shell pipeline generating
doc/arm/notes.txt with a sed invocation which prevents such splitting.

(cherry picked from commit 2d00143ab1)
2020-01-03 09:08:09 +01:00
Evan Hunt
5301d8c77f Merge branch 'each-copyrights-v9_14' into 'v9_14'
update copyright year to 2020

See merge request isc-projects/bind9!2802
2020-01-03 05:53:15 +00:00
Evan Hunt
6e73d3266c update copyright year to 2020 2020-01-02 21:47:16 -08:00
Mark Andrews
e5875ec558 Merge branch '1530-lib-dns-gen-c-29-26-fatal-error-isc-platform-h-no-such-file-or-directory-v9_14' into 'v9_14'
Resolve "lib/dns/gen.c:29:26: fatal error: isc/platform.h: No such file or directory"

See merge request isc-projects/bind9!2793
2019-12-22 21:50:23 +00:00
Mark Andrews
ebc43d8d66 remove duplicate #includes
(cherry picked from commit 848c1c8b8b)
2019-12-23 08:20:35 +11:00
Mark Andrews
171f2ab8d6 revert d10fbdec for lib/dns/gen.c as it is a build platform executable
(cherry picked from commit 7278f2529a)
2019-12-23 08:20:35 +11:00
Mark Andrews
19079bbec0 Merge branch '1501-summary-threadsanitizer-lock-order-inversion-potential-deadlock-in-pthread_rwlock_wrlock-v9_14' into 'v9_14'
Resolve "SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) in pthread_rwlock_wrlock - zone_postload"

See merge request isc-projects/bind9!2789
2019-12-20 11:41:05 +00:00
Mark Andrews
7f04f2f252 Refactor loop body as copy_non_dnssec_records.
(cherry picked from commit d26e125438)
2019-12-20 22:05:24 +11:00
Ondřej Surý
364f232da8 Add failure handling when iterators don't end with ISC_R_NOMORE
(cherry picked from commit bff83b9480)
2019-12-20 22:02:32 +11:00
Ondřej Surý
a2cf6090b2 Refactor receive_secure_db to make the variables and code flow around the iterator more local
(cherry picked from commit 6012479419)
2019-12-20 22:02:32 +11:00
Mark Andrews
37567e0106 Call dns_dbiterator_destroy earlier to prevent potential deadlock.
(cherry picked from commit 9d8f9cc8f2)
2019-12-20 22:02:32 +11:00
Mark Andrews
c45da64953 Merge branch '1523-pkcs11-destroy-s-usage-message-is-misleading-v9_14' into 'v9_14'
update usage message

See merge request isc-projects/bind9!2787
2019-12-20 09:24:30 +00:00
Mark Andrews
631ac188ee update usage message
(cherry picked from commit 41d827893e)
2019-12-20 20:04:36 +11:00
Mark Andrews
818fdd0490 Merge branch 'feature/master/maxminddb-version-v9_14' into 'v9_14'
Feature/master/maxminddb version v9 14

See merge request isc-projects/bind9!2778
2019-12-18 00:57:50 +00:00
Mark Andrews
299fdfc76f add CHANGES
(cherry picked from commit 2f2bc03b2d)
2019-12-18 00:31:43 +00:00
Petr Menšík
e37d8aecba Include protobuf-c version
Include used version of protobuf-c in version info, both link time and
runtime version is available.

(cherry picked from commit 85f3476894)
2019-12-18 00:31:43 +00:00
Petr Menšík
412d7724ae Provide GeoIP2 library version in version
Libmaxmind does not provide any version macro for link time version.
Print at least runtime version library used, if linked.

(cherry picked from commit e6d7384c0d)
2019-12-18 00:31:43 +00:00
Mark Andrews
ce2cf874fd Merge branch 'ondrej/remove-too-generic-node_count-macro-from-dns_acl-v9_14' into 'v9_14'
Change the (acl)->node_count macro to dns_acl_node_count(acl) macro to clean the global namespace

See merge request isc-projects/bind9!2779
2019-12-18 00:30:53 +00:00
Ondřej Surý
f42d1be5fa Change the (acl)->node_count macro to dns_acl_node_count(acl) macro to clean the global namespace
(cherry picked from commit 8120088ec7)
2019-12-18 11:11:31 +11:00
Ondřej Surý
065d19c023 Merge branch '1423-threadsanitizer-data-race-time-c-170-in-isc_time_nowplusinterval-v9_14' into 'v9_14'
Ensure all zone_settimer() calls are done on locked zone

See merge request isc-projects/bind9!2769
2019-12-12 15:37:36 +00:00
Ondřej Surý
8eac1d365d Ensure all zone_settimer() calls are done on locked zone
(cherry picked from commit cf48e8eb32)
2019-12-12 16:12:51 +01:00
Mark Andrews
caafeb6c7e Merge branch '1486-threadsanitizer-lock-order-inversion-potential-deadlock-dns_resolver_createfetch-vs-v9_14' into 'v9_14'
make resolver->zspill atomic to prevent potential deadlock

See merge request isc-projects/bind9!2765
2019-12-12 10:05:05 +00:00
Mark Andrews
02874aa472 make resolver->zspill atomic to prevent potential deadlock
(cherry picked from commit 62abb6aa82)
2019-12-12 20:22:22 +11:00
Evan Hunt
623e23e296 Merge branch 'prep-release-v9_14_9' into 'v9_14'
Prep 9.14.9

See merge request isc-projects/bind9!2762
2019-12-12 06:12:17 +00:00
Tinderbox User
b247e541b0 Merge branch 'prep-release' into v9_14 2019-12-12 06:09:31 +00:00
Tinderbox User
84e68460cc prep 9.14.9 2019-12-12 06:09:19 +00:00
Evan Hunt
9b98a59634 Merge branch 'michal/add-empty-release-notes-section-for-bind-9.14.9' into 'v9_14'
Add empty release notes section for BIND 9.14.9

See merge request isc-projects/bind9!2754
2019-12-11 22:12:02 +00:00
Michał Kępień
f23f682860 Add empty release notes section for BIND 9.14.9 2019-12-11 22:11:38 +00:00
Michal Nowak
4c63562fe6 Merge branch 'mnowak/fedora31-v9.14' into 'v9_14'
[9.14] Update GitLab CI to Fedora 31

See merge request isc-projects/bind9!2758
2019-12-11 16:33:34 +00:00
Michal Nowak
fde281f653 Update GitLab CI to Fedora 31
Since Fedora 31 is the current Fedora release, replace Fedora 30 GitLab
CI jobs with their up-to-date counterparts.

(cherry picked from commit b36f5496237f0dbb84d7541140e87d7da475cd36)
2019-12-11 16:33:33 +00:00
Michał Kępień
56e54fb201 Merge branch 'michal/create-release-tarballs-in-gitlab-ci-v9_14' into 'v9_14'
[v9_14] Create release tarballs in GitLab CI

See merge request isc-projects/bind9!2752
2019-12-11 12:31:13 +00:00
Michał Kępień
7e13a1f7e9 Add a job creating a release tarball to GitLab CI
Add a GitLab CI job (which is run only if all other jobs in a pipeline
succeed) that builds a BIND release tarball, i.e. fetches the source
tarball from the tarball building job, creates Windows zips, puts
certain parts of BIND documentation into the appropriate places, and
packs it all up into a single tarball whose contents can be subsequently
signed and published.

(cherry picked from commit 5a4a6b5e91)
2019-12-11 12:26:48 +01:00
Michał Kępień
7c586d3ac6 Add a Windows debug system test job to GitLab CI
Add a system test job for binaries created by Visual Studio in the
"Debug" build configuration to GitLab CI so that they can be tested
along their "Release" counterparts when necessary.

(cherry picked from commit 2b1c8c54d1)
2019-12-11 12:26:37 +01:00
Michał Kępień
01598c5c2a Add a Windows debug build job to GitLab CI
Add a Visual Studio build job using the "Debug" build configuration to
GitLab CI without enabling it for every pipeline as it takes about twice
as long to complete as its "Release" counterpart.

(cherry picked from commit 12564928a7)
2019-12-11 12:26:11 +01:00
Michał Kępień
d1b120d3bd Create and test BIND source tarballs in GitLab CI
Add a set of jobs to GitLab CI that create a BIND source tarball and
then build and test its contents.  Run those extra jobs only when a tag
is pushed to the Git repository as they are only meant to be sanity
checks of BIND source tarball contents.

(cherry picked from commit 8d56749046)
2019-12-11 12:24:17 +01:00
Michał Kępień
f60cd0c730 Include prepare-softhsm2.sh in source tarballs
The util/prepare-softhsm2.sh script is useful for initializing a working
SoftHSM environment which can be used by unit tests and system tests.
However, since it is a test-specific script, it does not really belong
in the util/ subdirectory which is mostly pruned during the BIND source
tarball creation process.  Move the prepare-softhsm2.sh script to
bin/tests/ so that its location is more appropriate for its purpose and
also so that it does not get removed during the BIND source tarball
creation process, allowing it to be used for setting up test
environments for tarball-based builds.

(cherry picked from commit c0be772ebc)
2019-12-11 12:23:20 +01:00
Michał Kępień
89cccc53ba List paths which should be excluded from tarballs
Convert the logic (currently present in the form of "rm -rf" calls in
util/kit.sh) for removing files and directories which are tracked by Git
but redundant in release tarballs into a set of .gitattributes rules
which allow the same effect to be achieved using "git archive".

(cherry picked from commit 925ecb0aae)
2019-12-11 12:22:14 +01:00
Mark Andrews
872462fe7b Merge branch '1411-threadsanitizer-data-race-resolver-c-2153-in-fctx_query-v9_14' into 'v9_14'
Resolve "ThreadSanitizer: data race resolver.c:2153 in fctx_query"

See merge request isc-projects/bind9!2748
2019-12-11 00:35:59 +00:00
Mark Andrews
e40c1582d6 Note bucket lock requirements and move REQUIRE inside locked section.
(cherry picked from commit 13aaeaa06f)
2019-12-11 11:01:59 +11:00
Mark Andrews
0de313fff7 lock access to fctx->nqueries
(cherry picked from commit 5589748eca)
2019-12-11 11:01:59 +11:00
Mark Andrews
bd6a5a9993 Merge branch '1441-threadsanitizer-lock-order-inversion-potential-deadlock-usr-lib-x86_64-linux-gnu-libtsan-so-0-v9_14' into 'v9_14'
address deadlock introduced in cd2469d3cd

See merge request isc-projects/bind9!2743
2019-12-10 13:04:22 +00:00
Mark Andrews
8bd8ed26ed address deadlock introduced in cd2469d3cd
(cherry picked from commit fd52417f71)
2019-12-10 23:38:53 +11:00
Michał Kępień
7242c4fbd7 Merge branch '1465-fix-idna-system-test-v9_14' into 'v9_14'
[v9_14] Fix the "idna" system test

See merge request isc-projects/bind9!2741
2019-12-10 11:28:43 +00:00
Michał Kępień
7c14f67d74 Only use LC_ALL=C where intended
The LC_ALL=C assignments in the "idna" system test, which were only
meant to affect a certain subset of checks, in fact persist throughout
all the subsequent checks in that system test.  That affects the test's
behavior and is misleading.

When the "VARIABLE=value command ..." syntax is used in a shell script,
in order for the variable assignment to only apply to "command", the
latter must be an external binary; otherwise, the VARIABLE=value
assignment persists for all subsequent commands in a script:

    $ cat foo.sh
    #!/bin/sh

    foo() {
        /bin/sh bar.sh
    }

    BAR="baz0"
    BAR="baz1" /bin/sh bar.sh
    echo "foo: BAR=${BAR}"
    BAR="baz2" foo
    echo "foo: BAR=${BAR}"

    $ cat bar.sh
    #!/bin/sh

    echo "bar: BAR=${BAR}"

    $ /bin/sh foo.sh
    bar: BAR=baz1
    foo: BAR=baz0
    bar: BAR=baz2
    foo: BAR=baz2
    $

Fix by saving the value of LC_ALL before the relevant set of checks in
the "idna" system test, restoring it afterwards, and dropping the
"LC_ALL=C command ..." syntax.

(cherry picked from commit 2ee7ff23ce)
2019-12-10 11:57:57 +01:00
Matthijs Mekking
18d314fa64 Merge branch '1457-intermittent-failure-autosign-v9_14' into 'v9_14'
Resolve "Intermittent failure in the autosign system test"

See merge request isc-projects/bind9!2732
2019-12-09 15:30:27 +00:00
Matthijs Mekking
6658c11251 Better error handling in autosign system test
(cherry picked from commit bd4035900a)
2019-12-09 16:01:53 +01:00
Matthijs Mekking
fb0ddd5bfe Fix race in autosign test
The autosign test has a test case where a DNSSEC maintaiend zone
has a set of DNSSEC keys without any timing metadata set.  It
tests if named picks up the key for publication and signing if a
delayed dnssec-settime/loadkeys event has occured.

The test failed intermittently despite the fact it sleeps for 5
seconds but the triggered key reconfigure action should happen after
3 seconds.

However, the test output showed that the test query came in before
the key reconfigure action was complete (see excerpts below).

The loadkeys command is received:

15:38:36 received control channel command 'loadkeys delay.example.'

The reconfiguring zone keys action is triggered after 3 seconds:

15:38:39 zone delay.example/IN: reconfiguring zone keys
15:38:39 DNSKEY delay.example/NSEC3RSASHA1/7484 (ZSK) is now published
15:38:39 DNSKEY delay.example/NSEC3RSASHA1/7455 (KSK) is now published
15:38:39 writing to journal

Two seconds later the test query comes in:

15:38:41 client @0x7f1b8c0562b0 10.53.0.1#44177: query
15:38:41 client @0x7f1b8c0562b0 10.53.0.1#44177: endrequest

And 6 more seconds later the reconfigure keys action is complete:

15:38:47 zone delay.example/IN: next key event: 05-Dec-2019 15:48:39

This commit fixes the test by checking the "next key event" log has
been seen before executing the test query, making sure that the
reconfigure keys action has been complete.

This commit however does not fix, nor explain why it took such a long
time (8 seconds) to reconfigure the keys.

(cherry picked from commit 2e4273b55a)
2019-12-09 15:53:02 +01:00
Matthijs Mekking
5d6fad9e1e Introduce wait_for_log in autosign test 2019-12-09 15:52:00 +01:00
Matthijs Mekking
440732acd7 Save settime output
(cherry picked from commit 6b4a17ef7c)
2019-12-09 15:45:11 +01:00
Michał Kępień
fdccea0896 Merge branch '1452-system-test-framework-cleanup-tweaks-v9_14' into 'v9_14'
[v9_14] System test framework: cleanup tweaks

See merge request isc-projects/bind9!2721
2019-12-06 13:48:53 +00:00
Michał Kępień
5f82122ffa Automatically run clean.sh from run.sh
The first step in all existing setup.sh scripts is to call clean.sh.  To
reduce code duplication and ensure all system tests added in the future
behave consistently with existing ones, invoke clean.sh from run.sh
before calling setup.sh.

(cherry picked from commit d8905b7a9c)
2019-12-06 14:47:08 +01:00
Michał Kępień
3f7658bda7 Remove bin/tests/system/clean.sh
Since the role of the bin/tests/system/clean.sh script has now been
reduced to calling a given system test's clean.sh script, remove the
former altogether and replace its only use with a direct invocation of
the latter.

(cherry picked from commit bf3eeac067)
2019-12-06 14:47:08 +01:00
Michał Kępień
9a60296b84 Remove the -r switch from system test scripts
Since files containing system test output are no longer stored in test
subdirectories, bin/tests/system/clean.sh no longer needs to take care
of removing the test.output file for a given test as testsummary.sh
already takes care of that and even if a test suite terminates
abnormally and another one is started, tee invoked without the -a
command line switch overwrites the destination file if it exists, so
leftover test.output.* files from previous test suite runs are not a
concern.  Remove the -r command line switch and the code associated with
it from the relevant scripts.

(cherry picked from commit b4d37878f6)
2019-12-06 14:47:08 +01:00
Michał Kępień
38a4bedfcd Store system test output in bin/tests/system/
Some clean.sh scripts contain overly broad file deletion wildcards which
cause the test.output file (used by the system test framework for
collecting output) in a given system test's directory to be erroneously
removed immediately after the test is started (due to setup.sh scripts
calling clean.sh at the beginning).  This prevents the test's output
from being placed in bin/tests/system/systests.output at the end of a
test suite run and thus can lead to test failures being ignored.  Fix by
storing each test's output in a test.output.<test-name> file in
bin/tests/system/, which prevents clean.sh scripts from removing it (as
they should only ever affect files contained in a given system test's
directory).

(cherry picked from commit b0916bba41)
2019-12-06 14:47:08 +01:00
Michał Kępień
8ed6c8fd59 Merge branch '1452-detect-missing-system-test-results-v9_14' into 'v9_14'
[v9_14] Detect missing system test results

See merge request isc-projects/bind9!2720
2019-12-06 13:46:31 +00:00
Michał Kępień
19cd59923c Detect missing system test results
At the end of each system test suite run, the system test framework
collects all existing test.output files from system test subdirectories
and produces bin/tests/system/systests.output from those files.
However, it does not check whether a test.output file was found for
every executed test.  Thus, if the test.output file is accidentally
deleted by the system test itself (e.g. due to an overly broad file
removal wildcard present in clean.sh), its output will not be included
in bin/tests/system/systests.output.  Since the result of each system
test suite run is determined by bin/tests/system/testsummary.sh, which
only operates on the contents of bin/tests/system/systests.output, this
can lead to test failures being ignored.  Fix by ensuring the number of
test results found in bin/tests/system/systests.output is equal to the
number of tests run and triggering a system test suite failure in case
of a discrepancy between these two values.

(cherry picked from commit 3c3085be3c)
2019-12-06 14:19:55 +01:00
Mark Andrews
1b0845a182 Merge branch '1455-job-failed-453300-v9_14' into 'v9_14'
loop waiting for the redirect zone to load

See merge request isc-projects/bind9!2713
2019-12-06 00:19:40 +00:00
Mark Andrews
a47736abb0 loop waiting for the redirect zone to load
(cherry picked from commit e4b1d0b686)
2019-12-06 10:57:16 +11:00
Mark Andrews
c480706290 Merge branch '1434-explicitly-set-python-to-a-empty-string-with-without-python-v9_14' into 'v9_14'
Resolve "explicitly set PYTHON to a empty string with --without-python"

See merge request isc-projects/bind9!2696
2019-12-03 13:32:47 +00:00
Mark Andrews
eab8463f42 add AC_ARG_VAR([PYTHON], [path to python executable])
(cherry picked from commit eed2aabc40)
2019-12-03 23:51:09 +11:00
Mark Andrews
4c257570d6 add CHANGES
(cherry picked from commit 8cd3cf90b2)
2019-12-03 23:51:09 +11:00
Mark Andrews
a53231a274 unset PYTHON on --without-python to prevent python still being used
(cherry picked from commit d8fc544569)
2019-12-03 23:51:09 +11:00
Mark Andrews
62f0b06637 Merge branch '1419-threadsanitizer-data-race-rbtdb-c-7568-in-issecure-v9_14' into 'v9_14'
r/w of rbtdb->current_version requires that rbtdb->lock be held

See merge request isc-projects/bind9!2692
2019-12-03 12:16:00 +00:00
Mark Andrews
e9704327c4 r/w of rbtdb->current_version requires that rbtdb->lock be held
(cherry picked from commit cd2469d3cd)
2019-12-03 09:09:52 +00:00
Mark Andrews
08a60bdd92 Merge branch '1416-threadsanitizer-data-race-resolver-c-3384-in-findname-v9_14' into 'v9_14'
Assign fctx->client when fctx is created rather when the join happens.

See merge request isc-projects/bind9!2694
2019-12-03 06:20:50 +00:00
Mark Andrews
d0796289dc Assign fctx->client when fctx is created rather when the join happens.
This prevents races on fctx->client whenever a new fetch joins a existing
fetch (by calling fctx_join) as it is now invariant for the active life of
fctx.

(cherry picked from commit 9ca6ad6311)
2019-12-03 17:00:02 +11:00
Mark Andrews
90712110e3 Merge branch '1412-threadsanitizer-data-race-resolver-c-7030-in-fctx_decreference-2-v9_14' into 'v9_14'
Make fctx->attributes atomic.

See merge request isc-projects/bind9!2690
2019-12-03 01:34:36 +00:00
Mark Andrews
7e66602cd6 back port atomic and / or support 2019-12-03 11:38:06 +11:00
Mark Andrews
c712f40676 Make fctx->attributes atomic.
FCTX_ATTR_SHUTTINGDOWN needs to be set and tested while holding the node
lock but the rest of the attributes don't as they are task locked. Making
fctx->attributes atomic allows both behaviours without races.

(cherry picked from commit 912ce87479)
2019-12-03 10:52:02 +11:00
Michał Kępień
0f2a8e259d Merge branch 'michal/address-asan-memory-leak-reports-v9_14' into 'v9_14'
[v9_14] Address ASAN memory leak reports

See merge request isc-projects/bind9!2683
2019-12-02 18:24:42 +00:00
Michał Kępień
1313f06110 Move xmlInitThreads()/xmlCleanupThreads() calls
xmlInitThreads() and xmlCleanupThreads() are called from within
named_statschannels_configure() and named_statschannels_shutdown(),
respectively.  Both of these functions are executed by worker threads,
not the main named thread.  This causes ASAN to report memory leaks like
the following one upon shutdown (as long as named is asked to produce
any XML output over its configured statistics channels during its
lifetime):

    Direct leak of 968 byte(s) in 1 object(s) allocated from:
        #0 0x7f677c249cd8 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:153
        #1 0x7f677bc1838f in xmlGetGlobalState (/usr/lib/libxml2.so.2+0xa838f)

The data mentioned in the above report is a libxml2 state structure
stored as thread-specific data.  Such chunks of memory are automatically
released (by a destructor passed to pthread_key_create() by libxml2)
whenever a thread that allocated a given chunk exits.  However, if
xmlCleanupThreads() is called by a given thread before it exits, the
destructor will not be invoked (due to xmlCleanupThreads() calling
pthread_key_delete()) and ASAN will report a memory leak.  Thus,
xmlInitThreads() and xmlCleanupThreads() must not be called from worker
threads.  Since xmlInitThreads() must be called on Windows in order for
libxml2 to work at all, move xmlInitThreads() and xmlCleanupThreads()
calls to the main named thread (which does not produce any XML output
itself) in order to prevent the memory leak from being reported by ASAN.

(cherry picked from commit b425b5d56e)
2019-12-02 17:09:39 +01:00
Michał Kępień
7a5c7f2ba7 Merge branch '1445-fix-geoip2-memory-leak-upon-reconfiguration-v9_14' into 'v9_14'
[v9_14] Fix GeoIP2 memory leak upon reconfiguration

See merge request isc-projects/bind9!2681
2019-12-02 16:07:29 +00:00
Michał Kępień
b109666c94 Add CHANGES entry
5329.	[bug]		Reconfiguring named caused memory to be leaked when any
			GeoIP2 database was in use. [GL #1445]

(cherry picked from commit 628b1837d2)
2019-12-02 15:27:15 +01:00
Michał Kępień
5a0582f3e7 Fix GeoIP2 memory leak upon reconfiguration
Loaded GeoIP2 databases are only released when named is shut down, but
not during server reconfiguration.  This causes memory to be leaked
every time "rndc reconfig" or "rndc reload" is used, as long as any
GeoIP2 database is in use.  Fix by releasing any loaded GeoIP2 databases
before reloading them.  Do not call dns_geoip_shutdown() until server
shutdown as that function releases the memory context used for caching
GeoIP2 lookup results.

(cherry picked from commit 670afbe84a)
2019-12-02 15:21:38 +01:00
Mark Andrews
29b40677b0 Merge branch '1417-threadsanitizer-data-race-rbtdb-c-1535-in-add32-v9_14' into 'v9_14'
Resolve "ThreadSanitizer: data race rbtdb.c:1535 in add32"

See merge request isc-projects/bind9!2664
2019-11-28 21:55:22 +00:00
Mark Andrews
049b5e0dcc add CHANGES
(cherry picked from commit 68693f8279)
2019-11-29 07:12:44 +11:00
Mark Andrews
1a7b62916c rdataset_setownercase and rdataset_getownercase need to obtain a node lock
(cherry picked from commit 637b2c4e51)
2019-11-29 07:12:44 +11:00
Ondřej Surý
36e5f50ee8 Merge branch 'mnowak/runtime-forward-port-softhsm2-setup-9_14' into 'v9_14'
[9.14] Fix the UID switch test to work with PKCS#11 build

See merge request isc-projects/bind9!2653
2019-11-27 17:14:53 +00:00
Michal Nowak
271c836a86 Fix the UID switch test to work with PKCS#11 build
Forward port of 32fe9a0051fc76be4657fc2742e71d2be6193011 by Ondřej Surý.

(cherry picked from commit c49c41a1adb9fa8ae75fe656692d9935de1d505f)
2019-11-27 17:14:53 +00:00
Mark Andrews
af0e100b84 Merge branch '1350-threadsanitizer-data-race-rbt-c-1312-in-dns_rbt_addnode-v9_14' into 'v9_14'
Resolve "ThreadSanitizer: data race rbt.c:1312 in dns_rbt_addnode"

See merge request isc-projects/bind9!2650
2019-11-27 11:49:00 +00:00
Mark Andrews
da0fb0fdc0 add comments 'tree_lock(write) must be held'
(cherry picked from commit 8f6aaa7230)
2019-11-27 21:59:19 +11:00
Mark Andrews
e53af115da rbtnode->nsec needs to be read while holding the tree lock
(cherry picked from commit 7cad3b2e91)
2019-11-27 21:59:18 +11:00
Evan Hunt
5f3d61e1ff Merge branch '1399-recursive-limit-stat-v9_14' into 'v9_14'
Resolve "recursive-client limit should have a stat counter"

See merge request isc-projects/bind9!2645
2019-11-26 19:43:26 +00:00
Evan Hunt
d445121c26 add a stats counter for clients dropped due to recursive-clients limit
(cherry picked from commit 715afa9c57)
2019-11-26 11:20:12 -08:00
Ondřej Surý
0f7676c8fe Merge branch '1403-when-configuration-loading-fails-named-could-assert-v9_14' into 'v9_14'
Request exclusive access when crashing via fatal()

See merge request isc-projects/bind9!2637
2019-11-26 12:54:11 +00:00
Ondřej Surý
e78506c3a8 Request exclusive access when crashing via fatal()
When loading the configuration fails, there might be already other tasks
running and calling OpenSSL library functions.  The OpenSSL on_exit
handler is called when exiting the main process and there's a timing
race between the on_exit function that destroys OpenSSL allocated
resources (threads, locks, ...) and other tasks accessing the very same
resources leading to a crash in the system threading library. Therefore,
the fatal() function needs to request exlusive access to the task
manager to finish the already running tasks and exit only when no other
tasks are running.

(cherry picked from commit 952d7fde63)
2019-11-26 12:51:49 +01:00
Ondřej Surý
f2d9b062b4 Merge branch 'ondrej/add-retry_quiet-function-to-conf.sh.common-v9_14' into 'v9_14'
Add retry_quiet() function to retry quietly for an event to occur

See merge request isc-projects/bind9!2631
2019-11-26 08:20:37 +00:00
Ondřej Surý
699bcc70ca Add retry_quiet() function to retry quietly for an event to occur
(cherry picked from commit 31264a7e00)
2019-11-26 09:19:52 +01:00
Mark Andrews
2a368efd53 Merge branch '1367-threadsanitizer-data-race-dispatch-c-901-in-free_buffer-v9_14' into 'v9_14'
Resolve "ThreadSanitizer: data race dispatch.c:901 in free_buffer"

See merge request isc-projects/bind9!2627
2019-11-26 02:37:14 +00:00
Mark Andrews
d53ce94d36 move maxbuffers test to allocate_udp_buffer
(cherry picked from commit 26a93d77aa)
2019-11-26 11:53:19 +11:00
Mark Andrews
25306ea1ad Lock dispatch manager buffer_lock before accessing buffers;
Only test buffers for UDP dispatches.

(cherry picked from commit 011af4de71)
2019-11-26 11:53:19 +11:00
Mark Andrews
fbcf160346 lock disp->mgr before reading disp->mgr->buffers
(cherry picked from commit afc7389ce8)
2019-11-26 11:53:19 +11:00
Mark Andrews
00ff640c36 Merge branch '1397-install-isc-python-module-v9_14' into 'v9_14'
Resolve "Install ISC python module"

See merge request isc-projects/bind9!2625
2019-11-25 23:38:44 +00:00
Mark Andrews
047c8f3318 add CHANGES and note in README.md
(cherry picked from commit 8bbafeb5ef)
2019-11-26 10:02:38 +11:00
Mark Andrews
04f16633c5 check for 'distutils.core setup'
(cherry picked from commit 50e1bf3800)
2019-11-26 10:02:06 +11:00
Evan Hunt
1a8b22c715 Merge branch 'each-notes-v9_14' into 'v9_14'
cleanup release notes text

See merge request isc-projects/bind9!2623
2019-11-25 21:20:18 +00:00
Evan Hunt
d47a606707 cleanup release notes text
(cherry picked from commit fa70fc8731)
2019-11-25 13:19:48 -08:00
Mark Andrews
6bf8ecf15e Merge branch '1334-threadsanitizer-data-race-dispatch-c-1339-in-tcp_recv-v9_14' into 'v9_14'
lock dispatch before reporting state

See merge request isc-projects/bind9!2618
2019-11-22 21:52:58 +00:00
Mark Andrews
e99156043f lock dispatch before reporting state
(cherry picked from commit 3075445ed6)
2019-11-23 08:25:33 +11:00
Mark Andrews
940f75a4fe Merge branch '1317-alphabetise-delv-s-usage-v9_14' into 'v9_14'
alphabetise delv's usage.

See merge request isc-projects/bind9!2615
2019-11-22 19:56:53 +00:00
Mark Andrews
a7da1514d2 fix release line 2019-11-23 00:19:40 +11:00
Mark Andrews
148c0f63fd alphabetise delv's usage.
(cherry picked from commit 78685ed173)
2019-11-23 00:09:29 +11:00
Evan Hunt
4eb815a283 Merge branch 'merge-v9_14_8' into 'v9_14'
merge 9.14.8 to v9_14 branch

See merge request isc-projects/bind9!2605
2019-11-20 21:42:11 +00:00
Evan Hunt
ff2a28351a Merge tag 'v9_14_8' into merge-v9_14_8 2019-11-20 13:39:46 -08:00
Michal Nowak
eba92ada69 Merge branch 'mnowak/537_Add_CI_step_to_test_named_-u-v9_14' into 'v9_14'
[9.14] Verifying that named switches UID

See merge request isc-projects/bind9!2599
2019-11-20 11:01:05 +00:00
Michal Nowak
4c391e0a47 Verifying that named switches UID
This test runs only under root, which is required for the user-switch
`-u` option to work.

Closes #537.

(cherry picked from commit b00360537e)
2019-11-20 11:01:05 +00:00
Ondřej Surý
410eab62ee Merge branch '1341-threadsanitizer-data-race-rbtdb-c-5756-in-add32-v9_14' into 'v9_14'
Resolve "ThreadSanitizer: data race rbtdb.c:5756 in add32"

See merge request isc-projects/bind9!2593
2019-11-19 17:30:39 +00:00
Mark Andrews
6a64f3a84e add CHANGES
(cherry picked from commit 4534fb5ec1)
2019-11-20 01:00:24 +08:00
Mark Andrews
637fb4cdb4 use update_recordsandbytes in rbt_datafixer
(cherry picked from commit 7d4d64340e)
2019-11-20 00:59:12 +08:00
Mark Andrews
83ce99a389 always obtain write lock when updating version->{records,bytes}
(cherry picked from commit 0cda448248)
2019-11-20 00:59:12 +08:00
Michał Kępień
847d6ac7c6 Merge branch '1308-fix-tcp-system-test-v9_14' into 'v9_14'
[v9_14] Fix "tcp" system test

See merge request isc-projects/bind9!2591
2019-11-19 15:17:54 +00:00
Michał Kępień
3d58204f46 Address ShellCheck warnings
Address all outstanding warnings that ShellCheck reports for
bin/tests/system/tcp/tests.sh.

(cherry picked from commit 23ca0ec55b)
2019-11-19 15:39:04 +01:00
Michał Kępień
b1294b049c Use "set -e" in the "tcp" system test
Ensure any unexpected failure in the "tcp" system test causes it to be
immediately interrupted with an error to make the aforementioned test
more reliable.  Since the exit code for "expr 0 + 0" is 1, the status
variable needs to be updated using arithmetic expansion.

(cherry picked from commit 9841635b7f)
2019-11-19 15:39:03 +01:00
Michał Kępień
5e818012e5 Ensure all "tcp" system test errors are caught
Ensure any "rndc stats" failure causes the "tcp" system test to fail.
Do not hide "rndc stats" output.

(cherry picked from commit 46df363a0d)
2019-11-19 15:39:03 +01:00
Michał Kępień
1138e158f1 Make all "tcp" system test checks numbered
Ensure all checks in the "tcp" system test are numbered, so that
forensic data is preserved in case of any failure.

(cherry picked from commit 2f4877d11c)
2019-11-19 15:39:03 +01:00
Michał Kępień
8e19e3701b Fix argument order in assert_int_equal()
assert_int_equal() calls in bin/tests/system/tcp/tests.sh pass the found
value as the first argument and the expected value as the second
argument, while the function interprets its arguments the other way
round.  Fix argument handling in assert_int_equal() to make sure the
error messages printed by that function are correct.

(cherry picked from commit 6bd1f68bef)
2019-11-19 15:39:03 +01:00
Michał Kępień
1286db44f1 Allow retries when checking TCP high-water stats
In the TCP high-water checks, "rndc stats" is run after ans6 reports
that it opened the requested number of TCP connections.  However, we
fail to account for the fact that ns5 might not yet have called accept()
for these connections, in which case the counts output by "rndc stats"
will be off.  To prevent intermittent "tcp" system test failures, allow
the relevant connection count checks to be retried (just once, after one
second, as that should be enough for any system to accept() a dozen TCP
connections under any circumstances).

(cherry picked from commit 1e22e052d0)
2019-11-19 15:39:03 +01:00
Mark Andrews
d396360b22 Merge branch '1299-parse-commandline-code-should-be-done-in-alphabetical-order-v9_14' into 'v9_14'
alphabetize command line switch

See merge request isc-projects/bind9!2589
2019-11-19 10:47:58 +00:00
Mark Andrews
3f27a0ccb2 alphabetize command line switch
(cherry picked from commit ca83a66618)
2019-11-19 20:44:21 +11:00
Ondřej Surý
fa9a406a10 Merge branch 'ondrej/dont-call-dns_adb_endupdfetch-for-TCP-queries-v9_14' into 'v9_14'
lib/dns/resolver.c: Call dns_adb_endudpfetch() only for UDP queries

See merge request isc-projects/bind9!2585
2019-11-18 20:33:48 +00:00
Ondřej Surý
dc8eafee57 lib/dns/resolver.c: Call dns_adb_endudpfetch() only for UDP queries
The dns_adb_beginudpfetch() is called only for UDP queries, but
the dns_adb_endudpfetch() is called for all queries, including
TCP.  This messages the quota counting in adb.c.

(cherry picked from commit a5189eefa5)
2019-11-19 03:48:32 +08:00
Ondřej Surý
4cc935b0ff Merge branch 'ondrej/switch-coccinelle-job-to-buster-v9_14' into 'v9_14'
Installing coccinelle on Debian sid is broken, switch to Debian buster

See merge request isc-projects/bind9!2583
2019-11-18 18:05:03 +00:00
Ondřej Surý
c1f658c225 Installing coccinelle on Debian sid is broken, switch to Debian buster
(cherry picked from commit 0946db13de)
2019-11-19 02:02:29 +08:00
Mark Andrews
db5d4e5618 Merge branch '1327-update-solution-dependencies-host-and-nslookup-depend-on-libirs-v9_14' into 'v9_14'
Add dependancy on libirs to dig, host, and nslookup.

See merge request isc-projects/bind9!2574
2019-11-15 04:01:53 +00:00
Mark Andrews
1cff81e0a6 Add dependancy on libirs to dig, host, and nslookup.
(cherry picked from commit 72ca05c966)
2019-11-15 12:13:36 +11:00
Michał Kępień
284042a54f Merge branch 'fix-url-in-readme-v9_14' into 'v9_14'
[v9_14] updated a broken link for newer release notes.

See merge request isc-projects/bind9!2569
2019-11-13 12:02:27 +00:00
Vicky Risk
38f6a686d4 Update broken release notes link
(cherry picked from commit c830a9116d)
2019-11-13 12:59:35 +01:00
Ondřej Surý
3a2522e687 Merge branch 'hurd-v9_14' into 'v9_14'
hurd: Fix build

See merge request isc-projects/bind9!2563
2019-11-12 09:08:19 +00:00
Samuel Thibault
1100d198e4 hurd: Fix build
Move PATH_MAX, NAME_MAX, IOV_MAX default definitions to the common
<isc/platform.h>.

(cherry picked from commit d10fbdec84)
2019-11-12 09:27:19 +01:00
Tinderbox User
abcf57d588 Merge branch 'prep-release' into security-v9_14 2019-11-06 21:29:49 +00:00
Tinderbox User
eebfffb5d0 regen security-v9_14 2019-11-06 21:29:08 +00:00
Tinderbox User
efee30c516 prep 9.14.8 2019-11-06 21:29:08 +00:00
Ondřej Surý
b75599f4c2 Add CHANGES entry 2019-11-06 16:38:47 +01:00
Ondřej Surý
badeefdcb0 Add release note 2019-11-06 16:38:47 +01:00
Witold Kręcicki
68012b2c82 libns: Rename ns_tcpconn refs member to clients 2019-11-06 16:37:13 +01:00
Witold Kręcicki
ea5dae9e25 Limit query pipelining within each TCP connection
Previously, there was no limit to the number of concurrently served
queries over one pipelined TCP connection; an unlimited number of
queries sent over a single TCP connection could have potentially
exhausted the server's resources.
2019-11-06 16:37:13 +01:00
Michał Kępień
a604aa25af Merge branch '1206-fix-tcp-high-water-release-note-v9_14' into 'v9_14'
[v9_14] Fix TCP high-water release note

See merge request isc-projects/bind9!2542
2019-11-06 15:36:15 +00:00
Michał Kępień
8e72c1aeb6 Fix TCP high-water release note
Add missing GitLab issue number to the TCP high-water release note and
put it in the "New Features" section where it belongs.

(cherry picked from commit d0a3273d4d)
2019-11-06 16:31:53 +01:00
Michał Kępień
afcb1d8f8d Merge branch '1298-do-not-use-sys-sysctl.h-on-linux-v9_14' into 'v9_14'
[v9_14] Do not use <sys/sysctl.h> on Linux

See merge request isc-projects/bind9!2540
2019-11-06 15:14:12 +00:00
Michał Kępień
ae933dec2c Do not use <sys/sysctl.h> on Linux
glibc 2.30 deprecated the <sys/sysctl.h> header [1].  However, that
header is still used on other Unix-like systems, so only prevent it from
being used on Linux, in order to prevent compiler warnings from being
triggered.

[1] https://sourceware.org/ml/libc-alpha/2019-08/msg00029.html

(cherry picked from commit 65a8b53bd0)
2019-11-06 16:00:02 +01:00
Michał Kępień
d0344e2505 Merge branch '1206-add-assert_int_equal-shell-function-v9_14' into 'v9_14'
[v9_14] Add assert_int_equal() shell function

See merge request isc-projects/bind9!2539
2019-11-06 14:56:48 +00:00
Michał Kępień
0bb075808a Add assert_int_equal() shell function
Add a shell function which is used in the "tcp" system test, but has
been accidentally omitted from !2425.  Make sure the function does not
change the value of "ret" itself, so that the caller can decide what to
do with the function's return value.

(cherry picked from commit 8bb7f1f2a1)
2019-11-06 15:54:52 +01:00
Matthijs Mekking
9d8b4af026 Merge branch '1256-jitter-dynamically-updated-signatures-v9_14' into 'v9_14'
Resolve "Signature Expiration Jitter not working for dynamic NSEC3 zones"

See merge request isc-projects/bind9!2537
2019-11-06 14:53:28 +00:00
Ondřej Surý
8466be3e91 Add CHANGES
(cherry picked from commit 00569e0dfa)
2019-11-06 15:15:26 +01:00
Matthijs Mekking
75f31d2422 Test jitter distribution
Test jitter distribution in NSEC3 dynamic zone and for a zone that has old
signatures.  In both cases the generated signatures should be spread nicely.

(cherry picked from commit 540b90fd6c)
2019-11-06 15:15:15 +01:00
Witold Kręcicki
662d10cba7 Jitter signatures times when adding dynamic records.
When doing regular signing expiry time is jittered to make sure
that the re-signing times are not clumped together. This expands
this behaviour to expiry times of dynamically added records.

When incrementally re-signing a zone use the full jitter range if
the server appears to have been offline for greater than 5 minutes
otherwise use a small jitter range of 3600 seconds.  This will stop
the signatures becoming more clustered if the server has been off
line for a significant period of time (> 5 minutes).

(cherry picked from commit 6b2fd40269)
2019-11-06 15:14:16 +01:00
Ondřej Surý
6db9d7c279 Merge branch '1206-tcp-high-water-stats-v9_14' into 'v9_14'
Resolve "Customer Feature Request:  Add "high-water" measurement for tcp-clients"

See merge request isc-projects/bind9!2530
2019-11-06 11:31:27 +00:00
Diego Fronza
f3750b385c Added TCP high-water entry to CHANGES
(cherry picked from commit ba3fe75e65)
2019-11-06 11:29:35 +01:00
Diego Fronza
873973959d Added TCP high-water entry to release notes
(cherry picked from commit dd492b64d9)
2019-11-06 11:29:35 +01:00
Ondřej Surý
bc760310cd Avoid an extra atomic_load() call 2019-11-06 11:29:35 +01:00
Diego Fronza
558d7ff5e5 Added TCP high-water system tests
Note: ans6/ans6.py is a helper script that allows tests.sh to open/close
TCP connections to some BIND instance.

(cherry picked from commit 29be224a04)
2019-11-06 11:26:22 +01:00
Diego Fronza
d5cc3ed381 Added TCP high-water statistics variable
This variable will report the maximum number of simultaneous tcp clients
that BIND has served while running.

It can be verified by running rndc status, then inspect "tcp high-water:
count", or by generating statistics file, rndc stats, then inspect the
line with "TCP connection high-water" text.

The tcp-highwater variable is atomically updated based on an existing
tcp-quota system handled in ns/client.c.

(cherry picked from commit 66fe8627de)
2019-11-06 11:26:22 +01:00
Diego Fronza
faf3cbe62d Add functions for collecting high-water counters
Add {isc,ns}_stats_{update_if_greater,get_counter}() functions that
are used to set and collect high-water type of statistics.

(cherry picked from commit a544e2e300)
2019-11-06 11:26:22 +01:00
Diego Fronza
733720a3f2 Change the isc_stat_t type to isc__atomic_statcounter_t
The isc_stat_t type was too similar to isc_stats_t type, so the name was
changed to something more distinguishable.

(cherry picked from commit eb5611a770)
2019-11-06 11:26:22 +01:00
Diego Fronza
02555bb7a5 Change the isc_statscounter_t type from int to C99 int_fast64_t type
For TCP high-water work, we need to keep the used integer types widths
in sync.

Note: int_fast32_t is used on WIN32 platform
(cherry picked from commit 0fc98ef2d5)
2019-11-06 11:26:22 +01:00
Ondřej Surý
a217737764 Merge branch '1285-documentation-update-to-sortlist-feature-bugs-42615-v9_14' into 'v9_14'
arm: Add a sentence about overlaping selectors in sortlist statement

See merge request isc-projects/bind9!2532
2019-11-06 10:09:26 +00:00
Ondřej Surý
28884623fb arm: Add a sentence about overlaping selectors in sortlist statement
(cherry picked from commit ebc61946b2)
2019-11-06 11:08:17 +01:00
Michał Kępień
11f08caa9a Merge branch 'michal/split-release-notes-into-per-version-sections-v9_14' into 'v9_14'
[v9_14] Split release notes into per-version sections

See merge request isc-projects/bind9!2529
2019-11-06 09:13:46 +00:00
Michał Kępień
78d96b8fb9 Rebuild output files 2019-11-06 09:33:59 +01:00
Michał Kępień
bb74ec04bb Update URLs used in release notes
Some URLs used in release notes became outdated.  Make sure they point
to currently available resources.
2019-11-06 09:33:59 +01:00
Michał Kępień
920920e68e Split release notes into per-version sections
Intertwining release notes from different BIND releases in a single XML
file has caused confusion in the past due to different (and often
arbitrary) approaches to keeping/removing release notes from older
releases on different BIND branches.  Divide doc/arm/notes.xml into
per-version sections to simplify determining the set of changes
introduced by a given release and to make adding/reviewing release notes
less error-prone.
2019-11-06 09:33:57 +01:00
Mark Andrews
e700a0a67b Merge branch '1301-geoip2-default-data-path-v9_14' into 'v9_14'
Resolve "geoip2 default data path"

See merge request isc-projects/bind9!2526
2019-11-06 01:43:12 +00:00
Mark Andrews
82458699f9 Add CHANGES note
(cherry picked from commit 7b10faf108)
2019-11-06 12:28:52 +11:00
Mark Andrews
dcf958b852 Regenerate configure.
(cherry picked from commit 51fb42edcb)
2019-11-06 12:28:52 +11:00
Mark Andrews
538b455490 Have 'named -V' report geoip-directory
(cherry picked from commit 2eaa75c380)
2019-11-06 12:28:52 +11:00
Mark Andrews
ca036f346d The default geoip-directory should be <MAXMINDDB_PREFIX>/share/GeoIP
(cherry picked from commit fcd765a59d)
2019-11-06 11:47:32 +11:00
Mark Andrews
33b1a1ef0f MAXMINDDB_LIBS should end with '/lib' not '/libs'
(cherry picked from commit e0fe33506c)
2019-11-06 11:47:28 +11:00
Ondřej Surý
d116a4ea9f Merge branch '664-fetches-per-server-quota-docs-v9_14' into 'v9_14'
Describe the polynomial backoff curve used in the quota adjustment

See merge request isc-projects/bind9!2523
2019-11-05 10:12:48 +00:00
Ondřej Surý
1ab5685d25 Describe the polynomial backoff curve used in the quota adjustment
(cherry picked from commit 56ef09c3a1)
2019-11-05 11:06:04 +01:00
Ondřej Surý
d265ce0243 Merge branch '45-integrate-llvm-scan-build-to-gitlab-ci-workflow-v9_14' into 'v9_14'
Resolve "Integrate LLVM scan-build to GitLab CI workflow"

See merge request isc-projects/bind9!2521
2019-11-05 09:19:49 +00:00
Ondřej Surý
027f2c1518 libdns: add missing checks for return values in dnstap unit test
Related scan-build report:

dnstap_test.c:169:2: warning: Value stored to 'result' is never read
        result = dns_test_makeview("test", &view);
        ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dnstap_test.c:193:2: warning: Value stored to 'result' is never read
        result = dns_compress_init(&cctx, -1, dt_mctx);
        ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.

(cherry picked from commit e9acad638e)
2019-11-05 09:49:24 +01:00
Ondřej Surý
2d52a05f4f named: remove named_g_defaultdnstap global variable
The named_g_defaultdnstap was never used as the dnstap requires
explicit configuration of the output file.

Related scan-build report:

./server.c:3476:14: warning: Value stored to 'dpath' during its initialization is never read
        const char *dpath = named_g_defaultdnstap;
                    ^~~~~   ~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

(cherry picked from commit 6decd14592)
2019-11-05 09:48:51 +01:00
Ondřej Surý
72f9846be6 libdns: Change check_dnskey_sigs() return type to void to match the reality how the function is used
(cherry picked from commit 64cf5144a6)
2019-11-05 09:48:51 +01:00
Ondřej Surý
7a0019cfa1 tests: Resolve scan-build false positive by adding extra assertion
(cherry picked from commit 309dca417c)
2019-11-05 09:48:51 +01:00
Ondřej Surý
38866cb5c4 dnssec: don't qsort() empty hashlist
(cherry picked from commit 6bbb0b8e42)
2019-11-05 09:48:51 +01:00
Ondřej Surý
aaded0efe0 named: Add INSIST() after bindkeysfile configuration load to silence scan-build FP
(cherry picked from commit 6bf364aec8)
2019-11-05 09:48:50 +01:00
Ondřej Surý
fcfdd847f4 tests: Workaround scan-build false positive with FD_ZERO/FD_SET
(cherry picked from commit 7aa7f8592c)
2019-11-05 09:48:50 +01:00
Ondřej Surý
1be8170888 libdns: Remove useless checks for ISC_R_MEMORY, which cannot happen now
(cherry picked from commit 80b55d25de)
2019-11-05 09:48:50 +01:00
Ondřej Surý
9bf2ae0e0a ci: Add LLVM/Clang scan-build checks into the GitLab CI
(cherry picked from commit 5f584310bc)
2019-11-05 09:48:50 +01:00
Michal Nowak
742eb50347 Merge branch 'mnowak/1244-extra-quotes-around-TESTSOCK6/9_14' into 'v9_14'
[9.14] digdelv: Extra quotes prevent IPv6 runs

See merge request isc-projects/bind9!2515
2019-10-31 12:32:07 -04:00
Michal Nowak
c7a1d051c5 digdelv: Extra quotes prevent IPv6 runs
Portion of the digdelv test are skipped on IPv6 due to extra quotes
around $TESTSOCK6: "I:digdelv:IPv6 unavailable; skipping".

Researched by @michal.

Regressed with 351efd8812.

(cherry picked from commit 1b6419f8a7)
2019-10-31 12:32:06 -04:00
Ondřej Surý
cab2929b4f Merge branch '876-documentation-feedback-v9_14' into 'v9_14'
Resolve "Documentation feedback."

See merge request isc-projects/bind9!2513
2019-10-31 10:42:58 -04:00
Ondřej Surý
912040b611 arm: add more text describing interaction between automatic-interface-scan and interface-interval
(cherry picked from commit e0618174b6)
2019-10-31 09:09:06 -05:00
Ondřej Surý
5095ad31b1 arm: Fix the default for the lock-file command, it's 'none'
(cherry picked from commit f7eea400a8)
2019-10-31 09:09:06 -05:00
Brian Conry
30ccde7cdc arm: Add an explanation on the effect of 'require-server-cookie yes;'
(cherry picked from commit c6f91f8bd0)
2019-10-31 09:09:05 -05:00
Mark Andrews
bcb9fca00c arm: add why when to set 'require-server-cookie yes;'
(cherry picked from commit c5453ea328)
2019-10-31 09:09:05 -05:00
Mark Andrews
9054c1ff33 arm: document resolver-nonbackoff-tries and resolver-retry-interval
(cherry picked from commit 1ea6aadf6f)
2019-10-31 09:09:05 -05:00
Mark Andrews
09999761ad arm: add default values for require-server-cookie and send-cookie options
(cherry picked from commit d8abf4f5b6)
2019-10-31 09:09:05 -05:00
Michał Kępień
0506c0b442 Merge branch '1059-prevent-tcp-failures-from-affecting-edns-stats-v9_14' into 'v9_14'
[v9_14] Prevent TCP failures from affecting EDNS stats

See merge request isc-projects/bind9!2511
2019-10-31 05:36:51 -04:00
Michał Kępień
80586e82b1 Add CHANGES entry
5310.	[bug]		TCP failures were affecting EDNS statistics. [GL #1059]

(cherry picked from commit 36d3c66e4e)
2019-10-31 09:54:37 +01:00
Michał Kępień
b2ee3fa0bb Prevent TCP failures from affecting EDNS stats
EDNS mechanisms only apply to DNS over UDP.  Thus, errors encountered
while sending DNS queries over TCP must not influence EDNS timeout
statistics.

(cherry picked from commit fce3c93ea2)
2019-10-31 09:54:23 +01:00
Michał Kępień
79a9bf6f03 Merge branch '1059-prevent-query-loops-for-misbehaving-servers-v9_14' into 'v9_14'
[v9_14] Prevent query loops for misbehaving servers

See merge request isc-projects/bind9!2508
2019-10-31 04:45:51 -04:00
Michał Kępień
61370994fc Prevent query loops for misbehaving servers
If a TCP connection fails while attempting to send a query to a server,
the fetch context will be restarted without marking the target server as
a bad one.  If this happens for a server which:

  - was already marked with the DNS_FETCHOPT_EDNS512 flag,
  - responds to EDNS queries with the UDP payload size set to 512 bytes,
  - does not send response packets larger than 512 bytes,

and the response for the query being sent is larger than 512 byes, then
named will pointlessly alternate between sending UDP queries with EDNS
UDP payload size set to 512 bytes (which are responded to with truncated
answers) and TCP connections until the fetch context retry limit is
reached.  Prevent such query loops by marking the server as bad for a
given fetch context if the advertised EDNS UDP payload size for that
server gets reduced to 512 bytes and it is impossible to reach it using
TCP.

(cherry picked from commit 6cd115994e)
2019-10-31 08:49:09 +01:00
Mark Andrews
e99835b915 Merge branch '1288-log-dns_r_unchanged-from-sync_secure_journal-at-info-level-in-receive_secure_serial-v9_14' into 'v9_14'
Resolve "Log DNS_R_UNCHANGED from sync_secure_journal at info level in receive_secure_serial."

See merge request isc-projects/bind9!2498
2019-10-29 21:32:49 -04:00
Mark Andrews
244c72b5b6 add CHANGES
(cherry picked from commit e6ef7858c3)
2019-10-30 12:13:01 +11:00
Mark Andrews
cdf114078b Log DNS_R_UNCHANGED from sync_secure_journal() at info level in receive_secure_serial()
(cherry picked from commit 8eb09f3232)
2019-10-30 12:13:01 +11:00
Mark Andrews
f42292104b Merge branch 'u/fanf2/compilezone-hang-v9_14' into 'v9_14'
Fix hang in `named-compilezone | head`

See merge request isc-projects/bind9!2496
2019-10-29 20:14:35 -04:00
Tony Finch
c4890c7e83 CHANGES
(cherry picked from commit 548f29a4d9)
2019-10-30 10:52:52 +11:00
Tony Finch
19970088fc Fix hang in named-compilezone | head
I was truncating zone files for experimental purposes when I found
that `named-compilezone | head` got stuck. The full command line that
exhibited the problem was:

	dig axfr dotat.at |
	named-compilezone -o /dev/stdout dotat.at /dev/stdin |
	head

This requires a large enough zone to exhibit the problem, more than
about 70000 bytes of plain text output from named-compilezone.
I was running the command on Debian Stretch amd64.

This was puzzling since it looked like something was suppressing the
SIGPIPE. I used `strace` to examine what was happening at the hang.
The program was just calling write() a lot to print the zone file, and
the last write() hanged until I sent it a SIGINT.

During some discussion with friends, Ian Jackson guessed that opening
/dev/stdout O_RDRW might be the problem, and after some tests we found
that this does in fact suppress SIGPIPE.

Since `named-compilezone` only needs to write to its output file, the
fix is to omit the stdio "+" update flag.

(cherry picked from commit a87ccea032)
2019-10-30 10:52:22 +11:00
Ondřej Surý
8c2f196182 Merge branch '1265-disable-synth-from-dnssec-by-default-workaround-v9_14' into 'v9_14'
Disable synth-from-dnssec by default [v9_14]

See merge request isc-projects/bind9!2494
2019-10-29 07:39:27 -04:00
Ondřej Surý
41611a9bd9 Add CHANGES note
(cherry picked from commit 4a778cfa45)
2019-10-29 05:59:51 -05:00
Ondřej Surý
5eeaeb486f Add release notes.
(cherry picked from commit fce5a01a63)
2019-10-29 05:59:50 -05:00
Ondřej Surý
56b6d8c6a7 Adjust synthfromdnssec system test to the changed defaults
(cherry picked from commit 800d7843af)
2019-10-29 05:14:34 -05:00
Ondřej Surý
b97004be30 Disable NSEC Aggressive Cache (synth-from-dnssec) by default
It was found that NSEC Aggressive Caching has a significant performance impact
on BIND 9 when used as recursor.  This commit disables the synth-from-dnssec
configuration option by default to provide immediate remedy for people running
BIND 9.12+.  The NSEC Aggressive Cache will be enabled again after a proper fix
will be prepared.

(cherry picked from commit a20c42dca6)
2019-10-29 05:14:34 -05:00
Michał Kępień
4fb9ef674f Merge branch 'michal/add-centos-8-to-gitlab-ci-v9_14' into 'v9_14'
[v9_14] Add CentOS 8 to GitLab CI

See merge request isc-projects/bind9!2492
2019-10-29 04:22:35 -04:00
Michał Kępień
810cbde0bc Add CentOS 8 to GitLab CI
Ensure BIND can be tested on CentOS 8 in GitLab CI to more quickly catch
build and test errors on that operating system.

(cherry picked from commit dce1c05042)
2019-10-29 08:53:56 +01:00
Mark Andrews
4689f8cec6 Merge branch '876-documentation-feedback-2-v9_14' into 'v9_14'
dnskey-sig-validity 0;

See merge request isc-projects/bind9!2487
2019-10-24 17:09:53 -04:00
Mark Andrews
c452db5790 add named-checkconf tests for dnskey-sig-validity at range limits
(cherry picked from commit 918f020f9f)
2019-10-25 07:12:36 +11:00
Mark Andrews
85d89c00da accept 0 for dnskey-sig-validity (indicates off)
(cherry picked from commit 20647657f9)
2019-10-25 07:12:03 +11:00
Mark Andrews
f59321d972 Merge branch '1281-dnstap-per-view-configuration-v9_14' into 'v9_14'
Resolve "dnstap per view configuration"

See merge request isc-projects/bind9!2479
2019-10-21 19:29:09 -04:00
Mark Andrews
aface50cfe add CHANGES
(cherry picked from commit 6ce1e2e731)
2019-10-22 08:23:32 +11:00
Mark Andrews
c46f4d14f5 check for relationship between dnstap and dnstap-output seperately
(cherry picked from commit c2fcc9f16f)
2019-10-22 08:23:32 +11:00
Mark Andrews
71f33e0c24 add more dnstap/dnstap-output combinations
(cherry picked from commit f3d53630c3)
2019-10-22 08:23:32 +11:00
Tinderbox User
6330f2c6c8 Merge branch 'security-v9_14' into v9_14 2019-10-19 23:34:28 +00:00
Michał Kępień
afb1e0758f Merge branch 'michal/address-cppcheck-1.89-warnings-v9_14' into 'v9_14'
[v9_14] Address cppcheck 1.89 warnings

See merge request isc-projects/bind9!2473
2019-10-17 05:50:06 -04:00
Michał Kępień
c62c7c2f86 Suppress cppcheck 1.89 false positive
cppcheck 1.89 emits a false positive for lib/dns/spnego_asn1.c:

    lib/dns/spnego_asn1.c:700:9: error: Uninitialized variable: data [uninitvar]
     memset(data, 0, sizeof(*data));
            ^
    lib/dns/spnego.c:1709:47: note: Calling function 'decode_NegTokenResp', 3rd argument '&resp' value is <Uninit>
     ret = decode_NegTokenResp(buf + taglen, len, &resp, NULL);
                                                  ^
    lib/dns/spnego_asn1.c:700:9: note: Uninitialized variable: data
     memset(data, 0, sizeof(*data));
            ^

This message started appearing with cppcheck 1.89 [1], but it will be
gone in the next release [2], so just suppress it for the time being.

[1] af214e8212

[2] 2595b82634

(cherry picked from commit db7fd16346)
2019-10-17 10:52:19 +02:00
Michał Kępień
2a2a346340 Fix cppcheck 1.89 warnings
cppcheck 1.89 enabled certain value flow analysis mechanisms [1] which
trigger null pointer dereference false positives in lib/dns/rpz.c:

    lib/dns/rpz.c:584:7: warning: Possible null pointer dereference: tgt_ip [nullPointer]
      if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
          ^
    lib/dns/rpz.c:1425:44: note: Calling function 'adj_trigger_cnt', 4th argument '(void*)0' value is 0
      adj_trigger_cnt(rpzs, rpz_num, rpz_type, NULL, 0, true);
                                               ^
    lib/dns/rpz.c:584:7: note: Null pointer dereference
      if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
          ^
    lib/dns/rpz.c:598:7: warning: Possible null pointer dereference: tgt_ip [nullPointer]
      if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
          ^
    lib/dns/rpz.c:1425:44: note: Calling function 'adj_trigger_cnt', 4th argument '(void*)0' value is 0
      adj_trigger_cnt(rpzs, rpz_num, rpz_type, NULL, 0, true);
                                               ^
    lib/dns/rpz.c:598:7: note: Null pointer dereference
      if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
          ^
    lib/dns/rpz.c:612:7: warning: Possible null pointer dereference: tgt_ip [nullPointer]
      if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
          ^
    lib/dns/rpz.c:1425:44: note: Calling function 'adj_trigger_cnt', 4th argument '(void*)0' value is 0
      adj_trigger_cnt(rpzs, rpz_num, rpz_type, NULL, 0, true);
                                               ^
    lib/dns/rpz.c:612:7: note: Null pointer dereference
      if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
          ^

It seems that cppcheck no longer treats at least some REQUIRE()
assertion failures as fatal, so add extra assertion macro definitions to
lib/isc/include/isc/util.h that are only used when the CPPCHECK
preprocessor macro is defined; these definitions make cppcheck 1.89
behave as expected.

There is an important requirement for these custom definitions to work:
cppcheck must properly treat abort() as a function which does not
return.  In order for that to happen, the __GNUC__ macro must be set to
a high enough number (because system include directories are used and
system headers compile attributes away if __GNUC__ is not high enough).
__GNUC__ is thus set to the major version number of the GCC compiler
used, which is what that latter does itself during compilation.

[1] aaeec462e6

(cherry picked from commit abfde3d543)
2019-10-17 10:50:51 +02:00
Michał Kępień
4ea4e9b0b0 Merge branch 'michal/cleanup-with-cc-alg-remnants-v9_14' into 'v9_14'
[v9_14] Remove remnants of the --with-cc-alg option

See merge request isc-projects/bind9!2469
2019-10-15 16:35:12 -04:00
Michał Kępień
847879f772 Remove remnants of the --with-cc-alg option
Commit afa81ee4e4 omitted some spots in
the source tree which are still referencing the removed --with-cc-alg
"configure" option.  Make sure the latter is removed completely.

(cherry picked from commit 428dcf3b49)
2019-10-15 21:58:48 +02:00
Michał Kępień
97a940041f Merge branch 'michal/limit-triggers-for-openbsd-system-test-jobs-v9_14' into 'v9_14'
[v9_14] Limit triggers for OpenBSD system test jobs

See merge request isc-projects/bind9!2467
2019-10-15 15:52:45 -04:00
Michał Kępień
695e099c67 Limit triggers for OpenBSD system test jobs
When a GitLab CI runner is not under load, a single OpenBSD system test
job completes in about 12 minutes, which is considered decent.  However,
such jobs are usually multiplexed with other system test jobs on the
same host, which causes each of them to take even 40 minutes to
complete.  Taking retries into account, this is completely unacceptable
for everyday use, so only start OpenBSD system test jobs for pipelines
created through GitLab's web interface and for pipelines created for Git
tags.

(cherry picked from commit 603e04563b)
2019-10-15 21:48:43 +02:00
Michał Kępień
c2faa4dd64 Merge branch 'michal/minor-gitlab-ci-tweaks-v9_14' into 'v9_14'
[v9_14] Minor GitLab CI tweaks

See merge request isc-projects/bind9!2464
2019-10-15 15:45:57 -04:00
Michał Kępień
765cdd284b Tweak dependencies for the Windows build job
Since the Windows build job does not use the files created as a result
of running "autoreconf -fi" in the "autoreconf:sid:amd64" job, set its
dependencies to an empty list.

Since it is currently not possible to use "needs: []" for jobs which do
not belong to the first stage of a pipeline, set the "needs" key for the
Windows build job to the "autoreconf:sid:amd64" job so that all build
jobs are started at the same time (without this change, the Windows
build job does not start until all jobs in the "precheck" stage are
finished).

As a side note, these changes also attempt to eliminate intermittent,
bogus GitLab error messages ("There has been a missing dependency
failure").

(cherry picked from commit dd97dfdc14)
2019-10-15 20:49:28 +02:00
Michał Kępień
5599892021 Fix artifacts created by the "autoreconf" CI job
The intended purpose of the "autoreconf:sid:amd64" GitLab CI job is to
run "autoreconf -fi" and then pass the updated files on to subsequent
non-Windows build jobs.  However, the artifacts currently created by
that job only include files which are not tracked by Git.  Since we
currently do track e.g. "configure" with Git, the aforementioned job is
essentially a no-op.  Fix by manually specifying the files generated by
the "autoreconf:sid:amd64" job that should be passed on to subsequent
build jobs.

(cherry picked from commit e83b322f7f)
2019-10-15 20:49:28 +02:00
Michał Kępień
feaed60540 Merge branch 'michal/add-openbsd-to-gitlab-ci-v9_14' into 'v9_14'
[v9_14] Add OpenBSD to GitLab CI

See merge request isc-projects/bind9!2459
2019-10-15 14:44:41 -04:00
Michał Kępień
9d24eba876 Add OpenBSD to GitLab CI
Ensure BIND can be tested on OpenBSD in GitLab CI to more quickly catch
build and test errors on that operating system.

Some notes:

  - While GCC is packaged for OpenBSD, only old versions (4.2.1, 4.9.4)
    are readily available and none of them is the default system
    compiler, so we are only doing Clang builds in GitLab CI.

  - Unit tests are currently not run on OpenBSD because it ships with an
    old version of kyua which does not handle skipped tests properly.
    These jobs will be added when we move away from using kyua in the
    future as the test code itself works fine.

  - All OpenBSD jobs are run inside QEMU virtual machines, using GitLab
    Runner Custom executor.

(cherry picked from commit 07d2fcb544)
2019-10-15 16:38:24 +02:00
Michał Kępień
2395288c2e Work around an OpenBSD "make" quirk
Consider the following Makefile:

    foo:
    	false

On OpenBSD, the following happens for this Makefile:

  - "make foo" returns 1,
  - "make -k foo" returns 0,
  - "make -k -j6 foo" returns 1.

However, if the .NOTPARALLEL pseudo-target is added to this Makefile,
"make -k -j6 foo" will return 0 as well.

Since bin/tests/Makefile contains the .NOTPARALLEL pseudo-target,
running "make -k -j6 test" from bin/tests/ on OpenBSD prevents any
errors from being reported through that command's exit code.

Work around the issue by running "make -k -j6 test" in the
bin/tests/system/ directory instead as bin/tests/system/Makefile does
not contain the .NOTPARALLEL pseudo-target and thus things work as
expected there.

(cherry picked from commit 6b5426e1a7)
2019-10-15 16:38:23 +02:00
Mark Andrews
71db12db0f Merge branch '1143-a-minor-documentation-issue-consideration-of-parsing-inconsistencies-in-ipv4s-in-address-match-lists-and-in-a-controls-inet-statement-v9_14' into 'v9_14'
Resolve "A minor documentation issue & consideration of parsing inconsistencies in IPv4s in address match lists and in a controls/inet statement"

See merge request isc-projects/bind9!2454
2019-10-13 10:59:37 -04:00
Mark Andrews
446de056b6 Detect partial prefixes / incomplete IPv4 address in acls.
(cherry picked from commit fb87e669fb)
2019-10-14 01:31:44 +11:00
Ondřej Surý
7076fd6825 Merge branch 'ondrej/1-week-artifact-expiration-v9_14' into 'v9_14'
Synchronize the lifetime of artifact to 1 week

See merge request isc-projects/bind9!2449
2019-10-10 02:10:04 -04:00
Ondřej Surý
540f25194b Synchronize the lifetime of artifact to 1 week
(cherry picked from commit 85c0bede78)
2019-10-10 07:47:41 +02:00
Tinderbox User
5b7e2059ca Merge branch 'fix-doc' into security-v9_14 2019-10-09 20:54:55 +00:00
Tinderbox User
98f2e7149b regenerate doc 2019-10-09 20:54:43 +00:00
Ondřej Surý
148d39afbd Merge branch 'security-v9_14-issue-numbers' into 'security-v9_14'
Fix the GitLab issue numbers in CHANGES and notes.xml

See merge request isc-private/bind9!120
2019-10-09 02:34:53 -04:00
Ondřej Surý
bfb08a9780 Fix the GitLab issue numbers in CHANGES and notes.xml 2019-10-09 08:02:05 +02:00
Mark Andrews
348077c1e6 Merge branch 'marka-missing-runtime-check-v9_14' into 'v9_14'
missing RUNTIME_CHECK

See merge request isc-projects/bind9!2417
2019-10-04 00:34:22 -04:00
Mark Andrews
0f51b41094 add CHANGES
(cherry picked from commit 346624fe38)
2019-10-04 14:08:26 +10:00
Ondřej Surý
3c20623436 Move the failure handling block closer to the only place where it could fail
(cherry picked from commit 69ecc711ac)
2019-10-04 14:08:26 +10:00
Ondřej Surý
aebea22fab Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf()
Use the semantic patch from the previous commit to replace all the calls to
dns_name_copy() with NULL as third argument with dns_name_copynf().

(cherry picked from commit c2dad0dcb2)
2019-10-04 14:08:26 +10:00
Ondřej Surý
c8c6718ee4 Add semantic patch to replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf
(cherry picked from commit ac26ecf540)
2019-10-04 14:08:25 +10:00
Ondřej Surý
a1ef76cd78 Split dns_name_copy() into dns_name_copy() and dns_name_copynf()
The dns_name_copy() function followed two different semanitcs that was driven
whether the last argument was or wasn't NULL.  This commit splits the function
in two where now third argument to dns_name_copy() can't be NULL and
dns_name_copynf() doesn't have third argument.

(cherry picked from commit f7aef3738a)
2019-10-04 14:08:25 +10:00
Ondřej Surý
660307283e The final round of adding RUNTIME_CHECK() around dns_name_copy() calls
This commit was done by hand to add the RUNTIME_CHECK() around stray
dns_name_copy() calls with NULL as third argument.  This covers the edge cases
that doesn't make sense to write a semantic patch since the usage pattern was
unique or almost unique.

(cherry picked from commit 5efa29e03a)
2019-10-04 14:08:25 +10:00
Ondřej Surý
77fe5da647 Add RUNTIME_CHECK() around result = dns_name_copy(..., NULL) calls
This second commit uses second semantic patch to replace the calls to
dns_name_copy() with NULL as third argument where the result was stored in a
isc_result_t variable.  As the dns_name_copy(..., NULL) cannot fail gracefully
when the third argument is NULL, it was just a bunch of dead code.

Couple of manual tweaks (removing dead labels and unused variables) were
manually applied on top of the semantic patch.

(cherry picked from commit 89b269b0d2)
2019-10-04 14:08:25 +10:00
Ondřej Surý
9adb3ae2d5 Add RUNTIME_CHECK() around plain dns_name_copy(..., NULL) calls using spatch
This commit add RUNTIME_CHECK() around all simple dns_name_copy() calls where
the third argument is NULL using the semantic patch from the previous commit.

(cherry picked from commit 35bd7e4da0)
2019-10-04 14:08:25 +10:00
Ondřej Surý
500b5b9f79 Add semantic patches to correctly check dns_name_copy(..., NULL) return code
The dns_name_copy() function cannot fail gracefully when the last argument
(target) is NULL.  Add RUNTIME_CHECK()s around such calls.

The first semantic patch adds RUNTIME_CHECK() around any call that ignores the
return value and is very safe to apply.

The second semantic patch attempts to properly add RUNTIME_CHECK() to places
where the return value from `dns_name_copy()` is recorded into `result`
variable.  The result of this semantic patch needs to be reviewed by hand.

Both patches misses couple places where the code surrounding the
`dns_name_copy(..., NULL)` usage is more complicated and is better suited to be
fixed by a human being that understands the surrounding code.

(cherry picked from commit 406eba0c41)
2019-10-04 14:08:25 +10:00
Mark Andrews
2894de2ab3 Merge branch 'marka-cppcheck-fixes-v9_12-and-v9_14' into 'v9_14'
Address cppcheck reports (v9_11/v9_14)

See merge request isc-projects/bind9!2342
2019-10-03 23:36:19 -04:00
Mark Andrews
fcebc4f15b Address cppcheck reports 2019-10-04 13:06:00 +10:00
Mark Andrews
b396c9dfde Merge branch 'marka-silence-clang-v9_14' into 'v9_14'
silence clang warning by using local variable.

See merge request isc-projects/bind9!2441
2019-10-03 21:58:45 -04:00
Mark Andrews
b997237f49 silence clang warning by using local variable.
'isc_commandline_index' is a global variable so it can theoretically
change result between if expressions.  Save 'argv[isc_commandline_index]'
to local variable 'arg1' and use 'arg1 == NULL' in if expressions
instead of 'argc < isc_commandline_index + 1'.  This allows clang
to correctly determine what code is reachable.

(cherry picked from commit 1b27ab8642)
2019-10-04 11:36:19 +10:00
Ondřej Surý
418b340a8f Merge branch 'ondrej/fix-docs-autoreconf-v9_14' into 'v9_14'
Fix docs -> autoreconf dependencies in the .gitlab-ci.yml (v9_14)

See merge request isc-projects/bind9!2439
2019-10-03 10:08:05 -04:00
Ondřej Surý
3b339eb43f Fix the triggering rule for autoreconf job (take 2) 2019-10-03 15:34:09 +02:00
Ondřej Surý
cc4c5482ef Fix docs -> autoreconf dependencies in the .gitlab-ci.yml 2019-10-03 15:34:06 +02:00
Ondřej Surý
c70c4be5c4 Merge branch 'ondrej/enable-cppcheck-v9_14' into 'v9_14'
Enable Cppcheck for v9_14 branch

See merge request isc-projects/bind9!2432
2019-10-03 08:20:18 -04:00
Ondřej Surý
2ae68cd120 Use util/suppressions.txt for Cppcheck suppressions list 2019-10-03 14:02:08 +02:00
Ondřej Surý
36b0c5a517 lib/isc/tests/md_test.c: Silence sizeofFunctionCall Cppcheck 2019-10-03 12:44:02 +02:00
Ondřej Surý
e8f64e99f3 lib/isc/tests/hmac_test.c: Silence sizeofFunctionCall Cppcheck 2019-10-03 12:44:02 +02:00
Ondřej Surý
fedfd48a08 lib/dns/zone.c: Fix invalid order of DbC checks that could cause dereference before NULL check 2019-10-03 10:16:03 +02:00
Ondřej Surý
6a82289e35 lib/dns/sdlz.c: Use the referenced variable in the DbC check 2019-10-03 10:15:35 +02:00
Ondřej Surý
9ffcc8f165 lib/dns/sdb.c: Fix invalid order of DbC checks that could cause dereference before NULL check 2019-10-03 10:14:43 +02:00
Ondřej Surý
9f75d17e95 Remove randomly scattered additional style check suppressions that caused unmatchedSuppression
(cherry picked from commit a0d3614a60)
2019-10-03 09:50:27 +02:00
Ondřej Surý
beb05c3d78 lib/ns/query.c: Fix invalid order of DbC checks that could cause dereference before NULL check
(cherry picked from commit d1f035bbba)
2019-10-03 09:50:27 +02:00
Ondřej Surý
82d3faa274 lib/ns/interfacemgr.c: Fix invalid order of DbC checks that could cause dereference before NULL check
(cherry picked from commit 033f3eb580)
2019-10-03 09:50:27 +02:00
Ondřej Surý
c12ff394f1 lib/ns/client.c: Fix invalid order of DbC checks that could cause dereference before NULL check
(cherry picked from commit b4a42a286f)
2019-10-03 09:50:27 +02:00
Ondřej Surý
929fc207c7 lib/isccfg/parser.c: Fix invalid order of DbC checks that could cause dereference before NULL check
(cherry picked from commit f855f09a55)
2019-10-03 09:50:27 +02:00
Ondřej Surý
22d5735a0e lib/isccfg/aclconf.c: Suppress nullPointerRedundantCheck false positive
(cherry picked from commit 09232213d7)
2019-10-03 09:50:27 +02:00
Ondřej Surý
be4aafeac7 lib/isc/unix/socket.c: Suppress preprocessorErrorDirective error from Cppcheck
(cherry picked from commit 026cf2ff4f)
2019-10-03 09:50:27 +02:00
Ondřej Surý
d6de4edc41 lib/isc/task.c: Fix invalid order of DbC checks that could cause dereference before NULL check
(cherry picked from commit c662969da1)
2019-10-03 09:50:27 +02:00
Ondřej Surý
4acf396f83 lib/isc/pkc11.c: Fix possible NULL pointer dereference in push_attribute()
(cherry picked from commit e8948fd9b4)
2019-10-03 09:50:27 +02:00
Ondřej Surý
ac1127b2ad lib/isc/buffer.c: Fix invalid order of DbC checks that could cause dereference before NULL check
(cherry picked from commit e9f30fc211)
2019-10-03 09:50:26 +02:00
Ondřej Surý
8b32d11206 lib/dns/tsig.c: Suppress Cppcheck false positive error uninitStructMember
(cherry picked from commit 8f2ad12d0a)
2019-10-03 09:50:26 +02:00
Ondřej Surý
8db221d97a lib/dns/tests/rbt_serialize_test.c: Fix dereference before DbC check
(cherry picked from commit 14c174d921)
2019-10-03 09:50:26 +02:00
Ondřej Surý
4ef534aa90 Instead of declaring unused va_list, just don't declare it at all
(cherry picked from commit 269d507ccc)
2019-10-03 09:50:26 +02:00
Ondřej Surý
c3c515b56b lib/dns/rdatalist.c: Fix dereference before DbC check
(cherry picked from commit 5fc7e98d29)
2019-10-03 09:50:26 +02:00
Ondřej Surý
e442d1bbd2 lib/dns/rdata/*/*.c: Silence false positive nullPointerRedundantCheck warning from Cppcheck
Cppcheck gets confused by:

void bar(void *arg) {
    foo *data = arg;
    REQUIRE(source != NULL);
    REQUIRE(data->member != NULL);
}

and for consistency the DbC check needs to be changed to

void bar(void *arg) {
    foo *data = arg;
    REQUIRE(data != NULL);
    REQUIRE(data->member != NULL);
}

(cherry picked from commit 66af8713d8)
2019-10-03 09:50:26 +02:00
Ondřej Surý
2f5a7e84d9 lib/dns/rdata.c: Silence false positive nullPointerRedundantCheck warning from Cppcheck
(cherry picked from commit e68333aa67)
2019-10-03 09:50:26 +02:00
Ondřej Surý
7379248d9c lib/dns/rbtdb.c: Add DbC check to safely dereference rbtdb in rbt_datafixer()
(cherry picked from commit d508ce4036)
2019-10-03 09:50:26 +02:00
Ondřej Surý
4a129256e4 lib/dns/rbt.c: Suppress nullPointerRedundantCheck warnings from Cppcheck
(cherry picked from commit 8be5c3fcfc)
2019-10-03 09:50:26 +02:00
Ondřej Surý
e5474241e9 lib/dns/name.c: Fix dereference before DbC check reported by Cppcheck
(cherry picked from commit 0f5860aad3)
2019-10-03 09:50:26 +02:00
Ondřej Surý
df21cac6a8 lib/dns/gssapi_link.c: Fix %d -> %u formatting when printing unsigned integers
(cherry picked from commit cea871464f)
2019-10-03 09:50:26 +02:00
Ondřej Surý
e3ccbb7dc0 Fix passing NULL after the last typed argument to a variadic function leads to undefined behaviour.
From Cppcheck:

Passing NULL after the last typed argument to a variadic function leads to
undefined behaviour.  The C99 standard, in section 7.15.1.1, states that if the
type used by va_arg() is not compatible with the type of the actual next
argument (as promoted according to the default argument promotions), the
behavior is undefined.  The value of the NULL macro is an implementation-defined
null pointer constant (7.17), which can be any integer constant expression with
the value 0, or such an expression casted to (void*) (6.3.2.3). This includes
values like 0, 0L, or even 0LL.In practice on common architectures, this will
cause real crashes if sizeof(int) != sizeof(void*), and NULL is defined to 0 or
any other null pointer constant that promotes to int.  To reproduce you might be
able to use this little code example on 64bit platforms. If the output includes
"ERROR", the sentinel had only 4 out of 8 bytes initialized to zero and was not
detected as the final argument to stop argument processing via
va_arg(). Changing the 0 to (void*)0 or 0L will make the "ERROR" output go away.

void f(char *s, ...) {
    va_list ap;
    va_start(ap,s);
    for (;;) {
        char *p = va_arg(ap,char*);
        printf("%018p, %s\n", p, (long)p & 255 ? p : "");
        if(!p) break;
    }
    va_end(ap);
}

void g() {
    char *s2 = "x";
    char *s3 = "ERROR";

    // changing 0 to 0L for the 7th argument (which is intended to act as
    // sentinel) makes the error go away on x86_64
    f("first", s2, s2, s2, s2, s2, 0, s3, (char*)0);
}

void h() {
    int i;
    volatile unsigned char a[1000];
    for (i = 0; i<sizeof(a); i++)
        a[i] = -1;
}

int main() {
    h();
    g();
    return 0;
}

(cherry picked from commit d8879af877)
2019-10-03 09:50:26 +02:00
Ondřej Surý
a3abf117ad lib/dns/ecdb.c: Fix couple of DbC conditions reported by Cppcheck
(cherry picked from commit 91cc6b9eb9)
2019-10-03 09:50:25 +02:00
Ondřej Surý
a8a0c78927 Fix the constification of the dns_name_t * result variable for dns_tsig_identity()
(cherry picked from commit fa7475b77a)
2019-10-03 09:50:25 +02:00
Ondřej Surý
67978007a2 bin/named/zoneconf.c: Reset dns_name_t *tsig on every view iteration
(cherry picked from commit 43925b2a8b)
2019-10-03 09:50:25 +02:00
Ondřej Surý
adb4e80f58 Change dns_tsigkey_identity from macro to a function and const argument and result
(cherry picked from commit 2e304b0b7f)
2019-10-03 09:50:25 +02:00
Ondřej Surý
2163567cb8 Constify dns_name_t *signer argument to dns_acl_allowed()
(cherry picked from commit 4d2697b31c)
2019-10-03 09:50:25 +02:00
Ondřej Surý
3a10558787 bin/named/server.c: Fix couple of DbC conditions reported by Cppcheck
(cherry picked from commit 476277a6e6)
2019-10-03 09:50:25 +02:00
Ondřej Surý
dfe1bb5388 bin/dig/dighost.c: Fix REQUIRE(!= NULL) condition after the variable has been dereferenced
(cherry picked from commit 9366ca769f)
2019-10-03 09:50:25 +02:00
Ondřej Surý
a2c7b2f619 bin/delv/delv.c: Fix invalid logic operation in REQUIRE() condition
(cherry picked from commit 9ab16d10d4)
2019-10-03 09:50:25 +02:00
Ondřej Surý
b9cb767cbf Add Cppcheck job to the CI
This MR changes the default Debian sid build to wrap make with bear
that creates compilation database and use the compilation database
to run Cppcheck on the source files systematically.

The job is currently set to be allowed to fail as it will take some
time to fix all the Cppcheck detected issues.

(cherry picked from commit f55dc51f42)
2019-10-03 09:50:25 +02:00
Tinderbox User
d410de0545 Merge branch 'prep-release' into security-v9_14 2019-10-02 06:24:10 +00:00
Tinderbox User
4ee12e5337 prep 9.14.7 2019-10-02 06:21:57 +00:00
Evan Hunt
70da456043 Merge branch '16-security-mirror-key-check-security-v9_14' into 'security-v9_14' 2019-10-01 22:38:47 -07:00
Evan Hunt
8af8d626d3 CHANGES, release note
(cherry picked from commit 03278d6062)
2019-10-01 22:38:45 -07:00
Evan Hunt
4c09be6309 fix mirror zone trust anchor check
- compare key data when checking for a trust anchor match.
- allow for the possibility of multiple trust anchors with the same key ID
  so we don't overlook possible matches.

(cherry picked from commit bc727e5ccc)
2019-10-01 22:38:30 -07:00
Evan Hunt
95b2398fdf Merge branch 'marka-forward-to-non-recursive-security-v9_14' into 'security-v9_14' 2019-10-01 22:15:24 -07:00
Mark Andrews
4c56b3c556 add release note entry
(cherry picked from commit b7442e4389)
2019-10-01 22:15:24 -07:00
Mark Andrews
2ee9a6ee4e add CHANGES
(cherry picked from commit 21553af7cc)
2019-10-01 22:15:21 -07:00
Mark Andrews
8766962f22 reset fctx->qmindcname and fctx->qminname after processing a delegation
(cherry picked from commit 622bef6aec)
2019-10-01 22:14:22 -07:00
Mark Andrews
22247084e3 check recovery from forwarding to a non-recursive server
(cherry picked from commit 47d285a7d6)
2019-10-01 22:14:22 -07:00
Evan Hunt
7434f80008 Merge branch '1191-qmin-fetch-failure-v9_14' into 'v9_14'
SERVFAIL if a prior qmin fetch has not been canceled when a new one starts

See merge request isc-projects/bind9!2426
2019-10-02 00:45:55 -04:00
Evan Hunt
31636d05c4 CHANGES
(cherry picked from commit 1d741c5c0f)
2019-10-01 21:20:38 -07:00
Evan Hunt
b632142526 SERVFAIL if a prior qmin fetch has not been canceled when a new one starts
(cherry picked from commit 488cb4da10)
2019-10-01 21:20:20 -07:00
Ondřej Surý
dd4c4d155c Merge branch '846-dig-idn-alabel-fallback-v9_14' into 'v9_14'
Resolve "dig cannot display ACE query if locale is not unicode"

See merge request isc-projects/bind9!2413
2019-09-30 06:51:14 -04:00
Ondřej Surý
b5ca157e2a Add CHANGES for GL #846
(cherry picked from commit dccec984c0)
2019-09-30 11:53:28 +02:00
Ondřej Surý
f5d443aa56 Test of valid A-label in locale that cannot display it only with non-broken idn2
The libidn2 library on Ubuntu Bionic is broken and idn2_to_unicode_8zlz() does't
fail when it should.  This commit ensures that we don't run the system test for
valid A-label in locale that cannot display with the buggy libidn2 as it would
break the tests.

(cherry picked from commit c42e3583f9)
2019-09-30 11:53:28 +02:00
Petr Menšík
b3bc4f6eac Emit warning on IDN output failure
Warning is emitted before any dig headers.

(cherry picked from commit 21371abd72)
2019-09-30 11:53:28 +02:00
Petr Menšík
30bf32365f Modify idna test to fallback to ACE
Test valid A-label on input would be displayed as A-label on output if
locale does not allow U-label.

(cherry picked from commit ac0cf85f09)
2019-09-30 11:53:28 +02:00
Petr Menšík
a38aa7f674 Fallback to ASCII on output IDN conversion error
It is possible dig used ACE encoded name in locale, which does not
support converting it to unicode. Instead of fatal error, fallback to
ACE name on output.

(cherry picked from commit c8a871e908)
2019-09-30 11:53:28 +02:00
Mark Andrews
93c334dd41 Merge branch 'marka-correct-list-v9_14' into 'v9_14'
use correct list

See merge request isc-projects/bind9!2411
2019-09-28 21:19:40 -04:00
Mark Andrews
76a15b6fe8 Address cut-and-paste error where list name was not changed in one instance for change 5292.
(cherry picked from commit 9cd308ac5e)
2019-09-29 10:52:31 +10:00
Michał Kępień
72d5660a15 Merge branch '147-add-windows-to-gitlab-ci-v9_14' into 'v9_14'
[v9_14] Add Windows to GitLab CI

See merge request isc-projects/bind9!2408
2019-09-27 07:18:10 -04:00
Michał Kępień
f861d5d156 Update Windows-specific documentation
Bring the files describing Windows-specific aspects of building and
installing BIND up to date.  Remove the parts which are either outdated
(e.g. 32-bit build instructions), already included elsewhere (e.g. the
list of Windows systems BIND is known to run on), or inconvenient to
keep up to date in the long run (e.g. ARM chapter numbers).

(cherry picked from commit 646fcb733e)
2019-09-27 09:16:02 +02:00
Michał Kępień
4fa3b4ff9c Add Windows to GitLab CI
Ensure BIND can be tested on Windows in GitLab to more quickly catch
build and test errors on that operating system.

Some notes:

  - While build jobs are triggered for all pipelines, system test jobs
    are not - due to the time it takes to run the complete system test
    suite on Windows (about 20 minutes), the latter are only run for
    pipelines created through GitLab's web interface and for pipelines
    created for Git tags.

  - Only the "Release" build configuration is currently used.  Adding
    "Debug" builds is a matter of extending .gitlab-ci.yml, but it was
    not done for the time being due to questionable usefulness of
    performing such builds in GitLab CI.

  - Only a 64-bit build is performed.  Adding support for 32-bit builds
    is not planned to be implemented.

  - Unit tests are still not run on Windows, but adding support for that
    is on the roadmap.

  - All Windows GitLab CI jobs are run inside Windows Server containers,
    using the Custom executor feature of GitLab Runner as Windows Server
    2016 is not supported by GitLab Runner's native Docker on Windows
    executor and Windows Server 2019 is not yet widely available from
    hosting providers.

  - The Windows Docker image used by GitLab CI is not stored in the
    GitLab Container Registry as it is over 27 GB in size and thus
    passing it between GitLab and its runners is impractical.

  - There is no vcvarsall.bat variant written in PowerShell and batch
    scripts are no longer supported by GitLab Runner Custom executor, so
    the environment variables set by vcvarsall.bat are injected back
    into the PowerShell environment by processing the output of "set".

  - Visual Studio parallel builds are a bit different than "make -jX"
    builds as parallelization happens in two tiers: project parallelism
    (controlled by the "/maxCpuCount" msbuild.exe switch) and compiler
    parallelism (controlled by the "/MP" cl.exe switch).  To limit the
    total number of compiler processes spawned concurrently to a value
    similar to the one used for Unix builds, msbuild.exe is allowed to
    build at most 2 projects at once, each of which can spawn up to half
    of BUILD_PARALLEL_JOBS worth of compiler processes.  Using such
    parameters is a fairly arbitrary decision taken to solve the
    trade-off between compilation speed and runner load.

  - Configuring network addresses in Windows Server containers is
    tricky.  Adding 10.53.0.1/24 and similar addresses to the vEthernet
    interface created by Docker never causes ifconfig.bat to fail, but
    in fact only one container can have any given IP address configured
    at any given time (the request to add the same address in another
    container is silently ignored).  Thus, in order to allow multiple
    system test jobs to be run in parallel, the addresses used in system
    tests are configured on the loopback interfaces.  Interestingly
    enough, the addresses set on the loopback interfaces... persist
    between containers.  Fortunately, this is acceptable for the time
    being and only requires ifconfig.bat failures to be ignored (as
    ifconfig.bat will fail if it attempts to configure an already
    existing address on an interface).  We also need to wait for a brief
    moment after calling ifconfig.bat as the addresses the latter
    attempts to configure may not be immediately available after it
    returns (and that causes runall.sh to error out).  Finally, for some
    reason we also need to signal that the DNS servers on each loopback
    interface are to be configured using DHCP or else ifconfig.bat will
    fail to add the requested addresses.

  - Since named.pid files created by named instances used in system
    tests contain Windows PIDs instead of Cygwin PIDs and various
    versions of Cygwin "kill" react differently when passed Windows PIDs
    without the -W switch, all "kill" invocations in GitLab CI need to
    use that switch (otherwise they would print error messages which
    would cause stop.pl to assume the process being killed died
    prematurely).  However, to preserve compatibility with older Cygwin
    versions used in our other Windows test environments, we alter the
    relevant scripts "on the fly" rather than in the Git repository.

  - In the containers used for running system tests, Windows Error
    Reporting is configured to automatically create crash dumps in
    C:\CrashDumps.  This directory is examined after the test suite is
    run to ensure no crashes went under stop.pl's radar.

(cherry picked from commit ca36405a3d)
2019-09-27 09:16:02 +02:00
Michał Kępień
6ab9726038 Fix the "statschannel" system test on Windows
The SYSTEMTESTTOP variable is set by bin/tests/system/run.sh.  When
system tests are run on Windows, that variable will contain an absolute
Cygwin path.  In the case of the "statschannel" system test, using the
unmodified SYSTEMTESTTOP variable in tests.sh causes the RNDCCMD
variable to contain an invocation of a native Windows application with
an absolute Cygwin path passed as a parameter, which prevents rndc from
working in that system test.  Until we have a cleaner solution, override
SYSTEMTESTTOP with a relative path to work around the issue and thus fix
the "statschannel" system test on Windows.

(cherry picked from commit 4deb2a48d9)
2019-09-27 09:16:02 +02:00
Michał Kępień
d20a928435 Fix system test error reporting on Windows
Make sure the CYGWIN environment variable is set whenever system tests
are run on Windows to prevent stop.pl from making incorrect assumptions
about the environment it is running in, which triggers e.g. false
reports about named instances crashing on shutdown when system tests are
run on Windows.  This issue has not been caught earlier because the
CYGWIN environment variable was incidentally being set on a higher level
in our Windows test environments.

Error reporting for parallel system tests on Windows has been broken all
along: since all parallel.mk targets generated by parallel.sh pipe their
output through "tee", the return code from run.sh is lost and thus
running "make -f parallel.mk check" will not yield a non-zero return
code if some system tests fail.  The same applies to runsequential.sh.
Yet, runall.sh on Windows only sets its return code to a non-zero value
if either "make -f parallel.mk check" or runsequential.sh returns a
non-zero return code.  Fix by making runall.sh yield a non-zero return
code when testsummary.sh fails, which is the same approach as the one
used in the "test" target in bin/tests/system/Makefile.

(cherry picked from commit fed397c04b)
2019-09-27 09:16:02 +02:00
Michał Kępień
78a3cacf8d Make VS solution upgrading unnecessary
Until now, the build process for BIND on Windows involved upgrading the
solution file to the version of Visual Studio used on the build host.
Unfortunately, the executable used for that (devenv.exe) is not part of
Visual Studio Build Tools and thus there is no clean way to make that
executable part of a Windows Server container.

Luckily, the solution upgrade process boils down to just adding XML tags
to Visual Studio project files and modifying certain XML attributes - in
files which we pregenerate anyway using win32utils/Configure.  Thus,
extend win32utils/Configure with three new command line parameters that
enable it to mimic what "devenv.exe bind9.sln /upgrade" does.  This
makes the devenv.exe build step redundant and thus facilitates building
BIND in Windows Server containers.

(cherry picked from commit 0476e8f1ac)
2019-09-27 09:16:02 +02:00
Michał Kępień
90b8e590b7 Enable building dnssec-cds.exe
Build configuration for the dnssec-cds Visual Studio project is absent
from the solution file template, which means the solution needs to be
upgraded using "devenv bind9.sln /upgrade" in order for the dnssec-cds
project to be built.  Add the build configuration for dnssec-cds to the
solution file template so that upgrading the solution is not necessary
for building that project.

(cherry picked from commit 1d5259b0a0)
2019-09-27 09:16:02 +02:00
Michał Kępień
d43392e546 Drop named-checkzone dependency on libbind9
named-checkzone does not use libbind9.  Update the Visual Studio project
file template for named-checkzone to reflect that, thus preventing
compilation issues during parallel builds.

(cherry picked from commit 918ebd9830)
2019-09-27 09:16:02 +02:00
Michał Kępień
1bf5a95774 Add missing nsupdate dependency on libirs
When commit 8eb88aafee removed liblwres,
it also modified nsupdate to use libirs instead of liblwres, but the
Visual Studio project files were not updated to reflect that change.
Make sure the nsupdate Visual Studio project depends on the libirs
project to prevent compilation issues during parallel builds.

(cherry picked from commit de1859422e)
2019-09-27 09:16:02 +02:00
Michał Kępień
cfb6e311a0 Merge branch 'marka-win32-vsconf-v9_14' into 'v9_14'
[v9_14] allow VSCONF to be overridden at runtime

See merge request isc-projects/bind9!2406
2019-09-27 03:15:19 -04:00
Mark Andrews
fea03c8a43 allow VSCONF to be overridden at runtime
(cherry picked from commit 2433e3e808)
2019-09-27 09:14:10 +02:00
Mark Andrews
d44a1289c9 Merge branch 'marka-resolver-fix-v9_14' into 'v9_14'
use test specific shell variables

See merge request isc-projects/bind9!2388
2019-09-27 03:07:43 -04:00
Mark Andrews
fd916bf406 use test specific shell variables
(cherry picked from commit 4a5400c1b7)
2019-09-27 16:23:27 +10:00
Ondřej Surý
6d2092e749 Merge branch 'ondrej/fix-clang-10-error-v9_14' into 'v9_14'
Silence false positive warning from Clang 10 in random_test.c

See merge request isc-projects/bind9!2405
2019-09-26 09:25:44 -04:00
Ondřej Surý
903fab5f6c Silence false positive warning from Clang 10 in random_test.c
(cherry picked from commit 9ff02c8170)
2019-09-26 15:24:56 +02:00
Michał Kępień
3096e11af9 Merge branch 'michal/prevent-unbuffered-stderr-io-on-windows-v9_14' into 'v9_14'
[v9_14] Prevent unbuffered stderr I/O on Windows

See merge request isc-projects/bind9!2401
2019-09-26 08:00:54 -04:00
Michał Kępień
b440d30a78 Prevent unbuffered stderr I/O on Windows
Make stderr fully buffered on Windows to improve named performance when
it is logging to stderr, which happens e.g. in system tests.  Note that:

  - line buffering (_IOLBF) is unavailable on Windows,

  - fflush() is called anyway after each log message gets written to the
    default stderr logging channels created by libisc.

(cherry picked from commit c72da3497d)
2019-09-26 13:56:38 +02:00
Ondřej Surý
7f55b7d60c Merge branch '1246-fix-stdatomic-shim-for-win32-v9_14' into 'v9_14'
Resolve "Add atomic_fetch_add and atomic_fetch_or shims"

See merge request isc-projects/bind9!2399
2019-09-26 07:43:16 -04:00
Ondřej Surý
9d400c7d89 Fix the wrong function for the atomic_fetch_add_explicit64 shim on non-WIN64 build 2019-09-26 13:01:26 +02:00
Michał Kępień
75bc9ea249 Merge branch 'michal/prevent-cygwin-from-concealing-non-abort-crashes-v9_14' into 'v9_14'
Prevent Cygwin from concealing non-abort() crashes

See merge request isc-projects/bind9!2394
2019-09-26 04:38:08 -04:00
Michał Kępień
239c1195d5 Prevent Cygwin from concealing non-abort() crashes
BIND system tests are run in a Cygwin environment.  Apparently Cygwin
shell sets the SEM_NOGPFAULTERRORBOX bit in its process error mode which
is then inherited by all spawned child processes.  This bit prevents the
Windows Error Reporting dialog from being displayed, which I assume is
part of an effort to contain memory handling errors triggered by Cygwin
binaries in the Cygwin environment.  Unfortunately, this also prevents
automatic crash dump creation by Windows Error Reporting and Cygwin
itself does not handle memory errors in native Windows processes spawned
from a Cygwin shell.

Fix by clearing the SEM_NOGPFAULTERRORBOX bit inside named if it is
started in a Cygwin environment, thus overriding the Cygwin-set process
error mode in order to enable Windows Error Reporting to handle all
named crashes.

(cherry picked from commit 3d4b17806f)
2019-09-26 10:34:40 +02:00
Michał Kępień
8dfb51b15d Merge branch '1245-properly-initialize-libxml2-v9_14' into 'v9_14'
[v9_14] Properly initialize libxml2

See merge request isc-projects/bind9!2392
2019-09-26 04:31:55 -04:00
Michał Kępień
258f48bcf0 Add CHANGES entry
5293.	[bug]		On Windows, named crashed upon any attempt to fetch XML
			statistics from it. [GL #1245]

(cherry picked from commit b5bcd4b8d6)
2019-09-26 10:28:52 +02:00
Michał Kępień
e9f9062732 Properly initialize libxml2
When libxml2 is to be used in a multi-threaded application, the
xmlInitThreads() function must be called before any other libxml2
function.  This function does different things on various platforms and
thus one can get away without calling it on Unix systems, but not on
Windows, where it initializes critical section objects used for
synchronizing access to data structures shared between threads.  Add the
missing xmlInitThreads() call to prevent crashes on affected systems.

Also add a matching xmlCleanupThreads() call to properly release the
resources set up by xmlInitThreads().

(cherry picked from commit a3c0b00ef6)
2019-09-26 10:28:51 +02:00
Mark Andrews
4d725a54b8 Merge branch '1205-named-crashes-when-setting-nsec3param-v9_14' into 'v9_14'
Resolve "named crashes when setting nsec3param"

See merge request isc-projects/bind9!2379
2019-09-23 23:06:24 -04:00
Mark Andrews
75a8acf3ab add CHANGES
(cherry picked from commit 31c8f66f25)
2019-09-24 11:38:06 +10:00
Mark Andrews
bf63ff09c1 Queue nsec3param setting until receive_secure_serial has completed.
(cherry picked from commit 456888c00f)
2019-09-24 11:37:37 +10:00
Mark Andrews
553313c2c2 Move dns_zone_setdb() to after the db is created.
Addresses the database changing w/o the changes being done under task lock.
Fix: build the database before assigning it to the zone.

(cherry picked from commit 4e686f40e0)
2019-09-24 11:37:37 +10:00
Michał Kępień
c6d9e9cd8f Merge branch 'michal/run-freebsd-jobs-automatically-for-all-pipelines-v9_14' into 'v9_14'
[v9_14] Run FreeBSD jobs automatically for all pipelines

See merge request isc-projects/bind9!2353
2019-09-17 14:26:16 -04:00
Michał Kępień
7c992a0e57 Run FreeBSD jobs automatically for all pipelines
No problems have been observed on the FreeBSD GitLab CI runner during
the burn-in period, when FreeBSD jobs needed to be triggered manually.
Thus, make the FreeBSD jobs run automatically along other GitLab CI
jobs.

(cherry picked from commit f7bc95409d)
2019-09-17 20:24:37 +02:00
Michal Nowak
b479738b20 Merge branch 'mnowak/Red_Hat_find_docbook-xsl-v9_14' into 'v9_14'
Find docbook-xsl and dblatex templates on Red Hat/Fedora

See merge request isc-projects/bind9!2351
2019-09-17 12:07:26 -04:00
Michal Nowak
5347941ef1 Remove unused configure checks for dblatex
(cherry picked from commit c871dda0aa)
2019-09-17 17:03:44 +02:00
Michal Nowak
df6e06e941 Find docbook-xsl and dblatex templates on Red Hat/Fedora
`/usr/share/sgml/docbook/xsl-stylesheets` and `/usr/share/dblatex` are
places where docbook-style-xsl and, respectively, dblatex packages on
Red Hat systems put their XSL templates. Unless we hint this place it
has to be added to `./configure` manually (`--with-docbook-xsl=...`):
https://src.fedoraproject.org/rpms/bind/blob/master/f/bind.spec#_691.

On Fedora 30:

Before
```
./configure
...
checking for Docbook-XSL path... auto
checking for html/docbook.xsl... "not found"
checking for xhtml/docbook.xsl... "not found"
checking for manpages/docbook.xsl... "not found"
checking for html/chunk.xsl... "not found"
checking for xhtml/chunk.xsl... "not found"
checking for html/chunktoc.xsl... "not found"
checking for xhtml/chunktoc.xsl... "not found"
checking for html/maketoc.xsl... "not found"
checking for xhtml/maketoc.xsl... "not found"
checking for xsl/docbook.xsl... "not found"
checking for xsl/latex_book_fast.xsl... "not found"
```

After:
```
./configure
...
checking for Docbook-XSL path... auto
checking for html/docbook.xsl... /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl
checking for xhtml/docbook.xsl... /usr/share/sgml/docbook/xsl-stylesheets/xhtml/docbook.xsl
checking for manpages/docbook.xsl... /usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl
checking for html/chunk.xsl... /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl
checking for xhtml/chunk.xsl... /usr/share/sgml/docbook/xsl-stylesheets/xhtml/chunk.xsl
checking for html/chunktoc.xsl... /usr/share/sgml/docbook/xsl-stylesheets/html/chunktoc.xsl
checking for xhtml/chunktoc.xsl... /usr/share/sgml/docbook/xsl-stylesheets/xhtml/chunktoc.xsl
checking for html/maketoc.xsl... /usr/share/sgml/docbook/xsl-stylesheets/html/maketoc.xsl
checking for xhtml/maketoc.xsl... /usr/share/sgml/docbook/xsl-stylesheets/xhtml/maketoc.xsl
checking for xsl/docbook.xsl... /usr/share/dblatex/xsl/docbook.xsl
checking for xsl/latex_book_fast.xsl... /usr/share/dblatex/xsl/latex_book_fast.xsl
```

(cherry picked from commit 0055b9616e)
2019-09-17 17:03:44 +02:00
Ondřej Surý
236e47beec Merge branch 'ondrej/improve-flycheck-configuration-v9_14' into 'v9_14'
Remove the current directory from the flycheck configuration

See merge request isc-projects/bind9!2349
2019-09-17 07:31:08 -04:00
Ondřej Surý
28241706c6 Remove the current directory from the flycheck configuration 2019-09-17 13:07:23 +02:00
Michal Nowak
b792a3bc02 Merge branch 'mnowak_README_fixes-v9_14' into 'v9_14'
Various README.md and README fixes

See merge request isc-projects/bind9!2337
2019-09-16 01:46:46 -04:00
Michal Nowak
3ec897c97e Various README.md and README fixes
Fixing typos, typographical glitches. Added backticks around binaries,
modules, and libraries so it's more consistent. Added a paragraph with
ISC Security Policy.

(cherry picked from commit 4e2fdd7ee9)
2019-09-16 07:45:16 +02:00
Mark Andrews
974fc3c3f4 Merge branch 'marka-win32-fixup-v9_11-v9_14' into 'v9_14'
reinstate error handler

See merge request isc-projects/bind9!2341
2019-09-13 00:31:22 -04:00
Mark Andrews
31a905775c reinstate error handler
(cherry picked from commit 7fb0a0db53)
2019-09-13 14:29:54 +10:00
Mark Andrews
1aff269e6a Merge branch 'marka-win32-fixup-v9_11-v9_14' into 'v9_14'
win32 fixup v9_11

See merge request isc-projects/bind9!2340
2019-09-13 00:28:01 -04:00
Mark Andrews
946f08db99 declare alloc_failure
(cherry picked from commit 0d23bc5b55)
2019-09-13 14:26:36 +10:00
Mark Andrews
fd395947ad declare result
(cherry picked from commit 9ee27573af)
2019-09-13 14:26:36 +10:00
Michał Kępień
ab6db576e2 Merge branch 'michal/add-freebsd-to-ci-v9_14' into 'v9_14'
[v9_14] Add FreeBSD to CI

See merge request isc-projects/bind9!2334
2019-09-12 09:23:38 -04:00
Michał Kępień
097989cf59 Add FreeBSD to GitLab CI
Ensure BIND can be tested on FreeBSD in GitLab to more quickly catch
build and test errors on that operating system.  Make the relevant jobs
optional until the CI environment supporting them is deemed stable
enough for continuous use.

FreeBSD jobs are run using the Custom executor feature of GitLab Runner.
Unlike the Docker executor, the Custom executor does not support the
"image" option and thus some way of informing the runner about the OS
version to use for a given job is necessary.  Arguably the simplest way
of doing that without a lot of code duplication in .gitlab-ci.yml would
be to use a YAML template with a "variables" block specifying the
desired FreeBSD release to use, but including such a template in a job
definition would cause issues in case other variables also needed to be
set for that job (e.g. CFLAGS or EXTRA_CONFIGURE for build jobs).  Thus,
only one FreeBSD YAML template is defined instead and the Custom
executor scripts on FreeBSD runners extract the OS version to use from
the CI job name.  This allows .gitlab-ci.yml variables to be defined for
FreeBSD jobs in the same way as for Docker-based jobs.

(cherry picked from commit 51af91d007)
2019-09-12 15:00:38 +02:00
Michał Kępień
83ceebef81 Set --logfile for all kyua invocations
When kyua is called without the --logfile command line option, the log
file is created at a default location which is derived from the HOME
environment variable.  On FreeBSD GitLab CI runners, /home is a
read-only directory and thus kyua invocations not using the --logfile
option fail when HOME is set to something beneath /home.  Set --logfile
to /dev/null for all kyua invocations whose logs are irrelevant in order
to prevent kyua failures caused by HOME being non-writable.

(cherry picked from commit 1bffa602ba)
2019-09-12 15:00:34 +02:00
Michał Kępień
84fdc4034f Merge branch 'michal/misc-doc-fixes-v9_14' into 'v9_14'
[v9_14] Miscellaneous documentation fixes

See merge request isc-projects/bind9!2330
2019-09-12 08:01:33 -04:00
Michał Kępień
bf4c9450ca README: do not mention /usr/include on macOS
For newer versions of Xcode, "xcode-select --install" no longer installs
system headers into /usr/include (instead, they are installed in the
Xcode directory tree), so do not mention that path in the macOS section
of README to prevent confusion.

(cherry picked from commit 5af0b1d1d3)
2019-09-12 13:58:01 +02:00
Mark Andrews
973eac118d Merge branch 'marka-split-notes-v9_14' into 'v9_14'
split notes.xml into sections v9_14

See merge request isc-projects/bind9!2327
2019-09-12 06:06:42 -04:00
Mark Andrews
9f612e0850 split notes.xml into sections 2019-09-12 20:05:05 +10:00
Mark Andrews
eeb281641b Merge branch '1043-cppcheck-detected-code-issues-v9_14' into 'v9_14'
Resolve "cppcheck-detected code issues"

See merge request isc-projects/bind9!2332
2019-09-12 06:01:25 -04:00
Mark Andrews
57824120e4 address or suppress cppcheck warnings
(cherry picked from commit b59fe46e76)
2019-09-12 19:27:28 +10:00
Tinderbox User
39057cceec Merge branch 'prep-release' into v9_14 2019-09-09 14:51:54 +00:00
Tinderbox User
87bcd335d6 prep for 9.14.6 2019-09-09 14:09:52 +00:00
Tinderbox User
2a2d8d00aa prep for 9.14.6 2019-09-09 13:34:28 +00:00
Mark Andrews
57a21490bf Merge branch 'marka-fix-insist-v9_14' into 'v9_14'
Address "Value stored to 'dscpcount' is never read"

See merge request isc-projects/bind9!2319
2019-09-06 03:06:00 -04:00
Mark Andrews
34f4295d1f also insist that keycount == dscpcount
(cherry picked from commit dbdd19853e)
2019-09-06 16:44:05 +10:00
Mark Andrews
729882ce41 Merge branch '1212-edns-udp-size-docs-not-updated-for-flag-day-changes-v9_14' into 'v9_14'
Resolve "edns-udp-size docs not updated for Flag Day changes"

See merge request isc-projects/bind9!2316
2019-09-05 21:13:27 -04:00
Mark Andrews
91b0e48b2a remove discussion about falling back to plain DNS on timeout
(cherry picked from commit aca78add3a)
2019-09-06 10:51:54 +10:00
Mark Andrews
c628c9a9ad Merge branch '1210-address-potential-null-pointer-dereference-in-rpz-c-v9_14' into 'v9_14'
Resolve "Address potential NULL pointer dereference in rpz.c"

See merge request isc-projects/bind9!2309
2019-09-04 17:51:45 -04:00
Mark Andrews
cc5978a961 add CHANGES
(cherry picked from commit 924f9b9e1d)
2019-09-05 07:29:35 +10:00
Mark Andrews
7b26e2d819 use rpzs->updater as rpz->rpzs is NULL
(cherry picked from commit 3e82a2ea9a)
2019-09-05 07:29:05 +10:00
Mark Andrews
6f729bf3e3 Merge branch '1207-bind-potential-for-null-pointer-de-references-plus-memory-leaks-cwe-476-in-file-dlz_mysqldyn_mod-c-v9_14' into 'v9_14'
Resolve "BIND | Potential for NULL pointer de-references plus memory leaks (CWE-476) in file 'dlz_mysqldyn_mod.c'"

See merge request isc-projects/bind9!2301
2019-09-04 00:52:15 -04:00
Mark Andrews
ee1636d0c8 add CHANGES
(cherry picked from commit 8b65ac9128)
2019-09-04 14:37:57 +10:00
Mark Andrews
1eafd26fa4 address NULL pointer dereferences
(cherry picked from commit 2de94dd4c4)
2019-09-04 14:37:56 +10:00
Mark Andrews
573f88e5ba Merge branch '837-win32-legacy-system-test-failure-v9_14' into 'v9_14'
Resolve "win32 legacy system test failure"

See merge request isc-projects/bind9!2297
2019-09-03 21:18:57 -04:00
Mark Andrews
33c751c967 add CHANGES
(cherry picked from commit f0fd713f17)
2019-09-04 10:50:23 +10:00
Mark Andrews
0c75cb9a1e silence dos2unix messages
(cherry picked from commit 2390d16955)
2019-09-04 10:50:00 +10:00
Mark Andrews
d72f73af48 implement maxudp under windows
(cherry picked from commit 2f558854b7)
2019-09-04 10:50:00 +10:00
Ondřej Surý
581baceff9 Merge branch '1196-misaligned-address-in-siphash-c-v9_14' into 'v9_14'
Resolve "Misaligned address in siphash.c"

See merge request isc-projects/bind9!2291
2019-09-03 05:00:42 -04:00
Ondřej Surý
77a68cbd4c Fix alignment issues in the native implementation of isc_siphash24()
The native implementation's conversion from the uint8_t buffers to uint64_t now
follows the reference implementation that doesn't require aligned buffers.
2019-09-02 13:21:40 +02:00
Evan Hunt
8057e21421 Merge branch '1146-rpz-expiry-v9_14' into 'v9_14'
remove policies from RPZ summary database when policy zones expire

See merge request isc-projects/bind9!2290
2019-08-30 16:28:33 -04:00
Evan Hunt
25bbe76f4f CHANGES, release note
(cherry picked from commit 38523ac4a8)
2019-08-30 13:08:48 -07:00
Evan Hunt
2a58b03336 when a response-policy zone expires, unload its polices from RPZ summary
(cherry picked from commit 7ba6d592ec)
2019-08-30 13:08:48 -07:00
Evan Hunt
b92b5ef35d Merge branch '1146-rpz-search-v9_14' into 'v9_14'
use an rbtnodechain for wildcard matching in RPZ summary db

See merge request isc-projects/bind9!2286
2019-08-30 14:46:51 -04:00
Evan Hunt
2078d8fcca CHANGES
(cherry picked from commit 22349d919c)
2019-08-29 20:08:16 -07:00
Evan Hunt
326ec91c8b use an rbtnodechain to walk up labels
when looking for a possible wildcard match in the RPZ summary database,
use an rbtnodechain to walk up label by label, rather than using the
node's parent pointer.

(cherry picked from commit 6e9be9a952)
2019-08-29 20:08:16 -07:00
Mark Andrews
2701f9eab0 Merge branch '1189-don-t-escape-commas-when-reporting-named-s-command-line-v9_14' into 'v9_14'
Resolve "Don't escape commas when reporting named's command line."

See merge request isc-projects/bind9!2283
2019-08-29 21:19:24 -04:00
Mark Andrews
7ef47e8979 add CHANGES
(cherry picked from commit ecba23bc24)
2019-08-30 10:42:51 +10:00
Mark Andrews
ed92040d7a don't escape commas when saving named's command line
(cherry picked from commit 70dd93bf8a)
2019-08-30 10:42:48 +10:00
Ondřej Surý
9691ad733b Merge branch 'ondrej/use-needs-kw-in-gitlab-ci-v9_14' into 'v9_14'
Ondrej/use needs kw in gitlab ci v9 14

See merge request isc-projects/bind9!2281
2019-08-29 09:57:24 -04:00
Ondřej Surý
d17168b102 Remove the tkey_test.c from the BIND 9.14 branch, it's no-op here anyway. 2019-08-29 15:37:03 +02:00
Ondřej Surý
1c084c35f0 Fix uninitialized variable warning in restore_nsec3param() 2019-08-29 15:14:24 +02:00
Ondřej Surý
53058ce4b3 Synchronize the .gitlab-ci.yml with master 2019-08-29 15:07:49 +02:00
Ondřej Surý
173ecd41a2 Swap unit and system stages
(cherry picked from commit 3f2de6d39c)
2019-08-29 15:04:06 +02:00
Ondřej Surý
6464b2e962 Further improve the CI by starting the build and docs right after autoreconf
(cherry picked from commit fc834aa4bc)
2019-08-29 15:03:49 +02:00
Ondřej Surý
76e8f7783d Split the system and unit tests into separate stages
(cherry picked from commit 008b73fb41)
2019-08-29 15:02:41 +02:00
Ondřej Surý
1d04597702 Make use of DAG for GitLab Pipelines
GitLab 12.2 has introduced Directed Acyclic Graphs in the GitLab CI[1] that
allow jobs to run out-of-order and not wait for the whole previous stage to
complete.

1. https://docs.gitlab.com/ee/ci/directed_acyclic_graph/

(cherry picked from commit 04ce124279)
2019-08-29 15:02:39 +02:00
Mark Andrews
a12ad253f1 Merge branch '1199-return-value-from-open-not-checked-v9_14' into 'v9_14'
Resolve "Return value from open() not checked."

See merge request isc-projects/bind9!2274
2019-08-28 20:50:36 -04:00
Mark Andrews
768fb45660 check that open() succeeded
(cherry picked from commit 510306c654)
2019-08-29 10:26:00 +10:00
Mark Andrews
f54f73d063 Merge branch '1201-add-llq-option-v9_14' into 'v9_14'
Resolve "Add LLQ option"

See merge request isc-projects/bind9!2271
2019-08-28 03:36:48 -04:00
Mark Andrews
b25262b1df Add support for displaying EDNS option LLQ.
(cherry picked from commit d98f446d3f)
2019-08-28 17:22:11 +10:00
Mark Andrews
aefde2f527 Merge branch '1187-ddns-rejected-if-zone-contains-cds-cdnskey-v9_14' into 'v9_14'
Resolve "DDNS rejected if zone contains CDS/CDNSKEY"

See merge request isc-projects/bind9!2269
2019-08-28 02:40:33 -04:00
Mark Andrews
8959c97667 add CHANGES
(cherry picked from commit ba26c6eb48)
2019-08-28 16:15:29 +10:00
Mark Andrews
f109c56f4e add good and bad CDS / CDNSKEY test zones
(cherry picked from commit 30610eb9a5)
2019-08-28 16:14:46 +10:00
Mark Andrews
491b2ebcf2 fix dnssec system tests that fail now that we call dns_zone_cdscheck
(cherry picked from commit 3705605e0b)
2019-08-28 16:14:45 +10:00
Mark Andrews
545e7cca9d add dns_zone_cdscheck to integrity checks
(cherry picked from commit cd40c9fe61)
2019-08-28 16:14:45 +10:00
Mark Andrews
45402340b6 implement getoriginnode for sdb
(cherry picked from commit 2ebc4776ca)
2019-08-28 16:14:45 +10:00
Evan Hunt
8b4ce7f900 Merge branch 'each-tidy-glue-test-v9_14' into 'v9_14'
remove unneeded files and options from glue test

See merge request isc-projects/bind9!2268
2019-08-27 21:53:22 -04:00
Evan Hunt
b361e7523e remove unneeded files and options from glue test
- the cache-file and check-itegrity options were not needed
- some zones and files were not used

(cherry picked from commit 7b65ea4c11)
2019-08-27 18:26:47 -07:00
Tinderbox User
6cd21bd26e Merge branch 'prep-release' into v9_14 2019-08-21 21:35:31 +00:00
Tinderbox User
cbc0f07a70 prep 9.14.5 2019-08-21 21:35:31 +00:00
Tinderbox User
7f67efcc14 prep 9.14.5 2019-08-21 21:35:30 +00:00
Evan Hunt
18e8b0cd7f Merge branch '1031-multiple-rate-limit-clauses-are-unsupported-v9_14' into 'v9_14'
Resolve "Multiple rate-limit clauses are unsupported"

See merge request isc-projects/bind9!2263
2019-08-21 11:05:00 -04:00
Mark Andrews
f155d1e020 remove reference to rate-limit { domain ...; }
(cherry picked from commit 2275630bc9)
2019-08-21 08:42:01 -06:00
Matthijs Mekking
04e7d2294f Merge branch 'fix-changes-file-dlv-entry-v9_14' into 'v9_14'
Fix CHANGES

See merge request isc-projects/bind9!2260
2019-08-12 06:46:44 -04:00
Matthijs Mekking
6809a5b594 Fix CHANGES
Commit 5d8eba4be0 accidentally
cherry-picked change number 5276 about obsoleting DLV.
2019-08-12 12:23:28 +02:00
Matthijs Mekking
5170a79d09 Merge branch '1074-matthijs-underflow-cachedb-statistics-v9_14' into 'v9_14'
Resolve "underflow in stats channel stale cached RRSIG gauge [ISC-support #14769]"

See merge request isc-projects/bind9!2259
2019-08-12 05:10:57 -04:00
Matthijs Mekking
ea0543a74f Simplify do_stats logic in rbtdb.c
(cherry picked from commit 4c0b0fa6a5)
2019-08-12 10:44:48 +02:00
Evan Hunt
db381b7205 improve ARM text about cache DB statistics
(cherry picked from commit 2ceb4b6a98)
2019-08-12 10:44:25 +02:00
Matthijs Mekking
3e3fd9bb2e Add serve-stale test for ancient RRsets counters
(cherry picked from commit 98b460e604)
2019-08-12 10:44:07 +02:00
Matthijs Mekking
3df7a1961f Move dnssec_keyid_max out rrsettype counters enum
(cherry picked from commit 1cd3516d54)
2019-08-12 10:43:44 +02:00
Matthijs Mekking
5d8eba4be0 Update CHANGES, notes
(cherry picked from commit 6e48abc503)
2019-08-12 10:43:22 +02:00
Matthijs Mekking
a8b29e051e Make rbtdb maintain stale counters
When updating the statistics for RRset types, if a header is marked
stale or ancient, the appropriate statistic counters are decremented,
then incremented.

Also fix some out of date comments.

(cherry picked from commit a3af2c57e7)
2019-08-12 10:42:23 +02:00
Matthijs Mekking
51a3ba45e1 No longer have stale tracking in stats module
Having the decrement/increment logic in stats makes the code hard
to follow. Remove it here and adjust the unit test. The caller
will be responsible for maintaining the correct increments and
decrements for statistics counters (in the following commit).

(cherry picked from commit 48332d4478)
2019-08-12 10:42:12 +02:00
Matthijs Mekking
ca4c9f3b06 Print out ancient type stats with '~' prefix.
The stale RR types are now printed with '#'.  This used to be the
prefix for RR types that were marked ancient, but commit
df50751585 changed the meaning.  It is
probably better to keep '#' for stale RR types and introduce a new
prefix for reintroducing ancient type stat counters.

(cherry picked from commit c9d56a8185)
2019-08-12 10:41:19 +02:00
Michał Kępień
3292b22957 Merge branch '1110-clarify-relationship-between-acls-and-rpz-v9_14' into 'v9_14'
[v9_14] Clarify relationship between ACLs and RPZ

See merge request isc-projects/bind9!2257
2019-08-12 03:50:21 -04:00
Michał Kępień
5d36461feb Clarify relationship between ACLs and RPZ
In the ARM section about RPZ, add text explicitly stating that ACLs take
precedence over RPZ to prevent users from expecting RPZ actions to be
applied to queries coming from clients which are not permitted access to
the resolver by ACLs.

(cherry picked from commit 33bddbb5d1)
2019-08-12 09:48:05 +02:00
Michał Kępień
822e20a721 Merge branch 'michal/implement-a-convenience-function-for-rndc-dumpdb-v9_14' into 'v9_14'
[v9_14] Implement a convenience function for "rndc dumpdb"

See merge request isc-projects/bind9!2249
2019-08-08 09:31:41 -04:00
Michał Kępień
e68255814e Use rndc_dumpdb() in the "sfcache" system test
(cherry picked from commit 4a8b3a8ac0)
2019-08-08 15:12:01 +02:00
Michał Kępień
f520e571b4 Use rndc_dumpdb() in the "serve-stale" system test
(cherry picked from commit 52beeed444)
2019-08-08 15:12:01 +02:00
Michał Kępień
25bd10710a Use rndc_dumpdb() in the "rndc" system test
(cherry picked from commit 443449863b)
2019-08-08 15:12:01 +02:00
Michał Kępień
50f6c92ae6 Use rndc_dumpdb() in the "dnssec" system test
(cherry picked from commit 44c0cc881f)
2019-08-08 15:12:01 +02:00
Michał Kępień
c356748700 Use rndc_dumpdb() in the "cookie" system test
(cherry picked from commit cbf32b901b)
2019-08-08 15:12:01 +02:00
Michał Kępień
66cfb7a34e Use rndc_dumpdb() in the "cacheclean" system test
(cherry picked from commit 22d5355782)
2019-08-08 15:12:01 +02:00
Michał Kępień
841be8d06d Implement a convenience function for "rndc dumpdb"
Add a helper shell function, rndc_dumpdb(), which provides a convenient
way to call "rndc dumpdb" for a given server with optional additional
arguments.  Since database dumping is an asynchronous process, the
function waits until the dump is complete before returning, which
prevents false positives in system tests caused by inspecting the dump
before its preparation is finished.  The function also renames the dump
file before returning so that it does not get overwritten by subsequent
calls; this retains forensic data in case of an unexpected test failure.

(cherry picked from commit ab78e350dd)
2019-08-08 15:12:01 +02:00
Ondřej Surý
d0b9ca1a2e Merge branch '1182-add-older-autoconf-pkg-config-compat-macros-v9_14' into 'v9_14'
Add PKG_CHECK_VAR and AS_VAR_COPY compat macros (Courtesy of ycflash)

See merge request isc-projects/bind9!2247
2019-08-08 09:06:37 -04:00
Ondřej Surý
f9154f3c88 Add PKG_CHECK_VAR and AS_VAR_COPY compat macros (Courtesy of ycflash)
(cherry picked from commit d80b6ec879)
2019-08-08 14:47:56 +02:00
Ondřej Surý
4809483086 Merge branch 'sparc-pause-v9_14' into 'v9_14'
configure.ac: autodetect 'pause' instruction presence on sparc

See merge request isc-projects/bind9!2245
2019-08-08 08:22:46 -04:00
Sergei Trofimovich
e39b03d06d configure.ac: autodetect 'pause' instruction presence on sparc
The change fixes the following build failure on sparc T3 and older CPUs:

```
sparc-unknown-linux-gnu-gcc ... -O2 -mcpu=niagara2 ... -c rwlock.c
{standard input}: Assembler messages:
{standard input}:398: Error: Architecture mismatch on "pause ".
{standard input}:398: (Requires v9e|v9v|v9m|m8; requested architecture is v9b.)
make[1]: *** [Makefile:280: rwlock.o] Error 1
```

`pause` insutruction exists only on `-mcpu=niagara4` (`T4`) and upper.

The change adds `pause` configure-time autodetection and uses it if available.
config.h.in got new `HAVE_SPARC_PAUSE` knob. Fallback is a fall-through no-op.

Build-tested on:

- sparc-unknown-linux-gnu-gcc (no `pause`, build succeeds)
- sparc-unknown-linux-gnu-gcc -mcpu=niagara4 (`pause`, build succeeds)

Reported-by: Rolf Eike Beer
Bug: https://bugs.gentoo.org/691708
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
(cherry picked from commit a5ad6b16c5)
2019-08-08 14:03:29 +02:00
Evan Hunt
e7b8c9b451 Merge branch 'each-mdig-multi-norrcomments-v9_14' into 'v9_14'
minor bugfix in mdig: when using +multi, +norrcomments was ignored

See merge request isc-projects/bind9!2240
2019-08-08 00:15:26 -04:00
Evan Hunt
81312bcf82 added "mdig +multi +norrcomment" test; also fixed the flawed dig test
(cherry picked from commit 93ad3eea90)
2019-08-07 20:52:20 -07:00
Evan Hunt
c2a128587c minor bugfix in mdig: when using +multi, +norrcomments was ignored
(cherry picked from commit edab51b420)
2019-08-07 20:52:20 -07:00
Ondřej Surý
13f4c3b54d Merge branch '1148-deadlock-hangs-named-v9_11-v9_14' into 'v9_14'
Resolve "deadlock hangs named"

See merge request isc-projects/bind9!2235
2019-08-07 06:34:25 -04:00
Ondřej Surý
ebc48cda26 Have the dns_client hold a .references until all external references are removed
so that cleanup can all be done in dns_client_destroy().

(cherry picked from commit e80c4c3431)
2019-08-07 12:15:32 +02:00
Mark Andrews
e394632703 Have the view hold a weakref until all external references are removed
so that cleanup can all be done in dns_view_weakattach().

(cherry picked from commit be8af3afb7)
2019-08-07 12:15:32 +02:00
Ondřej Surý
232140edae lib/dns/resolver.c: Convert (dns_view_t *)->weakrefs to isc_refcount_t
There's a deadlock in BIND 9 code where (dns_view_t){ .lock } and
(dns_resolver_t){ .buckets[i].lock } gets locked in different order.  When
view->weakrefs gets converted to a reference counting we can reduce the locking
in dns_view_weakdetach only to cases where it's the last instance of the
dns_view_t object.

(cherry picked from commit a7c9a52c89)
2019-08-07 12:00:50 +02:00
Evan Hunt
94ba942eab Merge branch '1170-dig-comments-v9_14' into 'v9_14'
Resolve "dig +nocomment still comments"

See merge request isc-projects/bind9!2231
2019-08-06 01:10:43 -04:00
Evan Hunt
e6b8944f9e clarify descriptions of comment-related options in dig usage and man page
(cherry picked from commit 9679c8c20a)
2019-08-05 21:57:09 -07:00
Evan Hunt
4caffaaad2 always check 'printcmd' before printing cmdline message
(cherry picked from commit 6d50f7d924)
2019-08-05 21:57:09 -07:00
Mark Andrews
cb0140bdda Merge branch '964-use-referral-ds-record-when-validating-v9_14' into 'v9_14'
Resolve "Use referral DS record when validating"

See merge request isc-projects/bind9!2228
2019-08-02 02:40:13 -04:00
Mark Andrews
1d925c4068 add CHANGES
(cherry picked from commit ac28cc14e1)
2019-08-02 15:38:00 +10:00
Mark Andrews
c9e6813899 check that example/DS is not fetched when validating a.example
(cherry picked from commit 4293a2f4bf)
2019-08-02 15:34:22 +10:00
Mark Andrews
2e85ede202 Store the DS and RRSIG(DS) with trust dns_trust_pending_answer
so that the validator can validate the records as part of validating
the current request.

(cherry picked from commit 57a328d67e)
2019-08-02 15:34:22 +10:00
Mark Andrews
df6574aa2c Merge branch '1175-a-race-in-ht-c-can-cause-require-failures-v9_14' into 'v9_14'
Resolve "a race in ht.c can cause REQUIRE failures"

See merge request isc-projects/bind9!2226
2019-08-01 02:43:19 -04:00
Mark Andrews
d1e36a5adf add CHANGES
(cherry picked from commit 49c31702bd)
2019-08-01 16:07:00 +10:00
Mark Andrews
f2ab4eb376 remove invalid comment
(cherry picked from commit 9cfd0ecccf)
2019-08-01 16:07:00 +10:00
Mark Andrews
a15e89c3d6 keep rpzs around until everything referencing it has gone
(cherry picked from commit 9b10cfef56)
2019-08-01 16:06:59 +10:00
Mark Andrews
d4551764fd maintain a reference to 'rpz' when calling rpz.c:update_quantum
(cherry picked from commit 53800281fe)
2019-08-01 16:06:59 +10:00
Mark Andrews
f3b4b3601b Merge branch '1159-bits-65-72-of-the-dns64-prefix-are-supposed-to-be-zero-v9_14' into 'v9_14'
Resolve "Bits 64..71 of the dns64 prefix are supposed to be zero"

See merge request isc-projects/bind9!2220
2019-07-31 08:56:28 -04:00
Mark Andrews
06f390e478 add CHANGES
(cherry picked from commit d95ae93dd3)
2019-07-31 22:35:14 +10:00
Mark Andrews
f0fa5ce397 check that bits 64..71 in a dns64 prefix are zero
(cherry picked from commit a7ec7eb6ed)
2019-07-31 22:35:14 +10:00
Michał Kępień
31998f2bf2 Merge branch 'michal/wildcard-system-test-make-root-hints-consistent-with-authoritative-data-v9_14' into 'v9_14'
[v9_14] "wildcard" system test: make root hints consistent with authoritative data

See merge request isc-projects/bind9!2217
2019-07-31 05:43:18 -04:00
Michał Kępień
558ee243a6 Make root hints consistent with authoritative data
Multiple resolvers in the "wildcard" system test are configured with a
single root hint: "ns.root-servers.nil", pointing to 10.53.0.1, which is
inconsistent with authoritative data served by ns1.  This may cause
intermittent resolution failures, triggering false positives for the
"wildcard" system test.  Prevent this from happening by making ns2, ns3,
and ns5 use root hints corresponding to the contents of ns1/root.db.in.

(cherry picked from commit dd430c3093)
2019-07-31 11:07:22 +02:00
Michał Kępień
72915c9d40 Merge branch 'michal/staticstub-system-test-make-root-hints-consistent-with-authoritative-data-v9_14' into 'v9_14'
[v9_14] "staticstub" system test: make root hints consistent with authoritative data

See merge request isc-projects/bind9!2215
2019-07-31 03:42:42 -04:00
Michał Kępień
df4d771ed8 Make root hints consistent with authoritative data
The ns2 named instance in the "staticstub" system test is configured
with a single root hint commonly used in BIND system tests
(a.root-servers.nil with an address of 10.53.0.1), which is inconsistent
with authoritative data served by ns1.  This may cause intermittent
resolution failures, triggering false positives for the "staticstub"
system test.  Prevent this from happening by making ns1 serve data
corresponding to the contents of bin/tests/system/common/root.hint.

(cherry picked from commit 4b5e1da0e3)
2019-07-31 09:18:16 +02:00
Michał Kępień
0cebbd2742 Merge branch 'michal/update-gitlab-ci-to-fedora-30-v9_14' into 'v9_14'
[v9_14] Update GitLab CI to Fedora 30

See merge request isc-projects/bind9!2213
2019-07-31 03:14:26 -04:00
Michał Kępień
947d40692b Update GitLab CI to Fedora 30
Since Fedora 30 is the current Fedora release, replace Fedora 29 GitLab
CI jobs with their up-to-date counterparts.

(cherry picked from commit fac23cf939)
2019-07-31 08:47:36 +02:00
Mark Andrews
3c11f3ea0c Merge branch '1133-your-problem-or-cygwin-s-v9_14' into 'v9_14'
Resolve "Your problem or Cygwin's ?????"

See merge request isc-projects/bind9!2211
2019-07-30 21:26:45 -04:00
Mark Andrews
2b5237c325 add CHANGES
(cherry picked from commit 12d9681442)
2019-07-31 11:03:26 +10:00
Mark Andrews
f6d6fb8124 handle connect() returning ETIMEDOUT on a non-blocking socket
(cherry picked from commit 91a0cb5da3)
2019-07-31 11:02:30 +10:00
Michał Kępień
ef63765c73 Merge branch '1171-alpine-linux-tweaks-v9_14' into 'v9_14'
[v9_14] Alpine Linux tweaks

See merge request isc-projects/bind9!2209
2019-07-30 16:49:16 -04:00
Michał Kępień
6cf79bc963 Add Alpine Linux to GitLab CI
Ensure BIND is continuously tested on Alpine Linux as it is commonly
used as a base for Docker containers and employs a less popular libc
implementation, musl libc.

(cherry picked from commit 326a334b49)
2019-07-30 21:25:47 +02:00
Michał Kępień
8d0cdb54ee Do not use legacy time zone names
"PST8PDT" is a legacy time zone name whose use in modern code is
discouraged.  It so happens that using this time zone with musl libc
time functions results in different output than for other libc
implementations, which breaks the lib/isc/tests/time_test unit test.
Use the "America/Los_Angeles" time zone instead in order to get
consistent output across all tested libc implementations.

(cherry picked from commit f4daf6e0e7)
2019-07-30 21:25:47 +02:00
Michał Kępień
5159597db5 Fix awk invocation in the "verify" system test
Appending output of a command to the same file as the one that command
is reading from is a dangerous practice.  It seems to have accidentally
worked with all the awk implementations we have tested against so far,
but for BusyBox awk, doing this may result in the input/output file
being written to in an infinite loop.  Prevent this from happening by
redirect awk output to a temporary file and appending its contents to
the original file in a separate shell pipeline.

(cherry picked from commit bb9c1654e2)
2019-07-30 21:25:47 +02:00
Michał Kępień
61981b3688 Extend prerequisites for the "xfer" system test
The Net::DNS Perl module needs the Digest::HMAC module to support TSIG.
However, since the latter is not a hard requirement for the former, some
packagers do not make Net::DNS depend on Digest::HMAC.  If Net::DNS is
installed on a host but Digest::HMAC is not, the "xfer" system test
breaks in a very hard-to-debug way (ans5 returns TSIG RRs with empty
RDATA, which prevents TSIG-signed SOA queries and transfers from
working).  Prevent this from happening by making the "xfer" system test
explicitly require Digest::HMAC apart from Net::DNS.

(cherry picked from commit b10d28d1e0)
2019-07-30 21:25:47 +02:00
Michał Kępień
fe7dec851b Make "digdelv" system test work with BusyBox sed
The BusyBox version of sed treats leading '\+' in a regular expression
to be matched as a syntax error ("Repetition not preceded by valid
expression"), which triggers false positives for the "digdelv" system
test.  Make the relevant sed invocations work portably across all sed
implementations by removing the leading backslash.

(cherry picked from commit 266e3ed52a)
2019-07-30 21:25:47 +02:00
Michał Kępień
fdd926d7cb Make "autosign" system test work with BusyBox awk
The BusyBox version of awk treats some variables which other awk
implementations consider to be decimal values as octal values.  This
intermittently breaks key event interval calculations in the "autosign"
system test, trigger false positives for it.  Prevent the problem from
happening by stripping leading zeros from the affected awk variables.

(cherry picked from commit ad008f7dbf)
2019-07-30 21:25:46 +02:00
Michał Kępień
149ffc529d Tweak buffer sizes to prevent compilation warnings
For some libc implementations, BUFSIZ is small enough (e.g. 1024 for
musl libc) to trigger compilation warnings about insufficient size of
certain buffers.  Since the relevant buffers are used for printing DNS
names, increase their size to '(n + 1) * DNS_NAME_FORMATSIZE', where 'n'
is the number of DNS names which are printed to a given buffer.  This
results in somewhat arbitrary, albeit nicely-aligned and large enough
buffer sizes.

(cherry picked from commit 3384455659)
2019-07-30 21:25:46 +02:00
Michał Kępień
3f341b996d Always include <errno.h> instead of <sys/errno.h>
Including <sys/errno.h> instead of <errno.h> raises a compiler warning
when building against musl libc.  Always include <errno.h> instead of
<sys/errno.h> to prevent that compilation warning from being triggered
and to achieve consistency in this regard across the entire source tree.

(cherry picked from commit b5cd146033)
2019-07-30 21:25:46 +02:00
Michał Kępień
80669d8c89 Unify header ordering in unit tests
Make sure all unit tests include headers in a similar order:

 1. Three headers which must be included before <cmocka.h>.
 2. System headers.
 3. UNIT_TESTING definition, followed by the <cmocka.h> header.
 4. libisc headers.
 5. Headers from other BIND libraries.
 6. Local headers.

Also make sure header file names are sorted alphabetically within each
block of #include directives.

(cherry picked from commit 5381ac0fcc)
2019-07-30 21:25:45 +02:00
Michał Kępień
77dc5be6b4 Include <sched.h> where necessary for musl libc
All unit tests define the UNIT_TESTING macro, which causes <cmocka.h> to
replace malloc(), calloc(), realloc(), and free() with its own functions
tracking memory allocations.  In order for this not to break
compilation, the system header declaring the prototypes for these
standard functions must be included before <cmocka.h>.

Normally, these prototypes are only present in <stdlib.h>, so we make
sure it is included before <cmocka.h>.  However, musl libc also defines
the prototypes for calloc() and free() in <sched.h>, which is included
by <pthread.h>, which is included e.g. by <isc/mutex.h>.  Thus, unit
tests including "dnstest.h" (which includes <isc/mem.h>, which includes
<isc/mutex.h>) after <cmocka.h> will not compile with musl libc as for
these programs, <sched.h> will be included after <cmocka.h>.

Always including <cmocka.h> after all other header files is not a
feasible solution as that causes the mock assertion macros defined in
<isc/util.h> to mangle the contents of <cmocka.h>, thus breaking
compilation.  We cannot really use the __noreturn__ or analyzer_noreturn
attributes with cmocka assertion functions because they do return if the
tested condition is true.  The problem is that what BIND unit tests do
is incompatible with Clang Static Analyzer's assumptions: since we use
cmocka, our custom assertion handlers are present in a shared library
(i.e. it is the cmocka library that checks the assertion condition, not
a macro in unit test code).  Redefining cmocka's assertion macros in
<isc/util.h> is an ugly hack to overcome that problem - unfortunately,
this is the only way we can think of to make Clang Static Analyzer
properly process unit test code.  Giving up on Clang Static Analyzer
being able to properly process unit test code is not a satisfactory
solution.

Undefining _GNU_SOURCE for unit test code could work around the problem
(musl libc's <sched.h> only defines the prototypes for calloc() and
free() when _GNU_SOURCE is defined), but doing that could introduce
discrepancies for unit tests including entire *.c files, so it is also
not a good solution.

All in all, including <sched.h> before <cmocka.h> for all affected unit
tests seems to be the most benign way of working around this musl libc
quirk.  While quite an ugly solution, it achieves our goals here, which
are to keep the benefit of proper static analysis of unit test code and
to fix compilation against musl libc.

(cherry picked from commit 59528d0e9d)
2019-07-30 21:25:30 +02:00
Michał Kępień
747dbdcb84 Merge branch 'michal/filter-aaaa-system-test-make-root-hints-consistent-with-authoritative-data-v9_14' into 'v9_14'
[v9_14] "filter-aaaa" system test: make root hints consistent with authoritative data

See merge request isc-projects/bind9!2205
2019-07-29 16:10:45 -04:00
Michał Kępień
7bcb5a3178 Make root hints consistent with authoritative data
Resolvers in the "filter-aaaa" system test are configured with a single
root hint: "ns.rootservers.net", pointing to 10.53.0.1.  However,
querying ns1 for "ns.rootservers.net" results in NXDOMAIN answers.
Since the TTL for the root hint is set to 0, it may happen that a
resolver's ADB will be asked to return any known addresses for
"ns.rootservers.net", but it will only have access to a cached NXDOMAIN
answer for that name and an expired root hint, which will result in a
resolution failure, triggering a false positive for the "filter-aaaa"
system test.  Prevent this from happening by making all the root hints
consistent with authoritative data served by ns1.

(cherry picked from commit c19ebde14b)
2019-07-29 21:44:51 +02:00
Evan Hunt
cd288f14e2 Merge branch '1163-geoip-subtype-fix' into 'v9_14'
fix a bug that could cause an assert when configuring "geoip continent"

See merge request isc-projects/bind9!2200
2019-07-25 22:22:56 -04:00
Evan Hunt
c3a996d547 CHANGES 2019-07-25 22:06:19 -04:00
Evan Hunt
8f1cdaeed9 add a system test, confirming that named fails to reload without crashing 2019-07-25 16:53:01 -04:00
Evan Hunt
326349228a fix a bug that could cause an assert when configuring "geoip continent"
- incidentally fixed some typos in log messages
2019-07-25 15:55:00 -04:00
Ondřej Surý
fd5fc5b46a Merge branch 'ondrej/fix-LD_WRAP-Makefile-v9_14' into 'v9_14'
Fix the lib/dns/tests/Makefile.in to work without LD_WRAP

See merge request isc-projects/bind9!2189
2019-07-23 09:06:49 -04:00
Ondřej Surý
16610d5477 Fix the lib/dns/tests/Makefile.in to work without LD_WRAP
(cherry picked from commit b558346437)
2019-07-23 09:06:12 -04:00
Mark Andrews
b572a5a210 Merge branch '1136-named-checkconf-should-report-missing-dnstap-output-option-when-dnstap-option-is-set-v9_14' into 'v9_14'
Resolve "named-checkconf should report missing dnstap-output option when dnstap option is set"

See merge request isc-projects/bind9!2185
2019-07-23 07:22:13 -04:00
Mark Andrews
2524d76133 named-checkconf failed to report dnstap-output missing
from named.conf when dnstap was specified

(cherry picked from commit a4f38bec6a)
2019-07-23 21:09:34 +10:00
Ondřej Surý
2a2d512ca3 Merge branch 'u/fanf2/arm-rrset-order-random-v9_14' into 'v9_14'
doc/arm: correct default for rrset-order

See merge request isc-projects/bind9!2183
2019-07-22 18:26:56 -04:00
Tony Finch
448ec6acad doc/arm: correct default for rrset-order
(cherry picked from commit bded8af7b8)
2019-07-22 18:25:37 -04:00
Ondřej Surý
1298a2aa40 Merge branch '195-add-dnstap-builds-to-ci-v9_14' into 'v9_14'
Add dnstap builds to CI

See merge request isc-projects/bind9!2181
2019-07-22 18:09:23 -04:00
Michał Kępień
e1006e0a25 Add dnstap builds to CI
Ensure BIND with dnstap support enabled is being continuously tested by
adding --enable-dnstap to the ./configure invocation used for CentOS 7
and Debian sid builds in GitLab CI.

(cherry picked from commit 2bf44c6cd4)
2019-07-22 17:53:27 -04:00
Ondřej Surý
f6bc62e663 Merge branch 'each-fix-ld-wrap-test-v9_14' into 'v9_14'
Fix LD_WRAP test [v9_14]

See merge request isc-projects/bind9!2180
2019-07-22 17:33:56 -04:00
Evan Hunt
b8e6b68d88 Make the symbol wrapping work with dynamic linking
When the unit test is linked with dynamic libraries, the wrapping
doesn't occur, probably because it's different translation unit.

To workaround the issue, we provide thin wrappers with *real* symbol
names that just call the mocked functions.

(cherry picked from commit 839ed7894b)
2019-07-22 17:20:19 -04:00
Ondřej Surý
6ba4b02d67 Fix the configure.ac and Makefile.in to correctly test for --wrap
(cherry picked from commit 135519e59a)
2019-07-22 17:19:51 -04:00
Mark Andrews
97f1bff3cc Merge branch '1106-interaction-between-dns64-and-rpz-can-cause-unexpected-results-v9_14' into 'v9_14'
Resolve "Interaction between dns64 and RPZ can cause unexpected results"

See merge request isc-projects/bind9!2179
2019-07-22 15:31:10 -04:00
Mark Andrews
22471cc532 add CHANGES
(cherry picked from commit b9a1c31df1)
2019-07-23 05:11:47 +10:00
Mark Andrews
4e63bacc04 Do not attempt to perform a DNS64 rewrite if RPZ returns NODATA.
(cherry picked from commit 1eb640049c)
2019-07-23 05:10:41 +10:00
Mark Andrews
984f2cea47 Check that RPZ 'CNAME *.' (NODATA) works with DNS64.
(cherry picked from commit b9dc9b68cd)
2019-07-23 05:10:41 +10:00
Ondřej Surý
712d991b2a Merge branch 'michal/add-debian-buster-to-ci-v9_14' into 'v9_14'
Add Debian buster to CI

See merge request isc-projects/bind9!2176
2019-07-22 11:52:20 -04:00
Michał Kępień
d8a613b78d Add Debian buster to CI
Ensure BIND is continuously tested on Debian 10 (buster) as it is the
current stable Debian release.

(cherry picked from commit 5f71d9c6ac)
2019-07-22 11:26:31 -04:00
Ondřej Surý
1b85e20f03 Merge branch 'ondrej-disable-freebsd-again-v9_14' into 'v9_14'
Disable FreeBSD Runner in the CI; it's broken again.

See merge request isc-projects/bind9!2174
2019-07-22 08:08:09 -04:00
Ondřej Surý
b2401f0caa Disable FreeBSD Runner in the CI; it's broken again.
(cherry picked from commit 747736d361)
2019-07-22 08:07:12 -04:00
Ondřej Surý
01b76c373e Merge branch '605-add-siphash24-v9_14' into 'v9_14'
Resolve "Add SipHash24 and synchronize the Cookie algorithm with other vendors"

See merge request isc-projects/bind9!2170
2019-07-21 17:58:38 -04:00
Ondřej Surý
be0cd728c5 Add CHANGES note 2019-07-21 17:30:53 -04:00
Ondřej Surý
7d8e7b0194 Add release notes 2019-07-21 17:30:53 -04:00
Ondřej Surý
196b342bc9 Add new default siphash24 cookie algorithm
This commit changes the BIND cookie algorithms to match
draft-sury-toorop-dnsop-server-cookies-00.  Namely, it changes the Client Cookie
algorithm to use SipHash 2-4, adds the new Server Cookie algorithm using SipHash
2-4.  The change doesn't make the SipHash 2-4 to be the default algorithm, this
is up to the operator.
2019-07-21 17:30:53 -04:00
Michał Kępień
496397eb3f Make ifconfig.sh work on DragonFly BSD
On DragonFly BSD, use the same commands for configuring network
interfaces used during system tests as on NetBSD and OpenBSD.
2019-07-21 15:37:22 -04:00
Ondřej Surý
84ff6a6963 Revise the Windows section of <isc/endian.h>
Add a comment and remove redundant definitions.
2019-07-21 15:37:22 -04:00
Ondřej Surý
c727a31eab Revise the macOS section of <isc/endian.h>
Move the macOS section of <isc/endian.h> to a lower spot as it is
believed not to be the most popular platform for running BIND.  Add a
comment and remove redundant definitions.
2019-07-21 15:37:22 -04:00
Ondřej Surý
a98c7408fc Make <isc/endian.h> detect GNU rather than Linux
Instead of only supporting Linux, try making <isc/endian.h> support
other GNU platforms as well.  Since some compilers define __GNUC__ on
BSDs (e.g. Clang on FreeBSD), move the relevant section to the bottom of
the platform-specific part of <isc/endian.h>, so that it only gets
evaluated when more specific platform determination criteria are not
met.  Also include <byteswap.h> so that any byte-swapping macros which
may be defined in that file on older platforms are used in the fallback
definitions of the nonstandard hto[bl]e{16,32,64}() and
[bl]e{16,32,64}toh() conversion functions.
2019-07-21 15:37:22 -04:00
Ondřej Surý
5b0f81e549 Add Solaris support for <isc/endian.h>
While Solaris does not support the nonstandard hto[bl]e{16,32,64}() and
[bl]e{16,32,64}toh() conversion functions, it does have some
byte-swapping macros available in <sys/byteorder.h>.  Ensure these
macros are used in the fallback definitions of the aforementioned
nonstandard functions.
2019-07-21 15:37:22 -04:00
Ondřej Surý
973d2991a0 Add fallback definitions to <isc/endian.h>
Since the hto[bl]e{16,32,64}() and [bl]e{16,32,64}toh() conversion
functions are nonstandard, add fallback definitions of these functions
to <isc/endian.h>, so that their unavailability does not prevent
compilation from succeeding.
2019-07-21 15:37:22 -04:00
Michał Kępień
588c14d5c9 Fix <isc/endian.h> on BSD systems
Current versions of DragonFly BSD, FreeBSD, NetBSD, and OpenBSD all
support the modern variants of functions converting values between host
and big-endian/little-endian byte order while older ones might not.
Ensure <isc/endian.h> works properly in both cases.
2019-07-21 15:37:21 -04:00
Ondřej Surý
283101fc89 Add CHANGES entry:
5236.   [func]          Add SipHash 2-4 implementation in lib/isc/siphash.c
                        and switch isc_hash_function() to use SipHash 2-4.
                        [GL #605]

(cherry picked from commit dc9543abb3)
2019-07-21 15:33:53 -04:00
Ondřej Surý
3f826a923f Remove isc_hash_reverse function
(cherry picked from commit d5055665ca)
2019-07-21 15:32:57 -04:00
Ondřej Surý
4e04e3d861 Convert isc_hash functions to use isc_siphash24
(cherry picked from commit 2e7d82443f)
2019-07-21 15:32:57 -04:00
Ondřej Surý
2188a58171 Add tests for the isc_siphash24 function
(cherry picked from commit 2cbf633192)
2019-07-21 15:32:57 -04:00
Ondřej Surý
8d87ad53eb Add reference SipHash 2-4 implementation
(cherry picked from commit a197df137a)
2019-07-21 15:32:56 -04:00
Ondřej Surý
0b050ad4fd Add portable <isc/endian.h> header
(cherry picked from commit 0efc36c19a)
2019-07-21 15:32:56 -04:00
Evan Hunt
3e16bf6ecb Merge branch 'ondrej/fix-leaked-memory-in-geoip_test.c-v9_14' into 'v9_14'
Fix leaked memory in geoip_test.c

See merge request isc-projects/bind9!2157
2019-07-16 19:07:53 -04:00
Ondřej Surý
aad88d2c00 Fix the memory leaks in GeoIP unit test
Each individual test opened GeoIP databases but the database handles were never
closed.  This commit moves the open/close from the individual unit tests into
the _setup and _teardown methods where they really belong.

(cherry picked from commit d1c7b79183)
2019-07-16 15:39:56 -07:00
Witold Krecicki
b8c84a7900 Merge branch 'wpk-fix-compilation-error-statschannel-v9_14' into 'v9_14'
statschannel.c: declare dnssecsignstat_dump only if it's used (LIBXML2 or LIBJSON is available)

See merge request isc-projects/bind9!2144
2019-07-09 14:15:48 -04:00
Witold Kręcicki
4748d7e6d4 statschannel.c: declare dnssecsignstat_dump only if it's used (LIBXML2 or LIBJSON is available) 2019-07-09 19:38:35 +02:00
Tinderbox User
a1f27b4012 Merge branch 'prep-release' into v9_14 2019-07-09 13:55:40 +00:00
Tinderbox User
1f83aca5e8 prep 9.14.4 2019-07-09 13:51:41 +00:00
Ondřej Surý
5dfd116057 Merge branch 'ondrej/missing-ax_restore_flags-geoip2-v9_14' into 'v9_14'
Add missing AX_RESTORE_FLAGS([geoip2]) to configure.ac

See merge request isc-projects/bind9!2142
2019-07-09 08:50:00 -04:00
Ondřej Surý
124595ea7f Add missing AX_RESTORE_FLAGS([geoip2]) to configure.ac
(cherry picked from commit 5c0cc1ee8b)
2019-07-09 14:22:15 +02:00
Evan Hunt
430365772b Merge branch '1131-geoip2-windows-914' into 'v9_14'
add support for building GeoIP2 on windows

See merge request isc-projects/bind9!2134
2019-07-04 17:42:26 -04:00
Evan Hunt
b5032f7a8b add support for building GeoIP2 on windows 2019-07-04 12:05:32 -07:00
Ondřej Surý
387b205a65 Merge branch 'ondrej/kyua.result-location-v9_14' into 'v9_14'
Ondrej/kyua.result location v9 14

See merge request isc-projects/bind9!2129
2019-07-03 14:07:38 -04:00
Ondřej Surý
9ffec881f2 Set number of parallel jobs in .gitlab-ci.yml
(cherry picked from commit f56b88f72e)
2019-07-03 19:24:23 +02:00
Ondřej Surý
e5f565358d Use $KYUA_RESULT in kyua report-html invocation for unified file location
(cherry picked from commit a2a69725ef)
2019-07-03 19:24:23 +02:00
Evan Hunt
36387a3761 Merge branch '1114-windows-build-broken-v9_14' into 'v9_14'
fix broken windows build

See merge request isc-projects/bind9!2128
2019-07-03 13:21:35 -04:00
Evan Hunt
2b8cdc06f9 fix broken windows build
The MSVS C compiler requires every struct to have at least one member.
The dns_geoip_databases_t structure had one set of members for
HAVE_GEOIP and a different set for HAVE_GEOIP2, and none when neither
API is in use.

This commit silences the compiler error by moving the declaration of
dns_geoip_databases_t to types.h as an opaque reference, and commenting
out the contents of geoip.h when neither version of GeoIP is enabled.

(cherry picked from commit 81fcde5953)
2019-07-03 10:00:28 -07:00
Ondřej Surý
c4565c994d Merge branch 'ondrej/restore-freebsd-runner-v9_14' into 'v9_14'
[v9_14] Restore the FreeBSD Runner

See merge request isc-projects/bind9!2122
2019-07-02 17:50:04 -04:00
Ondřej Surý
bc6c042116 Use $(pwd) instead of $CI_PROJECT_DIR to always get absolute path
(cherry picked from commit e957825eee)
2019-07-02 22:43:53 +02:00
Ondřej Surý
9d9a8400b2 Use sudo to setup the interfaces when CI job is not running as root
(cherry picked from commit 4d3e7d0b7d)
2019-07-02 22:43:53 +02:00
Evan Hunt
48c1ad84c3 Add FreeBSD 11 GitLab CI Runner
(cherry picked from commit 646bb64246)
2019-07-02 22:43:53 +02:00
Ondřej Surý
801bdd5a13 Merge branch 'ondrej/fix-freebsd-make-v9_14' into 'v9_14'
Add rules to make sure subdirs are always built before testdirs

See merge request isc-projects/bind9!2118
2019-07-02 13:58:48 -04:00
Ondřej Surý
d995dc4661 Add rules to make sure subdirs are always built before testdirs
(cherry picked from commit 723433cbc6)
2019-07-02 19:40:26 +02:00
Michał Kępień
d66a9a9b9a Merge branch 'michal/add-and-use-keyfile_to_key_id-helper-function-v9_14' into 'v9_14'
[v9_14] Add and use keyfile_to_key_id() helper function

See merge request isc-projects/bind9!2108
2019-06-28 08:33:30 -04:00
Michał Kępień
6045adbd1a Add and use keyfile_to_key_id() helper function
When trying to extract the key ID from a key file name, some test code
incorrectly attempts to strip all leading zeros.  This breaks tests when
keys with ID 0 are generated.  Add a new helper shell function,
keyfile_to_key_id(), which properly handles keys with ID 0 and use it in
test code whenever a key ID needs to be extracted from a key file name.

(cherry picked from commit 7d6eaad1bd)
2019-06-28 14:05:44 +02:00
Michał Kępień
23c2b14064 Merge branch '1093-dnstap-read-clear-buffer-before-expanding-it-v9_14' into 'v9_14'
[v9_14] dnstap-read: clear buffer before expanding it

See merge request isc-projects/bind9!2106
2019-06-28 07:08:35 -04:00
Michał Kępień
18aa38610f Add CHANGES entry
5260.	[bug]		dnstap-read was producing malformed output for large
			packets. [GL #1093]

(cherry picked from commit 7354207e1b)
2019-06-28 12:46:54 +02:00
Michał Kępień
1a1e550f94 dnstap-read: clear buffer before expanding it
When printing a packet, dnstap-read checks whether its text form takes
up more than the 2048 bytes allocated for the output buffer by default.
If that is the case, the output buffer is automatically expanded, but
the truncated output is left in the buffer, resulting in malformed data
being printed.  Clear the output buffer before expanding it to prevent
this issue from occurring.

(cherry picked from commit 3549abe81d)
2019-06-28 12:46:53 +02:00
Evan Hunt
5369bbe6e6 Merge branch '182-geoip2-api-v9_14' into 'v9_14'
Resolve "Update GeoIP support to new API (GeoLite2 from Maxmind)"

See merge request isc-projects/bind9!2099
2019-06-27 19:54:34 -04:00
Evan Hunt
24103171ca CHANGES, release note, README
(cherry picked from commit 8854e284fd)
2019-06-27 16:32:31 -07:00
Evan Hunt
d6bd7bb9af update ARM documentation
(cherry picked from commit c9945d6148)
2019-06-27 16:32:30 -07:00
Evan Hunt
049d8a311b add geoip2 system test
(cherry picked from commit 9a1caf99ef)
2019-06-27 16:32:30 -07:00
Evan Hunt
7468036226 add GeoIP2 lookups to unit test
(cherry picked from commit 6399a70cb4)
2019-06-27 16:32:29 -07:00
Evan Hunt
0283ab7512 implement searching of geoip2 database
- revise mapping of search terms to database types to match the
  GeoIP2 schemas.
- open GeoIP2 databases when starting up; close when shutting down.
- clarify the logged error message when an unknown database type
  is configured.
- add new geoip ACL subtypes to support searching for continent in
  country databases.
- map geoip ACL subtypes to specific MMDB database queries.
- perform MMDB lookups based on subtype, saving state between
  queries so repeated lookups for the same address aren't necessary.

(cherry picked from commit 6e0b93e5a0)
2019-06-27 16:32:29 -07:00
Evan Hunt
7fc92bee0c add HAVE_GEOIP2 #ifdef branches, without implementing yet
(cherry picked from commit fe46d5bc34)
2019-06-27 16:25:29 -07:00
Evan Hunt
6a7e805796 add a search for GeoIP2 libraries in configure
- "--with-geoip" is used to enable the legacy GeoIP library.
- "--with-geoip2" is used to enable the new GeoIP2 library
  (libmaxminddb), and is on by default if the library is found.
- using both "--with-geoip" and "--with-geoip2" at the same time
  is an error.
- an attempt is made to determine the default GeoIP2 database path at
  compile time if pkg-config is able to report the module prefix. if
  this fails, it will be necessary to set the path in named.conf with
  geoip-directory
- Makefiles have been updated, and a stub lib/dns/geoip2.c has been
  added for the eventual GeoIP2 search implementation.

(cherry picked from commit fea6b5bf10)
2019-06-27 16:25:28 -07:00
Ondřej Surý
38e10a8201 Merge branch '1095-when-gnu-c-compiler-is-used-on-solaris-gnu-ld-must-be-used-v9_14' into 'v9_14'
Enforce usage -zrelax=transtls when GNU C Compiler is used on Solaris

See merge request isc-projects/bind9!2098
2019-06-27 07:51:21 -04:00
Ondřej Surý
e87a180187 Enforce usage -zrelax=transtls when GNU C Compiler is used on Solaris
When GNU C Compiler is used on Solaris (11), the Thread Local Storage
is completely broken.  The behaviour doesn't manifest when GNU ld is
used.  Thus, we need to enforce usage of GNU ld when GNU C Compiler is
the compiler of choice.

For more background for this change, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90912

(cherry picked from commit d584223653)
2019-06-27 13:33:26 +02:00
Matthijs Mekking
34bacac31e Merge branch '513-matthijs-dnssec-sign-stats-v9_14' into 'v9_14'
Resolve "New metrics to report DNSSEC signing operations and IXFRs [ISC-support #13431]"

See merge request isc-projects/bind9!2080
2019-06-27 07:14:21 -04:00
Matthijs Mekking
04c8c43f09 DNSSEC sign metrics: CHANGES, doc, release note
Add some information about the new statistic-channel DNS sign
metrics. Also add a CHANGES and release note entry.

(cherry picked from commit 3a3f40e372)
2019-06-27 12:37:48 +02:00
Matthijs Mekking
97041a38a7 Also collect DNSSEC refresh signature statistics
In addition to gather how many times signatures are created per
key in a zone, also count how many of those signature creations are
because of DNSSEC maintenance.  These maintenance counters are
incremented if a signature is refreshed (but the RRset did not
changed), when the DNSKEY RRset is changed, and when that leads
to additional RRset / RRSIG updates (for example SOA, NSEC).

(cherry picked from commit 6f67546cd6)
2019-06-27 12:37:27 +02:00
Matthijs Mekking
212db50edd Add tests for DNSSEC sign statistics
This adds tests to the statschannel system test for testing if
the dnskey sign operation counters are incremented correctly.

It tests three cases:

1. A zone maintenance event where all the signatures that are about
   to expire are resigned.
2. A dynamic update event where the new RR and other relevant records
   (SOA, NSEC) are resigned.
3. Adding a standby key, that means the DNSKEY and SOA RRset are
   resigned.

(cherry picked from commit a8750a8805)
2019-06-27 12:37:27 +02:00
Matthijs Mekking
2c494feee6 Update dnskey sign operations statistics
Update per key tag the stats counter when it creates a new signature.
This can happen upon a dynamic update, or when doing DNSSEC
maintenance.

(cherry picked from commit 312fa7f65e)
2019-06-27 12:37:27 +02:00
Matthijs Mekking
ec799c667d Add DNSSEC sign operations statistics channel
Add a new statistics structure to record how many sign operations
a key has made within a zone.

(cherry picked from commit d8cf7aedfa)
2019-06-27 12:37:27 +02:00
Mark Andrews
a25668a58b Merge branch '1030-statistics-channel-fixes-v9_14' into 'v9_14'
Statistics Channel Fixes

See merge request isc-projects/bind9!2096
2019-06-26 23:41:38 -04:00
Mark Andrews
93b3964bc1 add CHANGES
(cherry picked from commit f8b3aa97df)
2019-06-27 13:23:57 +10:00
Mark Andrews
8573a1d752 check xsl vs xml
(cherry picked from commit d5c795942f)
2019-06-27 13:23:57 +10:00
Evan Hunt
41bb9505d4 add odd/even shading to the remaining tables
(cherry picked from commit ce3907e9fe)
2019-06-27 13:23:56 +10:00
Mark Andrews
e20eb63a6d remove 'Configured Zones'; add even/odd to zone list
(cherry picked from commit eaba8dd799)
2019-06-27 13:23:56 +10:00
Timothe Litt
bbb55191c5 Fix ISC-Bugs 45340: Statschannel XSL for zones, Traffic
In ISC-Bugs 45340, I wrote:

The Statistics channel offers links to Zones and Traffic.
Both produce valid data, but display as blank pages with
a web browser.

Zones never had XSL (I provided the original
implementation, but punted on the XSL).

Traffic has XSL, but it wasn't updated to reflect the
split between IPv4 and IPv6 data.

I've picked up enough XSL to fix my original omission,
and as penance for my sloth, fixed the Traffic bug as well.

(cherry picked from commit 96f0bbd4d5)
2019-06-27 13:23:56 +10:00
Evan Hunt
0c6b4f7285 Merge branch '1092-allow-priming-glue-v9_14' into 'v9_14'
allow glue in authoritative responses to root priming queries

See merge request isc-projects/bind9!2094
2019-06-26 12:38:22 -04:00
Evan Hunt
5246f6ecaa CHANGES, release note
(cherry picked from commit 03a6a78b55)
2019-06-26 09:21:05 -07:00
Evan Hunt
e8ce85d073 add system test to confirm glue is returned in priming queries
(cherry picked from commit 9a1f0ea873)
2019-06-26 09:21:05 -07:00
Evan Hunt
11b4bd4d7e allow glue in authoritative responses to root priming queries
- when processing authoritative queries for ./NS, set 'gluedb' so
  that glue will be included in the response, regardless of how
  'minimal-responses' has been configured.

(cherry picked from commit e7684c7b64)
2019-06-26 09:21:05 -07:00
Evan Hunt
3d839809c9 Merge branch '1109-inline-reload-error-v9_14' into 'v9_14'
don't overwrite the dns_master_loadfile() result before calling zone_postload()

See merge request isc-projects/bind9!2092
2019-06-26 12:09:04 -04:00
Evan Hunt
6b3eef02c5 CHANGES
(cherry picked from commit c29e344f07)
2019-06-26 08:50:14 -07:00
Evan Hunt
a049ce872f add a test that reloading errors are not ignored
(cherry picked from commit e48b3f1a00)
2019-06-26 08:49:52 -07:00
Evan Hunt
09fc9d4f87 don't overwrite the dns_master_loadfile() result before calling zone_postload()
if "rndc reload" fails, the result code is supposed to be passed to
zone_postload, but for inline-signing zones, the result can be
overwritten first by a call to the ZONE_TRYLOCK macro. this can lead
to the partially-loaded unsigned zone being synced over to the signed
zone instead of being rejected.

(cherry picked from commit 0b792bd37b)
2019-06-26 08:49:52 -07:00
Michał Kępień
9ea8ff424a Merge branch 'michal/prevent-idna-test-failures-with-libidn2-2.2.0-v9_14' into 'v9_14'
[v9_14] Prevent "idna" test failures with libidn2 2.2.0+

See merge request isc-projects/bind9!2090
2019-06-26 09:00:54 -04:00
Michał Kępień
e79362eaee Prevent "idna" test failures with libidn2 2.2.0+
libidn2 2.2.0+ parses Punycode more strictly than older versions and
thus "dig +idnin +noidnout xn--19g" fails with libidn2 2.2.0+ but
succeeds with older versions.

We could preserve the old behavior by using the IDN2_NO_ALABEL_ROUNDTRIP
flag available in libidn2 2.2.0+, but:

  - this change in behavior is considered a libidn2 bug fix [1],
  - we want to make sure dig behaves as expected, not libidn2,
  - implementing that would require additional configure.ac cruft.

Removing the problematic check appears to be the simplest solution as it
does not prevent the relevant block of checks in the "idna" system test
from achieving its purpose, i.e. ensuring dig properly handles invalid
U-labels.

[1] see upstream commit 241e8f486134793cb0f4a5b0e5817a97883401f5

(cherry picked from commit 60ce0ed411)
2019-06-26 14:40:58 +02:00
Ondřej Surý
efaa857219 Merge branch '1067-underflow-recursing-clients-stats-v9_14' into 'v9_14'
Resolve "Underflow in Stats Channel RecursClients value?"

See merge request isc-projects/bind9!2035
2019-06-26 05:36:51 -04:00
Witold Kręcicki
22a40323b0 CHANGES note
(cherry picked from commit c62a7c88b8)
2019-06-26 11:09:05 +02:00
Witold Kręcicki
0612da5d5d Make sure that recursclient gauge is calculated correctly.
We increase recursclients when we attach to recursion quota,
decrease when we detach. In some cases, when we hit soft
quota, we might attach to quota without increasing recursclients
gauge. We then decrease the gauge when we detach from quota,
and it causes the statistics to underflow.
Fix makes sure that we increase recursclients always when we
succesfully attach to recursion quota.

(cherry picked from commit 24cfee942f)
2019-06-26 11:08:44 +02:00
Michał Kępień
5324e332c5 Merge branch 'michal/wait-for-outgoing-transfer-statistics-to-be-logged-v9_14' into 'v9_14'
[v9_14] Wait for outgoing transfer statistics to be logged

See merge request isc-projects/bind9!2082
2019-06-25 16:15:22 -04:00
Michał Kępień
8c1c47b22b Wait for outgoing transfer statistics to be logged
Since the message confirming outgoing transfer completion is logged
asynchronously, it may happen that transfer statistics may not yet be
logged by the time the dig command triggering a given transfer returns.
This causes false positives for the "ixfr" and "xfer" system tests.
Prevent this from happening by checking outgoing transfer statistics up
to 10 times, in 1-second intervals.

(cherry picked from commit 9fc5e48b14)
2019-06-25 22:01:53 +02:00
Mark Andrews
32e5035ddb Merge branch 'marka-silence-unchecked-return-v9_14' into 'v9_14'
silence unchecked return

See merge request isc-projects/bind9!2078
2019-06-25 01:44:31 -04:00
Mark Andrews
e98921fd8d silence unchecked return
(cherry picked from commit 134248531c)
2019-06-25 15:32:12 +10:00
Mark Andrews
aff3391656 Merge branch '1098-compile-failure-on-9-11-8-v9_14' into 'v9_14'
Resolve "Compile failure on 9.11.8"

See merge request isc-projects/bind9!2076
2019-06-24 20:14:31 -04:00
Mark Andrews
019c5f3d12 add CHANGES
(cherry picked from commit 5c23623094)
2019-06-25 09:49:37 +10:00
Mark Andrews
7c963d0fc4 define ULLONG_MAX if not already defined
(cherry picked from commit 4110b9184d)
2019-06-25 09:48:59 +10:00
Mark Andrews
79765491c0 Merge branch 'marka-wait-for-zones-to-load-v9_14' into 'v9_14'
wait for zones to load

See merge request isc-projects/bind9!2070
2019-06-24 00:30:21 -04:00
Mark Andrews
1f9eb50f56 wait for zones to load
(cherry picked from commit b62e6418b5)
2019-06-24 14:18:43 +10:00
Ondřej Surý
add9625713 Merge branch '1081-fix-statistics-in-x86-windows-builds-v9_14' into 'v9_14'
Resolve "Statistics are broken in x86 Windows builds"

See merge request isc-projects/bind9!2068
2019-06-20 12:45:31 -04:00
Michał Kępień
4906e9cb9a Add CHANGES entry
5249.	[bug]		Statistics were broken in x86 Windows builds.
			[GL #1081]

(cherry picked from commit cbb2edb8d3)
2019-06-20 18:34:55 +02:00
Michał Kępień
de65b8f0f8 Fix statistics for x86 Windows builds
Using atomic_int_fast64_t variables with atomic functions on x86 does
not cause Visual Studio to report build errors, but such operations
yield useless results.  Since the isc_stat_t type is unconditionally
typedef'd to atomic_int_fast64_t, any code performing atomic operations
on isc_stat_t variables is broken in x86 Windows builds.  Fix by using
the atomic_int_fast32_t type for isc_stat_t in x86 Windows builds.

(cherry picked from commit e21103f2d3)
2019-06-20 18:34:27 +02:00
Ondřej Surý
095cfa32a3 Merge branch '1094-bump-clientinfomethods-version-v9_14' into 'v9_14'
[v9_14] Bump DNS_CLIENTINFOMETHODS VERSION and AGE

See merge request isc-projects/bind9!2060
2019-06-20 11:45:48 -04:00
Brian Conry
5de88e29f8 Bump DNS_CLIENTINFOMETHODS_VERSION/_AGE to 2/1 in clientinfo.h
BIND 9.11.0 has bumped DNS_CLIENTINFOMETHODS_VERSION and _AGE to
version 2 and 1 in the dlz_minimal.h because a member was addet to the
dnsclientinfo struct.  It was found out that the new member is not
used anywhere and there are no accessor functions therefore the change
was reverted.

Later on, it was found out that the revert caused some problems to the
users of BIND 9, and thus this changes takes a different approach by
syncing the values other way around.

(cherry picked from commit 39344dfb3e)
2019-06-20 14:18:50 +02:00
Ondřej Surý
5f777e6a49 Revert "Downgrade the dns_clientinfomethod structure to the version in lib/dns/clientinfo.c"
This reverts commit a6f09b2255.

(cherry picked from commit 04961a7e6b)
2019-06-20 14:18:50 +02:00
Evan Hunt
b0c7a44744 Merge branch 'security-v9_14' into 'v9_14'
merge security-v9_14

See merge request isc-projects/bind9!2063
2019-06-19 19:25:17 -04:00
Tinderbox User
84c8c26ae4 Merge branch 'prep-release' into security-v9_14 2019-06-19 15:54:22 -07:00
Evan Hunt
adf5b60e50 Merge branch '942-security-move-test-inside-lock-security-v9_14' into 'security-v9_14' 2019-06-19 15:54:22 -07:00
Tinderbox User
5a70336065 prep 9.14.3 2019-06-19 15:54:22 -07:00
Evan Hunt
1c6ce19e1b CHANGES, release note
(cherry picked from commit 332af50eed96cbcb20173f297e543adaded0ed92)
2019-06-19 15:54:22 -07:00
Mark Andrews
878dfb1e52 move item_out test inside lock in dns_dispatch_getnext()
(cherry picked from commit 60c42f849d520564ed42e5ed0ba46b4b69c07712)
2019-06-19 15:54:21 -07:00
Michał Kępień
488656375c Merge branch '1088-always-fail-a-system-test-if-crashes-are-detected-v9_14' into 'v9_14'
[v9_14] Always fail a system test if crashes are detected

See merge request isc-projects/bind9!2047
2019-06-18 03:55:22 -04:00
Michał Kępień
931357d801 Always fail a system test if crashes are detected
In certain situations (e.g. a named instance crashing upon shutdown in a
system test which involves shutting down a server and restarting it
afterwards), a system test may succeed despite a named crash being
triggered.  This must never be the case.  Extend run.sh to mark a test
as failed if core dumps or log lines indicating assertion failures are
detected (the latter is only an extra measure aimed at test environments
in which core dumps are not generated; note that some types of crashes,
e.g. segmentation faults, will not be detected using this method alone).

(cherry picked from commit 7706f22924)
2019-06-18 09:18:41 +02:00
Michał Kępień
14d4968f78 Merge branch 'michal/fix-transfer-statistics-extraction-v9_14' into 'v9_14'
[v9_14] Fix transfer statistics extraction

See merge request isc-projects/bind9!2046
2019-06-18 03:12:54 -04:00
Michał Kępień
aa54cc407f Fix transfer statistics extraction
Make the get_named_xfer_stats() helper shell function more precise in
order to prevent it from matching the wrong lines as that may trigger
false positives for the "ixfr" and "xfer" system tests.  As an example,
the regular expression responsible for extracting the number of bytes
transmitted throughout an entire zone transfer could also match a line
containing the following string:

    transfer of '<zone-name>/IN': sending TCP message of <integer> bytes

However, such a line is not one summarizing a zone transfer.

Also simplify both get_dig_xfer_stats() and get_named_xfer_stats() by
eliminating the need for "echo" statements in them.

(cherry picked from commit fab67c074a)
2019-06-18 08:53:35 +02:00
Mark Andrews
4f23a48449 Merge branch 'marka-cleanup-builtin-config-v9_14' into 'v9_14'
remove geoip-use-ecs from default config

See merge request isc-projects/bind9!2044
2019-06-17 20:49:55 -04:00
Mark Andrews
a4946bfd23 remove geoip-use-ecs from default config
(cherry picked from commit b2026bd9e8)
2019-06-18 09:59:59 +10:00
Michał Kępień
7e8884e2e3 Merge branch 'michal/tkey-system-test-fix-key-id-processing-v9_14' into 'v9_14'
[v9_14] "tkey" system test: fix key ID processing

See merge request isc-projects/bind9!2042
2019-06-17 08:43:19 -04:00
Michał Kępień
b9820ec727 Fix key ID processing
If ns1/setup.sh generates a key with ID 0, the "KEYID" token in
ns1/named.conf.in will be replaced with an empty string, causing the
following broken statement to appear in ns1/named.conf:

    tkey-dhkey "server" ;

Such a statement triggers false positives for the "tkey" system test due
to ns1 being unable to start with a broken configuration file.  Fix by
tweaking the regular expression used for removing leading zeros from the
key ID, so that it removes at most 4 leading zeros.

(cherry picked from commit 0b7b1161c2)
2019-06-17 14:15:36 +02:00
Michał Kępień
87b7562bfb Merge branch 'michal/address-compilation-warnings-for-O3-builds-v9_14' into 'v9_14'
[v9_14] Address compilation warnings for -O3 builds

See merge request isc-projects/bind9!2028
2019-06-11 04:49:02 -04:00
Michał Kępień
1d0bb1de10 Address GCC 9.1 -O3 compilation warnings
Compiling with -O3 triggers the following warnings with GCC 9.1:

    task.c: In function ‘isc_taskmgr_create’:
    task.c:1386:43: warning: ‘%04u’ directive output may be truncated writing between 4 and 10 bytes into a region of size 6 [-Wformat-truncation=]
     1386 |   snprintf(name, sizeof(name), "isc-worker%04u", i);
          |                                           ^~~~
    task.c:1386:32: note: directive argument in the range [0, 4294967294]
     1386 |   snprintf(name, sizeof(name), "isc-worker%04u", i);
          |                                ^~~~~~~~~~~~~~~~
    task.c:1386:3: note: ‘snprintf’ output between 15 and 21 bytes into a destination of size 16
     1386 |   snprintf(name, sizeof(name), "isc-worker%04u", i);
          |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    private_test.c: In function ‘private_nsec3_totext_test’:
    private_test.c:113:9: warning: array subscript 4 is outside array bounds of ‘uint32_t[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds]
      113 |  while (*sp == '\0' && slen > 0) {
          |         ^~~
    private_test.c:106:11: note: while referencing ‘salt’
      106 |  uint32_t salt;
          |           ^~~~

Prevent these warnings from being triggered by increasing the size of
the relevant array (task.c) and reordering conditions (private_test.c).

(cherry picked from commit ce796ac1f4)
2019-06-11 10:19:04 +02:00
Witold Kręcicki
a0621b51d8 Address GCC 8.3 -O3 compilation warning
Compiling with -O3 triggers the following warning with GCC 8.3:

    driver.c: In function ‘dlz_findzonedb’:
    driver.c:193:29: warning: ‘%u’ directive output may be truncated writing between 1 and 5 bytes into a region of size between 0 and 99 [-Wformat-truncation=]
      snprintf(buffer, size, "%s#%u", addr_buf, port);
                                 ^~
    driver.c:193:25: note: directive argument in the range [0, 65535]
      snprintf(buffer, size, "%s#%u", addr_buf, port);
                             ^~~~~~~
    driver.c:193:2: note: ‘snprintf’ output between 3 and 106 bytes into a destination of size 100
      snprintf(buffer, size, "%s#%u", addr_buf, port);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Increase the size of the relevant array to prevent this warning from
being triggered.

(cherry picked from commit 44e6bb8b93)
2019-06-11 10:18:58 +02:00
Michał Kępień
bd501abaa6 Make some build jobs use -O3 optimizations
Change the compiler optimization level for Debian sid build jobs from
-O2 to -O3 in order to enable triggering compilation warnings which are
not raised when -O2 is used.

(cherry picked from commit 3569487875)
2019-06-11 10:18:53 +02:00
Evan Hunt
8d2ae614e4 Merge branch 'each-pandoc-args-v9_14' into 'v9_14'
specify title metadata and markdown format when calling pandoc

See merge request isc-projects/bind9!2023
2019-06-10 00:31:13 -04:00
Evan Hunt
639bdf24c7 specify title metadata and markdown format when calling pandoc
this change silences a warning message and prevents the unwanted
use of smart quotes when using pandoc 2.7.1 to generate human-readable
versions of README and other markdown files.

(cherry picked from commit 3663f61e0e)
2019-06-09 21:30:28 -07:00
Evan Hunt
929ee132fc Merge branch 'michal/minor-doc-fixes-v9_14' into 'v9_14'
[v9_14] Minor doc fixes

See merge request isc-projects/bind9!2019
2019-06-10 00:22:25 -04:00
Stephen Morris
823c7babf8 Tweak paragraph style in release notes PDF 2019-06-07 08:37:33 +02:00
Stephen Morris
6e058ea035 Fix typos in README and release notes 2019-06-07 08:37:33 +02:00
Stephen Morris
4e0e7e2f24 Reword release note about obsolete systems 2019-06-07 08:37:33 +02:00
Mark Andrews
60177eb292 Merge branch 'marka-capture-checkconf-output-v9_14' into 'v9_14'
capture named-checkconf output

See merge request isc-projects/bind9!2015
2019-06-06 04:49:28 -04:00
Mark Andrews
b65b268fde capture named-checkconf output
(cherry picked from commit 36dd373ab4)
2019-06-06 18:34:51 +10:00
Mark Andrews
9a957fef40 Merge branch 'marka-rndc-manpage-fix-v9_14' into 'v9_14'
add missing word 'includes'

See merge request isc-projects/bind9!2012
2019-06-05 19:49:19 -04:00
Mark Andrews
9c374db434 add missing word 'includes'
(cherry picked from commit c6553eb3fc)
2019-06-06 09:33:13 +10:00
Mark Andrews
e3afb5c619 Merge branch '1066-macports-uses-opt-local-as-its-openssl-location-v9_14' into 'v9_14'
Resolve "MacPorts uses /opt/local as its OpenSSL location"

See merge request isc-projects/bind9!2010
2019-06-04 04:32:51 -04:00
Mark Andrews
a86cf8eef6 add /opt/local to list of locations for OpenSSL
(cherry picked from commit 8973d4bd16)
2019-06-04 18:19:34 +10:00
Mark Andrews
535cf4b1aa Merge branch '1063-pkcs11_test-is-not-being-expanded-v9_14' into 'v9_14'
Resolve "@PKCS11_TEST@ is not being expanded"

See merge request isc-projects/bind9!2008
2019-06-04 04:15:41 -04:00
Mark Andrews
0c65d9dc3a make PKCS11_TEST unix only
(cherry picked from commit fbd9c5c97f)
2019-06-04 18:00:45 +10:00
Mark Andrews
f9649f0529 Merge branch '1017-remove-dead-stores-v9_14' into 'v9_14'
Resolve "remove dead stores"

See merge request isc-projects/bind9!2006
2019-06-04 02:07:42 -04:00
Mark Andrews
f33d9a825f POST(optlen)
(cherry picked from commit 4e97f7dccc)
2019-06-04 15:48:52 +10:00
Mark Andrews
023b44a921 Merge branch 'cppcheck-and-cmocka-false-positive-v9_14' into 'v9_14'
teach clang analyser that _assert_int_equal and _assert_int_not_equal don't return on failure

See merge request isc-projects/bind9!2003
2019-06-04 01:46:52 -04:00
Mark Andrews
65ece077c2 teach cppcheck that _assert_int_equal and _assert_int_not_equal don't return on failure
(cherry picked from commit 5d5d751c7f)
2019-06-04 15:23:49 +10:00
Michał Kępień
9c3c0c463f Merge branch 'michal/smartsign-system-test-properly-detect-presence-of-cds-cdnskey-records-v9_14' into 'v9_14'
[v9_14] "smartsign" system test: properly detect presence of CDS/CDNSKEY records

See merge request isc-projects/bind9!2002
2019-06-03 07:59:09 -04:00
Michał Kępień
0fc89e0f9f Properly detect presence of CDS/CDNSKEY records
Replace grep calls with awk scripts to more precisely detect presence of
CDS and CDNSKEY records in a signed zone file, in order to prevent rare
false positives for the "smartsign" system test triggered by the strings
"CDS" and/or "CDNSKEY" being accidentally present in the Base64 form of
DNSSEC-related data in the zone file being checked.

(cherry picked from commit d0a73c7da6)
2019-06-03 13:44:18 +02:00
Evan Hunt
d19507416d Merge branch '1061-update-supported-rfc-list-v9_14' into 'v9_14'
Resolve "update supported RFC list"

See merge request isc-projects/bind9!1996
2019-05-31 19:25:11 -04:00
Mark Andrews
4a889d5fe3 add RFC6944 2019-05-31 16:23:15 -07:00
Mark Andrews
8da63b7e7b update RFC compliance document 2019-05-31 16:23:05 -07:00
Evan Hunt
5dda2cfca7 Merge branch '943-race-in-dispatcher-socket-v9_14' into 'v9_14'
Fix a possible race between udp dispatch and socket code

See merge request isc-projects/bind9!1995
2019-05-31 15:43:52 -04:00
Witold Kręcicki
95c2595194 CHANGES
(cherry picked from commit e56d95847b)
2019-05-31 12:32:37 -07:00
Witold Kręcicki
b6d11230b2 Fix a possible race between udp dispatch and socket code
There's a small possibility of race between udp dispatcher and
socket code - socket code can still hold internal reference to a
socket while dispatcher calls isc_socket_open, which can cause
an assertion failure. Fix it by relaxing the assertion test, and
instead simply locking the socket in isc_socket_open.

(cherry picked from commit e517c18d98)
2019-05-31 12:32:37 -07:00
Witold Krecicki
dddc16d1d5 Merge branch '1055-qname-minimization-relaxed-lame-v9_14' into 'v9_14'
Resolve "Make relaxed qname minimization work with lame delegations"

See merge request isc-projects/bind9!1991
2019-05-31 04:01:42 -04:00
Evan Hunt
40b2ebc9c7 CHANGES
(cherry picked from commit 8783735f89)
2019-05-31 09:25:44 +02:00
Witold Kręcicki
60d0da833b Use experimental "_ A" minimization in relaxed mode.
qname minimization, even in relaxed mode, can fail on
some very broken domains. In relaxed mode, instead of
asking for "foo.bar NS" ask for "_.foo.bar A" to either
get a delegation or NXDOMAIN. It will require more queries
than regular mode for proper NXDOMAINs.

(cherry picked from commit ae52c2117e)
2019-05-31 09:25:44 +02:00
Witold Kręcicki
8b29a7cbf4 Don't SERVFAIL on lame delegations when doing minimization in relaxed mode.
qname minimization in relaxed mode should fall back to regular
resolution in case of failure.

(cherry picked from commit 2691e729f0)
2019-05-31 09:25:23 +02:00
Mark Andrews
668fce4f79 Merge branch '225-ed448-broken-with-openssl-1-1-1-pre6-v9_14' into 'v9_14'
Fix ASN.1 length values in Ed448 public and private key prefix blobs.

See merge request isc-projects/bind9!1987
2019-05-30 09:22:55 -04:00
Mark Andrews
630d05e920 add CHANGES note
(cherry picked from commit 6c499a0c08)
2019-05-30 23:09:56 +10:00
Mark Andrews
e726515e03 test Ed448 against test vectors
(cherry picked from commit 20f2d9b41b)
2019-05-30 23:09:23 +10:00
Mark Andrews
6ca95b5478 fix Ed448 length values for precomputed ASN.1 prefix blobs
(cherry picked from commit 5da97eeea6)
2019-05-30 23:09:23 +10:00
Ondřej Surý
b7a14300d8 Merge branch '996-revert-wrong-key-id-is-displayed-for-rsamd5-keys-v9_14' into 'v9_14'
Revert "Merge branch '996-wrong-key-id-is-displayed-for-rsamd5-keys' into 'master'"

See merge request isc-projects/bind9!1982
2019-05-30 09:00:00 -04:00
Ondřej Surý
d0181cb97d Revert "Merge branch '996-wrong-key-id-is-displayed-for-rsamd5-keys' into 'master'"
This reverts commit ea131d2e6a, reversing
changes made to e79dd268b6.

(cherry picked from commit 52a8fb31c7)
2019-05-30 14:32:58 +02:00
Mark Andrews
09b95b399e Merge branch '1011-use-proper-linker-config-on-hp-ux-v9_14' into 'v9_14'
Resolve "Use proper linker (config) on HP-UX"

See merge request isc-projects/bind9!1983
2019-05-29 21:47:53 -04:00
Mark Andrews
7273a5fa98 regen
(cherry picked from commit 92325d3150)
2019-05-30 11:27:27 +10:00
Mark Andrews
93063a0d3a add link flags for ia64-hp-hpux
(cherry picked from commit 61752bf8ac)
2019-05-30 11:27:27 +10:00
Ondřej Surý
53683aeed5 Merge branch '1044-fix-LFS-flags-on-BSDs-v9_14' into 'v9_14'
Pull the values for LFS_{CFLAGS,LDFLAGS,LIBS} from autoconf instead using them directly in make

See merge request isc-projects/bind9!1979
2019-05-29 07:54:49 -04:00
Ondřej Surý
8464fef786 Pull the values for LFS_{CFLAGS,LDFLAGS,LIBS} from autoconf instead using them directly in make
(cherry picked from commit d4596baed4)
2019-05-29 13:34:55 +02:00
Michał Kępień
2a569ef9e4 Merge branch 'michal/legacy-system-test-fixes-v9_14' into 'v9_14'
[v9_14] "legacy" system test fixes

See merge request isc-projects/bind9!1974
2019-05-29 05:33:52 -04:00
Michał Kępień
30c9068714 Optimize dig parameters to decrease test run time
Performing server setup checks using "+tries=3 +time=5" is redundant as
a single query is arguably good enough for determining whether a given
named instance was set up properly.  Only use multiple queries with a
long timeout for resolution checks in the "legacy" system test, in order
to significantly reduce its run time (on a contemporary machine, from
about 1m45s to 0m40s).

(cherry picked from commit 47b850348c)
2019-05-29 11:09:53 +02:00
Michał Kępień
909651afe6 Make "plain" server setup checks more similar
Send a test TCP query to the "plain" server during its setup check to
improve its consistency with the setup check for the "plain + no TCP"
server.

(cherry picked from commit bb939a03ff)
2019-05-29 11:09:49 +02:00
Michał Kępień
0f5871e0fa Add more EDNS checks for dig output files
In the "legacy" system test, in order to make server setup checks more
consistent with each other, add further checks for either presence or
absence of the EDNS OPT pseudo-RR in the responses returned by the
tested named instances.

(cherry picked from commit 56ed1275c6)
2019-05-29 11:09:44 +02:00
Michał Kępień
e1823c5240 Do not ignore dig exit codes
Make sure the "legacy" system test fails if any exit code returned by
dig does not match the expected one.

(cherry picked from commit 4dea5cb799)
2019-05-29 11:09:34 +02:00
Michał Kępień
eeb0747efa Use helper functions for checking resolution
Extract repeated dig and grep calls into two helper shell functions,
resolution_succeeds() and resolution_fails(), in order to reduce code
duplication in the "legacy" system test, emphasize the similarity
between all the resolution checks in that test, and make the conditions
for success and failure uniform for all resolution checks in that test.

(cherry picked from commit effd16ab25)
2019-05-29 11:09:28 +02:00
Michał Kępień
762344a468 Use +dnssec instead of separate TXT records
When testing named instances which are configured to drop outgoing UDP
responses larger than 512 bytes, querying with DO=1 may be used instead
of querying for large TXT records as the effect achieved will be
identical: an unsigned response for a SOA query will be below 512 bytes
in size while a signed response for the same query will be over 512
bytes in size.  Doing this makes all resolution checks in the "legacy"
system test more similar.  Add checks for the TC flag being set in UDP
responses which are expected to be truncated to further make sure that
tested named instances behave as expected.

(cherry picked from commit aaf81ca6ef)
2019-05-29 11:09:16 +02:00
Michał Kępień
96a4c329f1 Fix the name of the file to inspect
One of the checks in the "legacy" system test inspects dig.out.1.test$n
instead of dig.out.2.test$n.  Fix the file name used in that check.

(cherry picked from commit 3e7fa15ca3)
2019-05-29 11:09:12 +02:00
Michał Kępień
a74bcebbff Ensure queries expected to time out really do
Make sure that the "legacy" system test fails if queries which are
expected to time out do not really time out.

(cherry picked from commit 6283c1cc7e)
2019-05-29 11:09:01 +02:00
Michał Kępień
82f3c88d46 Properly test servers with TCP support disabled
Sending TCP queries to test named instances with TCP support disabled
should cause dig output to contain the phrase "connection refused", not
"connection timed out", as such instances never open the relevant
sockets.  Make sure that the "legacy" system test fails if the expected
phrase is not found in any of the relevant files containing dig output.

(cherry picked from commit 9491616e5c)
2019-05-29 11:08:47 +02:00
Ondřej Surý
bdae8ed097 Merge branch '1044-include-config.h-in-gen.c-v9_14' into 'v9_14'
Resolve "gen fails to generate headers on Debian buster"

See merge request isc-projects/bind9!1976
2019-05-29 04:44:33 -04:00
Ondřej Surý
f7050fc728 Use getconf LFS_{CFLAGS,LDFLAGS,LIBS} to get flags to compile lib/dns/gen
On some systems (namely Debian buster armhf) the readdir() call fails
with `Value too large for defined data type` unless the
_FILE_OFFSET_BITS=64 is defined.  The correct way to fix this is to
get the appropriate compilation parameters from getconf system
interface.

(cherry picked from commit 4c7345bcb6)
2019-05-29 10:30:39 +02:00
Ondřej Surý
a17eb8dec4 Exit the ./gen program on failed readdir() call
(cherry picked from commit 05b7c08a16)
2019-05-29 10:30:39 +02:00
Mark Andrews
477515fb09 Merge branch '1056-misleading-error-message-when-trying-to-build-without-python-support-v9_14' into 'v9_14'
Resolve "Misleading error message when trying to build without Python support"

See merge request isc-projects/bind9!1965
2019-05-27 00:13:27 -04:00
Mark Andrews
1ceef52e21 fix configire error message to say --without-python
(cherry picked from commit d70bf76d80)
2019-05-27 14:00:04 +10:00
Witold Krecicki
43f5b94da6 Merge branch '1046-deadlock-in-tcp-code-v9_14' into 'v9_14'
Fix a possible deadlock in TCP accepting

See merge request isc-projects/bind9!1961
2019-05-24 07:03:05 -04:00
Witold Kręcicki
000fdd8fa5 Fix a possible deadlock in TCP accepting
Each network thread holds an array of locks, indexed by a hash
of fd. When we accept a connection we hold a lock in accepting thread.
We then generate the thread number and lock bucket for the new
connection socket - if we hit the same thread and lock bucket as
accepting socket we get a deadlock. Avoid this by checking if we're
in the same thread/lock bucket and not locking in this case.

(cherry picked from commit 75815c1581)
2019-05-24 12:50:15 +02:00
Mark Andrews
0fc9c25cd8 Merge branch '1028-dig-trace-should-not-set-rd-0-norecurse-for-the-initial-root-hints-query-v9_14' into 'v9_14'
Resolve "dig +trace should not set RD=0 (+norecurse) for the initial root hints query"

See merge request isc-projects/bind9!1955
2019-05-22 02:31:22 -04:00
Mark Andrews
98de15b780 Recurse to find the root server list with 'dig +trace'.
(cherry picked from commit e65d4989a1)
2019-05-22 16:05:25 +10:00
Evan Hunt
4b21ee60b6 Merge branch 'each-document-bug-ids-v9_14' into 'v9_14'
update README to explain gitlab numbers

See merge request isc-projects/bind9!1948
2019-05-17 02:44:47 -04:00
Evan Hunt
1aabcfc725 update README to explain gitlab numbers
(cherry picked from commit 45d76498d9)
2019-05-16 23:44:16 -07:00
Ondřej Surý
9088679e85 Merge branch '1003-SO_REUSEPORT-tweaks-v9_14' into 'v9_14'
Resolve "socket.c error 'SO_REUSEPORT' undeclared"

See merge request isc-projects/bind9!1947
2019-05-17 01:58:56 -04:00
Ondřej Surý
2b343d1fc1 Use SO_REUSEPORT_LB on FreeBSD if available
(cherry picked from commit 94cb73d96c)
2019-05-17 07:45:21 +02:00
Ondřej Surý
5d8d65bfdc Add safeguard against the other usage of SO_REUSEPORT
(cherry picked from commit 1c672367a0)
2019-05-17 07:45:21 +02:00
Ondřej Surý
110beba49c Merge branch '984-remove-dead-code-in-pkcs11-keygen-c-v9_14' into 'v9_14'
Resolve "Remove dead code in pkcs11-keygen.c"

See merge request isc-projects/bind9!1929
2019-05-13 00:35:44 -04:00
Mark Andrews
b61d6cde83 remove dead code and unnecessary call to pkcs_C_GetAttributeValue
(cherry picked from commit 2e4986e2c4)
2019-05-13 11:22:33 +07:00
Ondřej Surý
f433202a5e Merge branch '899-remove-unspec-v9_14' into 'v9_14'
Remove UNSPEC rrtype

See merge request isc-projects/bind9!1932
2019-05-13 00:20:11 -04:00
Witold Kręcicki
0617148792 Remove UNSPEC rrtype
(cherry picked from commit a8e2ca6f7d)
2019-05-13 10:52:48 +07:00
Mark Andrews
7ad719f45a Merge branch '981-armv5-build-is-broken-v9_14' into 'v9_14'
Resolve "armv5 build is broken"

See merge request isc-projects/bind9!1930
2019-05-12 23:05:45 -04:00
Mark Andrews
4de58ee1c8 arm: just use the compiler's default yield support
(cherry picked from commit f546769b8b)
2019-05-13 12:19:26 +10:00
Tinderbox User
354cf1f66f Merge branch 'prep-release' into v9_14 2019-05-10 04:51:34 +00:00
Tinderbox User
d7862ea81c prep 9.14.2 2019-05-10 04:51:22 +00:00
Evan Hunt
092b9d3cba Merge branch 'fix-changes' into 'v9_14'
fix change number

See merge request isc-projects/bind9!1924
2019-05-10 00:02:25 -04:00
Evan Hunt
3b7bf9ecac fix change number 2019-05-09 21:00:54 -07:00
Evan Hunt
ddb09b8046 Merge branch '997-make-ntas-work-with-validating-forwarders-v9_14' into 'v9_14'
Make NTAs work with validating forwarders

See merge request isc-projects/bind9!1922
2019-05-09 23:51:13 -04:00
Michał Kępień
9ca0c63f1f Add CHANGES entry
5219.	[bug]		Negative trust anchors did not work with "forward only;"
			to validating resolvers. [GL #997]

(cherry picked from commit 5be7c6f4b3)
2019-05-09 20:37:37 -07:00
Michał Kępień
c6bf43a821 Make NTAs work with validating forwarders
If named is configured to perform DNSSEC validation and also forwards
all queries ("forward only;") to validating resolvers, negative trust
anchors do not work properly because the CD bit is not set in queries
sent to the forwarders.  As a result, instead of retrieving bogus DNSSEC
material and making validation decisions based on its configuration,
named is only receiving SERVFAIL responses to queries for bogus data.
Fix by ensuring the CD bit is always set in queries sent to forwarders
if the query name is covered by an NTA.

(cherry picked from commit 5e80488270)
2019-05-09 20:37:37 -07:00
Evan Hunt
90c4e778d5 Merge branch '958-improve-message-about-python-ply-v9_14' into 'v9_14'
Improve the error message about missing PLY Python package

See merge request isc-projects/bind9!1919
2019-05-09 23:16:34 -04:00
Ondřej Surý
31fbfe56fd Improve the error message about missing PLY Python package
Previously, only a message about missing Python was printed, which was
misleading to many users.  The new message clearly states that Python
AND PLY is required and prints basic instructions how to install PLY
package.

(cherry picked from commit 55b48700da)
2019-05-09 19:55:53 -07:00
Ondřej Surý
c3162ac196 Merge branch 'ondrej/reproducible-build-v9_14' into 'v9_14'
Make lib/dns/gen.c compatible with reproducible builds.

See merge request isc-projects/bind9!1912
2019-05-09 05:26:34 -04:00
Ondřej Surý
c10f361f44 Make lib/dns/gen.c compatible with reproducible builds.
The gen.c will now use SOURCE_DATE_EPOCH[1] if found in environment
to make the build more reproducible build friendly.

1. https://reproducible-builds.org/specs/source-date-epoch/

(cherry picked from commit c8cb612d39)
2019-05-09 16:05:12 +07:00
Mark Andrews
ace60a3daa Merge branch '960-add-edns-client-tag-and-edns-server-tag-v9_14' into 'v9_14'
Resolve "Add EDNS Client Tag and EDNS Server Tag"

See merge request isc-projects/bind9!1910
2019-05-09 04:39:06 -04:00
Mark Andrews
07f8daf536 Recognise EDNS Client Tag and EDNS Server Tag
(cherry picked from commit ee7cf180b3)
2019-05-09 18:19:29 +10:00
Evan Hunt
b31a9ce95d Merge branch '868-fix-trusted-keys-handling-with-dnssec-validation-auto-v9_14' into 'v9_14'
fix incorrect behavior mixing trusted-keys with validation auto

See merge request isc-projects/bind9!1904
2019-05-09 01:19:23 -04:00
Evan Hunt
bfd646795d CHANGES, release notes 2019-05-08 21:59:35 -07:00
Evan Hunt
9b59425d06 warn about the use of trusted-keys and managed-keys for the same name 2019-05-08 21:59:35 -07:00
Mark Andrews
80d946e90e Merge branch '899-totext-fromtext-fuzz-v9_14' into 'v9_14'
fuzz dns_rdata_fromwire

See merge request isc-projects/bind9!1907
2019-05-08 21:00:08 -04:00
Mark Andrews
228a50a3f3 dns_rdata_fromwire_text fuzzer
Fuzz input to dns_rdata_fromwire(). Then convert the result
to text, back to wire format, to multiline text, and back to wire
format again, checking for consistency throughout the sequence.

(cherry picked from commit 8ffdf6759e)
2019-05-09 10:46:21 +10:00
Mark Andrews
0ae562e2af Merge branch '852-bind-returning-malformed-packet-error-when-sshfp-record-has-fingerprint-value-less-than-4-characters-v9_14' into 'v9_14'
Resolve "Bind returning malformed packet error when sshfp record has fingerprint value less than 4 characters"

See merge request isc-projects/bind9!1905
2019-05-08 18:59:55 -04:00
Mark Andrews
7dd4fa9da3 enforce known SSHFP finger print lengths
(cherry picked from commit 1722728c80)
2019-05-09 08:48:28 +10:00
Mark Andrews
b99c0f93b1 Merge branch '991-provide-ixfr-should-only-be-tests-on-tcp-clients-v9_14' into 'v9_14'
Resolve "provide-ixfr should only be tested on TCP clients."

See merge request isc-projects/bind9!1900
2019-05-07 00:28:40 -04:00
Mark Andrews
7098238039 add CHANGES
(cherry picked from commit ba1d7f3a07)
2019-05-07 13:43:15 +10:00
Mark Andrews
227b49a830 add test for 'provide-ixfr no;' ; add forensics support
(cherry picked from commit d547465af5)
2019-05-07 13:43:14 +10:00
Mark Andrews
8c7052e1cf only test provideixfr if the transport is TCP
(cherry picked from commit 18c49853e3)
2019-05-07 13:43:14 +10:00
Mark Andrews
ea9083647e Merge branch '1005-filter-aaaa-crash-in-9-14-1-v9_14' into 'v9_14'
Resolve "filter-aaaa crash in 9.14.1"

See merge request isc-projects/bind9!1899
2019-05-06 21:19:35 -04:00
Mark Andrews
0b6a698320 add CHANGES
(cherry picked from commit bdc66eb5d9)
2019-05-07 11:07:32 +10:00
Mark Andrews
a0feec3dbc lock accesses to hash table
(cherry picked from commit 2483a8c76d)
2019-05-07 11:07:32 +10:00
Mark Andrews
dbbbed29e9 clear pointer before hash table
(cherry picked from commit 4886701c03)
2019-05-07 11:07:32 +10:00
Mark Andrews
b01ebf8168 Merge branch '983-delv-www-isc-org-any-rtrace-multiline-leaks-memory-v9_14' into 'v9_14'
Resolve "'delv www.isc.org ANY +rtrace +multiline' leaks memory"

See merge request isc-projects/bind9!1896
2019-05-06 20:39:34 -04:00
Mark Andrews
83310317c7 add CHANGES note
(cherry picked from commit ce5520b695)
2019-05-07 10:27:18 +10:00
Mark Andrews
3ebf1ddeb2 check that delv -t any works
(cherry picked from commit 6999bee7ef)
2019-05-07 10:27:18 +10:00
Mark Andrews
0e6a620432 fix whitespace
(cherry picked from commit 32ba5a0494)
2019-05-07 10:27:18 +10:00
Mark Andrews
2ffdbe9eff return rdatasets when processing ANY queries in client_resfind
(cherry picked from commit 127333c71f)
2019-05-07 10:27:18 +10:00
Evan Hunt
9c9b9ab651 Merge branch 'each-win32-parallel-tests-v9_14' into 'v9_14'
enable parallel system tests on windows

See merge request isc-projects/bind9!1894
2019-05-06 19:13:26 -04:00
Evan Hunt
df9cfeaf1b CHANGES
(cherry picked from commit d3cd0729c9)
2019-05-06 15:54:31 -07:00
Evan Hunt
96e0e38fcd move the test lists into conf.sh.common
there is now a common list of tests in conf.sh.common, with the
tests that are either unique to windows or to unix, or which are
enabled or disabled by configure or Configure, being listed in
separate variables in conf.sh.in and conf.sh.win32.

(cherry picked from commit a33237f070)
2019-05-06 15:54:31 -07:00
Evan Hunt
5755465c2f enable parallel system tests on windows
this moves the creation of "parallel.mk" into a separate shell script
instead of bin/tests/system/Makefile. that shell script can now be
executed by runall.sh, allowing us to make use of the cygwin "make"
command, which supports parallel execution.

(cherry picked from commit bbae24c140)
2019-05-06 15:54:30 -07:00
Evan Hunt
9fe5acc36b Merge branch 'each-simplify-stats-v9_14' into 'v9_14'
simplify the isc_stat structure to take avantage of atomics

See merge request isc-projects/bind9!1893
2019-05-06 17:13:17 -04:00
Evan Hunt
6925c8136d CHANGES
(cherry picked from commit f1aaf45085)
2019-05-06 14:02:41 -07:00
Evan Hunt
fb58d23a94 simplify the isc_stat structure to take avantage of atomics
(cherry picked from commit 4e5edb35e4)
2019-05-06 14:02:41 -07:00
Mark Andrews
3e052caca8 Merge branch '1000-arm-doc-rpz-nodata-policy-says-ancount-1-v9_14' into 'v9_14'
Resolve "ARM doc RPZ NODATA policy says ANCOUNT=1"

See merge request isc-projects/bind9!1890
2019-05-06 04:05:38 -04:00
Mark Andrews
756bb201bd A NODATA response has ANCOUNT of 0 assuming no CNAME/DNAMES
(cherry picked from commit 4889e06c3a)
2019-05-06 17:53:42 +10:00
Mark Andrews
63fe63c8c5 Merge branch 'marka-fix-changes' into 'v9_14'
move change 5190 above 9.14.1 release point.

See merge request isc-projects/bind9!1885
2019-04-29 18:54:05 -04:00
Mark Andrews
455472c817 move change 5190 above 9.14.1 release point. 2019-04-30 08:41:35 +10:00
Evan Hunt
0e30e6abaa Merge branch '956-fix-dnstap-test-v9_14' into 'v9_14'
attach memory context sooner so that cleanup will work correctly

See merge request isc-projects/bind9!1883
2019-04-26 19:10:32 -04:00
Evan Hunt
524d36bc2d attach memory context sooner so that cleanup will work correctly
(cherry picked from commit 0fd344e77a)
2019-04-26 15:53:48 -07:00
Ondřej Surý
60a834789e Merge branch '999-tcp-client-crash-v9_11-locks-v9_14' into 'v9_14'
Replace atomic operations in bin/named/client.c with isc_refcount reference counting

See merge request isc-projects/bind9!1880
2019-04-26 15:45:38 -04:00
Ondřej Surý
e203d4d65a Replace atomic operations in bin/named/client.c with isc_refcount reference counting
(cherry picked from commit ef49780d30)
2019-04-26 21:33:50 +02:00
Michał Kępień
bb258967c3 Merge branch 'michal/simplify-trailing-period-handling-in-system-tests-v9_14' into 'v9_14'
[v9_14] Simplify trailing period handling in system tests

See merge request isc-projects/bind9!1877
2019-04-26 15:12:11 -04:00
Michał Kępień
3b7bc3421c Simplify trailing period handling in system tests
Windows systems do not allow a trailing period in file names while Unix
systems do.  When BIND system tests are run, the $TP environment
variable is set to an empty string on Windows systems and to "." on Unix
systems.  This environment variable is then used by system test scripts
for handling this discrepancy properly.

In multiple system test scripts, a variable holding a zone name is set
to a string with a trailing period while the names of the zone's
corresponding dlvset-* and/or dsset-* files are determined using
numerous sed invocations like the following one:

    dlvsets="$dlvsets dlvset-`echo $zone |sed -e "s/.$//g"`$TP"

In order to improve code readability, use zone names without trailing
periods and replace sed invocations with variable substitutions.

To retain local consistency, also remove the trailing period from
certain other zone names used in system tests that are not subsequently
processed using sed.

(cherry picked from commit da2c1b74ad)
2019-04-26 20:38:29 +02:00
Michał Kępień
e3a090e159 Merge branch 'michal/fix-rare-allow-query-system-test-failures-v9_14' into 'v9_14'
[v9_14] Fix rare "allow-query" system test failures

See merge request isc-projects/bind9!1876
2019-04-26 05:31:25 -04:00
Michał Kępień
027c6179a8 Make root zone data match root hints
In the "allow-query" system test, ns3 uses a root hints file which
contains a single entry for a.root-servers.nil (10.53.0.1).  This name
is not present in the root zone served by ns1, which means querying it
for that name and any type will yield an NXDOMAIN response.  When
combined with unfavorable thread scheduling, this can lead to ns3
caching an NXDOMAIN response for the only root server it is aware of and
thus to false positives for the "allow-query" system test caused by ns3
returning unexpected SERVFAIL responses.  Fix by modifying the root zone
served by ns1 so that authoritative responses to a.root-servers.nil
queries match the root hints file used by ns3.

(cherry picked from commit 978a0d2555)
2019-04-26 11:07:00 +02:00
Evan Hunt
9215d68c6b Merge branch '982-filter-aaaa-race-v9_14' into 'v9_14'
Resolve "filter-aaaa crash in 9.14.0"

See merge request isc-projects/bind9!1874
2019-04-26 03:44:38 -04:00
Evan Hunt
e4204809ed CHANGES
(cherry picked from commit ce8ad08a45)
2019-04-26 00:32:55 -07:00
Evan Hunt
8c1af0d3f5 associate a lock with the memory pool in the filter-aaaa plugin
(cherry picked from commit 4f4c18d643)
2019-04-26 00:32:55 -07:00
Ondřej Surý
1d6133277f Merge branch 'prep-release-v9_14' into 'v9_14'
Prep release v9 14

See merge request isc-projects/bind9!1872
2019-04-25 11:28:50 -04:00
Tinderbox User
586e085a71 doc rebuild
(cherry picked from commit b441152036)
2019-04-25 17:01:11 +02:00
Tinderbox User
02cbca91d7 prep 9.14.1
(cherry picked from commit c7004347bc)
2019-04-25 17:00:56 +02:00
Ondřej Surý
a6fac68b4f Merge branch '615-tcp-client-crash-v9_14-v9_14' into 'v9_14'
Resolve "tcp-clients mostly ineffective"

See merge request isc-projects/bind9!1870
2019-04-25 10:40:31 -04:00
Evan Hunt
228a29da4b CHANGES, release note
(cherry picked from commit 244e44af432121a05e0a308b7ccce96a8ecd28ab)
(cherry picked from commit 79fad84bf6)
2019-04-25 16:20:50 +02:00
Evan Hunt
86e9e54766 restore allowance for tcp-clients < interfaces
in the "refactor tcpquota and pipeline refs" commit, the counting
of active interfaces was tightened in such a way that named could
fail to listen on an interface if there were more interfaces than
tcp-clients. when checking the quota to start accepting on an
interface, if the number of active clients was above zero, then
it was presumed that some other client was able to handle accepting
new connections. this, however, ignored the fact that the current client
could be included in that count, so if the quota was already exceeded
before all the interfaces were listening, some interfaces would never
listen.

we now check whether the current client has been marked active; if so,
then the number of active clients on the interface must be greater
than 1, not 0.

(cherry picked from commit 02365b87ea0b1ea5ea8b17376f6734c811c95e61)
(cherry picked from commit cae79e1bab)
2019-04-25 16:20:50 +02:00
Evan Hunt
a78af2f1d3 refactor tcpquota and pipeline refs; allow special-case overrun in isc_quota
- if the TCP quota has been exceeded but there are no clients listening
  for new connections on the interface, we can now force attachment to the
  quota using isc_quota_force(), instead of carrying on with the quota not
  attached.
- the TCP client quota is now referenced via a reference-counted
  'ns_tcpconn' object, one of which is created whenever a client begins
  listening for new connections, and attached to by members of that
  client's pipeline group. when the last reference to the tcpconn
  object is detached, it is freed and the TCP quota slot is released.
- reduce code duplication by adding mark_tcp_active() function
- convert counters to stdatomic

(cherry picked from commit a8dd133d270873b736c1be9bf50ebaa074f5b38f)
(cherry picked from commit 4a8fc979c4)
2019-04-25 16:20:50 +02:00
Evan Hunt
a41c9dbfc1 better tcpquota accounting and client mortality checks
- ensure that tcpactive is cleaned up correctly when accept() fails.
- set 'client->tcpattached' when the client is attached to the tcpquota.
  carry this value on to new clients sharing the same pipeline group.
  don't call isc_quota_detach() on the tcpquota unless tcpattached is
  set.  this way clients that were allowed to accept TCP connections
  despite being over quota (and therefore, were never attached to the
  quota) will not inadvertently detach from it and mess up the
  accounting.
- simplify the code for tcpquota disconnection by using a new function
  tcpquota_disconnect().
- before deciding whether to reject a new connection due to quota
  exhaustion, check to see whether there are at least two active
  clients. previously, this was "at least one", but that could be
  insufficient if there was one other client in READING state (waiting
  for messages on an open connection) but none in READY (listening
  for new connections).
- before deciding whether a TCP client object can to go inactive, we
  must ensure there are enough other clients to maintain service
  afterward -- both accepting new connections and reading/processing new
  queries.  A TCP client can't shut down unless at least one
  client is accepting new connections and (in the case of pipelined
  clients) at least one additional client is waiting to read.

(cherry picked from commit 427a2fb4d17bc04ca3262f58a9dcf5c93fc6d33e)
(cherry picked from commit 0896841272)
2019-04-25 16:20:49 +02:00
Michał Kępień
010e6f4bd7 use reference counter for pipeline groups (v3)
Track pipeline groups using a shared reference counter
instead of a linked list.

(cherry picked from commit 31f392db20207a1b05d6286c3c56f76c8d69e574)
(cherry picked from commit 2211120222)
2019-04-25 16:20:49 +02:00
Witold Kręcicki
ef28e8879b tcp-clients could still be exceeded (v2)
the TCP client quota could still be ineffective under some
circumstances.  this change:

- improves quota accounting to ensure that TCP clients are
  properly limited, while still guaranteeing that at least one client
  is always available to serve TCP connections on each interface.
- uses more descriptive names and removes one (ntcptarget) that
  was no longer needed
- adds comments

(cherry picked from commit 9e74969f85329fe26df2fad390468715215e2edd)
(cherry picked from commit d7e84cee0b)
2019-04-25 16:20:49 +02:00
Witold Kręcicki
4ca208adb8 fix enforcement of tcp-clients (v1)
tcp-clients settings could be exceeded in some cases by
creating more and more active TCP clients that are over
the set quota limit, which in the end could lead to a
DoS attack by e.g. exhaustion of file descriptors.

If TCP client we're closing went over the quota (so it's
not attached to a quota) mark it as mortal - so that it
will be destroyed and not set up to listen for new
connections - unless it's the last client for a specific
interface.

(cherry picked from commit eafcff07c25bdbe038ae1e4b6660602a080b9395)
(cherry picked from commit 9e7617cc84)
2019-04-25 16:20:49 +02:00
Ondřej Surý
b128b54261 Merge branch '880-secure-asdfasdfasdf-abacadabra-crash-v9_14-v9_14' into 'v9_14'
Resolve "CVE-2019-6467: lib/ns/query.c:9176: INSIST(!qctx->is_zone) failed, back trace"

See merge request isc-projects/bind9!1867
2019-04-25 10:19:26 -04:00
Evan Hunt
31c690396d CHANGES, release note
(cherry picked from commit ab5473007e91f011d003ff0ba5ab32fa0d56360c)
(cherry picked from commit 404be59527)
2019-04-25 15:59:43 +02:00
Matthijs Mekking
6b22e1f4fe Fix nxdomain-redirect assertion failure
- Always set is_zonep in query_getdb; previously it was only set if
  result was ISC_R_SUCCESS or ISC_R_NOTFOUND.
- Don't reset is_zone for redirect.
- Style cleanup.

(cherry picked from commit a85cc641d7a4c66cbde03cc4e31edc038a24df46)
(cherry picked from commit 486a201149)
2019-04-25 15:59:43 +02:00
Matthijs Mekking
a38d17dc1c Add test for nxdomain-redirect ncachenxdomain
(cherry picked from commit 2d65626630c19bb8159a025accb18e5179da5dc3)
(cherry picked from commit 05d29443eb)
2019-04-25 15:59:43 +02:00
Mark Andrews
ef6001e055 Merge branch '992-fetchcount-increment-in-resume-qmin-v9_14' into 'v9_14'
When resuming from qname-minimization increase fetches-per-zone counters for the 'new' zone

See merge request isc-projects/bind9!1850
2019-04-23 21:14:40 -04:00
Witold Kręcicki
434ef46661 When resuming from qname-minimization increase fetches-per-zone counters for the 'new' zone
(cherry picked from commit 7043c6eaf5)
2019-04-24 11:03:37 +10:00
Mark Andrews
84a02a0ed7 Merge branch '995-dlz_open_driver-fix-build-failure-without-dlfcn-h-v9_14' into 'v9_14'
Resolve "dlz_open_driver: fix build failure without dlfcn.h"

See merge request isc-projects/bind9!1856
2019-04-23 21:00:55 -04:00
Mark Andrews
c7bf78d52d add CHANGES
(cherry picked from commit 19e4098139)
2019-04-24 09:31:04 +10:00
Mark Andrews
0c5ab7563a conditionally include <dlfcn.h>
(cherry picked from commit eee8084734)
2019-04-24 09:31:04 +10:00
Mark Andrews
d5ec990f18 Merge branch '996-wrong-key-id-is-displayed-for-rsamd5-keys-v9_14' into 'v9_14'
Resolve "Wrong key id is displayed for RSAMD5 keys."

See merge request isc-projects/bind9!1853
2019-04-23 19:10:33 -04:00
Mark Andrews
c15805d74d add CHANGES
(cherry picked from commit 11cddb689f)
2019-04-24 08:52:20 +10:00
Mark Andrews
1b432b3633 compute the RSAMD5 key id
(cherry picked from commit ffaa5a07dd)
2019-04-24 08:51:50 +10:00
Matthijs Mekking
ae9c457878 Merge branch 'matthijs-fix-dnssec-test-intermittent-failure-kskonly-v9_14' into 'v9_14'
Fix dnssec test intermittent failure related to kskonly bugfix

See merge request isc-projects/bind9!1851
2019-04-23 11:25:39 -04:00
Matthijs Mekking
f58a0bbcc1 Harden grep key ID calls
Key IDs may accidentally match dig output that is not the key ID (for
example the RRSIG inception or expiration time, the query ID, ...).
Search for key ID + signer name should prevent that, as that is what
only should occur in the RRSIG record, and signer name always follows
the key ID.

(cherry picked from commit 83473b9758)
2019-04-23 17:12:20 +02:00
Matthijs Mekking
5496b04829 Remove sleeps
Remove sleep calls from test, rely on wait_for_log().  Make
wait_for_log() and dnssec_loadkeys_on() fail the test if the
appropriate log line is not found.

Slightly adjust the echo_i() lines to print only the key ID (not the
key name).

(cherry picked from commit 67f0635f3c)
2019-04-23 17:12:11 +02:00
Michał Kępień
5bb8f501ee Merge branch 'michal/minor-nsupdate-system-test-tweaks-v9_14' into 'v9_14'
[v9_14] Minor "nsupdate" system test tweaks

See merge request isc-projects/bind9!1848
2019-04-23 09:20:07 -04:00
Michał Kępień
5bd52654e8 Wait more than 1 second for NSEC3 chain changes
One second may not be enough for an NSEC3 chain change triggered by an
UPDATE message to complete.  Wait up to 10 seconds when checking whether
a given NSEC3 chain change is complete in the "nsupdate" system test.

(cherry picked from commit f8746cddbc)
2019-04-23 14:59:22 +02:00
Michał Kępień
8691b38edf Remove redundant sleeps
In the "nsupdate" system test, do not sleep before checking results of
changes which are expected to be processed synchronously, i.e. before
nsupdate returns.

(cherry picked from commit 1c8e5ea333)
2019-04-23 14:59:22 +02:00
Mark Andrews
41af10f069 Merge branch 'cleanup-socket-references-v9_14' into 'v9_14'
use isc_refcount_decrement to decrement NEWCONNSOCK(dev)->references; use...

See merge request isc-projects/bind9!1845
2019-04-23 02:44:19 -04:00
Mark Andrews
ca51ee2bb3 use isc_refcount_decrement to decrement NEWCONNSOCK(dev)->references; use isc_refcount_increment instead of isc_refcount_init in socket_create
(cherry picked from commit 265554f895)
2019-04-23 14:47:20 +10:00
Mark Andrews
f5eae9d637 Merge branch 'clang-false-positive-v9_14' into 'v9_14'
add assertions to silence clang false positive

See merge request isc-projects/bind9!1844
2019-04-23 00:22:26 -04:00
Mark Andrews
ff2c10cced add assertions to silence clang false positive
(cherry picked from commit bed9ad79ba)
2019-04-23 14:05:47 +10:00
Mark Andrews
8af9f59a58 Merge branch '962-bind-just-disables-gssapi-support-if-no-gssapi-krb5-headers-found-v9_14' into 'v9_14'
Resolve "Bind just disables GSSAPI support if no GSSAPI/KRB5 headers found"

See merge request isc-projects/bind9!1842
2019-04-22 23:17:02 -04:00
Mark Andrews
eee13b7786 make 'configure --with-gssapi=yes' fatal if support is not found
(cherry picked from commit e420078c63)
2019-04-23 12:59:26 +10:00
Evan Hunt
6419622575 Merge branch '990-return-servfail-v9_14' into 'v9_14'
force SERVFAIL response in the gotanswer failure case

See merge request isc-projects/bind9!1841
2019-04-22 22:30:37 -04:00
Evan Hunt
358e37309c CHANGES
(cherry picked from commit 4d358c9bce)
2019-04-22 19:11:41 -07:00
Evan Hunt
fcd2c2b644 force SERVFAIL response in the gotanswer failure case
- named could return FORMERR if parsing iterative responses
  ended with a result code such as DNS_R_OPTERR. instead of
  computing a response code based on the result, in this case
  we now just force the response to be SERVFAIL.

(cherry picked from commit 7402615697)
2019-04-22 19:11:41 -07:00
Mark Andrews
93af6cd40e Merge branch 'incorrect-use-of-bool-v9_14' into 'v9_14'
using 0 instead of false

See merge request isc-projects/bind9!1839
2019-04-22 22:06:57 -04:00
Mark Andrews
d5d4ddd764 using 0 instead of false
(cherry picked from commit da7f683abf)
2019-04-23 11:45:33 +10:00
Michał Kępień
5ac1725b67 Merge branch 'michal/win32-system-test-fixes-v9_14' into 'v9_14'
[v9_14] Miscellaneous Windows system test fixes

See merge request isc-projects/bind9!1834
2019-04-19 05:52:15 -04:00
Michał Kępień
f069aca7ed Update interface lists in ifconfig scripts
Make bin/tests/system/ifconfig.bat also configure addresses ending with
9 and 10, so that the script is in sync with its Unix counterpart.

Update comments listing the interfaces created by ifconfig.{bat,sh} so
that they do not include addresses whose last octet is zero (since an
address like 10.53.1.0/24 is not a valid host address and thus the
aforementioned scripts do not even attempt configuring them).

(cherry picked from commit b6c1cdfffe)
2019-04-19 11:29:29 +02:00
Michał Kępień
26907f1b0b Fix the "dnssec" system test on Windows
On Windows, the bin/tests/system/dnssec/signer/example.db.signed file
contains carriage return characters at the end of each line.  Remove
them before passing the aforementioned file to the awk script extracting
key IDs so that the latter can work properly.

(cherry picked from commit e4280ed9f5)
2019-04-19 11:29:24 +02:00
Michał Kępień
2c7e341bf3 Do not wait for lock file cleanup on Windows
As signals are currently not handled by named on Windows, instances
terminated using signals are not able to perform a clean shutdown, which
involves e.g. removing the lock file.  Thus, waiting for a given
instance's lock file to be removed beforing assuming it is shut down
is pointless on Windows, so do not even attempt it.

(cherry picked from commit 761ba4514f)
2019-04-19 11:28:05 +02:00
Michał Kępień
aa5839b19c Merge branch '979-win32-remove-lock-file-upon-shutdown-v9_14' into 'v9_14'
[v9_14] win32: remove lock file upon shutdown

See merge request isc-projects/bind9!1832
2019-04-19 05:20:31 -04:00
Michał Kępień
b45e5fc0c6 Add CHANGES entry
5214.	[bug]		win32: named now removes its lock file upon shutdown.
			[GL #979]

(cherry picked from commit e048436805)
2019-04-19 11:00:36 +02:00
Michał Kępień
a228c5b7be win32: remove lock file upon shutdown
Upon named shutdown, the lock file should not just be unlocked but also
removed.

(cherry picked from commit c506077da5)
2019-04-19 11:00:35 +02:00
Michał Kępień
f9b7e2834c Merge branch '978-win32-fix-service-state-reported-during-shutdown-v9_14' into 'v9_14'
[v9_14] win32: fix service state reported during shutdown

See merge request isc-projects/bind9!1830
2019-04-19 04:19:35 -04:00
Michał Kępień
d79ad36b90 Add CHANGES entry
5213.	[bug]		win32: Eliminated a race which allowed named.exe running
			as a service to be killed prematurely during shutdown.
			[GL #978]

(cherry picked from commit e7332343ed)
2019-04-19 09:53:39 +02:00
Michał Kępień
a8172d06cf win32: fix service state reported during shutdown
When a Windows service receives a request to stop, it should not set its
state to SERVICE_STOPPED until it is completely shut down as doing that
allows the operating system to kill that service prematurely, which in
the case of named may e.g. prevent the PID file and/or the lock file
from being cleaned up.

Set service state to SERVICE_STOP_PENDING when named begins its shutdown
and only report the SERVICE_STOPPED state immediately before exiting.

(cherry picked from commit 964749dfdb)
2019-04-19 09:38:45 +02:00
Ondřej Surý
1aeeb6ab85 Merge branch '989-check-for-typeof-extension-v9_14' into 'v9_14'
(v9_14) Use uintmax_t instead of typeof(x) in the ISC_ALIGN macro on non-GNUC systems

See merge request isc-projects/bind9!1827
2019-04-18 07:38:40 -04:00
Ondřej Surý
3349792aa3 On non-GNUC systems, use uintmax_t in the ISC_ALIGN macro
(cherry picked from commit 2e40cc94dc)
2019-04-18 13:17:21 +02:00
Ondřej Surý
5c1d831069 Merge branch 'ondrej/text-files-dont-need-copyright-v9_14' into 'v9_14'
(v9_14) Simple text files don't need copyright header

See merge request isc-projects/bind9!1822
2019-04-18 02:58:22 -04:00
Ondřej Surý
c8e376af50 Simple text files with docs on build or design don't really need copyright on their own
(cherry picked from commit 1877139a32)
2019-04-18 08:56:01 +02:00
Ondřej Surý
9e44151d40 Merge branch 'ondrej/refactor-DNS_RDATASET_FIXED-code-flow-v9_14' into 'v9_14'
(v9_14) Refactor the DNS_RDATASET_FIXED code to use macros instead of ifdefs

See merge request isc-projects/bind9!1817
2019-04-17 05:53:58 -04:00
Ondřej Surý
cd40d65e1b Refactor the DNS_RDATASET_FIXED code to use constants instead of ifdefs
(cherry picked from commit 4edbb773a1)
2019-04-17 11:34:17 +02:00
Matthijs Mekking
d583362353 Merge branch '757-unsupported-algorithms-v9_14' into 'v9_14'
Resolve "Investigate and fix what happens when managed-key algorithm is not supported"

See merge request isc-projects/bind9!1816
2019-04-17 04:54:45 -04:00
Matthijs Mekking
30ec661356 Update CHANGES
(cherry picked from commit 768ded1102)
2019-04-17 10:36:20 +02:00
Matthijs Mekking
b93cb57afe Add documentation
(cherry picked from commit a67dac5d21)
2019-04-17 10:35:33 +02:00
Matthijs Mekking
d52bed8864 DLV tests unsupported/disabled algorithms
This tests both the cases when the DLV trust anchor is of an
unsupported or disabled algorithm, as well as if the DLV zone
contains a key with an unsupported or disabled algorithm.

(cherry picked from commit 3b7c849a3f)
2019-04-17 10:35:19 +02:00
Michał Kępień
3113dc24ec Move code handling key loading errors into a common function
Some values returned by dstkey_fromconfig() indicate that key loading
should be interrupted, others do not.  There are also certain subsequent
checks to be made after parsing a key from configuration and the results
of these checks also affect the key loading process.  All of this
complicates the key loading logic.

In order to make the relevant parts of the code easier to follow, reduce
the body of the inner for loop in load_view_keys() to a single call to a
new function, process_key().  Move dstkey_fromconfig() error handling to
process_key() as well and add comments to clearly describe the effects
of various key loading errors.

(cherry picked from commit b85007e0a6)
2019-04-17 10:35:07 +02:00
Matthijs Mekking
a224bea4b2 Also ignore configured revoked trusted anchors
(cherry picked from commit 4d1ed1283a)
2019-04-17 10:34:54 +02:00
Matthijs Mekking
a7c59e322b Ignore trust anchors using disabled algorithm
More specifically: ignore configured trusted and managed keys that
match a disabled algorithm.  The behavioral change is that
associated responses no longer SERVFAIL, but return insecure.

(cherry picked from commit 1d45ad8f39)
2019-04-17 10:33:25 +02:00
Matthijs Mekking
42c543bb85 Move algorithm variables, add disabled algorithms
Move from conf.sh.in to conf.sh.common as they will also need to be
added to conf.sh.win32.  Add variables for testing disabled
algorithms.

(cherry picked from commit 07c35f32f9)
2019-04-17 10:29:09 +02:00
Matthijs Mekking
96312dadc6 Add inline test related to unsupported algorithms
(cherry picked from commit 924fdad0e5)
2019-04-17 10:28:57 +02:00
Matthijs Mekking
5626c56862 System tests for tools and unsupported algorithms
(cherry picked from commit dfcf9bb0ed)
2019-04-17 10:28:40 +02:00
Evan Hunt
ab125db998 Merge branch '817-out-of-zone-additional-v9_14' into 'v9_14'
out of zone additional data

See merge request isc-projects/bind9!1805
2019-04-15 14:54:58 -04:00
Evan Hunt
0d6a4f7a89 CHANGES
(cherry picked from commit 5071e43c19)
2019-04-15 11:38:28 -07:00
Evan Hunt
0ccddb2b0e revise "minimal-responses" documentation in the ARM
(cherry picked from commit b7e9115793)
2019-04-15 11:38:28 -07:00
Evan Hunt
19f249ffa5 if recursion is allowed and minimal-responses is no, search other databases
this restores functionality that was removed in commit 03be5a6b4e,
allowing named to search in authoritative zone databases outside the
current zone for additional data, if and only if recursion is allowed
and minimal-responses is disabled.

(cherry picked from commit 7fff3295f5)
2019-04-15 11:38:28 -07:00
Matthijs Mekking
7d7930cb82 Merge branch '763-matthijs-active-zsk-but-ksk-only-v9_14' into 'v9_14'
Don't sign DNKSEY RRset with ZSK if KSK is offline

See merge request isc-projects/bind9!1796
2019-04-12 06:02:16 -04:00
Matthijs Mekking
f4dc62f33b With update-check-ksk also consider offline keys
The option `update-check-ksk` will look if both KSK and ZSK are
available before signing records.  It will make sure the keys are
active and available.  However, for operational practices keys may
be offline.  This commit relaxes the update-check-ksk check and will
mark a key that is offline to be available when adding signature
tasks.

(cherry picked from commit 3cb8c49c73)
2019-04-12 11:33:06 +02:00
Matthijs Mekking
244870844c Style: some curly brackets
(cherry picked from commit 2e83e3255a)
2019-04-12 11:33:06 +02:00
Matthijs Mekking
3e75bea995 Add detail on echo message in autosign test
(cherry picked from commit d330986374)
2019-04-12 11:33:06 +02:00
Matthijs Mekking
4dee3d149c Add test for ZSK rollover while KSK offline
This commit adds a lengthy test where the ZSK is rolled but the
KSK is offline (except for when the DNSKEY RRset is changed).  The
specific scenario has the `dnskey-kskonly` configuration option set
meaning the DNSKEY RRset should only be signed with the KSK.

A new zone `updatecheck-kskonly.secure` is added to test against,
that can be dynamically updated, and that can be controlled with rndc
to load the DNSSEC keys.

There are some pre-checks for this test to make sure everything is
fine before the ZSK roll, after the new ZSK is published, and after
the old ZSK is deleted.  Note there are actually two ZSK rolls in
quick succession.

When the latest added ZSK becomes active and its predecessor becomes
inactive, the KSK is offline.  However, the DNSKEY RRset did not
change and it has a good signature that is valid for long enough.
The expected behavior is that the DNSKEY RRset stays signed with
the KSK only (signature does not need to change).  However, the
test will fail because after reconfiguring the keys for the zone,
it wants to add re-sign tasks for the new active keys (in sign_apex).
Because the KSK is offline, named determines that the only other
active key, the latest ZSK, will be used to resign the DNSKEY RRset,
in addition to keeping the RRSIG of the KSK.

The question is: Why do we need to resign the DNSKEY RRset
immediately when a new key becomes active?  This is not required,
only once the next resign task is triggered the new active key
should replace signatures that are in need of refreshing.

(cherry picked from commit 8bc10bcf59)
2019-04-12 11:33:06 +02:00
Mark Andrews
72ba7d132d Merge branch '980-util-update_copyrights-now-needs-to-handle-files-with-cr-lf-endings-v9_14' into 'v9_14'
Resolve "util/update_copyrights now needs to handle files with CR LF endings."

See merge request isc-projects/bind9!1803
2019-04-12 00:50:03 -04:00
Mark Andrews
a7e1a91a36 support files which have CR LF ending like those in win32utils
(cherry picked from commit e76936fd85)
2019-04-12 14:32:32 +10:00
Evan Hunt
7378ba8a80 Merge branch '963-dnstap-check-ra-v9_14' into 'v9_14'
dnstap: if recursion is not available, log queries as AQ instead of CQ

See merge request isc-projects/bind9!1799
2019-04-11 19:08:50 -04:00
Evan Hunt
ded4650794 CHANGES 2019-04-11 15:48:50 -07:00
Evan Hunt
f6c3b13522 dnstap: if recursion is not available, log queries as AQ instead of CQ
(cherry picked from commit 1f578cdb12)
2019-04-11 15:45:52 -07:00
Evan Hunt
c675e366f2 Merge branch '972-auto-validation-summary-v9_14' into 'v9_14'
configure summary failed to report --disable-auto-validation correctly

See merge request isc-projects/bind9!1798
2019-04-11 13:05:00 -04:00
Evan Hunt
7b99a235a8 configure summary failed to report --disable-auto-validation correctly 2019-04-11 09:45:47 -07:00
Mark Andrews
57c8cb42db Merge branch '899-add-totext-fromtext-to-wirechecks-v9_14' into 'v9_14'
Run wire check through "totext" and "fromtext" methods including multi-line.

See merge request isc-projects/bind9!1789
2019-04-11 06:01:29 -04:00
Mark Andrews
ad73e08b07 Add CHANGES
(cherry picked from commit 307a1b563b)
2019-04-11 19:47:44 +10:00
Mark Andrews
b27ef87c38 Add debug printfs
(cherry picked from commit b78e128a2f)
2019-04-11 19:47:44 +10:00
Mark Andrews
86bb6e23ce Prevent WIRE_INVALID() being called without a argument
(cherry picked from commit e73a5b0ce3)
2019-04-11 19:47:44 +10:00
Mark Andrews
1eb7267e60 Check multi-line output from dns_rdata_tofmttext()
Check that multi-line output from dns_rdata_tofmttext() can be read
back in by dns_rdata_fromtext().

(cherry picked from commit b089f43b7a)
2019-04-11 19:47:44 +10:00
Mark Andrews
14c2db8c5d Process master file comments and make input invalid again
(cherry picked from commit 1a75a5cee6)
2019-04-11 19:47:43 +10:00
Mark Andrews
4395311280 Set 'specials' to match 'specials' in 'lib/dns/master.c'
(cherry picked from commit 7941a9554f)
2019-04-11 19:47:43 +10:00
Mark Andrews
c5b191e78f Fix whitespace so that the names align
(cherry picked from commit cc5e16e4d3)
2019-04-11 19:47:43 +10:00
Mark Andrews
56a534ab06 Add dns_rdata_totext() and dns_rdata_fromtext() to fromwire
Add dns_rdata_totext() and dns_rdata_fromtext() to fromwire for
valid inputs to ensure that what we accept in dns_rdata_fromwire()
can be written out and read back in.

(cherry picked from commit 36f30f5731)
2019-04-11 19:47:43 +10:00
Mark Andrews
63b34486c1 Merge branch '965-delv-prints-weird-ttl-values-2-v9_14' into 'v9_14'
Test that dig and delve print correct TTL values.

See merge request isc-projects/bind9!1786
2019-04-10 02:01:08 -04:00
Mark Andrews
fe0c131061 add CHANGES
(cherry picked from commit dfc485b02e)
2019-04-10 15:48:48 +10:00
Matthijs Mekking
5b77d02cbb Check dig TTLs.
This also fixes a bug in the tests ($n was not incremented in one
place).

(cherry picked from commit 195277ca6d)
2019-04-10 15:48:48 +10:00
Mark Andrews
f471907db8 Check delv TTLs.
(cherry picked from commit 146202d6a8)
2019-04-10 15:48:48 +10:00
Mark Andrews
6ba7607283 Merge branch '965-delv-prints-weird-ttl-values-v9_14' into 'v9_14'
Initialise view->mincachettl and view->minncachettl to zero in dns_view_create.

See merge request isc-projects/bind9!1785
2019-04-10 01:20:45 -04:00
Mark Andrews
dad1a49e4e Add CHANGES.
(cherry picked from commit 538da8c80d)
2019-04-10 15:08:33 +10:00
Mark Andrews
10fba8fd8d Initialise mincachettl and minncachettl to zero in dns_view_create.
(cherry picked from commit 8fd4308bda)
2019-04-10 15:08:33 +10:00
Mark Andrews
3818f05513 Merge branch '899-enforce-hash-in-ds-v9_14' into 'v9_14'
enforce DS hash exists

See merge request isc-projects/bind9!1783
2019-04-10 01:03:30 -04:00
Mark Andrews
92bb35b2f5 add CHANGES
(cherry picked from commit 97b7360ce1)
2019-04-10 14:44:05 +10:00
Mark Andrews
480bcb314d add ds unit test
(cherry picked from commit 6eb28eda1e)
2019-04-10 14:44:05 +10:00
Mark Andrews
b24c128a2c enforce DS hash exists
(cherry picked from commit b274f3fad7)
2019-04-10 14:44:05 +10:00
Mark Andrews
4b3df7b577 Merge branch '852-run-fromtext-through-fromwire-v9_14' into 'v9_14'
check that from fromtext produces valid towire input

See merge request isc-projects/bind9!1780
2019-04-09 23:36:54 -04:00
Mark Andrews
2e7a18fb3c add CHANGES
(cherry picked from commit d712b88048)
2019-04-10 13:24:17 +10:00
Mark Andrews
d006ae2195 check that from fromtext produces valid towire input
(cherry picked from commit 7b0a653858)
2019-04-10 13:24:17 +10:00
Ondřej Surý
25b1635310 Merge branch '971-downgrade-DLZ_DBCLIENTINFO_VERSION-in-dlz_minimal.h-v9_14' into 'v9_14'
Downgrade the dns_clientinfomethod structure to the version in lib/dns/clientinfo.c

See merge request isc-projects/bind9!1778
2019-04-09 15:39:25 -04:00
Ondřej Surý
69e218ea45 Downgrade the dns_clientinfomethod structure to the version in lib/dns/clientinfo.c
(cherry picked from commit a6f09b2255)
2019-04-09 20:25:53 +01:00
Mark Andrews
e09a3f0a2b Merge branch '899-fromwire-check-flags-for-nokey-v9_14' into 'v9_14'
Check KEY flags for empty key in fromwire method

See merge request isc-projects/bind9!1776
2019-04-09 00:49:12 -04:00
Mark Andrews
3c32b765c1 add CHANGES
(cherry picked from commit f78c688c4f)
2019-04-09 14:22:50 +10:00
Mark Andrews
53a62e2977 for rkey flags MUST be zero
(cherry picked from commit 82d4931440)
2019-04-09 14:22:50 +10:00
Mark Andrews
07d024a4da check flags for no key in fromwire for *KEY
(cherry picked from commit 2592e91516)
2019-04-09 14:22:50 +10:00
Mark Andrews
356bf021e2 Merge branch '976-dns-ecs-h-missing-isc_lang_enddecls-v9_14' into 'v9_14'
Resolve "dns/ecs.h missing ISC_LANG_ENDDECLS"

See merge request isc-projects/bind9!1775
2019-04-08 22:19:11 -04:00
Mark Andrews
14313d798a <dns/ecs.h> was missing ISC_LANG_ENDDECLS.
(cherry picked from commit 698a6f955e)
2019-04-09 12:05:57 +10:00
Evan Hunt
e5de594ddb Merge branch '973-pause-dbiterator-in-rpz-v9_14' into 'v9_14'
Fix deadlock in RPZ update code.

See merge request isc-projects/bind9!1772
2019-04-06 15:55:03 -04:00
Witold Kręcicki
6e63d7047d Fix deadlock in RPZ update code.
In dns_rpz_update_from_db we call setup_update which creates the db
iterator and calls dns_dbiterator_first. This unpauses the iterator and
might cause db->tree_lock to be acquired. We then do isc_task_send(...)
on an event to do quantum_update, which (correctly) after each iteration
calls dns_dbiterator_pause, and re-isc_task_sends itself.

That's an obvious bug, as we're holding a lock over an async task send -
if a task requesting write (e.g. prune_tree) is scheduled on the same
workers queue as update_quantum but before it, it will wait for the
write lock indefinitely, resulting in a deadlock.

To fix it we have to pause dbiterator in setup_update.

(cherry picked from commit 06021b3529)
2019-04-06 12:41:36 -07:00
Witold Krecicki
5ca807d65d Merge branch '966-resume-qmin-shuttingdown-v9_14' into 'v9_14'
Resolve "Crash in resolver code"

See merge request isc-projects/bind9!1766
2019-04-03 10:57:36 -04:00
Witold Kręcicki
4df48b84c1 CHANGES
(cherry picked from commit d11791e24c)
2019-04-03 16:34:33 +02:00
Witold Kręcicki
9ff296afeb In resume_qmin check if the fetch context is already shutting down - if so, try to destroy it, don't continue
(cherry picked from commit 7c960e89ea)
2019-04-03 16:34:33 +02:00
Michał Kępień
4024dac62b Merge branch '893-do-not-rely-on-default-dig-options-in-system-tests-v9_14' into 'v9_14'
[v9_14] Do not rely on default dig options in system tests

See merge request isc-projects/bind9!1764
2019-04-03 07:21:57 -04:00
Michał Kępień
915f94a6a3 Do not rely on default dig options in system tests
Some system tests assume dig's default setings are in effect.  While
these defaults may only be silently overridden (because of specific
options set in /etc/resolv.conf) for BIND releases using liblwres for
parsing /etc/resolv.conf (i.e. BIND 9.11 and older), it is arguably
prudent to make sure that tests relying on specific +timeout and +tries
settings specify these explicitly in their dig invocations, in order to
prevent test failures from being triggered by any potential changes to
current defaults.

(cherry picked from commit b6cce0fb8b)
2019-04-03 12:57:45 +02:00
Mark Andrews
cabee6b765 Merge branch '920-see-problem-when-multiple-sigs-with-besteffort-parsing-v9_14' into 'v9_14'
Address problems with best effort parsing.

See merge request isc-projects/bind9!1752
2019-03-26 06:46:09 -04:00
Mark Andrews
ffdd736b63 add CHANGES
(cherry picked from commit b779342017)
2019-03-26 21:32:08 +11:00
Witold Kręcicki
69d3bb78c2 Fix assertion failure in nslookup/dig/mdig when message has multiple SIG(0) options.
When parsing message with DNS_MESSAGE_BESTEFFORT (used exclusively in
tools, never in named itself) if we hit an invalid SIG(0) in wrong
place we continue parsing the message, and put the sig0 in msg->sig0.
If we then hit another sig0 in a proper place we see that msg->sig0
is already 'taken' and we don't free name and rdataset, and we don't
set seen_problem. This causes an assertion failure.
This fixes that issue by setting seen_problem if we hit second sig0,
tsig or opt, which causes name and rdataset to be always freed.

(cherry picked from commit 51a55ddbb7)
2019-03-26 21:32:08 +11:00
Mark Andrews
ddfd5be3b7 Merge branch '955-make-install-fails-after-configure-with-dlopen-no-v9_14' into 'v9_14'
Resolve "`make install` fails after ./configure --with-dlopen=no"

See merge request isc-projects/bind9!1750
2019-03-26 05:09:06 -04:00
Mark Andrews
7a0f39b848 add CHANGES
(cherry picked from commit bd670d4a04)
2019-03-26 19:54:40 +11:00
Mark Andrews
8c2a3b03f4 fix plugin installation
(cherry picked from commit cd3593c38d)
2019-03-26 19:54:39 +11:00
Evan Hunt
e1240eaa2e Merge branch 'each-merge-9140-doc' into 'v9_14'
merge version updates for 9.14.0rc3 and 9.14.0

See merge request isc-projects/bind9!1748
2019-03-22 13:35:42 -04:00
Tinderbox User
684f90a674 doc rebuild 2019-03-22 10:35:15 -07:00
Tinderbox User
e6225b210b prep 9.14.0 2019-03-22 10:35:15 -07:00
Tinderbox User
19c53595ff doc rebuild 2019-03-22 10:35:15 -07:00
Tinderbox User
2d36283bc1 prep 9.14.0rc3 2019-03-22 10:35:15 -07:00
Tinderbox User
fdeb694c1e doc rebuild 2019-03-22 10:35:15 -07:00
Tinderbox User
fc43fe565a prep 9.14.0rc2 2019-03-22 10:35:15 -07:00
Ondřej Surý
9cfcce0858 Merge branch '4-make-dnstap.pb-c.h-private-v9_14' into 'v9_14'
(v9_14) Make lib/dns/dnstap.pb-c.h header a private to lib/dns

See merge request isc-projects/bind9!1745
2019-03-22 07:20:10 -04:00
Ondřej Surý
7485a4332e Make lib/dns/dnstap.pb-c.h private header
This changes dns_dtdata struct to not expose data types from dnstap.pb-c.h to
prevent the need for including this header where not really needed.

(cherry picked from commit 8ccce7e24b)
2019-03-22 12:07:31 +01:00
Evan Hunt
ffb950c8ae Merge branch '913-allow-update-v9_14' into 'v9_14'
restore inheritance of 'allow-update' and 'allow-update-forwarding'

See merge request isc-projects/bind9!1743
2019-03-22 03:29:39 -04:00
Evan Hunt
6b09e885b8 CHANGES, release notes
(cherry picked from commit 55a7961cf3)
2019-03-22 00:15:22 -07:00
Evan Hunt
dde35a8edf don't fail when allow-update{,-forwarding} is used globally
(cherry picked from commit 91dca0f8da)
2019-03-22 00:14:52 -07:00
Mark Andrews
a31960314a Merge branch '899-zonemd-check-for-hash-existence-v9_14' into 'v9_14'
zonemd require non empty hash

See merge request isc-projects/bind9!1740
2019-03-21 16:10:49 -04:00
Mark Andrews
5125a367ad add CHANGES
(cherry picked from commit e1db1b8dcb)
2019-03-22 06:52:10 +11:00
Mark Andrews
753d77c51f Disallow empty ZONEMD hashes
This change is the result of discussions with the authors of
draft-wessels-dns-zone-digest.

(cherry picked from commit 473987d8d9)
2019-03-22 06:52:10 +11:00
Mark Andrews
e4bd0c00e2 Merge branch '899-eid-totext-is-broken-v9_14' into 'v9_14'
EID and NIMLOC totext is broken.

See merge request isc-projects/bind9!1736
2019-03-21 05:40:45 -04:00
Mark Andrews
2818a83df9 add CHANGES
(cherry picked from commit c20b89fcf8)
2019-03-21 20:26:29 +11:00
Mark Andrews
c52dfb2063 add brackets for multi-line output
(cherry picked from commit 40a770b932)
2019-03-21 20:26:02 +11:00
Michał Kępień
8b047466c9 Merge branch 'michal/fix-key-id-extraction-in-the-dnssec-system-test-v9_14' into 'v9_14'
[v9_14] Fix key ID extraction in the "dnssec" system test

See merge request isc-projects/bind9!1734
2019-03-21 03:35:54 -04:00
Michał Kępień
d14d661c20 Fix key ID extraction in the "dnssec" system test
Simply looking for the key ID surrounded by spaces in the tested
dnssec-signzone output file is not a precise enough method of checking
for signatures prepared using a given key ID: it can be tripped up by
cross-algorithm key ID collisions and certain low key IDs (e.g. 60, the
TTL specified in bin/tests/system/dnssec/signer/example.db.in), which
triggers false positives for the "dnssec" system test.  Make key ID
extraction precise by using an awk script which operates on specific
fields.

(cherry picked from commit a40c60e4c1)
2019-03-21 08:10:47 +01:00
Michał Kępień
7046195e23 Merge branch 'michal/minor-mirror-system-test-tweaks-v9_14' into 'v9_14'
[v9_14] Minor "mirror" system test tweaks

See merge request isc-projects/bind9!1726
2019-03-20 05:09:21 -04:00
Michał Kępień
689f5aef5a Increase dig query timeout to 2 seconds
The "mirror" system test expects all dig queries (including recursive
ones) to be responded to within 1 second, which turns out to be overly
optimistic in certain cases and leads to false positives being
triggered.  Increase dig query timeout used throughout the "mirror"
system test to 2 seconds in order to alleviate the issue.

(cherry picked from commit 73afbdc552)
2019-03-20 09:51:18 +01:00
Michał Kępień
78cce30893 Increase TAT query interval
Currently, ns3 in the "mirror" system test sends trust anchor telemetry
queries every second as it is started with "-T tat=1".  Given the number
of trust anchors configured on ns3 (9), TAT-related traffic clutters up
log files, hindering troubleshooting efforts.  Increase TAT query
interval to 3 seconds in order to alleviate the issue.

Note that the interval chosen cannot be much higher if intermittent test
failures are to be avoided: TAT queries are only sent after the
configured number of seconds passes since resolver startup.  Quick
experiments show that even on contemporary hardware, ns3 should be
running for at least 5 seconds before it is first shut down, so a
3-second TAT query interval seems to be a reasonable, future-proof
compromise.  Ensure the relevant check is performed before ns3 is first
shut down to emphasize this trade-off and make it more clear by what
time TAT queries are expected to be sent.

(cherry picked from commit 6847a29b54)
2019-03-20 09:51:18 +01:00
Ondřej Surý
31a2a00c64 Merge branch '4-update-gitignore-for-future-automake-v9_14' into 'v9_14'
(v9_14) Update and sort the top level .gitignore to ignore automake files

See merge request isc-projects/bind9!1728
2019-03-20 04:45:11 -04:00
Ondřej Surý
514ed3d0fa Sort the top level .gitignore file
(cherry picked from commit b9d524ed7e)
2019-03-20 09:25:07 +01:00
Ondřej Surý
03a7e521df Update top level .gitignore to ignore automake files
(cherry picked from commit 5c67d1d120)
2019-03-20 09:25:07 +01:00
Michał Kępień
cab6c2ff01 Merge branch 'michal/serve-stale-system-test-wait-for-dump-completion-v9_14' into 'v9_14'
[v9_14] "serve-stale" system test: wait until "rndc dumpdb" completes

See merge request isc-projects/bind9!1725
2019-03-20 04:08:05 -04:00
Michał Kępień
a61cc8cffe Wait until "rndc dumpdb" completes
"rndc dumpdb" works asynchronously, i.e. the requested dump may not yet
be fully written to disk by the time "rndc" returns.  Prevent false
positives for the "serve-stale" system test by only checking dump
contents after the line indicating that it is complete is written.

(cherry picked from commit 6e3f812afc)
2019-03-20 08:48:25 +01:00
Michał Kępień
e677397e19 Merge branch '944-make-stop.pl-wait-for-lock-file-cleanup-v9_14' into 'v9_14'
[v9_14] Make stop.pl wait for lock file cleanup

See merge request isc-projects/bind9!1710
2019-03-19 06:18:36 -04:00
Michał Kępień
a226afa2a6 Make stop.pl wait for lock file cleanup
bin/tests/system/stop.pl only waits for the PID file to be cleaned up
while named cleans up the lock file after the PID file.  Thus, the
aforementioned script may consider a named instance to be fully shut
down when in fact it is not.

Fix by also checking whether the lock file exists when determining a
given instance's shutdown status.  This change assumes that if a named
instance uses a lock file, it is called "named.lock".

Also rename clean_pid_file() to pid_file_exists(), so that it is called
more appropriately (it does not clean up the PID file itself, it only
returns the server's identifier if its PID file is not yet cleaned up).

(cherry picked from commit c787a539d2)
2019-03-19 10:28:54 +01:00
Michał Kępień
1119cccf99 Correctly invoke stop.pl when start.pl fails
MR !1141 broke the way stop.pl is invoked when start.pl fails:

  - start.pl changes the working directory to $testdir/$server before
    attempting to start $server,

  - commit 27ee629e6b causes the $testdir
    variable in stop.pl to be determined using the $SYSTEMTESTTOP
    environment variable, which is set to ".." by all tests.sh scripts,

  - commit e227815af5 makes start.pl pass
    $test (the test's name) rather than $testdir (the path to the test's
    directory) to stop.pl when a given server fails to start.

Thus, when a server is restarted from within a tests.sh script and such
a restart fails, stop.pl attempts to look for the server directory in a
nonexistent location ($testdir/$server/../$test, i.e. $testdir/$test,
instead of $testdir/../$test).  Fix the issue by changing the working
directory before stop.pl is invoked in the scenario described above.

(cherry picked from commit 4afad2a047)
2019-03-19 10:28:54 +01:00
Evan Hunt
6fd2475f3e Merge branch '945-remove-revoked-root-key-from-bind-keys-v9_14' into 'v9_14'
Resolve "Remove revoked root key from bind.keys."

See merge request isc-projects/bind9!1708
2019-03-19 00:23:16 -04:00
Mark Andrews
3954d4ec30 Remove revoked root DNSKEY from bind.keys.
(cherry picked from commit 0e805b58e8)
2019-03-18 21:21:39 -07:00
Mark Andrews
8c0a0011f4 Merge branch '940-unit-dnstap-pkcs11-tz-v9_14' into 'v9_14'
Fix regression in dnstap_test with native pkcs11

See merge request isc-projects/bind9!1700
2019-03-15 01:37:53 -04:00
Mark Andrews
b1c658b850 add CHANGES
(cherry picked from commit 788f784191)
2019-03-15 16:17:52 +11:00
Petr Menšík
7885bbff99 Fix regression in dnstap_test with native pkcs11
Change to cmocka broken initialization of TZ environment. This time,
commit 1cf1254051 is not soon enough. Has
to be moved more forward, before any other tests. It library is not full
reinitialized on each test.

(cherry picked from commit 71c4fad592)
2019-03-15 16:17:52 +11:00
Mark Andrews
2dc5dbfeb2 Merge branch 'rename-shadowed-variable-v9_14' into 'v9_14'
rename-shadowed-variable

See merge request isc-projects/bind9!1699
2019-03-14 21:35:49 -04:00
Mark Andrews
b57ca2982f rename-shadowed-variable
(cherry picked from commit 15bfe4f2e1)
2019-03-15 12:23:57 +11:00
Evan Hunt
3123d8714f Merge branch '938-cppcheck-format-issues-v9_14' into 'v9_14'
Resolve "Cppcheck format issues."

See merge request isc-projects/bind9!1695
2019-03-14 17:03:16 -04:00
Mark Andrews
b30e5f11fb force promotion to unsigned int
(cherry picked from commit 1eba2c5b06)
2019-03-14 13:51:30 -07:00
Mark Andrews
838906b3cd isc_quota_* return unsigned int
(cherry picked from commit a43d648b95)
2019-03-14 13:51:30 -07:00
Evan Hunt
46bc92d5d1 Merge branch '890-assert-the-hevent-rdataset-is-non-null-v9_14' into 'v9_14'
Resolve "Assert the hevent->rdataset is non-NULL."

See merge request isc-projects/bind9!1693
2019-03-14 16:34:22 -04:00
Mark Andrews
68608eaa3c assert hevent->rdataset is non NULL
(cherry picked from commit d8d04edfba)
2019-03-14 13:16:43 -07:00
Evan Hunt
1c1fb922c2 Merge branch '937-potential-null-pointer-dereference-in-bin-tests-system-dlzexternal-driver-c-v9_14' into 'v9_14'
Resolve "potential null pointer dereference in bin/tests/system/dlzexternal/driver.c"

See merge request isc-projects/bind9!1690
2019-03-14 16:14:06 -04:00
Mark Andrews
8f2227a423 check that state and state->log are non NULL before calling state->log
(cherry picked from commit 7bf6750330)
2019-03-14 12:55:57 -07:00
Evan Hunt
be71d9cc43 Merge branch 'missing-isc-lang-h-v9_14' into 'v9_14'
missing lang.h

See merge request isc-projects/bind9!1689
2019-03-14 15:43:34 -04:00
Mark Andrews
cdaf04f043 missing #include <isc/lang.h>
(cherry picked from commit 719b1d7fdc)
2019-03-14 12:24:19 -07:00
Mark Andrews
12fa506459 Merge branch 'u/fanf2/man-dnssec-keygen-again-v9_14' into 'v9_14'
A bit more cleanup in the dnssec-keygen manual

See merge request isc-projects/bind9!1684
2019-03-14 00:30:36 -04:00
Tony Finch
d69530cae8 A bit more cleanup in the dnssec-keygen manual
Remove another remnant of shared secret HMAC-MD5 support.

Explain that with currently recommended setups DNSKEY records are
inserted automatically, but you can still use $INCLUDE in other cases.

(cherry picked from commit acc3fa04b7)
2019-03-14 15:17:03 +11:00
Mark Andrews
d8ef8b5658 Merge branch '936-missing-unlocks-in-sdlz-c-v9_14' into 'v9_14'
Resolve "Missing unlocks in sdlz.c"

See merge request isc-projects/bind9!1679
2019-03-13 20:08:10 -04:00
Mark Andrews
1210201ab3 add CHANGES
(cherry picked from commit 32f2ae3791)
2019-03-14 09:01:12 +11:00
Mark Andrews
e9a1087e96 add missing MAYBE_UNLOCK
(cherry picked from commit ff8bf617e7)
2019-03-14 09:01:12 +11:00
Evan Hunt
e658e92ada Merge branch '881-cleanup-ecs-v9_14' into 'v9_14'
clean up ECS before reusing clients

See merge request isc-projects/bind9!1676
2019-03-12 17:10:04 -04:00
Evan Hunt
a87585aba3 CHANGES
(cherry picked from commit 9463a781fb)
2019-03-12 13:59:12 -07:00
Witold Kręcicki
fcb5642ec0 Clean up client->ecs when we're done with the request.
(cherry picked from commit aa3da7a232)
2019-03-12 13:59:12 -07:00
Evan Hunt
84910c0920 Merge branch '834-fix-race-in-fctx-cancel-v9_14' into 'v9_14'
fix race in socket code

See merge request isc-projects/bind9!1672
2019-03-12 16:10:22 -04:00
Witold Kręcicki
ec8621ae10 CHANGES
(cherry picked from commit 50f6054294)
2019-03-12 11:55:04 -07:00
Witold Kręcicki
fcc7a8c6ca Fix a race in fctx_cancelquery.
When sending an udp query (resquery_send) we first issue an asynchronous
isc_socket_connect and increment query->connects, then isc_socket_sendto2
and increment query->sends.
If we happen to cancel this query (fctx_cancelquery) we need to cancel
all operations we might have issued on this socket. If we are under very high
load the callback from isc_socket_connect (resquery_udpconnected) might have
not yet been fired. In this case we only cancel the CONNECT event on socket,
and ignore the SEND that's waiting there (as there is an `else if`).
Then we call dns_dispatch_removeresponse which kills the dispatcher socket
and calls isc_socket_close - but if system is under very high load, the send
we issued earlier might still not be complete - which triggers an assertion
because we're trying to close a socket that's still in use.

The fix is to always check if we have incomplete sends on the socket and cancel
them if we do.

(cherry picked from commit 56183a3917)
2019-03-12 11:54:43 -07:00
Michał Kępień
769982d7db Merge branch 'michal/silence-a-perl-warning-output-by-stop.pl-v9_14' into 'v9_14'
[v9_14] Silence a Perl warning output by stop.pl

See merge request isc-projects/bind9!1669
2019-03-12 04:04:14 -04:00
Michał Kępień
abf84143e4 Silence a Perl warning output by stop.pl
On Unix systems, the CYGWIN environment variable is not set at all when
BIND system tests are run.  If a named instance crashes on shutdown or
otherwise fails to clean up its pidfile and the CYGWIN environment
variable is not set, stop.pl will print an uninitialized value warning
on standard error.  Prevent this by using defined().

(cherry picked from commit 91e5a99b9b)
2019-03-12 08:43:07 +01:00
Mark Andrews
b0b1c5f88f Merge branch 'ifconfig.sh-anywhere-v9_14' into 'v9_14'
Allow ifconfig to be called from any directory

See merge request isc-projects/bind9!1667
2019-03-11 23:22:08 -04:00
Petr Menšík
2b526cf8e1 Allow ifconfig to be called from any directory
ifconfig.sh depends on config.guess for platform guessing. It uses it to
choose between ifconfig or ip tools to configure interfaces. If
system-wide automake script is installed and local was not found, use
platform guess. It should work well on mostly any sane platform. Still
prefers local guess, but passes when if cannot find it.

(cherry picked from commit 38301052e1)
2019-03-12 14:10:40 +11:00
Evan Hunt
4e0e40dee7 Merge branch '892-fix-redirect-name-v9_14' into 'v9_14'
use qname in redirect2

See merge request isc-projects/bind9!1663
2019-03-11 14:34:35 -04:00
Mark Andrews
7dcee14699 add CHANGES
(cherry picked from commit ad785e4f93)
2019-03-11 11:22:13 -07:00
Mark Andrews
d974a28898 use client->query.qname
(cherry picked from commit 8758d36a5e)
2019-03-11 11:19:00 -07:00
Evan Hunt
85f6e00755 Merge branch 'each-fix-changes' into 'v9_14'
remove accidentally-included CHANGES notes

See merge request isc-projects/bind9!1661
2019-03-11 13:59:59 -04:00
Evan Hunt
0faa56cb6c remove accidentally-included CHANGES notes 2019-03-11 10:58:51 -07:00
Michał Kępień
802a965245 Merge branch '928-stabilize-delzsk.example-zone-checks-v9_14' into 'v9_14'
[v9_14] Stabilize "delzsk.example" zone checks

See merge request isc-projects/bind9!1658
2019-03-11 08:28:15 -04:00
Michał Kępień
79a4cbd203 Stabilize "delzsk.example" zone checks
When a zone is converted from NSEC to NSEC3, the private record at zone
apex indicating that NSEC3 chain creation is in progress may be removed
during a different (later) zone_nsec3chain() call than the one which
adds the NSEC3PARAM record.  The "delzsk.example" zone check only waits
for the NSEC3PARAM record to start appearing in dig output while private
records at zone apex directly affect "rndc signing -list" output.  This
may trigger false positives for the "autosign" system test as the output
of the "rndc signing -list" command used for checking ZSK deletion
progress may contain extra lines which are not accounted for.  Ensure
the private record is removed from zone apex before triggering ZSK
deletion in the aforementioned check.

Also future-proof the ZSK deletion progress check by making it only look
at lines it should care about.

(cherry picked from commit e02de04e97)
2019-03-11 13:03:17 +01:00
Michał Kępień
83acb4ffad Merge branch '129-dnssec-system-test-tweaks-v9_14' into 'v9_14'
[v9_14] "dnssec" system test tweaks

See merge request isc-projects/bind9!1656
2019-03-11 08:02:07 -04:00
Mark Andrews
8f2f5d98dc ${ttl} must exist and be non null
(cherry picked from commit dee1f1a498)
2019-03-11 12:11:58 +01:00
Michał Kępień
f301744f59 Make ANSWER TTL capping checks stricter
For checks querying a named instance with "dnssec-accept-expired yes;"
set, authoritative responses have a TTL of 300 seconds.  Assuming empty
resolver cache, TTLs of RRsets in the ANSWER section of the first
response to a given query will always match their authoritative
counterparts.  Also note that for a DNSSEC-validating named resolver,
validated RRsets replace any existing non-validated RRsets with the same
owner name and type, e.g. cached from responses received while resolving
CD=1 queries.  Since TTL capping happens before a validated RRset is
inserted into the cache and RRSIG expiry time does not impose an upper
TTL bound when "dnssec-accept-expired yes;" is set and, as pointed out
above, the original TTLs of the relevant RRsets equal 300 seconds, the
RRsets in the ANSWER section of the responses to expiring.example/SOA
and expired.example/SOA queries sent with CD=0 should always be exactly
120 seconds, never a lower value.  Make the relevant TTL checks stricter
to reflect that.

(cherry picked from commit a85cc41486)
2019-03-11 12:11:58 +01:00
Michał Kępień
f28953b6fc Relax ADDITIONAL TTL capping checks
Always expecting a TTL of exactly 300 seconds for RRsets found in the
ADDITIONAL section of responses received for CD=1 queries sent during
TTL capping checks is too strict since these responses will contain
records cached from multiple DNS messages received during the resolution
process.

In responses to queries sent with CD=1, ns.expiring.example/A in the
ADDITIONAL section will come from a delegation returned by ns2 while the
ANSWER section will come from an authoritative answer returned by ns3.
If the queries to ns2 and ns3 happen at different Unix timestamps,
RRsets cached from the older response will have a different TTL by the
time they are returned to dig, triggering a false positive.

Allow a safety margin of 60 seconds for checks inspecting the ADDITIONAL
section of responses to queries sent with CD=1 to fix the issue.  A
safety margin this large is likely overkill, but it is used nevertheless
for consistency with similar safety margins used in other TTL capping
checks.

(cherry picked from commit 8baf859063)
2019-03-11 12:11:58 +01:00
Michał Kępień
8f1c3e5da6 Fix message section checked in a TTL capping test
Commit c032c54dda inadvertently changed
the DNS message section inspected by one of the TTL capping checks from
ADDITIONAL to ANSWER, introducing a discrepancy between that check's
description and its actual meaning.  Revert to inspecting the ADDITIONAL
section in the aforementioned check.

(cherry picked from commit a597bd52a6)
2019-03-11 12:11:58 +01:00
Michał Kępień
95a765202c Fix NTA-related races
Changes introduced by commit 6b8e4d6e69
were incomplete as not all time-sensitive checks were updated to match
revised "nta-lifetime" and "nta-recheck" values.  Prevent rare false
positives by updating all NTA-related checks so that they work reliably
with "nta-lifetime 12s;" and "nta-recheck 9s;".  Update comments as well
to prevent confusion.

(cherry picked from commit 9a36a1bba3)
2019-03-11 12:11:58 +01:00
Evan Hunt
b23e7208ed Merge branch 'ondrej/restore-flockfile-check-v9_14' into 'v9_14'
(v9_14) Restore missing check for flockfile and getc_unlocked

See merge request isc-projects/bind9!1654
2019-03-08 19:41:33 -05:00
Ondřej Surý
a169e35634 Restore missing check for flockfile and getc_unlocked
(cherry picked from commit 7eea756858)
2019-03-08 21:35:08 +01:00
Michał Kępień
4e38e3bb24 Merge branch 'michal/fix-regex-used-for-mangling-druz-dnskey-v9_14' into 'v9_14'
[v9_14] Fix regex used for mangling druz/DNSKEY (in the "dlv" system test)

See merge request isc-projects/bind9!1647
2019-03-08 08:08:57 -05:00
Michał Kępień
3bf0350ae7 Fix regex used for mangling druz/DNSKEY
During "dlv" system test setup, the "sed" regex used for mangling the
DNSKEY RRset for the "druz" zone does not include the plus sign ("+"),
which may:

  - cause the replacement to happen near the end of DNSKEY RDATA, which
    can cause the latter to become an invalid Base64 string,

  - prevent the replacement from being performed altogether.

Both cases prevent the "dlv" system test from behaving as intended and
may trigger false positives.  Add the missing character to the
aforementioned regex to ensure the replacement is always performed on
bytes 10-25 of DNSKEY RDATA.

(cherry picked from commit fd13fef299)
2019-03-08 13:48:39 +01:00
Michał Kępień
7202303f8c Merge branch '925-make-delv-use-os-supplied-ephemeral-port-range-v9_14' into 'v9_14'
[v9_14] Make delv use OS-supplied ephemeral port range

See merge request isc-projects/bind9!1645
2019-03-08 07:46:09 -05:00
Michał Kępień
9fe1f29d39 Add CHANGES entry
5180.	[bug]		delv now honors the operating system's preferred
			ephemeral port range. [GL #925]

(cherry picked from commit bf98324956)
2019-03-08 13:14:01 +01:00
Michał Kępień
040d631027 Make delv use OS-supplied ephemeral port range
Make delv honor the operating system's preferred ephemeral port range
instead of always using the default 1024-65535 range for outgoing
messages.

(cherry picked from commit ada6846a10)
2019-03-08 13:14:00 +01:00
Mark Andrews
a364783956 Merge branch 'u/fanf2/sectypes-v9_14' into 'v9_14'
cleanup: use dns_secalg_t and dns_dsdigest_t where appropriate

See merge request isc-projects/bind9!1643
2019-03-08 06:38:51 -05:00
Tony Finch
1e2bfb1460 cleanup: use dns_secalg_t and dns_dsdigest_t where appropriate
Use them in structs for various rdata types where they are missing.
This doesn't change the structs since we are replacing explicit
uint8_t field types with aliases for uint8_t.

Use dns_dsdigest_t in library function arguments.

Improve dnssec-cds with these more specific types.

(cherry picked from commit 0f219714e1)
2019-03-08 22:16:48 +11:00
Mark Andrews
1d3a271352 Merge branch 'marka-define-path-max-v9_14' into 'v9_14'
#include <limits.h> for PATH_MAX, define if not found

See merge request isc-projects/bind9!1639
2019-03-08 02:45:39 -05:00
Mark Andrews
8faca93b37 #include <limits.h> for PATH_MAX, define if not found
(cherry picked from commit 1fc7be36eb)
2019-03-08 18:23:59 +11:00
Evan Hunt
06d2cb71da Merge branch 'each-silence-warning-v9_14' into 'v9_14'
silence a warning about potential snprintf overrun

See merge request isc-projects/bind9!1633
2019-03-08 01:16:42 -05:00
Evan Hunt
e2ee2e9e0b silence a warning about potential snprintf overrun
(cherry picked from commit 7f26cad247)
2019-03-07 21:46:50 -08:00
Evan Hunt
61339e91ea Merge branch '902-hang-when-unexpected-errno-encountered-during-log-rename-v9_14' into 'v9_14'
Resolve "Hang when unexpected errno encountered during log rename"

See merge request isc-projects/bind9!1631
2019-03-08 00:44:04 -05:00
Mark Andrews
cdf928d391 Handle EDQUOT and ENOSPC errors
(cherry picked from commit 435ae2f29a)
2019-03-07 21:23:39 -08:00
Evan Hunt
5bb39746a1 Merge branch '884-patches-to-review-3-v9_14' into 'v9_14'
fix the use of dns_wildcardname as an optimisation in DLZ

See merge request isc-projects/bind9!1629
2019-03-07 23:39:30 -05:00
Mark Andrews
c1489dfa4f fix the use of dns_wildcardname as an optimisation in DLZ
(cherry picked from commit cb32cd98bd)
2019-03-07 20:27:57 -08:00
Evan Hunt
8b1e4ec8e9 Merge branch 'ckb-statistics-test-nit-v9_14' into 'v9_14'
the wrong variable was used to count the test cases in one place.

See merge request isc-projects/bind9!1627
2019-03-07 21:54:20 -05:00
Curtis Blackburn
e58a77043c the wrong variable was used to count the test cases in one place.
(cherry picked from commit 4f60a84e34)
2019-03-07 18:42:14 -08:00
Mark Andrews
ee9d1eca72 Merge branch '927-teach-clang-that-_fail-does-not-return-v9_14' into 'v9_14'
Resolve "teach clang that _fail() does not return."

See merge request isc-projects/bind9!1626
2019-03-07 20:26:08 -05:00
Mark Andrews
c117605812 add noreturn attribute
(cherry picked from commit 3f2b7e1006)
2019-03-08 12:13:18 +11:00
Evan Hunt
f13692afcf Merge branch '865-option-to-disable-information-leak-on-rpz-rewrites-isc-support-14178-v9_14' into 'v9_14'
Resolve "Option to disable information leak on RPZ rewrites [ISC-support

See merge request isc-projects/bind9!1623
2019-03-07 16:41:31 -05:00
Mark Andrews
d76b2147a8 CHANGES, release note
(cherry picked from commit 89234643e1)
2019-03-07 13:29:37 -08:00
Evan Hunt
e152529fb7 disable a previously broken test under dnsrps
(cherry picked from commit aeed047495)
2019-03-07 13:29:11 -08:00
Mark Andrews
edc607bced add the ability to control whether SOA records are added response-policy modified answers
(cherry picked from commit d1fa8be611)
2019-03-07 13:29:11 -08:00
Evan Hunt
b3e152610d Merge branch 'each-notes-914' into 'v9_14'
clear out 9.14.0 release notes

See merge request isc-projects/bind9!1622
2019-03-07 14:34:27 -05:00
Evan Hunt
5d09223874 clear out release notes from 9.14.0 to prepare the ground for 9.14.1 2019-03-07 11:11:15 -08:00
Evan Hunt
56e4b5c9dd Merge branch '882-zone-data-cannot-be-loaded-with-dnssec-coverage-v9_14' into 'v9_14'
Resolve "Zone data cannot be loaded with dnssec-coverage"

See merge request isc-projects/bind9!1619
2019-03-06 23:58:34 -05:00
Evan Hunt
36d91876bf add CHANGES
(cherry picked from commit 57e44efc73)
2019-03-06 20:41:23 -08:00
Mark Andrews
4a46242ed2 explicitly convert byte to string
(cherry picked from commit ec3d830bc5)
2019-03-06 20:41:09 -08:00
Mark Andrews
5b27d26909 Merge branch 'u/fanf2/man-dnssec-keygen-v9_14' into 'v9_14'
cleanup dnssec-keygen manual page

See merge request isc-projects/bind9!1616
2019-03-06 19:15:23 -05:00
Tony Finch
7ddd24ba97 cleanup dnssec-keygen manual page
Alphabetize options and synopsis; remove spurious -z from synopsis;
remove remnants of deprecated -k option; remove mention of long-gone
TSIG support; refer to -T KEY in options that are only relevant to
pre-RFC3755 DNSSEC; remove unnecessary -n ZONE from the example, and
add a -f KSK example.

(cherry picked from commit 1954f8d2bf)
2019-03-07 11:14:55 +11:00
Mark Andrews
9d3eb872d0 Merge branch '926-statschannel-system-tests-fails-json-only-no-libxml-v9_14' into 'v9_14'
Resolve "statschannel system tests fails json only (no libxml)"

See merge request isc-projects/bind9!1615
2019-03-06 19:02:59 -05:00
Mark Andrews
ef46f75066 add CHANGES
(cherry picked from commit 5bc06a0a11)
2019-03-07 10:45:04 +11:00
Mark Andrews
98fd813532 remove dependancy on libxml
(cherry picked from commit a9c47414b3)
2019-03-07 10:44:11 +11:00
Evan Hunt
be60fedced Merge branch '874-fix-race-in-socket-code-v9_14' into 'v9_14'
Fix a race in socket code

See merge request isc-projects/bind9!1613
2019-03-06 17:33:11 -05:00
Evan Hunt
71adab3f4a CHANGES
(cherry picked from commit 6d24292830)
2019-03-06 14:15:19 -08:00
Witold Kręcicki
54f9c1d306 Fix a race in socket code when internal_{accept, send, receive} is called
from event loop on an socket and, in the meantime, someone has closed this
socket.

(cherry picked from commit b57a38ae43)
2019-03-06 14:15:19 -08:00
Evan Hunt
c2fb1f8853 Merge branch 'michal/log-plugin-unloading-at-debug-level-v9_14' into 'v9_14'
Log plugin unloading at debug level

See merge request isc-projects/bind9!1612
2019-03-06 16:07:57 -05:00
Michał Kępień
9036952f84 Log plugin unloading at debug level
During server reconfiguration, plugin instances set up for the old views
are unloaded very close to the end of the whole process, after new
plugin instances are set up.  As the log message announcing plugin
unloading is emitted at the default "info" level, the user might be
misled into thinking that it is the new plugin instances that are being
unloaded for some reason, particularly because all other messages logged
at the "info" level around the same time inform about setting things up
rather than tearing them down.  Since no distinction is currently made
between destroying a view due to reconfiguration and due to a shutdown
in progress, there is no easy way to vary the contents of the log
message depending on circumstances.  Since this message is not a
particularly critical one, demote it to debug level to prevent
confusion.

(cherry picked from commit af4b81f944)
2019-03-06 12:55:29 -08:00
Michał Kępień
3e676b0d65 Merge branch '905-make-nsupdate-use-os-supplied-ephemeral-port-range-v9_14' into 'v9_14'
[v9_14] Make nsupdate use OS-supplied ephemeral port range

See merge request isc-projects/bind9!1609
2019-03-06 08:27:40 -05:00
Michał Kępień
0a5a0a5e97 Add CHANGES entry
5172.	[bug]		nsupdate now honors the operating system's preferred
			ephemeral port range. [GL #905]

(cherry picked from commit 0e64948274)
2019-03-06 14:03:37 +01:00
Michał Kępień
a553168786 Make nsupdate use OS-supplied ephemeral port range
Make nsupdate honor the operating system's preferred ephemeral port
range instead of always using the default 1024-65535 range for outgoing
messages.

(cherry picked from commit 06f582f23e)
2019-03-06 14:03:36 +01:00
Evan Hunt
d4d89a18af Merge branch '878-install-named-plugins-into-a-separate-directory-v9_14' into 'v9_14'
Install named plugins into a separate directory

See merge request isc-projects/bind9!1605
2019-03-05 20:04:27 -05:00
Michał Kępień
f1f695ef5a Add CHANGES entry
5161.	[func]		named plugins are now installed into a separate
			directory.  Supplying a filename (a string without path
			separators) in a "plugin" configuration stanza now
			causes named to look for that plugin in that directory.
			[GL #878]

(cherry picked from commit d2c960cfc2)
2019-03-05 16:52:49 -08:00
Michał Kępień
1865264426 Add -c to usage message for named-checkconf
Add the -c command line option to the usage message for named-checkconf
as it is not present there despite being documented.

(cherry picked from commit cba155154b)
2019-03-05 16:52:49 -08:00
Michał Kępień
9b72458b1e Look for named plugins in ${libdir}/named
When the "library" part of a "plugin" configuration stanza does not
contain at least one path separator, treat it as a filename and assume
it is a name of a shared object present in the named plugin installation
directory.  Absolute and relative paths can still be used and will be
used verbatim.  Get the full path to a plugin before attempting to
check/register it so that all relevant log messages include the same
plugin path (apart from the one logged when the full path cannot be
determined).

(cherry picked from commit 1a9fc624ca)
2019-03-05 16:52:49 -08:00
Michał Kępień
3883acc5c2 Add ns_plugin_expandpath()
Implement a helper function which, given an input string:

  - copies it verbatim if it contains at least one path separator,
  - prepends the named plugin installation directory to it otherwise.

This function will allow configuration parsing code to conveniently
determine the full path to a plugin module given either a path or a
filename.

While other, simpler ways exist for making sure filenames passed to
dlopen() cause the latter to look for shared objects in a specific
directory, they are very platform-specific.  Using full paths is thus
likely the most portable and reliable solution.

Also added unit tests for ns_plugin_expandpath() to ensure it behaves
as expected for absolute paths, relative paths, and filenames, for
various target buffer sizes.

(Note: plugins share a directory with named on Windows; there is no
default plugin path. Therefore the source path is copied to the
destination path with no modification.)

(cherry picked from commit d181c28c60)
2019-03-05 16:52:49 -08:00
Michał Kępień
4ddfaeea3e Install named plugins into a separate directory
Installing named plugins into ${libdir} clutters the latter and is not
in line with common filesystem conventions.  Instead, install named
plugins into a separate directory, ${libdir}/named.

(cherry picked from commit c527b7fd5c)
2019-03-05 16:52:49 -08:00
Evan Hunt
017b190bdb Merge branch '909-add-explicit-link-check-for-libatomic-v9_14' into 'v9_14'
Add explicit check for libatomic to fix configure step on NetBSD

See merge request isc-projects/bind9!1604
2019-03-05 18:41:55 -05:00
Ondřej Surý
919dc5dd42 Add information about NetBSD 6 compilation on i386
(cherry picked from commit 9a16e0a5ae)
2019-03-05 15:24:05 -08:00
Ondřej Surý
c7d164fad5 Add explicit check for libatomic
(cherry picked from commit fcade0610f)
2019-03-05 15:24:04 -08:00
Mark Andrews
1d8682d429 Merge branch '919-add-win32util-configure-file-list-check-to-ci-v9_14' into 'v9_14'
Resolve "Add win32util/Configure file list check to CI"

See merge request isc-projects/bind9!1602
2019-03-05 17:41:46 -05:00
Mark Andrews
3b6de8e0c1 remove '..\\bin\\tests\\system\\dlz\\prereq.sh' from win32util/Configure
(cherry picked from commit 442421906b)
2019-03-05 17:41:33 -05:00
Mark Andrews
cb1006d95d add util/check-win32util-configure to precheck
(cherry picked from commit c3dd8bb9f0)
2019-03-05 17:41:33 -05:00
Evan Hunt
8c32b70956 Merge branch '884-patches-to-review-4-v9_14' into 'v9_14'
dlz filesystem driver failed to properly detect period at end of filename.

See merge request isc-projects/bind9!1600
2019-03-05 17:40:01 -05:00
Mark Andrews
b12970046a properly detect period as last character in filename
(cherry picked from commit c9dc59eb90)
2019-03-05 14:22:36 -08:00
Evan Hunt
4b0eaf7267 Merge branch 'michal/disable-servfail-cache-for-ns5-in-the-mkeys-system-test-v9_14' into 'v9_14'
Disable SERVFAIL cache for ns5 in the "mkeys" system test

See merge request isc-projects/bind9!1598
2019-03-05 16:40:49 -05:00
Michał Kępień
e4a544e989 Disable SERVFAIL cache for ns5 in the "mkeys" system test
The "check key refreshes are resumed after root servers become
available" check may trigger a false positive for the "mkeys" system
test if the second example/TXT query sent by dig is received by ns5 less
than a second after it receives a REFUSED response to the upstream query
it sends to ns1 in order to resolve the first example/TXT query sent by
dig.  Since that REFUSED response from ns1 causes ns5 to return a
SERVFAIL answer to dig, example/TXT is added to the SERVFAIL cache,
which is enabled by default with a TTL of 1 second.  This in turn may
cause ns5 to return a cached SERVFAIL response to the second example/TXT
query sent by dig, i.e. make ns5 not perform full query processing as
expected by the check.

Since the primary purpose of the check in question is to ensure that key
refreshes are resumed once initially unavailable root servers become
available, the optimal solution appears to be disabling SERVFAIL cache
for ns5 as doing that still allows the check to fulfill its purpose and
it is arguably more prudent than always sleeping for 1 second.

(cherry picked from commit 7c6bff3c4e)
2019-03-05 13:25:04 -08:00
Evan Hunt
60beddf87f Merge branch '889-improve-clang-cmocka-interaction-v9_14' into 'v9_14'
Resolve "Improve clang/cmocka interaction."

See merge request isc-projects/bind9!1596
2019-03-05 14:01:37 -05:00
Mark Andrews
7c78e5b90a improve clang / cmocka integration
(cherry picked from commit cb913177ae)
2019-03-05 10:42:01 -08:00
Matthijs Mekking
3ca83c19d9 Merge branch 'matthijs-more-clean.sh-related-cleanups-v9_14' into 'v9_14'
More clean.sh related cleanups

See merge request isc-projects/bind9!1592
2019-03-04 11:30:16 -05:00
Matthijs Mekking
8578d11ca7 Ensure all system tests run clean.sh from setup.sh
For consistency between all system tests, add missing setup.sh scripts
for tests which do not have one yet and ensure every setup.sh script
calls its respective clean.sh script.
2019-03-04 16:58:40 +01:00
Matthijs Mekking
00d04b28c2 Only perform test cleanups in clean.sh scripts
Temporary files created by a given system test should be removed by its
clean.sh script, not its setup.sh script.  Remove redundant "rm"
invocations from setup.sh scripts.  Move required "rm" invocations from
setup.sh scripts to their corresponding clean.sh scripts.
2019-03-04 16:58:30 +01:00
Mark Andrews
4e800096e6 Merge branch 'feature/featuretest-dlz-v9_14' into 'v9_14'
Test dlz support in feature-test

See merge request isc-projects/bind9!1588
2019-03-03 22:26:30 -05:00
Mark Andrews
f9920f62c4 add CHANGES
(cherry picked from commit 5f125df462)
2019-03-04 14:08:21 +11:00
Mark Andrews
25e4ebaba6 run autoheader and autoconf
(cherry picked from commit 4988367b53)
2019-03-04 14:08:19 +11:00
Petr Menšík
3c29d47797 Support DLZ filesystem detection in feature-test
Do not use variable from configure to detect the feature.

(cherry picked from commit 759a7b4ce3)
2019-03-04 14:06:38 +11:00
Michał Kępień
6fd9415350 Merge branch 'michal/fix-ip-regex-used-in-the-resolver-system-test-v9_14' into 'v9_14'
[v9_14] Fix IP regex used in the "resolver" system test

See merge request isc-projects/bind9!1583
2019-03-01 01:55:45 -05:00
Michał Kępień
06b36db554 Fix IP regex used in the "resolver" system test
If dots are not escaped in the "1.2.3.4" regular expressions used for
checking whether IP address 1.2.3.4 is present in the tested resolver's
answers, a COOKIE that matches such a regular expression will trigger a
false positive for the "resolver" system test.  Properly escape dots in
the aforementioned regular expressions to prevent that from happening.

(cherry picked from commit 70ae48e5cb)
2019-03-01 07:53:27 +01:00
Evan Hunt
3761db36e8 Merge branch '901-empty-any-v9_14' into 'v9_14'
handle empty ANY query responses

See merge request isc-projects/bind9!1581
2019-02-28 19:24:52 -05:00
Evan Hunt
778cfd3a98 CHANGES 2019-02-28 16:07:41 -08:00
Evan Hunt
8431d18426 test correct occlusion of DNSSEC records
(cherry picked from commit c6939f0bd4)
2019-02-28 16:06:38 -08:00
Evan Hunt
ed72b9434d fix crash in query_respond_any() from all records being hidden
in query_respond_any(), the assumption had previously been made that it
was impossible to get past iterating the node with a return value of
ISC_R_NOMORE but not have found any records, unless we were searching
for RRSIG or SIG. however, it is possible for other types to exist but
be hidden, such as when the zone is transitioning from insecure to
secure and DNSSEC types are encountered, and this situation could
trigger an assertion.  removed the assertion and reorganized the code.

(cherry picked from commit 3e74c7e5ff)
2019-02-28 16:06:38 -08:00
Michał Kępień
71f7589f08 Merge branch 'michal/do-not-include-conf.sh-from-ttl-clean.sh-v9_14' into 'v9_14'
[v9_14] Do not include conf.sh from ttl/clean.sh

See merge request isc-projects/bind9!1578
2019-02-28 07:42:46 -05:00
Michał Kępień
43eeb2319b Do not include conf.sh from ttl/clean.sh
Including $SYSTEMTESTTOP/conf.sh from a system test's clean.sh script is
not needed for anything while it causes an error message to be printed
out when "./configure" is run, as "make clean" is invoked at the end.
Remove the offending line to prevent the error from occurring.

(cherry picked from commit 6602848460)
2019-02-28 13:17:13 +01:00
Michał Kępień
79666f739b Merge branch 'michal/call-clean.sh-from-all-relevant-setup.sh-scripts-v9_14' into 'v9_14'
[v9_14] Call clean.sh from all relevant setup.sh scripts

See merge request isc-projects/bind9!1576
2019-02-28 07:11:02 -05:00
Michał Kępień
7b1f4c8a6a Call clean.sh from all relevant setup.sh scripts
For all system tests utilizing named instances, call clean.sh from each
test's setup.sh script in a consistent way to make sure running the same
system test multiple times using run.sh does not trigger false positives
caused by stale files created by previous runs.

Ideally we would just call clean.sh from run.sh, but that would break
some quirky system tests like "rpz" or "rpzrecurse" and being consistent
for the time being does not hurt.

(cherry picked from commit a077a3ae8a)
2019-02-28 12:39:06 +01:00
Tinderbox User
c2c957735f Merge branch 'prep-release' into v9_14 2019-02-28 00:05:32 +00:00
Tinderbox User
4ea7fb82a7 doc rebuild 2019-02-28 00:05:06 +00:00
Tinderbox User
13c0bf922b prep 9.14.0rc1 2019-02-27 23:50:01 +00:00
Evan Hunt
8d3931409e Merge branch 'prep-914' into 'v9_14'
documentation changes establishing the 9.14 stable branch

See merge request isc-projects/bind9!1559
2019-02-27 18:33:05 -05:00
Evan Hunt
3396f9396f documentation changes establishing the 9.14 stable branch 2019-02-27 18:06:35 -05:00
Matthijs Mekking
06d5da0204 Merge branch '813-matthijs-failure-loading-rpz-v9_14' into 'v9_14'
Resolve "Problems after failure of loading rpz [ISC-support #14002]"

See merge request isc-projects/bind9!1562
2019-02-22 10:05:07 -05:00
Matthijs Mekking
0f520ac026 Update CHANGES 2019-02-22 15:26:43 +01:00
Matthijs Mekking
05f156e8ba Unregister RPZ CATZ db cbs when zone load fails
In case when a zone fails to load because the file does not exist
or is malformed, we should not run the callback that updates the
zone database when the load is done.  This is achieved by
unregistering the callbacks if at zone load end if the result
indicates something else than success.
2019-02-22 15:24:24 +01:00
Matthijs Mekking
ae159914b0 Update copyrights 2019-02-22 15:24:16 +01:00
Matthijs Mekking
d6cb3022a3 Add test for rpz zone load fail 2019-02-22 15:24:08 +01:00
Matthijs Mekking
6594f7acb2 Remove rpz->db_registered
As pointed out in !813 db_registered is sort of redundant.  It is
set to `true` only in `dns_zone_rpz_enable_db()` right before the
`dns_rpz_dbupdate_callback()` callback is registered.  It is only
required in that callback and it is the only place that the callback
is registered.  Therefore there is no path that that `REQUIRE` can
fail.

The `db_registered` variable is only set to `false` in
`dns_rpz_new_zone`, so it is not like the variable is unset again
later.

The only other place where `db_registered` is checked is in
`rpz_detach()`.  If `true`, it will call
`dns_db_updatenotify_unregister()`.  However if that happens, the
`db_registered` is not set back to `false` thus this implies that
this may happen multiple times.  If called a second time, most
likely the unregister function will return `ISC_R_NOTFOUND`, but
the return value is not checked anyway.  So it can do without the
`db_registered` check.
2019-02-22 15:23:59 +01:00
Matthijs Mekking
a4cd74e71a Add curly brackets on if statements 2019-02-22 15:23:44 +01:00
Matthijs Mekking
48d7e4bb40 named crashes on shutdown after load rpz failed
This may happen when loading an RPZ failed and the code path skips
calling dns_db_endload().  The dns_rpz_zone_t object is still kept
marked as having registered db.  So when this object is finally
destroyed in rpz_detach(), this code will incorrectly call
`dns_db_updatenotify_unregister()`:

   if (rpz->db_registered)
     dns_db_updatenotify_unregister(rpz->db,
                                    dns_rpz_dbupdate_callback, rpz);

and trigger this assertion failure:

   REQUIRE(db != NULL);

To fix this, only call `dns_db_updatenotify_unregister()` when
`rpz->db` is not NULL.
2019-02-22 15:23:33 +01:00
Matthijs Mekking
e2def297b6 Make RPZ tests more readable 2019-02-22 15:18:20 +01:00
Matthijs Mekking
c01d63373c Add README to RPZ tests 2019-02-22 15:18:11 +01:00
Tinderbox User
6491691ac4 Merge branch 'prep-release' into security-v9_14 2019-02-21 02:11:26 +00:00
Tinderbox User
453f5da790 doc rebuild 2019-02-21 02:11:15 +00:00
Tinderbox User
856c74700f prep 9.13.7 2019-02-21 01:57:08 +00:00
Evan Hunt
ce5857556b Merge branch 'security-dlz-axfr-deny-broken' into security-master
denied axfr requests were not effective for writable DLZ zones

See merge request isc-private/bind9!57
2019-02-20 17:45:50 -08:00
Mark Andrews
ed6c10d46b add CHANGES and release notes entries 2019-02-20 17:45:50 -08:00
Mark Andrews
bc01aadc02 denied axfr requests were not effective for writable DLZ zones 2019-02-20 17:45:50 -08:00
Evan Hunt
702e5dc21a Merge 'keytag-memleak' into security-master 2019-02-20 17:45:49 -08:00
Evan Hunt
a47d2850c0 fix test error 2019-02-20 17:45:49 -08:00
Mark Andrews
7d5b7192ec add CHANGES and release note entries 2019-02-20 17:45:49 -08:00
Mark Andrews
d68adfea9c check that multiple KEY-TAG trust-anchor-telemetry options don't leak memory 2019-02-20 17:45:49 -08:00
Mark Andrews
873c704de9 silently ignore additional keytag options 2019-02-20 17:45:49 -08:00
Evan Hunt
ff47556e26 Merge 'managed-key-assert' into security-master 2019-02-20 17:45:48 -08:00
Evan Hunt
f3fbbc20d2 Merge 'managed-key-assert' into security-master 2019-02-20 17:45:48 -08:00
Evan Hunt
8b8e492e48 use algorithm 255 for both unsupported keys 2019-02-20 17:45:48 -08:00
Matthijs Mekking
ea5a5b77f9 CHANGES, notes 2019-02-20 17:45:48 -08:00
Matthijs Mekking
98ef5c09d2 Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key.
2019-02-20 17:45:47 -08:00
Matthijs Mekking
3516864ade Add tests for mkeys with unsupported algorithm
These tests check if a key with an unsupported algorithm in
managed-keys is ignored and when seeing an algorithm rollover to
an unsupported algorithm, the new key will be ignored too.
2019-02-20 17:45:47 -08:00
Matthijs Mekking
5aa41ae9f8 Don't free key in compute_tag in case of failure
If `dns_dnssec_keyfromrdata` failed we don't need to call
`dst_key_free` because no `dstkey` was created.  Doing so
nevertheless will result in an assertion failure.

This can happen if the key uses an unsupported algorithm.
2019-02-20 17:45:47 -08:00
Evan Hunt
566ad7021e Merge branch 'setup-v914' into v9_14 2019-02-20 17:44:43 -08:00
Evan Hunt
2579f31f54 begin setup of 9.14 branch 2019-02-20 17:44:32 -08:00
5858 changed files with 461787 additions and 335085 deletions

View File

@@ -1,78 +0,0 @@
BasedOnStyle: LLVM
IndentWidth: 8
UseTab: Always
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: false
AfterEnum: false
AfterStruct: false
AfterUnion: false
AfterControlStatement: MultiLine
AfterFunction: false # should also be MultiLine, but not yet supported
AfterExternBlock: false
BeforeElse: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
AlwaysBreakAfterReturnType: All
Cpp11BracedListStyle: false
ColumnLimit: 80
AlignAfterOpenBracket: Align
AlignConsecutiveBitFields: true
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: true
AlignEscapedNewlines: Left
DerivePointerAlignment: false
PointerAlignment: Right
PointerBindsToType: false
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<isc/'
Priority: 5
- Regex: '^<(pk11|pkcs11)/'
Priority: 10
- Regex: '^<dns/'
Priority: 15
- Regex: '^<dst/'
Priority: 20
- Regex: '^<isccc/'
Priority: 25
- Regex: '^<isccfg/'
Priority: 30
- Regex: '^<ns/'
Priority: 35
- Regex: '^<irs/'
Priority: 40
- Regex: '^<bind9/'
Priority: 45
- Regex: '^<(dig|named|rndc|confgen|dlz)/'
Priority: 50
- Regex: '^<dlz_'
Priority: 55
- Regex: '^".*"'
Priority: 99
- Regex: '^<tests/'
Priority: 100
- Regex: '<openssl/'
Priority: 1
- Regex: '<(mysql|protobuf-c)/'
Priority: 1
- Regex: '.*'
Priority: 0
IndentExternBlock: NoIndent
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
PenaltyBreakAssignment: 30
PenaltyBreakComment: 10
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 80
PenaltyExcessCharacter: 100
Standard: Cpp11
ContinuationIndentWidth: 8

View File

@@ -1,66 +0,0 @@
BasedOnStyle: LLVM
IndentWidth: 8
UseTab: Always
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: false
AfterEnum: false
AfterStruct: false
AfterUnion: false
AfterControlStatement: MultiLine
AfterFunction: false # should also be MultiLine, but not yet supported
AfterExternBlock: false
BeforeElse: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
AlwaysBreakAfterReturnType: All
Cpp11BracedListStyle: false
ColumnLimit: 80
AlignAfterOpenBracket: Align
AlignConsecutiveBitFields: true
AlignConsecutiveDeclarations: true
AlignConsecutiveMacros: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: true
AlignEscapedNewlines: Left
DerivePointerAlignment: false
PointerAlignment: Right
PointerBindsToType: false
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<isc/'
Priority: 2
- Regex: '^<dns/'
Priority: 3
- Regex: '^<iscccc/'
Priority: 4
- Regex: '^<isccfg/'
Priority: 5
- Regex: '^<ns/'
Priority: 6
- Regex: '^<bind9/)'
Priority: 7
- Regex: '^(<[^/]*)/)'
Priority: 8
- Regex: '^<tests/'
Priority: 10
- Regex: '<[[:alnum:].]+>'
Priority: 1
- Regex: '".*"'
Priority: 9
IndentExternBlock: NoIndent
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
PenaltyBreakAssignment: 30
PenaltyBreakComment: 10
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 80
PenaltyExcessCharacter: 100
Standard: Cpp11
ContinuationIndentWidth: 8

View File

@@ -16,6 +16,10 @@
(concat directory-of-current-dir-locals-file "./"))
;; libisc
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/unix/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/pthreads/include"))
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/isc/include"))
(expand-file-name
@@ -49,10 +53,6 @@
(expand-file-name
(concat directory-of-current-dir-locals-file "lib/bind9/include"))
;; libtest
(expand-file-name
(concat directory-of-current-dir-locals-file "tests/include"))
;; bin
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/check"))
@@ -77,12 +77,8 @@
(expand-file-name
(concat directory-of-current-dir-locals-file "bin/rndc/include"))
(expand-file-name "/usr/include/libxml2")
(expand-file-name "/usr/include/json-c")
(expand-file-name "/usr/local/opt/openssl@1.1/include")
(expand-file-name "/usr/local/opt/libxml2/include/libxml2")
(expand-file-name "/usr/local/opt/json-c/include/json-c/")
(expand-file-name "/usr/local/include")
)
)
@@ -90,32 +86,5 @@
(eval setq flycheck-clang-include-path include-directories)
(eval setq flycheck-cppcheck-include-path include-directories)
(eval setq flycheck-gcc-include-path include-directories)
(eval setq flycheck-clang-args
(list
"-include"
(expand-file-name
(concat directory-of-current-dir-locals-file "config.h"))
)
)
(eval setq flycheck-gcc-args
(list
"-include"
(expand-file-name
(concat directory-of-current-dir-locals-file "config.h"))
)
)
(eval setq flycheck-cppcheck-args
(list
"--enable=all"
"--suppress=missingIncludeSystem"
"--suppress=nullPointerRedundantCheck"
"--suppress=preprocessorErrorDirective"
"--suppress=unknownMacro"
"--suppress=unmatchedSuppression"
(concat "-include=" (expand-file-name
(concat directory-of-current-dir-locals-file "config.h")))
)
)
)
))

File diff suppressed because it is too large Load Diff

5
.gitattributes vendored
View File

@@ -1,7 +1,6 @@
*.sln.in eol=crlf
*.vcxproj.* eol=crlf
/fuzz/dns_rdata_fromwire_text.in/input-* -text
*.vcxproj.in eol=crlf
*.vcxproj.filters.in eol=crlf
.gitignore export-ignore
/conftools export-ignore

View File

@@ -1,55 +0,0 @@
name: "CodeQL"
on:
push:
branches: [ "v9_16", "v9_18", "main" ]
schedule:
- cron: '39 8 * * 3'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install build dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libuv1-dev libssl-dev libnghttp2-dev libxml2-dev liblmdb-dev libjson-c-dev pkg-config autoconf automake autotools-dev libtool-bin libjemalloc-dev libedit-dev libcap-dev libidn2-dev libkrb5-dev libmaxminddb-dev zlib1g-dev python3-ply
version: 1.0
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"

View File

@@ -1,15 +0,0 @@
name: 'Lock down mirror repository'
on:
issues:
types: opened
pull_request:
types: opened
jobs:
lockdown:
runs-on: ubuntu-latest
steps:
- uses: dessant/repo-lockdown@v2
with:
github-token: ${{ github.token }}

View File

@@ -1,50 +0,0 @@
name: SonarCloud
on:
push:
branches: [ "v9_16", "v9_18", "main" ]
schedule:
- cron: '39 8 * * 3'
jobs:
build:
name: Build and analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
env:
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install build dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libuv1-dev libssl-dev libnghttp2-dev libxml2-dev liblmdb-dev libjson-c-dev pkg-config autoconf automake autotools-dev libtool-bin libjemalloc-dev libedit-dev libcap-dev libidn2-dev libkrb5-dev libmaxminddb-dev zlib1g-dev python3-ply
version: 1.0
- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v1
- name: Run build-wrapper
run: |
autoreconf -fi
./configure
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make clean all
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}"

46
.gitignore vendored
View File

@@ -4,17 +4,13 @@
*.gcno
*.la
*.lo
*.log
*.o
*.orig
*.plist/ # ccc-analyzer store its results in .plist directories
*.rej
*.so
*.trs
*_test
*.ipch # vscode/intellisense precompiled header
*~
__pycache__/
.ccache/
.cproject
.deps/
@@ -39,6 +35,7 @@ __pycache__/
/depcomp
/install-sh
/isc-config.sh
/libltdl/*
/libtool
/ltmain.sh
/m4/libtool.m4
@@ -53,48 +50,13 @@ __pycache__/
/stamp-h1
/test-driver
Makefile
Makefile.in
Makefile.user
ans.run
gen.dSYM/
kyua.log
named.memstats
named.run
timestamp
/compile_commands.json
# Gets generated by Build Ear (bear)
/compile_commands.commands.json
/tsan
/cppcheck_html/
/cppcheck.results
/util/check-make-install
/INSTALL
doc/man/dnssec-cds.8in
doc/man/dnssec-checkds.8in
doc/man/dnssec-coverage.8in
doc/man/dnssec-dsfromkey.8in
doc/man/dnssec-importkey.8in
doc/man/dnssec-keyfromlabel.8in
doc/man/dnssec-keygen.8in
doc/man/dnssec-keymgr.8in
doc/man/dnssec-revoke.8in
doc/man/dnssec-settime.8in
doc/man/dnssec-signzone.8in
doc/man/dnssec-verify.8in
doc/man/named-checkconf.8in
doc/man/named-checkzone.8in
doc/man/named-journalprint.8in
doc/man/named-nzd2nzf.8in
doc/man/nsec3hash.8in
doc/man/pkcs11-destroy.8in
doc/man/pkcs11-keygen.8in
doc/man/pkcs11-list.8in
doc/man/pkcs11-tokens.8in
# clangd index directory
/\.cache/
/\.*_clangd/
# GNU Global index files
/GPATH
/GRTAGS
/GTAGS
# Emacs specific files
\.dir-locals-2.el
/emacs.desktop
/emacs.desktop-lock

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
<!--
If the bug you are reporting is potentially security-related - for example,
if it involves an assertion failure or other crash in `named` that can be
triggered repeatedly - then please make sure that you make the new issue
confidential!
triggered repeatedly - then please do *NOT* report it here, but send an
email to [security-officer@isc.org](security-officer@isc.org).
-->
### Summary

View File

@@ -1,128 +0,0 @@
<!--
THIS ISSUE TEMPLATE IS INTENDED ONLY FOR INTERNAL USE.
If the bug you are reporting is potentially security-related - for example,
if it involves an assertion failure or other crash in `named` that can be
triggered repeatedly - then please make sure that you make the new issue
confidential!
-->
| Quick Links | :link: |
| ------------------------ | ------------------------------------ |
| Incident Manager: | @user |
| Deputy Incident Manager: | @user |
| Public Disclosure Date: | YYYY-MM-DD |
| CVSS Score: | [0.0][cvss_score] |
| Security Advisory: | isc-private/printing-press!NNN |
| Mattermost Channel: | [CVE-YYYY-NNNN][mattermost_url] |
| Support Ticket: | [URL] |
| Release Checklist: | #NNNN |
| Post-mortem Etherpad: | [postmortem-YYYY-MM][postmortem_url] |
[cvss_score]: https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:X/AC:X/PR:X/UI:X/S:X/C:X/I:X/A:X&version=3.1
[mattermost_url]:
[postmortem_url]:
:bulb: **Click [here][checklist_explanations] (internal resource) for general information about the security incident handling process.**
[checklist_explanations]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations
### Earlier Than T-5
- [ ] [:link:][step_deputy] **(IM)** Pick a Deputy Incident Manager
- [ ] [:link:][step_respond] **(IM)** Respond to the bug reporter
- [ ] [:link:][step_etherpad] **(IM)** Create an Etherpad for post-mortem
- [ ] [:link:][step_public_mrs] **(SwEng)** Ensure there are no public merge requests which inadvertently disclose the issue
- [ ] [:link:][step_assign_cve_id] **(IM)** Assign a CVE identifier
- [ ] [:link:][step_note_cve_info] **(SwEng)** Update this issue with the assigned CVE identifier and the CVSS score
- [ ] [:link:][step_versions_affected] **(SwEng)** Determine the range of product versions affected (including the Subscription Edition)
- [ ] [:link:][step_workarounds] **(SwEng)** Determine whether workarounds for the problem exist
- [ ] [:link:][step_coordinate] **(SwEng)** If necessary, coordinate with other parties
- [ ] [:link:][step_earliest] **(Support)** Prepare and send out "earliest" notifications
- [ ] [:link:][step_advisory_mr] **(Support)** Create a merge request for the Security Advisory and include all readily available information in it
- [ ] [:link:][step_reproducer_mr] **(SwEng)** Prepare a private merge request containing a system test reproducing the problem
- [ ] [:link:][step_notify_support] **(SwEng)** Notify Support when a reproducer is ready
- [ ] [:link:][step_code_analysis] **(SwEng)** Prepare a detailed explanation of the code flow triggering the problem
- [ ] [:link:][step_fix_mr] **(SwEng)** Prepare a private merge request with the fix
- [ ] [:link:][step_review_fix] **(SwEng)** Ensure the merge request with the fix is reviewed and has no outstanding discussions
- [ ] [:link:][step_review_docs] **(Support)** Review the documentation changes introduced by the merge request with the fix
- [ ] [:link:][step_backports] **(SwEng)** Prepare backports of the merge request addressing the problem for all affected (and still maintained) branches of a given product
- [ ] [:link:][step_finish_advisory] **(Support)** Finish preparing the Security Advisory
- [ ] [:link:][step_meta_issue] **(QA)** Create (or update) the private issue containing links to fixes & reproducers for all CVEs fixed in a given release cycle
- [ ] [:link:][step_changes] **(QA)** (BIND 9 only) Reserve a block of `CHANGES` placeholders once the complete set of vulnerabilities fixed in a given release cycle is determined
- [ ] [:link:][step_merge_fixes] **(QA)** Merge the CVE fixes in CVE identifier order
- [ ] [:link:][step_patches] **(QA)** Prepare a standalone patch for the last stable release of each affected (and still maintained) product branch
- [ ] [:link:][step_asn_releases] **(QA)** Prepare ASN releases (as outlined in the Release Checklist)
### At T-5
- [ ] [:link:][step_send_asn] **(Support)** Send ASN to eligible customers
- [ ] [:link:][step_preannouncement] **(Support)** (BIND 9 only) Send a pre-announcement email to the *bind-announce* mailing list to alert users that the upcoming release will include security fixes
### At T-4
- [ ] [:link:][step_verify_asn] **(Support)** Verify that all ASN-eligible customers have received the notification email
### At T-1
- [ ] [:link:][step_check_customers] **(Support)** Verify that any new or reinstated customers have received the notification email
- [ ] [:link:][step_packager_emails] **(First IM)** Send notifications to OS packagers
### On the Day of Public Disclosure
- [ ] [:link:][step_clearance] **(IM)** Grant Support clearance to proceed with public release
- [ ] [:link:][step_publish] **(Support)** Publish the releases (as outlined in the release checklist)
- [ ] [:link:][step_matrix] **(Support)** (BIND 9 only) Update vulnerability matrix in the Knowledge Base
- [ ] [:link:][step_publish_advisory] **(Support)** Bump Document Version for the Security Advisory and publish it in the Knowledge Base
- [ ] [:link:][step_notifications] **(First IM)** Send notification emails to third parties
- [ ] [:link:][step_mitre] **(First IM)** Advise MITRE about the disclosed CVEs
- [ ] [:link:][step_merge_advisory] **(First IM)** Merge the Security Advisory merge request
- [ ] [:link:][step_embargo_end] **(IM)** Inform original reporter (if external) that the security disclosure process is complete
- [ ] [:link:][step_customers] **(Support)** Inform customers a fix has been released
### After Public Disclosure
- [ ] [:link:][step_postmortem] **(First IM)** Organize post-mortem meeting and make sure it happens
- [ ] [:link:][step_tickets] **(Support)** Close support tickets
- [ ] [:link:][step_regression] **(QA)** Merge a regression test reproducing the bug into all affected (and still maintained) branches
[step_deputy]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#pick-a-deputy-incident-manager
[step_respond]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#respond-to-the-bug-reporter
[step_etherpad]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#create-an-etherpad-for-post-mortem
[step_public_mrs]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#ensure-there-are-no-public-merge-requests-which-inadvertently-disclose-the-issue
[step_assign_cve_id]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#assign-a-cve-identifier
[step_note_cve_info]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#update-this-issue-with-the-assigned-cve-identifier-and-the-cvss-score
[step_versions_affected]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#determine-the-range-of-product-versions-affected-including-the-subscription-edition
[step_workarounds]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#determine-whether-workarounds-for-the-problem-exist
[step_coordinate]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#if-necessary-coordinate-with-other-parties
[step_earliest]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#prepare-and-send-out-earliest-notifications
[step_advisory_mr]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#create-a-merge-request-for-the-security-advisory-and-include-all-readily-available-information-in-it
[step_reproducer_mr]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#prepare-a-private-merge-request-containing-a-system-test-reproducing-the-problem
[step_notify_support]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#notify-support-when-a-reproducer-is-ready
[step_code_analysis]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#prepare-a-detailed-explanation-of-the-code-flow-triggering-the-problem
[step_fix_mr]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#prepare-a-private-merge-request-with-the-fix
[step_review_fix]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#ensure-the-merge-request-with-the-fix-is-reviewed-and-has-no-outstanding-discussions
[step_review_docs]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#review-the-documentation-changes-introduced-by-the-merge-request-with-the-fix
[step_backports]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#prepare-backports-of-the-merge-request-addressing-the-problem-for-all-affected-and-still-maintained-branches-of-a-given-product
[step_finish_advisory]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#finish-preparing-the-security-advisory
[step_meta_issue]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#create-or-update-the-private-issue-containing-links-to-fixes-reproducers-for-all-cves-fixed-in-a-given-release-cycle
[step_changes]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#bind-9-only-reserve-a-block-of-changes-placeholders-once-the-complete-set-of-vulnerabilities-fixed-in-a-given-release-cycle-is-determined
[step_merge_fixes]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#merge-the-cve-fixes-in-cve-identifier-order
[step_patches]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#prepare-a-standalone-patch-for-the-last-stable-release-of-each-affected-and-still-maintained-product-branch
[step_asn_releases]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#prepare-asn-releases-as-outlined-in-the-release-checklist
[step_send_asn]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#send-asn-to-eligible-customers
[step_preannouncement]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#bind-9-only-send-a-pre-announcement-email-to-the-bind-announce-mailing-list-to-alert-users-that-the-upcoming-release-will-include-security-fixes
[step_verify_asn]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#verify-that-all-asn-eligible-customers-have-received-the-notification-email
[step_check_customers]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#verify-that-any-new-or-reinstated-customers-have-received-the-notification-email
[step_packager_emails]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#send-notifications-to-os-packagers
[step_clearance]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#grant-support-clearance-to-proceed-with-public-release
[step_publish]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#publish-the-releases-as-outlined-in-the-release-checklist
[step_matrix]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#bind-9-only-update-vulnerability-matrix-in-the-knowledge-base
[step_publish_advisory]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#bump-document-version-for-the-security-advisory-and-publish-it-in-the-knowledge-base
[step_notifications]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#send-notification-emails-to-third-parties
[step_mitre]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#advise-mitre-about-the-disclosed-cves
[step_merge_advisory]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#merge-the-security-advisory-merge-request
[step_embargo_end]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#inform-original-reporter-if-external-that-the-security-disclosure-process-is-complete
[step_customers]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#inform-customers-a-fix-has-been-released
[step_postmortem]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#organize-post-mortem-meeting-and-make-sure-it-happens
[step_tickets]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#close-support-tickets
[step_regression]: https://gitlab.isc.org/isc-private/isc-wiki/-/wikis/Security-Incident-Handling-Checklist-Explanations#merge-a-regression-test-reproducing-the-bug-into-all-affected-and-still-maintained-branches

View File

@@ -1,95 +0,0 @@
## Release Schedule
**Code Freeze:**
**Tagging Deadline:**
**Public Release:**
## Documentation Review Links
**Closed issues assigned to the milestone without a release note:**
- []()
- []()
- []()
**Merge requests merged into the milestone without a release note:**
- []()
- []()
- []()
**Merge requests merged into the milestone without a `CHANGES` entry:**
- []()
- []()
- []()
## Release Checklist
### Before the Code Freeze
- [ ] ***(QA)*** Inform Support and Marketing of impending release (and give estimated release dates).
- [ ] ***(QA)*** Ensure there are no permanent test failures on any platform.
- [ ] ***(QA)*** Check Perflab to ensure there has been no unexplained drop in performance for the versions being released.
- [ ] ***(QA)*** Check whether all issues assigned to the release milestone are resolved[^1].
- [ ] ***(QA)*** Ensure that there are no outstanding merge requests in the private repository[^1] (Subscription Edition only).
- [ ] ***(QA)*** Ensure all merge requests marked for backporting have been indeed backported.
- [ ] ***(QA)*** Update GitLab settings for all maintained branches to disallow merging to them.
- [ ] ***(QA)*** Announce (on Mattermost) that the code freeze is in effect.
### Before the Tagging Deadline
- [ ] ***(QA)*** Ensure release notes are correct, ask Support and Marketing to check them as well.
- [ ] ***(QA)*** Add a release marker to `CHANGES`.
- [ ] ***(QA)*** Add a release marker to `CHANGES.SE` (Subscription Edition only).
- [ ] ***(QA)*** Update BIND 9 version in `configure.ac` (9.18+) or `version` (9.16).
- [ ] ***(QA)*** Rebuild `configure` using Autoconf on `docs.isc.org` (9.16).
- [ ] ***(QA)*** Tag the releases in the private repository (`git tag -s -m "BIND 9.x.y" v9_x_y`).
### Before the ASN Deadline (for ASN Releases) or the Public Release Date (for Regular Releases)
- [ ] ***(QA)*** Check that the formatting is correct for HTML and PDF versions of release notes.
- [ ] ***(QA)*** Check that the formatting of the generated man pages is correct.
- [ ] ***(QA)*** Verify GitLab CI results for the tags created and sign off on the releases to be published.
- [ ] ***(QA)*** Update GitLab settings for all maintained branches to allow merging to them again.
- [ ] ***(QA)*** Prepare and merge MRs resetting the release notes and updating the version string for each maintained branch.
- [ ] ***(QA)*** Announce (on Mattermost) that the code freeze is over.
- [ ] ***(QA)*** Request signatures for the tarballs, providing their location and checksums.
- [ ] ***(Signers)*** Ensure that the contents of tarballs and tags are identical.
- [ ] ***(Signers)*** Validate tarball checksums, sign tarballs, and upload signatures.
- [ ] ***(QA)*** Verify tarball signatures and check tarball checksums again.
- [ ] ***(Support)*** Pre-publish ASN and/or Subscription Edition tarballs so that packages can be built.
- [ ] ***(QA)*** Build and test ASN and/or Subscription Edition packages.
- [ ] ***(QA)*** Prepare the `patches/` subdirectory for each security release (if applicable).
- [ ] ***(QA)*** Notify Support that the releases have been prepared.
- [ ] ***(Support)*** Send out ASNs (if applicable).
### On the Day of Public Release
- [ ] ***(Support)*** Wait for clearance from Security Officer to proceed with the public release (if applicable).
- [ ] ***(Support)*** Place tarballs in public location on FTP site.
- [ ] ***(Support)*** Publish links to downloads on ISC website.
- [ ] ***(Support)*** Write release email to *bind-announce*.
- [ ] ***(Support)*** Write email to *bind-users* (if a major release).
- [ ] ***(Support)*** Send eligible customers updated links to the Subscription Edition (update the -S edition delivery tickets, even if those links were provided earlier via an ASN ticket).
- [ ] ***(Support)*** Update tickets in case of waiting support customers.
- [ ] ***(QA)*** Build and test any outstanding private packages.
- [ ] ***(QA)*** Build public RPMs.
- [ ] ***(SwEng)*** Build Debian/Ubuntu packages.
- [ ] ***(SwEng)*** Update Docker images.
- [ ] ***(QA)*** Inform Marketing of the release.
- [ ] ***(Marketing)*** Post short note to Twitter.
- [ ] ***(Marketing)*** Update [Wikipedia entry for BIND](https://en.wikipedia.org/wiki/BIND).
- [ ] ***(Marketing)*** Write blog article (if a major release).
- [ ] ***(QA)*** Ensure all new tags are annotated and signed.
- [ ] ***(QA)*** Push tags for the published releases to the public repository.
- [ ] ***(QA)*** Merge published release tags (non-linearly) back into the their relevant development/maintenance branches.
- [ ] ***(QA)*** Sanitize confidential issues which are assigned to the current release milestone and do not describe a security vulnerability, then make them public.
- [ ] ***(QA)*** Sanitize confidential issues which are assigned to older release milestones and describe security vulnerabilities, then make them public if appropriate[^2].
- [ ] ***(QA)*** Update QA tools used in GitLab CI (e.g. Black, PyLint, Sphinx) by modifying the relevant `Dockerfile`.
- [ ] ***(QA)*** Run a pipeline to rebuild all [images](https://gitlab.isc.org/isc-projects/images) used in GitLab CI.
[^1]: If not, use the time remaining until the tagging deadline to ensure all outstanding issues are either resolved or moved to a different milestone.
[^2]: As a rule of thumb, security vulnerabilities which have reproducers merged to the public repository are considered okay for full disclosure.

View File

@@ -0,0 +1,44 @@
## Release Checklist
- [ ] (Manager) Check for the presence of a milestone for the release:
- If there is a milestone, are all the issues for the milestone resolved? (other than this checklist).
- [ ] (Manager) Inform Support/Marketing of impending release (and give estimated release dates).
- (SwEng) Prepare the sources for tarball generation:
- [ ] Check perflab to ensure there has been no unexplained drop in performance for the version being released.
- [ ] Ensure that there are no outstanding merge requests in the private repository (subscription version only).
- [ ] Update API files for libraries with new version information.
- [ ] Change software version and library versions in configure.in (new major release only).
- [ ] Rebuild configure using autoconf on docs.isc.org.
- [ ] Update CHANGES.
- [ ] Update CHANGES.SE (subscription branch only).
- [ ] Update "version".
- [ ] Update "readme.md".
- Check the release notes are correct:
- [ ] Compare content with merge requests for the release.
- [ ] Check formatting.
- [ ] Build documentation on docs.isc.org.
- [ ] Commit changes and make sure the gitlab-ci tests are passing.
- [ ] Push the changes and tag ("alphatag" is an optional string such as "b1", "rc1" etc.). (```git tag -u <DEVELOPER_KEYID> -a -s -m "BIND 9.X.Y[alphatag]" v9_X_Y[alphatag]```)
- [ ] If this is the first tag for a release (e.g. beta), create a release branch named `release_v9_X_Y` (this allows development to continue on the release branch whilst release engineering continues).
- [ ] (SwEng) Run the "make release" Jenkins job to produce the tarballs and zips.
- [ ] (SwEng) Ask QA to sanity check the tarball and zips (passing to them the number of the Jenkins job).
- [ ] (QA) Sanity check the tarballs.
- [ ] (QA) Request the signature on the tarballs.
- [ ] (QA) Check signatures on tarballs.
- [ ] (QA) Tell Support to handle notification of release.
- [ ] (Manager) Inform Marketing of the release
- [ ] (Manager) Update the internal [BIND release dates wiki page](https://wiki.isc.org/bin/view/Main/BindReleaseDates) when public announcement has been made.
- [ ] (SwEng) Update DEB and RPM packages
- [ ] (SwEng) Merge the automatically prepared `prep 9.X.Y` commit which updates `version` and documentation on the release branch into the relevant maintenance branch (`v9_X`)
## Support
- [ ] Make tarballs and signatures available to download.
- [ ] Write release email to bind9-announce.
- [ ] Write email to bind9-users (if a major release).
- [ ] Update tickets in case of waiting support customers.
## Marketing
- [ ] Post short note to Twitter.
- [ ] Update [Wikipedia entry for BIND](http://en.wikipedia.org/wiki/BIND).
- [ ] Write blog article (if a major release).

View File

@@ -1,9 +0,0 @@
[MASTER]
disable=
C0103, # invalid-name
C0114, # missing-module-docstring
C0115, # missing-class-docstring
C0116, # missing-function-docstring
C0209, # consider-using-f-string
C0415, # import-outside-toplevel
R0801, # duplicate-code

View File

@@ -1,198 +0,0 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: BIND 9
Upstream-Contact: Internet Systems Consortium, Inc. ("ISC") <info@isc.org>
Source: https://gitlab.isc.org/isc-projects/bind9/
#
# Build system, data files from tests, and misc cruft
#
Files: **/*.after*
**/*.bad
**/*.batch
**/*.before*
**/*.ccache
**/*.good
**/*.key
**/*.pem
**/*.private
**/*.raw
**/*.saved
**/*.zonelist
**/*dig.out*
**/Makefile
**/Makefile.*
**/testdata/*
.github/*
.gitlab/*
AUTHORS
CHANGES
COPYRIGHT
Makefile
Makefile.*
bin/tests/system/checkzone/zones/bad-caa-rr.db
bin/tests/system/checkzone/zones/bad1.db
bin/tests/system/checkzone/zones/crashzone.db
bin/tests/system/dnstap/large-answer.fstrm
bin/tests/system/doth/CA/CA.cfg
bin/tests/system/doth/CA/README
bin/tests/system/doth/CA/index.txt
bin/tests/system/doth/CA/index.txt.attr
bin/tests/system/doth/CA/serial
bin/tests/system/notify/ns4/named.port.in
bin/tests/system/formerr/nametoolong
bin/tests/system/formerr/noquestions
bin/tests/system/formerr/twoquestions
bin/tests/system/forward/CA/CA.cfg
bin/tests/system/forward/CA/README
bin/tests/system/forward/CA/index.txt
bin/tests/system/forward/CA/index.txt.attr
bin/tests/system/forward/CA/serial
bin/tests/system/journal/ns1/managed-keys.bind.in
bin/tests/system/journal/ns1/managed-keys.bind.jnl.in
bin/tests/system/journal/ns2/managed-keys.bind.in
bin/tests/system/journal/ns2/managed-keys.bind.jnl.in
bin/tests/system/keepalive/expected
bin/tests/system/legacy/ns6/edns512.db.signed
bin/tests/system/legacy/ns7/edns512-notcp.db.signed
bin/tests/system/nsupdate/CA/CA.cfg
bin/tests/system/nsupdate/CA/README
bin/tests/system/nsupdate/CA/index.txt
bin/tests/system/nsupdate/CA/index.txt.attr
bin/tests/system/nsupdate/CA/serial
bin/tests/system/nsupdate/commandlist
bin/tests/system/nsupdate/verylarge.in
bin/tests/system/org.isc.bind.system.plist
bin/tests/system/pipelined/input
bin/tests/system/pipelined/inputb
bin/tests/system/pipelined/ref
bin/tests/system/pipelined/refb
bin/tests/system/rsabigexponent/ns2/dsset-example.in
bin/tests/system/run.gdb
bin/tests/system/runtime/ctrl-chars
bin/tests/system/runtime/long-cmd-line
bin/tests/system/statschannel/traffic.expect.1
bin/tests/system/statschannel/traffic.expect.2
bin/tests/system/statschannel/traffic.expect.4
bin/tests/system/statschannel/traffic.expect.5
bin/tests/system/statschannel/traffic.expect.6
bin/tests/system/tcp/1996-alloc_dnsbuf-crash-test.pkt
bin/tests/system/tsig/badlocation
bin/tests/system/tsig/badtime
bin/tests/system/unknown/large.out
bin/tests/system/xfer/ans5/badkeydata
bin/tests/system/xfer/ans5/badmessageid
bin/tests/system/xfer/ans5/goodaxfr
bin/tests/system/xfer/ans5/partial
bin/tests/system/xfer/ans5/soamismatch
bin/tests/system/xfer/ans5/unknownkey
bin/tests/system/xfer/ans5/unsigned
bin/tests/system/xfer/ans5/wrongkey
bin/tests/system/xfer/ans5/wrongname
bin/tests/system/xfer/knowngood.mapped
cocci/*.cocci
cocci/*.disabled
cocci/*.spatch
doc/arm/*.dia
doc/arm/*.png
doc/arm/isc-logo.pdf
doc/arm/requirements.txt
doc/man/*.1in
doc/man/*.5in
doc/man/*.8in
fuzz/*.in/*
Copyright: Internet Systems Consortium, Inc. ("ISC")
License: MPL-2.0
#
# DNSSEC Guide images
#
Files: doc/dnssec-guide/img/*.png
Copyright: Internet Systems Consortium, Inc. ("ISC")
License: MPL-2.0
#
# Libtool Files
#
Files: m4/libtool.m4
m4/ltoptions.m4
m4/ltsugar.m4
m4/ltversion.m4
m4/ltversion.m4
m4/lt~obsolete.m4
Copyright: Free Software Foundation, Inc.
License:
This file is free software; the Free Software Foundation gives unlimited
permission to copy and/or distribute it, with or without modifications, as long
as this notice is preserved.
#
# DLZ Modules
#
Files: contrib/dlz/modules/*/testing/*
Copyright: Internet Systems Consortium, Inc. ("ISC")
Stichting NLnet, Netherlands
License: ISC and MPL-2.0
#
# Stuff that's basically uncopyrightable (configuration, generated files),
# use CC0-1.0 for clarity that we don't care
#
Files: **/.clang-format
**/.clang-format.headers
**/.dir-locals.el
**/.gitattributes
**/.gitignore
**/named*.args
**/named.dropedns
**/named.ednsformerr
**/named.ednsnotimp
**/named.ednsrefused
**/named.maxudp1460
**/named.maxudp512
**/named.noaa
**/named.noedns
**/named.nosoa
**/named.notcp
**/startme
.clang-format
.clang-format.headers
.dir-locals.el
.git-blame-ignore-revs
.gitattributes
.gitignore
.gitlab-ci.yml
.lgtm.yml
.pylintrc
.uncrustify.cfg
doc/misc/*.zoneopt
doc/misc/options
doc/misc/rndc.grammar
tsan-suppressions.txt
sonar-project.properties
Copyright: Internet Systems Consortium, Inc. ("ISC")
License: CC0-1.0
#
# geoip2 test files (mmdb is generated from json)
#
Files: bin/tests/system/geoip2/data/*.json
bin/tests/system/geoip2/data/*.mmdb
Copyright: Internet Systems Consortium, Inc. ("ISC")
License: CC0-1.0
#
# files that may be left over from other branches.
#
# in a newly cloned branch or after running "git clean", these
# files don't exist, but they can be left lying around after
# checking out an older branch. we explicitly ignore them so they
# won't clutter up the output when running "reuse lint" by hand
# in a working source tree.
#
Files: **/platform.h
bin/python/*
bin/tests/optional/*
make/*
unit/unittest.sh
Copyright: Internet Systems Consortium, Inc. ("ISC")
License: CC0-1.0

View File

@@ -1,16 +0,0 @@
{% for copyright_line in copyright_lines %}
{{ copyright_line }}
{% endfor %}
{% for expression in spdx_expressions %}
SPDX-License-Identifier: {{ expression }}
{% endfor %}
{% if "MPL-2.0" in spdx_expressions %}
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
{% endif %}

View File

@@ -24,7 +24,7 @@ string_escape_char2 = 0 # number
# Improvements to template detection may make this option obsolete.
tok_split_gte = false # false/true
# Control what to do with the UTF-8 BOM (recommend 'remove')
# Control what to do with the UTF-8 BOM (recommed 'remove')
utf8_bom = ignore # ignore/add/remove/force
# If the file only contains chars between 128 and 255 and is not UTF-8, then output as UTF-8
@@ -1352,7 +1352,7 @@ cmt_insert_func_header = "" # string
# Will substitute $(class) with the class name.
cmt_insert_class_header = "" # string
# The filename that contains text to insert before a Obj-C message specification if the method isn't preceded with a C/C++ comment.
# The filename that contains text to insert before a Obj-C message specification if the method isn't preceeded with a C/C++ comment.
# Will substitute $(message) with the function name and $(javaparam) with the javadoc @param and @return stuff.
cmt_insert_oc_msg_header = "" # string

54
AUTHORS
View File

@@ -1,54 +0,0 @@
Mark Andrews
Andreas Gustafsson
Evan Hunt
Brian Wellington
Bob Halley
David Lawrence
Michael Graff
Michael Sawyer
Ondřej Surý
James Brister
Tatuya JINMEI 神明達哉
Francis Dupont
Michał Kępień
Danny Mayer
Mukund Sivaraman
Jeremy C. Reed
William King
Stephen Morris
Witold Kręcicki
Curtis Blackburn
Scott Mann
Rob Austein
Jim Reid
Eric Luce
Olafur Gudmundsson
Stephen Jacob
Damien Neil
Tony Finch
Jakob Schlyter
Petr Menšík
Vernon Schryver
Matt Nelson
Shane Kerr
Paul Ebersman
Ray Bellis
Shawn Routhier
Ben Cottrell
Tomas Hozza
johnd
Bill Parker
李昶
Kevin Chen
Jonathan Casey
Mary Stahl
Mathieu Arnold
David Hankins
Paul Hoffman
Paul Vixie
Brian Conry
Anay Panvalkar
colleen
Robert Edmonds
João Damas
Artem Boldariev (Артем Болдарєв)

3480
CHANGES

File diff suppressed because it is too large Load Diff

View File

@@ -1,84 +0,0 @@
<!--
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
SPDX-License-Identifier: MPL-2.0
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
-->
# BIND 9 Code of Conduct
Like the technical community as a whole, the BIND 9 team and community is made
up of a mixture of professionals and volunteers from all over the world, working
on every aspect of the mission - including mentorship, teaching, and connecting
people.
Diversity is one of our huge strengths, but it can also lead to communication
issues and unhappiness. To that end, we have a few ground rules that we ask
people to adhere to. This code applies equally to the core development team,
open source contributors and those seeking help and guidance.
This isn't an exhaustive list of things that you can't do. Rather, take it in
the spirit in which it's intended - a guide to make it easier to enrich all of
us and the technical communities in which we participate.
This code of conduct applies to all spaces managed by the BIND 9 project or
Internet Systems Consortium. This includes chat, the mailing lists, the issue
tracker, and any other fora created by the project team which the
community uses for communication. In addition, violations of this code outside
these spaces may affect a person's ability to participate within them.
If you believe someone is violating the code of conduct, we ask that you report
it by emailing [conduct@isc.org](conduct@isc.org). For more details please see
our [Reporting Guidelines](https://www.isc.org/conductreporting/).
* **Be friendly and patient.**
* **Be welcoming.** We strive to be a community that welcomes and supports
people of all backgrounds and identities. This includes, but is not limited to
members of any race, ethnicity, culture, national origin, colour, immigration
status, social and economic class, educational level, sex, sexual orientation,
gender identity and expression, age, size, family status, political belief,
religion, and mental and physical ability.
* **Be considerate.** Your work will be used by other people, and you in turn
will depend on the work of others. Any decision you take will affect users and
colleagues, and you should take those consequences into account when making
decisions. Remember that we're a world-wide community, so you might not be
communicating in someone else's primary language.
* **Be respectful.** Not all of us will agree all the time, but disagreement is
no excuse for poor behavior and poor manners. We might all experience some
frustration now and then, but we cannot allow that frustration to turn into a
personal attack. It's important to remember that a community where people feel
uncomfortable or threatened is not a productive one. Members of the BIND 9
community should be respectful when dealing with other members as well as with
people outside the BIND 9 community.
* **Be careful in the words that you choose.** We are a community of
professionals, and we conduct ourselves professionally. Be kind to others. Do
not insult or put down other participants. Harassment and other exclusionary
behavior aren't acceptable. This includes, but is not limited to:
* Violent threats or language directed against another person.
* Discriminatory jokes and language.
* Posting sexually explicit or violent material.
* Posting (or threatening to post) other people's personally identifying
information ("doxing").
* Personal insults, especially those using racist or sexist terms.
* Unwelcome sexual attention.
* Advocating for, or encouraging, any of the above behavior.
* Repeated harassment of others. In general, if someone asks you to stop, then
stop.
* **When we disagree, try to understand why.** Disagreements, both social and
technical, happen all the time and BIND 9 is no exception. It is important
that we resolve disagreements and differing views constructively. Remember
that we're different. The strength of BIND 9 comes from its varied community,
people from a wide range of backgrounds. Different people have different
perspectives on issues. Being unable to understand why someone holds a
viewpoint doesn't mean that they're wrong. Don't forget that it is human to
err and blaming each other doesn't get us anywhere. Instead, focus on helping
to resolve issues and learning from mistakes.
Original text courtesy of the [Django Code of Conduct](https://www.djangoproject.com/conduct/)
project.

188
CONTRIBUTING Normal file
View File

@@ -0,0 +1,188 @@
CONTRIBUTING
BIND Source Access and Contributor Guidelines
Feb 22, 2018
Contents
1. Access to source code
2. Reporting bugs
3. Contributing code
Introduction
Thank you for using BIND!
BIND is open source software that implements the Domain Name System (DNS)
protocols for the Internet. It is a reference implementation of those
protocols, but it is also production-grade software, suitable for use in
high-volume and high-reliability applications. It is by far the most
widely used DNS software, providing a robust and stable platform on top of
which organizations can build distributed computing systems with the
knowledge that those systems are fully compliant with published DNS
standards.
BIND is and will always remain free and openly available. It can be used
and modified in any way by anyone.
BIND is maintained by the Internet Systems Consortium, a public-benefit
501(c)(3) nonprofit, using a "managed open source" approach: anyone can
see the source, but only ISC employees have commit access. Until recently,
the source could only be seen once ISC had published a release: read
access to the source repository was restricted just as commit access was.
That's now changing, with the opening of a public git mirror to the BIND
source tree (see below).
Access to source code
Public BIND releases are always available from the ISC FTP site.
A public-access GIT repository is also available at https://gitlab.isc.org
. This repository is a mirror, updated several times per day, of the
source repository maintained by ISC. It contains all the public release
branches; upcoming releases can be viewed in their current state at any
time. It does not contain development branches or unreviewed work in
progress. Commits which address security vulnerablilities are withheld
until after public disclosure.
You can browse the source online via https://gitlab.isc.org/isc-projects/
bind9
To clone the repository, use:
$ git clone https://gitlab.isc.org/isc-projects/bind9.git
Release branch names are of the form v9_X, where X represents the second
number in the BIND 9 version number. So, to check out the BIND 9.12
branch, use:
$ git checkout v9_12
Whenever a branch is ready for publication, a tag will be placed of the
form v9_X_Y. The 9.12.0 release, for instance, is tagged as v9_12_0.
The branch in which the next major release is being developed is called
master.
Reporting bugs
Reports of flaws in the BIND package, including software bugs, errors in
the documentation, missing files in the tarball, suggested changes or
requests for new features, etc, can be filed using https://gitlab.isc.org/
isc-projects/bind9/issues.
Due to a large ticket backlog, we are sometimes slow to respond,
especially if a bug is cosmetic or if a feature request is vague or low in
priority, but we will try at least to acknowledge legitimate bug reports
within a week.
ISC's ticketing system is publicly readable; however, you must have an
account to file a new issue. You can either register locally or use
credentials from an existing account at GitHub, GitLab, Google, Twitter,
or Facebook.
Reporting possible security issues
If you think you may be seeing a potential security vulnerability in BIND
(for example, a crash with REQUIRE, INSIST, or ASSERT failure), please
report it immediately by emailing to security-officer@isc.org. Plain-text
e-mail is not a secure choice for communications concerning undisclosed
security issues so please encrypt your communications to us if possible,
using the ISC Security Officer public key.
Do not discuss undisclosed security vulnerabilites on any public mailing
list. ISC has a long history of handling reported vulnerabilities promptly
and effectively and we respect and acknowledge responsible reporters.
ISC's Security Vulnerability Disclosure Policy is documented at https://
kb.isc.org/article/AA-00861/0.
If you have a crash, you may want to consult ?What to do if your BIND or
DHCP server has crashed.?
Contributing code
BIND is licensed under the Mozilla Public License 2.0. Earier versions
(BIND 9.10 and earlier) were licensed under the ISC License
ISC does not require an explicit copyright assignment for patch
contributions. However, by submitting a patch to ISC, you implicitly
certify that you are the author of the code, that you intend to reliquish
exclusive copyright, and that you grant permission to publish your work
under the open source license used for the BIND version(s) to which your
patch will be applied.
BIND code
Patches for BIND may be submitted directly via merge requests in ISC's
Gitlab source repository for BIND.
Patches can also be submitted as diffs against a specific version of BIND
-- preferably the current top of the master branch. Diffs may be generated
using either git format-patch or git diff.
Those wanting to write code for BIND may be interested in the developer
information page, which includes information about BIND design and coding
practices, including discussion of internal APIs and overall system
architecture. (This is a work in progress, and still quite preliminary.)
Every patch submitted will be reviewed by ISC engineers following our code
review process before it is merged.
It may take considerable time to review patch submissions, especially if
they don't meet ISC style and quality guidelines. If a patch is a good
idea, we can and will do additional work to bring it up to par, but if
we're busy with other work, it may take us a long time to get to it.
To ensure your patch is acted on as promptly as possible, please:
* Try to adhere to the BIND 9 coding style.
* Run make check to ensure your change hasn't caused any functional
regressions.
* Document your work, both in the patch itself and in the accompanying
email.
* In patches that make non-trivial functional changes, include system
tests if possible; when introducing or substantially altering a
library API, include unit tests. See Testing for more information.
Changes to configure
If you need to make changes to configure, you should not edit it directly;
instead, edit configure.in, then run autoconf. Similarly, instead of
editing config.h.in directly, edit configure.in and run autoheader.
When submitting a patch as a diff, it's fine to omit the configure diffs
to save space. Just send the configure.in diffs and we'll generate the new
configure during the review process.
Documentation
All functional changes should be documented. There are three types of
documentation in the BIND source tree:
* Man pages are kept alongside the source code for the commands they
document, in files ending in .docbook; for example, the named man page
is bin/named/named.docbook.
* The BIND 9 Administrator Reference Manual is mostly in doc/arm/
Bv9ARM-book.xml, plus a few other XML files that are included in it.
* API documentation is in the header file describing the API, in
Doxygen-formatted comments.
It is not necessary to edit any documentation files other than these; all
PDF, HTML, and nroff-format man page files will be updated automatically
from the docbook and XML files after merging.
Patches to improve existing documentation are also very welcome!
Tests
BIND is a large and complex project. We rely heavily on continuous
automated testing and cannot merge new code without adequate test
coverage. Please see the 'Testing' section of doc/dev/dev.md for more
information.
Thanks
Thank you for your interest in contributing to the ongoing development of
BIND.

View File

@@ -1,17 +1,15 @@
<!--
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
SPDX-License-Identifier: MPL-2.0
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
## BIND 9 Source Access and Contributor Guidelines
*May 28, 2020*
## BIND Source Access and Contributor Guidelines
*Feb 22, 2018*
### Contents
@@ -21,12 +19,12 @@ information regarding copyright ownership.
### Introduction
Thank you for using BIND 9!
Thank you for using BIND!
BIND is open source software that implements the Domain Name System (DNS)
protocols for the Internet. It is a reference implementation of those
protocols, but it is also production-grade software, suitable for use in
high-volume and high-reliability applications. It is very
high-volume and high-reliability applications. It is by far the most
widely used DNS software, providing a robust and stable platform on top of
which organizations can build distributed computing systems with the
knowledge that those systems are fully compliant with published DNS
@@ -35,34 +33,27 @@ standards.
BIND is and will always remain free and openly available. It can be
used and modified in any way by anyone.
BIND is maintained by [Internet Systems Consortium](https://www.isc.org),
BIND is maintained by the [Internet Systems Consortium](https://www.isc.org),
a public-benefit 501(c)(3) nonprofit, using a "managed open source" approach:
anyone can see the source, but only ISC employees have commit access.
In the past, the source could only be seen once ISC had published
a release; read access to the source repository was restricted just
as commit access was. That has changed, as ISC now provides a
public git repository of the BIND source tree (see below).
At ISC, we're committed to
building communities that are welcoming and inclusive: environments where people
are encouraged to share ideas, treat each other with respect, and collaborate
towards the best solutions. To reinforce our commitment, ISC
has adopted a slightly modified version of the Django
[Code of Conduct](https://gitlab.isc.org/isc-projects/bind9/-/blob/main/CODE_OF_CONDUCT.md)
for the BIND 9 project, as well as for the conduct of our developers throughout
the industry.
Until recently, the source could only be seen once ISC had published
a release: read access to the source repository was restricted just
as commit access was. That's now changing, with the opening of a
public git mirror to the BIND source tree (see below).
### <a name="access"></a>Access to source code
Public BIND releases are always available from the
[ISC FTP site](ftp://ftp.isc.org/isc/bind9).
A public-access git repository is also available at
[https://gitlab.isc.org](https://gitlab.isc.org). This repository
contains all public release branches. Upcoming releases can be viewed in
their current state at any time. Short-lived development branches
contain unreviewed work in progress. Commits which address security
vulnerablilities are withheld until after public disclosure.
A public-access GIT repository is also available at
[https://gitlab.isc.org](https://gitlab.isc.org).
This repository is a mirror, updated several times per day, of the
source repository maintained by ISC. It contains all the public release
branches; upcoming releases can be viewed in their current state at any
time. It does *not* contain development branches or unreviewed work in
progress. Commits which address security vulnerablilities are withheld
until after public disclosure.
You can browse the source online via
[https://gitlab.isc.org/isc-projects/bind9](https://gitlab.isc.org/isc-projects/bind9)
@@ -77,58 +68,55 @@ branch, use:
> $ git checkout v9_12
Whenever a branch is ready for publication, a tag is placed of the
Whenever a branch is ready for publication, a tag will be placed of the
form `v9_X_Y`. The 9.12.0 release, for instance, is tagged as `v9_12_0`.
The branch in which the next major release is being developed is called
`main`.
`master`.
### <a name="bugs"></a>Reporting bugs
Reports of flaws in the BIND package, including software bugs, errors
in the documentation, missing files in the tarball, suggested changes
or requests for new features, etc., can be filed using
or requests for new features, etc, can be filed using
[https://gitlab.isc.org/isc-projects/bind9/issues](https://gitlab.isc.org/isc-projects/bind9/issues).
Due to a large ticket backlog, we are sometimes slow to respond,
especially if a bug is cosmetic or if a feature request is vague or
low in priority, but we try at least to acknowledge legitimate
low in priority, but we will try at least to acknowledge legitimate
bug reports within a week.
ISC's GitLab system is publicly readable; however, you must have
an account to create a new issue. You can either register locally or
ISC's ticketing system is publicly readable; however, you must have
an account to file a new issue. You can either register locally or
use credentials from an existing account at GitHub, GitLab, Google,
Twitter, or Facebook.
### Reporting possible security issues
If you think you may be seeing a potential security vulnerability in BIND
(for example, a crash with REQUIRE, INSIST, or ASSERT failure), please
report it immediately by emailing to security-officer@isc.org. Plain-text
e-mail is not a secure choice for communications concerning undisclosed
security issues so please encrypt your communications to us if possible,
using the [ISC Security Officer public key](https://www.isc.org/pgpkey/).
using the [ISC Security Officer public key](https://www.isc.org/downloads/software-support-policy/openpgp-key/).
Do not discuss undisclosed security vulnerabilities on any public mailing list.
Do not discuss undisclosed security vulnerabilites on any public mailing list.
ISC has a long history of handling reported vulnerabilities promptly and
effectively and we respect and acknowledge responsible reporters.
ISC's Security Vulnerability Disclosure Policy is documented at
[https://kb.isc.org/docs/aa-00861](https://kb.isc.org/docs/aa-00861).
ISC's Security Vulnerability Disclosure Policy is documented at [https://kb.isc.org/article/AA-00861/0](https://kb.isc.org/article/AA-00861/0).
If you have a crash, you may want to consult
["What to do if your BIND or DHCP server has crashed."](https://kb.isc.org/docs/aa-00340)
[What to do if your BIND or DHCP server has crashed.](https://kb.isc.org/article/AA-00340/89/What-to-do-if-your-BIND-or-DHCP-server-has-crashed.html)
### <a name="contrib"></a>Contributing code
### <a name="bugs"></a>Contributing code
BIND is licensed under the
[Mozilla Public License 2.0](https://www.mozilla.org/en-US/MPL/2.0/).
Earlier versions (BIND 9.10 and earlier) were licensed under the
[ISC License](https://www.isc.org/licenses/)
[Mozilla Public License 2.0](http://www.isc.org/downloads/software-support-policy/isc-license/).
Earier versions (BIND 9.10 and earlier) were licensed under the [ISC License](http://www.isc.org/downloads/software-support-policy/isc-license/)
ISC does not require an explicit copyright assignment for patch
contributions. However, by submitting a patch to ISC, you implicitly
certify that you are the author of the code, that you intend to relinquish
certify that you are the author of the code, that you intend to reliquish
exclusive copyright, and that you grant permission to publish your work
under the open source license used for the BIND version(s) to which your
patch will be applied.
@@ -136,19 +124,20 @@ patch will be applied.
#### <a name="bind"></a>BIND code
Patches for BIND may be submitted directly via merge requests in
[ISC's GitLab](https://gitlab.isc.org/isc-projects/bind9/) source
[ISC's Gitlab](https://gitlab.isc.org/isc-projects/bind9/) source
repository for BIND.
Patches can also be submitted as diffs against a specific version of
BIND -- preferably the current top of the `main` branch. Diffs may
BIND -- preferably the current top of the `master` branch. Diffs may
be generated using either `git format-patch` or `git diff`.
Those wanting to write code for BIND may be interested in the
[developer information](doc/dev/dev.md) page, which includes information
about BIND design and coding practices, including discussion of internal
APIs and overall system architecture.
APIs and overall system architecture. (This is a work in progress, and
still quite preliminary.)
Every patch submitted is reviewed by ISC engineers following our
Every patch submitted will be reviewed by ISC engineers following our
[code review process](doc/dev/dev.md#reviews) before it is merged.
It may take considerable time to review patch submissions, especially if
@@ -159,7 +148,7 @@ we're busy with other work, it may take us a long time to get to it.
To ensure your patch is acted on as promptly as possible, please:
* Try to adhere to the [BIND 9 coding style](doc/dev/style.md).
* Run `make check` to ensure your change hasn't caused any
* Run `make` `check` to ensure your change hasn't caused any
functional regressions.
* Document your work, both in the patch itself and in the
accompanying email.
@@ -185,24 +174,28 @@ All functional changes should be documented. There are three types
of documentation in the BIND source tree:
* Man pages are kept alongside the source code for the commands
they document, in files ending in `.rst`: for example, the
`named` man page is `bin/named/named.rst`.
* The *BIND 9 Administrator Reference Manual* is in the .rst files in
`doc/arm/`; the PDF and HTML versions are automatically generated from
the `.rst` files.
they document, in files ending in `.docbook`; for example, the
`named` man page is `bin/named/named.docbook`.
* The *BIND 9 Administrator Reference Manual* is mostly in
`doc/arm/Bv9ARM-book.xml`, plus a few other XML files that are included
in it.
* API documentation is in the header file describing the API, in
Doxygen-formatted comments.
It is not necessary to edit any documentation files other than these;
all PDF, HTML, and `nroff`-format man page files will be updated
automatically from the `docbook` and `XML` files after merging.
Patches to improve existing documentation are also very welcome!
##### Tests
BIND is a large and complex project. We rely heavily on continuous
automated testing and cannot merge new code without adequate test coverage.
Please see [the "Testing" section of doc/dev/dev.md](doc/dev/dev.md#testing)
Please see [the 'Testing' section of doc/dev/dev.md](doc/dev/dev.md#testing)
for more information.
#### Thanks
Thank you for your interest in contributing to the ongoing development
of BIND 9.
of BIND.

View File

@@ -1 +0,0 @@
LICENSE

251
COPYRIGHT
View File

@@ -1,8 +1,8 @@
Copyright (C) 1996-2023 Internet Systems Consortium, Inc. ("ISC")
Copyright (C) 1996-2020 Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
file, You can obtain one at http://mozilla.org/MPL/2.0/.
-----------------------------------------------------------------------------
@@ -181,6 +181,67 @@ SUCH DAMAGE.
-----------------------------------------------------------------------------
Copyright (c) 1998 Doug Rabson
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-----------------------------------------------------------------------------
Copyright ((c)) 2002, Rice University
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Rice University (RICE) nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
This software is provided by RICE and the contributors on an "as is"
basis, without any representations or warranties of any kind, express
or implied including, but not limited to, representations or
warranties of non-infringement, merchantability or fitness for a
particular purpose. In no event shall RICE or contributors be liable
for any direct, indirect, incidental, special, exemplary, or
consequential damages (including, but not limited to, procurement of
substitute goods or services; loss of use, data, or profits; or
business interruption) however caused and on any theory of liability,
whether in contract, strict liability, or tort (including negligence
or otherwise) arising in any way out of the use of this software, even
if advised of the possibility of such damage.
-----------------------------------------------------------------------------
Copyright (c) 1993 by Digital Equipment Corporation.
Permission to use, copy, modify, and distribute this software for any
@@ -201,6 +262,61 @@ SOFTWARE.
-----------------------------------------------------------------------------
Copyright 2000 Aaron D. Gifford. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTOR(S) BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-----------------------------------------------------------------------------
Copyright (c) 1998 Doug Rabson.
Copyright (c) 2001 Jake Burkholder.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
-----------------------------------------------------------------------------
Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
All rights reserved.
@@ -247,6 +363,49 @@ SOFTWARE.
-----------------------------------------------------------------------------
Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved.
By using this file, you agree to the terms and conditions set forth bellow.
LICENSE TERMS AND CONDITIONS
The following License Terms and Conditions apply, unless a different
license is obtained from Japan Network Information Center ("JPNIC"),
a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
Chiyoda-ku, Tokyo 101-0047, Japan.
1. Use, Modification and Redistribution (including distribution of any
modified or derived work) in source and/or binary forms is permitted
under this License Terms and Conditions.
2. Redistribution of source code must retain the copyright notices as they
appear in each source code file, this License Terms and Conditions.
3. Redistribution in binary form must reproduce the Copyright Notice,
this License Terms and Conditions, in the documentation and/or other
materials provided with the distribution. For the purposes of binary
distribution the "Copyright Notice" refers to the following language:
"Copyright (c) 2000-2002 Japan Network Information Center. All rights
reserved."
4. The name of JPNIC may not be used to endorse or promote products
derived from this Software without specific prior written approval of
JPNIC.
5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-----------------------------------------------------------------------------
Copyright (C) 2004 Nominet, Ltd.
Permission to use, copy, modify, and distribute this software for any
@@ -263,6 +422,24 @@ PERFORMANCE OF THIS SOFTWARE.
-----------------------------------------------------------------------------
Portions Copyright RSA Security Inc.
License to copy and use this software is granted provided that it is
identified as "RSA Security Inc. PKCS #11 Cryptographic Token Interface
(Cryptoki)" in all material mentioning or referencing this software.
License is also granted to make and use derivative works provided that
such works are identified as "derived from the RSA Security Inc. PKCS #11
Cryptographic Token Interface (Cryptoki)" in all material mentioning or
referencing the derived work.
RSA Security Inc. makes no representations concerning either the
merchantability of this software or the suitability of this software for
any particular purpose. It is provided "as is" without express or implied
warranty of any kind.
-----------------------------------------------------------------------------
Copyright (c) 1996, David Mazieres <dm@uun.org>
Copyright (c) 2008, Damien Miller <djm@openbsd.org>
@@ -280,6 +457,54 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-----------------------------------------------------------------------------
Copyright (c) 2000-2001 The OpenSSL Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. All advertising materials mentioning features or use of this
software must display the following acknowledgment:
"This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
endorse or promote products derived from this software without
prior written permission. For written permission, please contact
licensing@OpenSSL.org.
5. Products derived from this software may not be called "OpenSSL"
nor may "OpenSSL" appear in their names without prior written
permission of the OpenSSL Project.
6. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
-----------------------------------------------------------------------------
Copyright (c) 1995, 1997, 1998 The NetBSD Foundation, Inc.
All rights reserved.
@@ -367,25 +592,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-----------------------------------------------------------------------------
Copyright Joyent, Inc. and other Node contributors. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.

View File

@@ -1 +0,0 @@
CHANGES

526
HISTORY Normal file
View File

@@ -0,0 +1,526 @@
HISTORY
Functional enhancements from prior major releases of BIND 9
BIND 9.11
BIND 9.11.0 includes a number of changes from BIND 9.10 and earlier
releases. New features include:
* Added support for Catalog Zones, a new method for provisioning
servers: a list of zones to be served is stored in a DNS zone, along
with their configuration parameters. Changes to the catalog zone are
propagated to slaves via normal AXFR/IXFR, whereupon the zones that
are listed in it are automatically added, deleted or reconfigured.
* Added support for "dnstap", a fast and flexible method of capturing
and logging DNS traffic.
* Added support for "dyndb", a new API for loading zone data from an
external database, developed by Red Hat for the FreeIPA project.
* "fetchlimit" quotas are now compiled in by default. These are for the
use of recursive resolvers that are are under high query load for
domains whose authoritative servers are nonresponsive or are
experiencing a denial of service attack:
+ "fetches-per-server" limits the number of simultaneous queries
that can be sent to any single authoritative server. The
configured value is a starting point; it is automatically adjusted
downward if the server is partially or completely non-responsive.
The algorithm used to adjust the quota can be configured via the
"fetch-quota-params" option.
+ "fetches-per-zone" limits the number of simultaneous queries that
can be sent for names within a single domain. (Note: Unlike
"fetches-per-server", this value is not self-tuning.)
+ New stats counters have been added to count queries spilled due to
these quotas.
* Added a new "dnssec-keymgr" key mainenance utility, which can generate
or update keys as needed to ensure that a zone's keys match a defined
DNSSEC policy.
* The experimental "SIT" feature in BIND 9.10 has been renamed "COOKIE"
and is no longer optional. EDNS COOKIE is a mechanism enabling clients
to detect off-path spoofed responses, and servers to detect
spoofed-source queries. Clients that identify themselves using COOKIE
options are not subject to response rate limiting (RRL) and can
receive larger UDP responses.
* SERVFAIL responses can now be cached for a limited time (defaulting to
1 second, with an upper limit of 30). This can reduce the frequency of
retries when a query is persistently failing.
* Added an "nsip-wait-recurse" switch to RPZ. This causes NSIP rules to
be skipped if a name server IP address isn't in the cache yet; the
address will be looked up and the rule will be applied on future
queries.
* Added a Python RNDC module. This allows multiple commands to sent over
a persistent RNDC channel, which saves time.
* The "controls" block in named.conf can now grant read-only "rndc"
access to specified clients or keys. Read-only clients could, for
example, check "rndc status" but could not reconfigure or shut down
the server.
* "rndc" commands can now return arbitrarily large amounts of text to
the caller.
* The zone serial number of a dynamically updatable zone can now be set
via "rndc signing -serial ". This allows inline-signing zones to be
set to a specific serial number.
* The new "rndc nta" command can be used to set a Negative Trust Anchor
(NTA), disabling DNSSEC validation for a specific domain; this can be
used when responses from a domain are known to be failing validation
due to administrative error rather than because of a spoofing attack.
Negative trust anchors are strictly temporary; by default they expire
after one hour, but can be configured to last up to one week.
* "rndc delzone" can now be used on zones that were not originally
created by "rndc addzone".
* "rndc modzone" reconfigures a single zone, without requiring the
entire server to be reconfigured.
* "rndc showzone" displays the current configuration of a zone.
* "rndc managed-keys" can be used to check the status of RFC 5011
managed trust anchors, or to force trust anchors to be refreshed.
* "max-cache-size" can now be set to a percentage of available memory.
The default is 90%.
* Update forwarding performance has been improved by allowing a single
TCP connection to be shared by multiple updates.
* The EDNS Client Subnet (ECS) option is now supported for authoritative
servers; if a query contains an ECS option then ACLs containing
"geoip" or "ecs" elements can match against the the address encoded in
the option. This can be used to select a view for a query, so that
different answers can be provided depending on the client network.
* The EDNS EXPIRE option has been implemented on the client side,
allowing a slave server to set the expiration timer correctly when
transferring zone data from another slave server.
* The key generation and manipulation tools (dnssec-keygen,
dnssec-settime, dnssec-importkey, dnssec-keyfromlabel) now take
"-Psync" and "-Dsync" options to set the publication and deletion
times of CDS and CDNSKEY parent-synchronization records. Both named
and dnssec-signzone can now publish and remove these records at the
scheduled times.
* A new "minimal-any" option reduces the size of UDP responses for query
type ANY by returning a single arbitrarily selected RRset instead of
all RRsets.
* A new "masterfile-style" zone option controls the formatting of text
zone files: When set to "full", a zone file is dumped in
single-line-per-record format.
* "serial-update-method" can now be set to "date". On update, the serial
number will be set to the current date in YYYYMMDDNN format.
* "dnssec-signzone -N date" sets the serial number to YYYYMMDDNN.
* "named -L " causes named to send log messages to the specified file by
default instead of to the system log.
* "dig +ttlunits" prints TTL values with time-unit suffixes: w, d, h, m,
s for weeks, days, hours, minutes, and seconds.
* "dig +unknownformat" prints dig output in RFC 3597 "unknown record"
presentation format.
* "dig +ednsopt" allows dig to set arbitrary EDNS options on requests.
* "dig +ednsflags" allows dig to set yet-to-be-defined EDNS flags on
requests.
* "mdig" is an alternate version of dig which sends multiple pipelined
TCP queries to a server. Instead of waiting for a response after
sending a query, it sends all queries immediately and displays
responses in the order received.
* "serial-query-rate" no longer controls NOTIFY messages. These are
separately controlled by "notify-rate" and "startup-notify-rate".
* "nsupdate" now performs "check-names" processing by default on records
to be added. This can be disabled with "check-names no".
* The statistics channel now supports DEFLATE compression, reducing the
size of the data sent over the network when querying statistics.
* New counters have been added to the statistics channel to track the
sizes of incoming queries and outgoing responses in histogram buckets,
as specified in RSSAC002.
* A new NXDOMAIN redirect method (option "nxdomain-redirect") has been
added, allowing redirection to a specified DNS namespace instead of a
single redirect zone.
* When starting up, named now ensures that no other named process is
already running.
* Files created by named to store information, including "mkeys" and
"nzf" files, are now named after their corresponding views unless the
view name contains characters incompatible with use as a filename. Old
style filenames (based on the hash of the view name) will still work.
BIND 9.10.0
BIND 9.10.0 includes a number of changes from BIND 9.9 and earlier
releases. New features include:
* DNS Response-rate limiting (DNS RRL), which blunts the impact of
reflection and amplification attacks, is always compiled in and no
longer requires a compile-time option to enable it.
* An experimental "Source Identity Token" (SIT) EDNS option is now
available. Similar to DNS Cookies as invented by Donald Eastlake 3rd,
these are designed to enable clients to detect off-path spoofed
responses, and to enable servers to detect spoofed-source queries.
Servers can be configured to send smaller responses to clients that
have not identified themselves using a SIT option, reducing the
effectiveness of amplification attacks. RRL processing has also been
updated; clients proven to be legitimate via SIT are not subject to
rate limiting. Use "configure --enable-sit" to enable this feature in
BIND.
* A new zone file format, "map", stores zone data in a format that can
be mapped directly into memory, allowing significantly faster zone
loading.
* "delv" (domain entity lookup and validation) is a new tool with
dig-like semantics for looking up DNS data and performing internal
DNSSEC validation. This allows easy validation in environments where
the resolver may not be trustworthy, and assists with troubleshooting
of DNSSEC problems. (NOTE: In previous development releases of BIND
9.10, this utility was called "delve". The spelling has been changed
to avoid confusion with the "delve" utility included with the Xapian
search engine.)
* Improved EDNS(0) processing for better resolver performance and
reliability over slow or lossy connections.
* A new "configure --with-tuning=large" option tunes certain compiled-in
constants and default settings to values better suited to large
servers with abundant memory. This can improve performance on such
servers, but will consume more memory and may degrade performance on
smaller systems.
* Substantial improvement in response-policy zone (RPZ) performance. Up
to 32 response-policy zones can be configured with minimal performance
loss.
* To improve recursive resolver performance, cache records which are
still being requested by clients can now be automatically refreshed
from the authoritative server before they expire, reducing or
eliminating the time window in which no answer is available in the
cache.
* New "rpz-client-ip" triggers and drop policies allowing response
policies based on the IP address of the client.
* ACLs can now be specified based on geographic location using the
MaxMind GeoIP databases. Use "configure --with-geoip" to enable.
* Zone data can now be shared between views, allowing multiple views to
serve the same zones authoritatively without storing multiple copies
in memory.
* New XML schema (version 3) for the statistics channel includes many
new statistics and uses a flattened XML tree for faster parsing. The
older schema is now deprecated.
* A new stylesheet, based on the Google Charts API, displays XML
statistics in charts and graphs on javascript-enabled browsers.
* The statistics channel can now provide data in JSON format as well as
XML.
* New stats counters track TCP and UDP queries received per zone, and
EDNS options received in total.
* The internal and export versions of the BIND libraries (libisc,
libdns, etc) have been unified so that external library clients can
use the same libraries as BIND itself.
* A new compile-time option, "configure --enable-native-pkcs11", allows
BIND 9 cryptography functions to use the PKCS#11 API natively, so that
BIND can drive a cryptographic hardware service module (HSM) directly
instead of using a modified OpenSSL as an intermediary. (Note: This
feature requires an HSM to have a full implementation of the PKCS#11
API; many current HSMs only have partial implementations. The new
"pkcs11-tokens" command can be used to check API completeness. Native
PKCS#11 is known to work with the Thales nShield HSM and with SoftHSM
version 2 from the Open DNSSEC project.)
* The new "max-zone-ttl" option enforces maximum TTLs for zones. This
can simplify the process of rolling DNSSEC keys by guaranteeing that
cached signatures will have expired within the specified amount of
time.
* "dig +subnet" sends an EDNS CLIENT-SUBNET option when querying.
* "dig +expire" sends an EDNS EXPIRE option when querying. When this
option is sent with an SOA query to a server that supports it, it will
report the expiry time of a slave zone.
* New "dnssec-coverage" tool to check DNSSEC key coverage for a zone and
report if a lapse in signing coverage has been inadvertently
scheduled.
* Signing algorithm flexibility and other improvements for the "rndc"
control channel.
* "named-checkzone" and "named-compilezone" can now read journal files,
allowing them to process dynamic zones.
* Multiple DLZ databases can now be configured. Individual zones can be
configured to be served from a specific DLZ database. DLZ databases
now serve zones of type "master" and "redirect".
* "rndc zonestatus" reports information about a specified zone.
* "named" now listens on IPv6 as well as IPv4 interfaces by default.
* "named" now preserves the capitalization of names when responding to
queries: for instance, a query for "example.com" may be answered with
"example.COM" if the name was configured that way in the zone file.
Some clients have a bug causing them to depend on the older behavior,
in which the case of the answer always matched the case of the query,
rather than the case of the name configured in the DNS. Such clients
can now be specified in the new "no-case-compress" ACL; this will
restore the older behavior of "named" for those clients only.
* new "dnssec-importkey" command allows the use of offline DNSSEC keys
with automatic DNSKEY management.
* New "named-rrchecker" tool to verify the syntactic correctness of
individual resource records.
* When re-signing a zone, the new "dnssec-signzone -Q" option drops
signatures from keys that are still published but are no longer
active.
* "named-checkconf -px" will print the contents of configuration files
with the shared secrets obscured, making it easier to share
configuration (e.g. when submitting a bug report) without revealing
private information.
* "rndc scan" causes named to re-scan network interfaces for changes in
local addresses.
* On operating systems with support for routing sockets, network
interfaces are re-scanned automatically whenever they change.
* "tsig-keygen" is now available as an alternate command name to use for
"ddns-confgen".
BIND 9.9.0
BIND 9.9.0 includes a number of changes from BIND 9.8 and earlier
releases. New features include:
* Inline signing, allowing automatic DNSSEC signing of master zones
without modification of the zonefile, or "bump in the wire" signing in
slaves.
* NXDOMAIN redirection.
* New 'rndc flushtree' command clears all data under a given name from
the DNS cache.
* New 'rndc sync' command dumps pending changes in a dynamic zone to
disk without a freeze/thaw cycle.
* New 'rndc signing' command displays or clears signing status records
in 'auto-dnssec' zones.
* NSEC3 parameters for 'auto-dnssec' zones can now be set prior to
signing, eliminating the need to initially sign with NSEC.
* Startup time improvements on large authoritative servers.
* Slave zones are now saved in raw format by default.
* Several improvements to response policy zones (RPZ).
* Improved hardware scalability by using multiple threads to listen for
queries and using finer-grained client locking
* The 'also-notify' option now takes the same syntax as 'masters', so it
can used named masterlists and TSIG keys.
* 'dnssec-signzone -D' writes an output file containing only DNSSEC
data, which can be included by the primary zone file.
* 'dnssec-signzone -R' forces removal of signatures that are not expired
but were created by a key which no longer exists.
* 'dnssec-signzone -X' allows a separate expiration date to be specified
for DNSKEY signatures from other signatures.
* New '-L' option to dnssec-keygen, dnssec-settime, and
dnssec-keyfromlabel sets the default TTL for the key.
* dnssec-dsfromkey now supports reading from standard input, to make it
easier to convert DNSKEY to DS.
* RFC 1918 reverse zones have been added to the empty-zones table per
RFC 6303.
* Dynamic updates can now optionally set the zone's SOA serial number to
the current UNIX time.
* DLZ modules can now retrieve the source IP address of the querying
client.
* 'request-ixfr' option can now be set at the per-zone level.
* 'dig +rrcomments' turns on comments about DNSKEY records, indicating
their key ID, algorithm and function
* Simplified nsupdate syntax and added readline support
BIND 9.8.0
BIND 9.8.0 includes a number of changes from BIND 9.7 and earlier
releases. New features include:
* Built-in trust anchor for the root zone, which can be switched on via
"dnssec-validation auto;"
* Support for DNS64.
* Support for response policy zones (RPZ).
* Support for writable DLZ zones.
* Improved ease of configuration of GSS/TSIG for interoperability with
Active Directory
* Support for GOST signing algorithm for DNSSEC.
* Removed RTT Banding from server selection algorithm.
* New "static-stub" zone type.
* Allow configuration of resolver timeouts via "resolver-query-timeout"
option.
* The DLZ "dlopen" driver is now built by default.
* Added a new include file with function typedefs for the DLZ "dlopen"
driver.
* Made "--with-gssapi" default.
* More verbose error reporting from DLZ LDAP.
BIND 9.7.0
BIND 9.7.0 includes a number of changes from BIND 9.6 and earlier
releases. Most are intended to simplify DNSSEC configuration. New features
include:
* Fully automatic signing of zones by "named".
* Simplified configuration of DNSSEC Lookaside Validation (DLV).
* Simplified configuration of Dynamic DNS, using the "ddns-confgen"
command line tool or the "local" update-policy option. (As a side
effect, this also makes it easier to configure automatic zone
re-signing.)
* New named option "attach-cache" that allows multiple views to share a
single cache.
* DNS rebinding attack prevention.
* New default values for dnssec-keygen parameters.
* Support for RFC 5011 automated trust anchor maintenance
* Smart signing: simplified tools for zone signing and key maintenance.
* The "statistics-channels" option is now available on Windows.
* A new DNSSEC-aware libdns API for use by non-BIND9 applications
* On some platforms, named and other binaries can now print out a stack
backtrace on assertion failure, to aid in debugging.
* A "tools only" installation mode on Windows, which only installs dig,
host, nslookup and nsupdate.
* Improved PKCS#11 support, including Keyper support and explicit
OpenSSL engine selection.
BIND 9.6.0
* Full NSEC3 support
* Automatic zone re-signing
* New update-policy methods tcp-self and 6to4-self
* The BIND 8 resolver library, libbind, has been removed from the BIND 9
distribution and is now available as a separate download.
* Change the default pid file location from /var/run to /var/run/
{named,lwresd} for improved chroot/setuid support.
BIND 9.5.0
* GSS-TSIG support (RFC 3645).
* DHCID support.
* Experimental http server and statistics support for named via xml.
* More detailed statistics counters including those supported in BIND 8.
* Faster ACL processing.
* Use Doxygen to generate internal documentation.
* Efficient LRU cache-cleaning mechanism.
* NSID support.
BIND 9.4.0
* Implemented "additional section caching (or acache)", an internal
cache framework for additional section content to improve response
performance. Several configuration options were provided to control
the behavior.
* New notify type 'master-only'. Enable notify for master zones only.
* Accept 'notify-source' style syntax for query-source.
* rndc now allows addresses to be set in the server clauses.
* New option "allow-query-cache". This lets "allow-query" be used to
specify the default zone access level rather than having to have every
zone override the global value. "allow-query-cache" can be set at both
the options and view levels. If "allow-query-cache" is not set then
"allow-recursion" is used if set, otherwise "allow-query" is used if
set unless "recursion no;" is set in which case "none;" is used,
otherwise the default (localhost; localnets;) is used.
* rndc: the source address can now be specified.
* ixfr-from-differences now takes master and slave in addition to yes
and no at the options and view levels.
* Allow the journal's name to be changed via named.conf.
* 'rndc notify zone [class [view]]' resend the NOTIFY messages for the
specified zone.
* 'dig +trace' now randomly selects the next servers to try. Report if
there is a bad delegation.
* Improve check-names error messages.
* Make public the function to read a key file, dst_key_read_public().
* dig now returns the byte count for axfr/ixfr.
* allow-update is now settable at the options / view level.
* named-checkconf now checks the logging configuration.
* host now can turn on memory debugging flags with '-m'.
* Don't send notify messages to self.
* Perform sanity checks on NS records which refer to 'in zone' names.
* New zone option "notify-delay". Specify a minimum delay between sets
of NOTIFY messages.
* Extend adjusting TTL warning messages.
* Named and named-checkzone can now both check for non-terminal wildcard
records.
* "rndc freeze/thaw" now freezes/thaws all zones.
* named-checkconf now check acls to verify that they only refer to
existing acls.
* The server syntax has been extended to support a range of servers.
* Report differences between hints and real NS rrset and associated
address records.
* Preserve the case of domain names in rdata during zone transfers.
* Restructured the data locking framework using architecture dependent
atomic operations (when available), improving response performance on
multi-processor machines significantly. x86, x86_64, alpha, powerpc,
and mips are currently supported.
* UNIX domain controls are now supported.
* Add support for additional zone file formats for improving loading
performance. The masterfile-format option in named.conf can be used to
specify a non-default format. A separate command named-compilezone was
provided to generate zone files in the new format. Additionally, the
-I and -O options for dnssec-signzone specify the input and output
formats.
* dnssec-signzone can now randomize signature end times (dnssec-signzone
-j jitter).
* Add support for CH A record.
* Add additional zone data constancy checks. named-checkzone has
extended checking of NS, MX and SRV record and the hosts they
reference. named has extended post zone load checks. New zone options:
check-mx and integrity-check.
* edns-udp-size can now be overridden on a per server basis.
* dig can now specify the EDNS version when making a query.
* Added framework for handling multiple EDNS versions.
* Additional memory debugging support to track size and mctx arguments.
* Detect duplicates of UDP queries we are recursing on and drop them.
New stats category "duplicates".
* "USE INTERNAL MALLOC" is now runtime selectable.
* The lame cache is now done on a <qname,qclass,qtype> basis as some
servers only appear to be lame for certain query types.
* Limit the number of recursive clients that can be waiting for a single
query (<qname,qtype,qclass>) to resolve. New options clients-per-query
and max-clients-per-query.
* dig: report the number of extra bytes still left in the packet after
processing all the records.
* Support for IPSECKEY rdata type.
* Raise the UDP recieve buffer size to 32k if it is less than 32k.
* x86 and x86_64 now have seperate atomic locking implementations.
* named-checkconf now validates update-policy entries.
* Attempt to make the amount of work performed in a iteration self
tuning. The covers nodes clean from the cache per iteration, nodes
written to disk when rewriting a master file and nodes destroyed per
iteration when destroying a zone or a cache.
* ISC string copy API.
* Automatic empty zone creation for D.F.IP6.ARPA and friends. Note: RFC
1918 zones are not yet covered by this but are likely to be in a
future release.
* New options: empty-server, empty-contact, empty-zones-enable and
disable-empty-zone.
* dig now has a '-q queryname' and '+showsearch' options.
* host/nslookup now continue (default)/fail on SERVFAIL.
* dig now warns if 'RA' is not set in the answer when 'RD' was set in
the query. host/nslookup skip servers that fail to set 'RA' when 'RD'
is set unless a server is explicitly set.
* Integrate contibuted DLZ code into named.
* Integrate contibuted IDN code from JPNIC.
* libbind: corresponds to that from BIND 8.4.7.
BIND 9.3.0
* DNSSEC is now DS based (RFC 3658).
* DNSSEC lookaside validation.
* check-names is now implemented.
* rrset-order is more complete.
* IPv4/IPv6 transition support, dual-stack-servers.
* IXFR deltas can now be generated when loading master files,
ixfr-from-differences.
* It is now possible to specify the size of a journal, max-journal-size.
* It is now possible to define a named set of master servers to be used
in masters clause, masters.
* The advertised EDNS UDP size can now be set, edns-udp-size.
* allow-v6-synthesis has been obsoleted.
* Zones containing MD and MF will now be rejected.
* dig, nslookup name. now report "Not Implemented" as NOTIMP rather than
NOTIMPL. This will have impact on scripts that are looking for
NOTIMPL.
* libbind: corresponds to that from BIND 8.4.5.
BIND 9.2.0
* The size of the cache can now be limited using the "max-cache-size"
option.
* The server can now automatically convert RFC1886-style recursive
lookup requests into RFC2874-style lookups, when enabled using the new
option "allow-v6-synthesis". This allows stub resolvers that support
AAAA records but not A6 record chains or binary labels to perform
lookups in domains that make use of these IPv6 DNS features.
* Performance has been improved.
* The man pages now use the more portable "man" macros rather than the
"mandoc" macros, and are installed by "make install".
* The named.conf parser has been completely rewritten. It now supports
"include" directives in more places such as inside "view" statements,
and it no longer has any reserved words.
* The "rndc status" command is now implemented.
* rndc can now be configured automatically.
* A BIND 8 compatible stub resolver library is now included in lib/bind.
* OpenSSL has been removed from the distribution. This means that to use
DNSSEC, OpenSSL must be installed and the --with-openssl option must
be supplied to configure. This does not apply to the use of TSIG,
which does not require OpenSSL.
* The source distribution now builds on Windows. See win32utils/
readme1.txt and win32utils/win32-build.txt for details.
* This distribution also includes a new lightweight stub resolver
library and associated resolver daemon that fully support forward and
reverse lookups of both IPv4 and IPv6 addresses. This library is
considered experimental and is not a complete replacement for the BIND
8 resolver library. Applications that use the BIND 8 res_* functions
to perform DNS lookups or dynamic updates still need to be linked
against the BIND 8 libraries. For DNS lookups, they can also use the
new "getrrsetbyname()" API.
* BIND 9.2 is capable of acting as an authoritative server for DNSSEC
secured zones. This functionality is believed to be stable and
complete except for lacking support for verifications involving
wildcard records in secure zones.
* When acting as a caching server, BIND 9.2 can be configured to perform
DNSSEC secure resolution on behalf of its clients. This part of the
DNSSEC implementation is still considered experimental. For detailed
information about the state of the DNSSEC implementation, see the file
doc/misc/dnssec.

542
HISTORY.md Normal file
View File

@@ -0,0 +1,542 @@
<!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
### Functional enhancements from prior major releases of BIND 9
#### BIND 9.11
BIND 9.11.0 includes a number of changes from BIND 9.10 and earlier
releases. New features include:
- Added support for Catalog Zones, a new method for provisioning servers: a
list of zones to be served is stored in a DNS zone, along with their
configuration parameters. Changes to the catalog zone are propagated to
slaves via normal AXFR/IXFR, whereupon the zones that are listed in it
are automatically added, deleted or reconfigured.
- Added support for "dnstap", a fast and flexible method of capturing and
logging DNS traffic.
- Added support for "dyndb", a new API for loading zone data from an
external database, developed by Red Hat for the FreeIPA project.
- "fetchlimit" quotas are now compiled in by default. These are for the
use of recursive resolvers that are are under high query load for domains
whose authoritative servers are nonresponsive or are experiencing a
denial of service attack:
- "fetches-per-server" limits the number of simultaneous queries that
can be sent to any single authoritative server. The configured value
is a starting point; it is automatically adjusted downward if the
server is partially or completely non-responsive. The algorithm used
to adjust the quota can be configured via the "fetch-quota-params"
option.
- "fetches-per-zone" limits the number of simultaneous queries that can
be sent for names within a single domain. (Note: Unlike
"fetches-per-server", this value is not self-tuning.)
- New stats counters have been added to count queries spilled due to
these quotas.
- Added a new "dnssec-keymgr" key mainenance utility, which can generate or
update keys as needed to ensure that a zone's keys match a defined DNSSEC
policy.
- The experimental "SIT" feature in BIND 9.10 has been renamed "COOKIE" and
is no longer optional. EDNS COOKIE is a mechanism enabling clients to
detect off-path spoofed responses, and servers to detect spoofed-source
queries. Clients that identify themselves using COOKIE options are not
subject to response rate limiting (RRL) and can receive larger UDP
responses.
- SERVFAIL responses can now be cached for a limited time (defaulting to 1
second, with an upper limit of 30). This can reduce the frequency of
retries when a query is persistently failing.
- Added an "nsip-wait-recurse" switch to RPZ. This causes NSIP rules to be
skipped if a name server IP address isn't in the cache yet; the address
will be looked up and the rule will be applied on future queries.
- Added a Python RNDC module. This allows multiple commands to sent over a
persistent RNDC channel, which saves time.
- The "controls" block in named.conf can now grant read-only "rndc" access
to specified clients or keys. Read-only clients could, for example, check
"rndc status" but could not reconfigure or shut down the server.
- "rndc" commands can now return arbitrarily large amounts of text to the
caller.
- The zone serial number of a dynamically updatable zone can now be set via
"rndc signing -serial <number> <zonename>". This allows inline-signing
zones to be set to a specific serial number.
- The new "rndc nta" command can be used to set a Negative Trust Anchor
(NTA), disabling DNSSEC validation for a specific domain; this can be
used when responses from a domain are known to be failing validation due
to administrative error rather than because of a spoofing attack.
Negative trust anchors are strictly temporary; by default they expire
after one hour, but can be configured to last up to one week.
- "rndc delzone" can now be used on zones that were not originally created
by "rndc addzone".
- "rndc modzone" reconfigures a single zone, without requiring the entire
server to be reconfigured.
- "rndc showzone" displays the current configuration of a zone.
- "rndc managed-keys" can be used to check the status of RFC 5011 managed
trust anchors, or to force trust anchors to be refreshed.
- "max-cache-size" can now be set to a percentage of available memory. The
default is 90%.
- Update forwarding performance has been improved by allowing a single TCP
connection to be shared by multiple updates.
- The EDNS Client Subnet (ECS) option is now supported for authoritative
servers; if a query contains an ECS option then ACLs containing "geoip"
or "ecs" elements can match against the the address encoded in the
option. This can be used to select a view for a query, so that different
answers can be provided depending on the client network.
- The EDNS EXPIRE option has been implemented on the client side, allowing
a slave server to set the expiration timer correctly when transferring
zone data from another slave server.
- The key generation and manipulation tools (dnssec-keygen, dnssec-settime,
dnssec-importkey, dnssec-keyfromlabel) now take "-Psync" and "-Dsync"
options to set the publication and deletion times of CDS and CDNSKEY
parent-synchronization records. Both named and dnssec-signzone can now
publish and remove these records at the scheduled times.
- A new "minimal-any" option reduces the size of UDP responses for query
type ANY by returning a single arbitrarily selected RRset instead of all
RRsets.
- A new "masterfile-style" zone option controls the formatting of text zone
files: When set to "full", a zone file is dumped in
single-line-per-record format.
- "serial-update-method" can now be set to "date". On update, the serial
number will be set to the current date in YYYYMMDDNN format.
- "dnssec-signzone -N date" sets the serial number to YYYYMMDDNN.
- "named -L <filename>" causes named to send log messages to the specified
file by default instead of to the system log.
- "dig +ttlunits" prints TTL values with time-unit suffixes: w, d, h, m, s
for weeks, days, hours, minutes, and seconds.
- "dig +unknownformat" prints dig output in RFC 3597 "unknown record"
presentation format.
- "dig +ednsopt" allows dig to set arbitrary EDNS options on requests.
- "dig +ednsflags" allows dig to set yet-to-be-defined EDNS flags on
requests.
- "mdig" is an alternate version of dig which sends multiple pipelined TCP
queries to a server. Instead of waiting for a response after sending a
query, it sends all queries immediately and displays responses in the
order received.
- "serial-query-rate" no longer controls NOTIFY messages. These are
separately controlled by "notify-rate" and "startup-notify-rate".
- "nsupdate" now performs "check-names" processing by default on records to
be added. This can be disabled with "check-names no".
- The statistics channel now supports DEFLATE compression, reducing the
size of the data sent over the network when querying statistics.
- New counters have been added to the statistics channel to track the sizes
of incoming queries and outgoing responses in histogram buckets, as
specified in RSSAC002.
- A new NXDOMAIN redirect method (option "nxdomain-redirect") has been
added, allowing redirection to a specified DNS namespace instead of a
single redirect zone.
- When starting up, named now ensures that no other named process is
already running.
- Files created by named to store information, including "mkeys" and "nzf"
files, are now named after their corresponding views unless the view name
contains characters incompatible with use as a filename. Old style
filenames (based on the hash of the view name) will still work.
#### BIND 9.10.0
BIND 9.10.0 includes a number of changes from BIND 9.9 and earlier
releases. New features include:
- DNS Response-rate limiting (DNS RRL), which blunts the
impact of reflection and amplification attacks, is always
compiled in and no longer requires a compile-time option
to enable it.
- An experimental "Source Identity Token" (SIT) EDNS option
is now available. Similar to DNS Cookies as invented by
Donald Eastlake 3rd, these are designed to enable clients
to detect off-path spoofed responses, and to enable servers
to detect spoofed-source queries. Servers can be configured
to send smaller responses to clients that have not identified
themselves using a SIT option, reducing the effectiveness of
amplification attacks. RRL processing has also been updated;
clients proven to be legitimate via SIT are not subject to
rate limiting. Use "configure --enable-sit" to enable this
feature in BIND.
- A new zone file format, "map", stores zone data in a
format that can be mapped directly into memory, allowing
significantly faster zone loading.
- "delv" (domain entity lookup and validation) is a new tool
with dig-like semantics for looking up DNS data and performing
internal DNSSEC validation. This allows easy validation in
environments where the resolver may not be trustworthy, and
assists with troubleshooting of DNSSEC problems. (NOTE:
In previous development releases of BIND 9.10, this utility
was called "delve". The spelling has been changed to avoid
confusion with the "delve" utility included with the Xapian
search engine.)
- Improved EDNS(0) processing for better resolver performance
and reliability over slow or lossy connections.
- A new "configure --with-tuning=large" option tunes certain
compiled-in constants and default settings to values better
suited to large servers with abundant memory. This can
improve performance on such servers, but will consume more
memory and may degrade performance on smaller systems.
- Substantial improvement in response-policy zone (RPZ)
performance. Up to 32 response-policy zones can be
configured with minimal performance loss.
- To improve recursive resolver performance, cache records
which are still being requested by clients can now be
automatically refreshed from the authoritative server
before they expire, reducing or eliminating the time
window in which no answer is available in the cache.
- New "rpz-client-ip" triggers and drop policies allowing
response policies based on the IP address of the client.
- ACLs can now be specified based on geographic location
using the MaxMind GeoIP databases. Use "configure
--with-geoip" to enable.
- Zone data can now be shared between views, allowing
multiple views to serve the same zones authoritatively
without storing multiple copies in memory.
- New XML schema (version 3) for the statistics channel
includes many new statistics and uses a flattened XML tree
for faster parsing. The older schema is now deprecated.
- A new stylesheet, based on the Google Charts API, displays
XML statistics in charts and graphs on javascript-enabled
browsers.
- The statistics channel can now provide data in JSON
format as well as XML.
- New stats counters track TCP and UDP queries received
per zone, and EDNS options received in total.
- The internal and export versions of the BIND libraries
(libisc, libdns, etc) have been unified so that external
library clients can use the same libraries as BIND itself.
- A new compile-time option, "configure --enable-native-pkcs11",
allows BIND 9 cryptography functions to use the PKCS#11 API
natively, so that BIND can drive a cryptographic hardware
service module (HSM) directly instead of using a modified
OpenSSL as an intermediary. (Note: This feature requires an
HSM to have a full implementation of the PKCS#11 API; many
current HSMs only have partial implementations. The new
"pkcs11-tokens" command can be used to check API completeness.
Native PKCS#11 is known to work with the Thales nShield HSM
and with SoftHSM version 2 from the Open DNSSEC project.)
- The new "max-zone-ttl" option enforces maximum TTLs for
zones. This can simplify the process of rolling DNSSEC keys
by guaranteeing that cached signatures will have expired
within the specified amount of time.
- "dig +subnet" sends an EDNS CLIENT-SUBNET option when
querying.
- "dig +expire" sends an EDNS EXPIRE option when querying.
When this option is sent with an SOA query to a server
that supports it, it will report the expiry time of
a slave zone.
- New "dnssec-coverage" tool to check DNSSEC key coverage
for a zone and report if a lapse in signing coverage has
been inadvertently scheduled.
- Signing algorithm flexibility and other improvements
for the "rndc" control channel.
- "named-checkzone" and "named-compilezone" can now read
journal files, allowing them to process dynamic zones.
- Multiple DLZ databases can now be configured. Individual
zones can be configured to be served from a specific DLZ
database. DLZ databases now serve zones of type "master"
and "redirect".
- "rndc zonestatus" reports information about a specified zone.
- "named" now listens on IPv6 as well as IPv4 interfaces
by default.
- "named" now preserves the capitalization of names
when responding to queries: for instance, a query for
"example.com" may be answered with "example.COM" if the
name was configured that way in the zone file. Some
clients have a bug causing them to depend on the older
behavior, in which the case of the answer always matched
the case of the query, rather than the case of the name
configured in the DNS. Such clients can now be specified
in the new "no-case-compress" ACL; this will restore the
older behavior of "named" for those clients only.
- new "dnssec-importkey" command allows the use of offline
DNSSEC keys with automatic DNSKEY management.
- New "named-rrchecker" tool to verify the syntactic
correctness of individual resource records.
- When re-signing a zone, the new "dnssec-signzone -Q" option
drops signatures from keys that are still published but are
no longer active.
- "named-checkconf -px" will print the contents of configuration
files with the shared secrets obscured, making it easier to
share configuration (e.g. when submitting a bug report)
without revealing private information.
- "rndc scan" causes named to re-scan network interfaces for
changes in local addresses.
- On operating systems with support for routing sockets,
network interfaces are re-scanned automatically whenever
they change.
- "tsig-keygen" is now available as an alternate command
name to use for "ddns-confgen".
#### BIND 9.9.0
BIND 9.9.0 includes a number of changes from BIND 9.8 and earlier
releases. New features include:
- Inline signing, allowing automatic DNSSEC signing of
master zones without modification of the zonefile, or
"bump in the wire" signing in slaves.
- NXDOMAIN redirection.
- New 'rndc flushtree' command clears all data under a given
name from the DNS cache.
- New 'rndc sync' command dumps pending changes in a dynamic
zone to disk without a freeze/thaw cycle.
- New 'rndc signing' command displays or clears signing status
records in 'auto-dnssec' zones.
- NSEC3 parameters for 'auto-dnssec' zones can now be set prior
to signing, eliminating the need to initially sign with NSEC.
- Startup time improvements on large authoritative servers.
- Slave zones are now saved in raw format by default.
- Several improvements to response policy zones (RPZ).
- Improved hardware scalability by using multiple threads
to listen for queries and using finer-grained client locking
- The 'also-notify' option now takes the same syntax as
'masters', so it can used named masterlists and TSIG keys.
- 'dnssec-signzone -D' writes an output file containing only DNSSEC
data, which can be included by the primary zone file.
- 'dnssec-signzone -R' forces removal of signatures that are
not expired but were created by a key which no longer exists.
- 'dnssec-signzone -X' allows a separate expiration date to
be specified for DNSKEY signatures from other signatures.
- New '-L' option to dnssec-keygen, dnssec-settime, and
dnssec-keyfromlabel sets the default TTL for the key.
- dnssec-dsfromkey now supports reading from standard input,
to make it easier to convert DNSKEY to DS.
- RFC 1918 reverse zones have been added to the empty-zones
table per RFC 6303.
- Dynamic updates can now optionally set the zone's SOA serial
number to the current UNIX time.
- DLZ modules can now retrieve the source IP address of
the querying client.
- 'request-ixfr' option can now be set at the per-zone level.
- 'dig +rrcomments' turns on comments about DNSKEY records,
indicating their key ID, algorithm and function
- Simplified nsupdate syntax and added readline support
#### BIND 9.8.0
BIND 9.8.0 includes a number of changes from BIND 9.7 and earlier
releases. New features include:
- Built-in trust anchor for the root zone, which can be
switched on via "dnssec-validation auto;"
- Support for DNS64.
- Support for response policy zones (RPZ).
- Support for writable DLZ zones.
- Improved ease of configuration of GSS/TSIG for
interoperability with Active Directory
- Support for GOST signing algorithm for DNSSEC.
- Removed RTT Banding from server selection algorithm.
- New "static-stub" zone type.
- Allow configuration of resolver timeouts via
"resolver-query-timeout" option.
- The DLZ "dlopen" driver is now built by default.
- Added a new include file with function typedefs
for the DLZ "dlopen" driver.
- Made "--with-gssapi" default.
- More verbose error reporting from DLZ LDAP.
#### BIND 9.7.0
BIND 9.7.0 includes a number of changes from BIND 9.6 and earlier
releases. Most are intended to simplify DNSSEC configuration.
New features include:
- Fully automatic signing of zones by "named".
- Simplified configuration of DNSSEC Lookaside Validation (DLV).
- Simplified configuration of Dynamic DNS, using the "ddns-confgen"
command line tool or the "local" update-policy option. (As a side
effect, this also makes it easier to configure automatic zone
re-signing.)
- New named option "attach-cache" that allows multiple views to
share a single cache.
- DNS rebinding attack prevention.
- New default values for dnssec-keygen parameters.
- Support for RFC 5011 automated trust anchor maintenance
- Smart signing: simplified tools for zone signing and key
maintenance.
- The "statistics-channels" option is now available on Windows.
- A new DNSSEC-aware libdns API for use by non-BIND9 applications
- On some platforms, named and other binaries can now print out
a stack backtrace on assertion failure, to aid in debugging.
- A "tools only" installation mode on Windows, which only installs
dig, host, nslookup and nsupdate.
- Improved PKCS#11 support, including Keyper support and explicit
OpenSSL engine selection.
#### BIND 9.6.0
- Full NSEC3 support
- Automatic zone re-signing
- New update-policy methods tcp-self and 6to4-self
- The BIND 8 resolver library, libbind, has been removed from the BIND 9
distribution and is now available as a separate download.
- Change the default pid file location from /var/run to
/var/run/{named,lwresd} for improved chroot/setuid support.
#### BIND 9.5.0
- GSS-TSIG support (RFC 3645).
- DHCID support.
- Experimental http server and statistics support for named via xml.
- More detailed statistics counters including those supported in BIND 8.
- Faster ACL processing.
- Use Doxygen to generate internal documentation.
- Efficient LRU cache-cleaning mechanism.
- NSID support.
BIND 9.4.0
- Implemented "additional section caching (or acache)", an internal cache
framework for additional section content to improve response performance.
Several configuration options were provided to control the behavior.
- New notify type 'master-only'. Enable notify for master zones only.
- Accept 'notify-source' style syntax for query-source.
- rndc now allows addresses to be set in the server clauses.
- New option "allow-query-cache". This lets "allow-query" be used to
specify the default zone access level rather than having to have every
zone override the global value. "allow-query-cache" can be set at both
the options and view levels. If "allow-query-cache" is not set then
"allow-recursion" is used if set, otherwise "allow-query" is used if set
unless "recursion no;" is set in which case "none;" is used, otherwise
the default (localhost; localnets;) is used.
- rndc: the source address can now be specified.
- ixfr-from-differences now takes master and slave in addition to yes and
no at the options and view levels.
- Allow the journal's name to be changed via named.conf.
- 'rndc notify zone [class [view]]' resend the NOTIFY messages for the
specified zone.
- 'dig +trace' now randomly selects the next servers to try. Report if
there is a bad delegation.
- Improve check-names error messages.
- Make public the function to read a key file, dst_key_read_public().
- dig now returns the byte count for axfr/ixfr.
- allow-update is now settable at the options / view level.
- named-checkconf now checks the logging configuration.
- host now can turn on memory debugging flags with '-m'.
- Don't send notify messages to self.
- Perform sanity checks on NS records which refer to 'in zone' names.
- New zone option "notify-delay". Specify a minimum delay between sets of
NOTIFY messages.
- Extend adjusting TTL warning messages.
- Named and named-checkzone can now both check for non-terminal wildcard
records.
- "rndc freeze/thaw" now freezes/thaws all zones.
- named-checkconf now check acls to verify that they only refer to existing
acls.
- The server syntax has been extended to support a range of servers.
- Report differences between hints and real NS rrset and associated address
records.
- Preserve the case of domain names in rdata during zone transfers.
- Restructured the data locking framework using architecture dependent
atomic operations (when available), improving response performance on
multi-processor machines significantly. x86, x86_64, alpha, powerpc, and
mips are currently supported.
- UNIX domain controls are now supported.
- Add support for additional zone file formats for improving loading
performance. The masterfile-format option in named.conf can be used to
specify a non-default format. A separate command named-compilezone was
provided to generate zone files in the new format. Additionally, the -I
and -O options for dnssec-signzone specify the input and output formats.
- dnssec-signzone can now randomize signature end times (dnssec-signzone -j
jitter).
- Add support for CH A record.
- Add additional zone data constancy checks. named-checkzone has extended
checking of NS, MX and SRV record and the hosts they reference. named
has extended post zone load checks. New zone options: check-mx and
integrity-check.
- edns-udp-size can now be overridden on a per server basis.
- dig can now specify the EDNS version when making a query.
- Added framework for handling multiple EDNS versions.
- Additional memory debugging support to track size and mctx arguments.
- Detect duplicates of UDP queries we are recursing on and drop them. New
stats category "duplicates".
- "USE INTERNAL MALLOC" is now runtime selectable.
- The lame cache is now done on a <qname,qclass,qtype> basis as some
servers only appear to be lame for certain query types.
- Limit the number of recursive clients that can be waiting for a single
query (<qname,qtype,qclass>) to resolve. New options clients-per-query
and max-clients-per-query.
- dig: report the number of extra bytes still left in the packet after
processing all the records.
- Support for IPSECKEY rdata type.
- Raise the UDP recieve buffer size to 32k if it is less than 32k.
- x86 and x86_64 now have seperate atomic locking implementations.
- named-checkconf now validates update-policy entries.
- Attempt to make the amount of work performed in a iteration self tuning.
The covers nodes clean from the cache per iteration, nodes written to
disk when rewriting a master file and nodes destroyed per iteration when
destroying a zone or a cache.
- ISC string copy API.
- Automatic empty zone creation for D.F.IP6.ARPA and friends. Note: RFC
1918 zones are not yet covered by this but are likely to be in a future
release.
- New options: empty-server, empty-contact, empty-zones-enable and
disable-empty-zone.
- dig now has a '-q queryname' and '+showsearch' options.
- host/nslookup now continue (default)/fail on SERVFAIL.
- dig now warns if 'RA' is not set in the answer when 'RD' was set in the
query. host/nslookup skip servers that fail to set 'RA' when 'RD' is set
unless a server is explicitly set.
- Integrate contibuted DLZ code into named.
- Integrate contibuted IDN code from JPNIC.
- libbind: corresponds to that from BIND 8.4.7.
#### BIND 9.3.0
- DNSSEC is now DS based (RFC 3658).
- DNSSEC lookaside validation.
- check-names is now implemented.
- rrset-order is more complete.
- IPv4/IPv6 transition support, dual-stack-servers.
- IXFR deltas can now be generated when loading master files,
ixfr-from-differences.
- It is now possible to specify the size of a journal, max-journal-size.
- It is now possible to define a named set of master servers to be used in
masters clause, masters.
- The advertised EDNS UDP size can now be set, edns-udp-size.
- allow-v6-synthesis has been obsoleted.
- Zones containing MD and MF will now be rejected.
- dig, nslookup name. now report "Not Implemented" as NOTIMP rather than
NOTIMPL. This will have impact on scripts that are looking for NOTIMPL.
- libbind: corresponds to that from BIND 8.4.5.
#### BIND 9.2.0
- The size of the cache can now be limited using the "max-cache-size"
option.
- The server can now automatically convert RFC1886-style recursive lookup
requests into RFC2874-style lookups, when enabled using the new option
"allow-v6-synthesis". This allows stub resolvers that support AAAA
records but not A6 record chains or binary labels to perform lookups in
domains that make use of these IPv6 DNS features.
- Performance has been improved.
- The man pages now use the more portable "man" macros rather than the
"mandoc" macros, and are installed by "make install".
- The named.conf parser has been completely rewritten. It now supports
"include" directives in more places such as inside "view" statements, and
it no longer has any reserved words.
- The "rndc status" command is now implemented.
- rndc can now be configured automatically.
- A BIND 8 compatible stub resolver library is now included in lib/bind.
- OpenSSL has been removed from the distribution. This means that to use
DNSSEC, OpenSSL must be installed and the --with-openssl option must be
supplied to configure. This does not apply to the use of TSIG, which
does not require OpenSSL.
- The source distribution now builds on Windows. See
win32utils/readme1.txt and win32utils/win32-build.txt for details.
- This distribution also includes a new lightweight stub resolver library
and associated resolver daemon that fully support forward and reverse
lookups of both IPv4 and IPv6 addresses. This library is considered
experimental and is not a complete replacement for the BIND 8 resolver
library. Applications that use the BIND 8 `res_*` functions to perform
DNS lookups or dynamic updates still need to be linked against the BIND 8
libraries. For DNS lookups, they can also use the new "getrrsetbyname()"
API.
- BIND 9.2 is capable of acting as an authoritative server for DNSSEC
secured zones. This functionality is believed to be stable and complete
except for lacking support for verifications involving wildcard records
in secure zones.
- When acting as a caching server, BIND 9.2 can be configured to perform
DNSSEC secure resolution on behalf of its clients. This part of the
DNSSEC implementation is still considered experimental. For detailed
information about the state of the DNSSEC implementation, see the file
doc/misc/dnssec.

4
Kyuafile Normal file
View File

@@ -0,0 +1,4 @@
syntax(2)
test_suite('bind9')
include('lib/Kyuafile')

View File

@@ -346,7 +346,7 @@ Exhibit A - Source Code Form License Notice
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
https://mozilla.org/MPL/2.0/.
http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular file,
then You may include the notice in a location (such as a LICENSE file in a

View File

@@ -1,73 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -1,26 +0,0 @@
AUTOCONF CONFIGURE SCRIPT EXCEPTION
Version 3.0, 18 August 2009
Copyright © 2009 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
This Exception is an additional permission under section 7 of the GNU General Public License, version 3 ("GPLv3"). It applies to a given file that bears a notice placed by the copyright holder of the file stating that the file is governed by GPLv3 along with this Exception.
The purpose of this Exception is to allow distribution of Autoconf's typical output under terms of the recipient's choice (including proprietary).
0. Definitions.
"Covered Code" is the source or object code of a version of Autoconf that is a covered work under this License.
"Normally Copied Code" for a version of Autoconf means all parts of its Covered Code which that version can copy from its code (i.e., not from its input file) into its minimally verbose, non-debugging and non-tracing output.
"Ineligible Code" is Covered Code that is not Normally Copied Code.
1. Grant of Additional Permission.
You have permission to propagate output of Autoconf, even if such propagation would otherwise violate the terms of GPLv3. However, if by modifying Autoconf you cause any Ineligible Code of the version you received to become Normally Copied Code of your modified version, then you void this Exception for the resulting covered work. If you convey that resulting covered work, you must remove this Exception in accordance with the second paragraph of Section 7 of GPLv3.
2. No Weakening of Autoconf Copyleft.
The availability of this Exception does not imply any general presumption that third-party software is unaffected by the copyleft requirements of the license of Autoconf.

View File

@@ -1,9 +0,0 @@
Copyright (c) <year> <owner> All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,11 +0,0 @@
Copyright (c) <year> <owner>. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,121 +0,0 @@
Creative Commons Legal Code
CC0 1.0 Universal
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
HEREUNDER.
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator
and subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for
the purpose of contributing to a commons of creative, cultural and
scientific works ("Commons") that the public can reliably and without fear
of later claims of infringement build upon, modify, incorporate in other
works, reuse and redistribute as freely as possible in any form whatsoever
and for any purposes, including without limitation commercial purposes.
These owners may contribute to the Commons to promote the ideal of a free
culture and the further production of creative, cultural and scientific
works, or to gain reputation or greater distribution for their Work in
part through the use and efforts of others.
For these and/or other purposes and motivations, and without any
expectation of additional consideration or compensation, the person
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
is an owner of Copyright and Related Rights in the Work, voluntarily
elects to apply CC0 to the Work and publicly distribute the Work under its
terms, with knowledge of his or her Copyright and Related Rights in the
Work and the meaning and intended legal effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not
limited to, the following:
i. the right to reproduce, adapt, distribute, perform, display,
communicate, and translate a Work;
ii. moral rights retained by the original author(s) and/or performer(s);
iii. publicity and privacy rights pertaining to a person's image or
likeness depicted in a Work;
iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;
v. rights protecting the extraction, dissemination, use and reuse of data
in a Work;
vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation
thereof, including any amended or successor version of such
directive); and
vii. other similar, equivalent or corresponding rights throughout the
world based on applicable law or treaty, and any national
implementations thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention
of, applicable law, Affirmer hereby overtly, fully, permanently,
irrevocably and unconditionally waives, abandons, and surrenders all of
Affirmer's Copyright and Related Rights and associated claims and causes
of action, whether now known or unknown (including existing as well as
future claims and causes of action), in the Work (i) in all territories
worldwide, (ii) for the maximum duration provided by applicable law or
treaty (including future time extensions), (iii) in any current or future
medium and for any number of copies, and (iv) for any purpose whatsoever,
including without limitation commercial, advertising or promotional
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
member of the public at large and to the detriment of Affirmer's heirs and
successors, fully intending that such Waiver shall not be subject to
revocation, rescission, cancellation, termination, or any other legal or
equitable action to disrupt the quiet enjoyment of the Work by the public
as contemplated by Affirmer's express Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason
be judged legally invalid or ineffective under applicable law, then the
Waiver shall be preserved to the maximum extent permitted taking into
account Affirmer's express Statement of Purpose. In addition, to the
extent the Waiver is so judged Affirmer hereby grants to each affected
person a royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmer's Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future
time extensions), (iii) in any current or future medium and for any number
of copies, and (iv) for any purpose whatsoever, including without
limitation commercial, advertising or promotional purposes (the
"License"). The License shall be deemed effective as of the date CC0 was
applied by Affirmer to the Work. Should any part of the License for any
reason be judged legally invalid or ineffective under applicable law, such
partial invalidity or ineffectiveness shall not invalidate the remainder
of the License, and in such case Affirmer hereby affirms that he or she
will not (i) exercise any of his or her remaining Copyright and Related
Rights in the Work or (ii) assert any associated claims and causes of
action with respect to the Work, in either case contrary to Affirmer's
express Statement of Purpose.
4. Limitations and Disclaimers.
a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
b. Affirmer offers the Work as-is and makes no representations or
warranties of any kind concerning the Work, express, implied,
statutory or otherwise, including without limitation warranties of
title, merchantability, fitness for a particular purpose, non
infringement, or the absence of latent or other defects, accuracy, or
the present or absence of errors, whether or not discoverable, all to
the greatest extent permissible under applicable law.
c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any person's Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the
Work.
d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to
this CC0 or use of the Work.

View File

@@ -1 +0,0 @@
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.

View File

@@ -1,117 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
one line to give the program's name and an idea of what it does. Copyright (C) yyyy name of author
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice

View File

@@ -1,232 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for software and other kinds of works.
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS
0. Definitions.
“This License” refers to version 3 of the GNU General Public License.
“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
A “covered work” means either the unmodified Program or a work based on the Program.
To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
1. Source Code.
The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
7. Additional Terms.
“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
11. Patents.
A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.
You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@@ -1,8 +0,0 @@
ISC License:
Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC")
Copyright (c) 1995-2003 by Internet Software Consortium
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@@ -1,15 +0,0 @@
---- LLVM Exceptions to the Apache 2.0 License ----
As an exception, if, as a result of your compiling your source code, portions
of this Software are embedded into an Object form of such source code, you
may redistribute such embedded portions in such Object form without complying
with the conditions of Sections 4(a), 4(b) and 4(d) of the License.
In addition, if you combine or link compiled forms of this Software with
software that is licensed under the GPLv2 ("Combined Software") and if a
court of competent jurisdiction determines that the patent provision (Section
3), the indemnity provision (Section 9) or other Section of the License
conflicts with the conditions of the GPLv2, you may retroactively and
prospectively choose to deem waived or otherwise exclude such Section(s) of
the License, but only in their entirety and only with respect to the Combined
Software.

View File

@@ -1 +0,0 @@
As a special exception to the GNU General Public License, if you distribute this file as part of a program that contains a configuration script generated by Autoconf, you may include it under the same distribution terms that you use for the rest of that program.

View File

@@ -1,9 +0,0 @@
MIT License
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -1,144 +0,0 @@
Mozilla Public License Version 2.0
1. Definitions
1.1. "Contributor" means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software.
1.2. "Contributor Version" means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution" means Covered Software of a particular Contributor.
1.4. "Covered Software" means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof.
1.5. "Incompatible With Secondary Licenses" means
(a) that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License.
1.6. "Executable Form" means any form of the work other than Source Code Form.
1.7. "Larger Work" means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software.
1.8. "License" means this document.
1.9. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License.
1.10. "Modifications" means any of the following:
(a) any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or
(b) any new file in Source Code Form that contains any Covered Software.
1.11. "Patent Claims" of a Contributor means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version.
1.12. "Secondary License" means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses.
1.13. "Source Code Form" means the form of the work preferred for making modifications.
1.14. "You" (or "Your") means an individual or a legal entity exercising rights under this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
2. License Grants and Conditions
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
(a) under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor:
(a) for any code that a Contributor has removed from Covered Software; or
(b) for infringements caused by: (i) Your and any other third party's modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or
(c) under Patent Claims infringed by Covered Software in the absence of its Contributions.
This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1.
3. Responsibilities
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients' rights in the Source Code Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s).
3.4. Notices
You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction.
4. Inability to Comply Due to Statute or Regulation
If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
5. Termination
5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination.
6. Disclaimer of Warranty
Covered Software is provided under this License on an "as is" basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this disclaimer.
7. Limitation of Liability
Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such party's negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You.
8. Litigation
Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party's ability to bring cross-claims or counter-claims.
9. Miscellaneous
This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor.
10. Versions of the License
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, you can obtain one at https://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.

View File

@@ -1,32 +0,0 @@
include $(top_srcdir)/Makefile.top
SUBDIRS = . lib doc
# build libtest before fuzz/* and bin/tests
if HAVE_CMOCKA
SUBDIRS += tests
endif HAVE_CMOCKA
# run fuzz tests before system tests
SUBDIRS += fuzz bin
BUILT_SOURCES = bind.keys.h
CLEANFILES = bind.keys.h
bind.keys.h: bind.keys Makefile
${PERL} ${top_srcdir}/util/bindkeys.pl ${top_srcdir}/bind.keys > $@
.PHONY: doc
EXTRA_DIST = \
bind.keys \
util/bindkeys.pl \
contrib \
CHANGES \
COPYRIGHT \
LICENSE \
*.md
dist-hook:
find $(distdir) -type f -name .gitignore -delete
git rev-parse --short HEAD | cut -b1-7 > $(distdir)/srcid

View File

@@ -1,62 +0,0 @@
SPHINX_V = $(SPHINX_V_@AM_V@)
SPHINX_V_ = $(SPHINX_V_@AM_DEFAULT_V@)
SPHINX_V_0 = -q
SPHINX_V_1 = -n
SPHINX_W = -W
AM_V_SPHINX = $(AM_V_SPHINX_@AM_V@)
AM_V_SPHINX_ = $(AM_V_SPHINX_@AM_DEFAULT_V@)
AM_V_SPHINX_0 = @echo " SPHINX $@";
SPHINXBUILDDIR = $(builddir)/_build
LF = \n
RNDC_CONF = .. |rndc_conf| replace:: ``$(sysconfdir)/rndc.conf``
RNDC_KEY = .. |rndc_key| replace:: ``$(sysconfdir)/rndc.key``
NAMED_CONF = .. |named_conf| replace:: ``$(sysconfdir)/named.conf``
NAMED_PID = .. |named_pid| replace:: ``$(runstatedir)/named.pid``
SESSION_KEY = .. |session_key| replace:: ``$(runstatedir)/session.key``
export RST_EPILOG = $(RNDC_CONF)$(LF)$(RNDC_KEY)$(LF)$(NAMED_CONF)$(LF)$(BIND_KEYS)$(LF)$(NAMED_PID)$(LF)$(SESSION_KEY)
common_SPHINXOPTS = \
$(SPHINX_W) \
-c $(srcdir) \
-a \
$(SPHINX_V)
# The "today" variable set below is not directly used in the ARM, but its value
# is implicitly inserted on the title page of the PDF file produced by Sphinx.
ALLSPHINXOPTS = \
$(common_SPHINXOPTS) \
-D today="$(RELEASE_DATE)" \
-D rst_epilog="$$(printf "$${RST_EPILOG}")" \
$(SPHINXOPTS) \
$(srcdir)
_ = @
man_RNDC_CONF = .. |rndc_conf| replace:: ``$(_)sysconfdir$(_)/rndc.conf``
man_RNDC_KEY = .. |rndc_key| replace:: ``$(_)sysconfdir$(_)/rndc.key``
man_NAMED_CONF = .. |named_conf| replace:: ``$(_)sysconfdir$(_)/named.conf``
man_BIND_KEYS = .. |bind_keys| replace:: ``$(_)sysconfdir$(_)/bind.keys``
man_NAMED_PID = .. |named_pid| replace:: ``$(_)runstatedir$(_)/named.pid``
man_SESSION_KEY = .. |session_key| replace:: ``$(_)runstatedir$(_)/session.key``
export man_RST_EPILOG = $(man_RNDC_CONF)$(LF)$(man_RNDC_KEY)$(LF)$(man_NAMED_CONF)$(LF)$(man_BIND_KEYS)$(LF)$(man_NAMED_PID)$(LF)$(man_SESSION_KEY)
man_SPHINXOPTS = \
$(common_SPHINXOPTS) \
-D version="@""PACKAGE_VERSION@" \
-D today="@""RELEASE_DATE@" \
-D release="@""PACKAGE_VERSION@" \
-D rst_epilog="$$(printf "$${man_RST_EPILOG}")" \
$(SPHINXOPTS) \
$(srcdir)
AM_V_SED = $(AM_V_SED_@AM_V@)
AM_V_SED_ = $(AM_V_SED_@AM_DEFAULT_V@)
AM_V_SED_0 = @echo " SED $@";
AM_V_CFG_TEST = $(AM_V_CFG_TEST_@AM_V@)
AM_V_CFG_TEST_ = $(AM_V_CFG_TEST_@AM_DEFAULT_V@)
AM_V_CFG_TEST_0 = @echo " CFG_GEN $@";

127
Makefile.in Normal file
View File

@@ -0,0 +1,127 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VERSION=@BIND9_VERSION@
SUBDIRS = make lib fuzz bin doc
TARGETS =
PREREQS = bind.keys.h
MANPAGES = isc-config.sh.1
HTMLPAGES = isc-config.sh.html
MANOBJS = README HISTORY OPTIONS CONTRIBUTING PLATFORMS \
${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@
newrr:
cd lib/dns; ${MAKE} newrr
bind.keys.h: ${top_srcdir}/bind.keys ${srcdir}/util/bindkeys.pl
${PERL} ${srcdir}/util/bindkeys.pl < ${top_srcdir}/bind.keys > $@
distclean::
rm -f config.cache config.h config.log config.status TAGS
rm -f libtool isc-config.sh configure.lineno
rm -f util/conf.sh docutil/docbook2man-wrapper.sh
# XXX we should clean libtool stuff too. Only do this after we add rules
# to make it.
maintainer-clean::
rm -f configure
rm -f bind.keys.h
docclean manclean maintainer-clean::
rm -f ${MANOBJS}
doc man:: ${MANOBJS}
installdirs:
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${bindir} \
${DESTDIR}${localstatedir}/run ${DESTDIR}${sysconfdir}
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man1
install:: isc-config.sh installdirs
${INSTALL_SCRIPT} isc-config.sh ${DESTDIR}${bindir}
rm -f ${DESTDIR}${bindir}/bind9-config
@LN@ ${DESTDIR}${bindir}/isc-config.sh ${DESTDIR}${bindir}/bind9-config
${INSTALL_DATA} ${top_srcdir}/isc-config.sh.1 ${DESTDIR}${mandir}/man1
rm -f ${DESTDIR}${mandir}/man1/bind9-config.1
@LN@ ${DESTDIR}${mandir}/man1/isc-config.sh.1 ${DESTDIR}${mandir}/man1/bind9-config.1
${INSTALL_DATA} ${top_srcdir}/bind.keys ${DESTDIR}${sysconfdir}
uninstall::
rm -f ${DESTDIR}${sysconfdir}/bind.keys
rm -f ${DESTDIR}${mandir}/man1/bind9-config.1
rm -f ${DESTDIR}${mandir}/man1/isc-config.sh.1
rm -f ${DESTDIR}${bindir}/bind9-config
rm -f ${DESTDIR}${bindir}/isc-config.sh
tags:
rm -f TAGS
find lib bin -name "*.[ch]" -print | @ETAGS@ -
test check:
@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; \
echo I: \'bin/tests/system/ifconfig.sh up\' as root to configure; \
echo I: them, then rerun the tests. Run make force-test to run the; \
echo I: tests anyway.; \
exit 1; \
fi
${MAKE} test-force
force-test: test-force
test-force:
status=0; \
(cd fuzz && ${MAKE} check) || status=1; \
(cd bin/tests && ${MAKE} ${MAKEDEFS} test) || status=1; \
(test -f ${top_builddir}/unit/unittest.sh && \
$(SHELL) ${top_builddir}/unit/unittest.sh) || status=1; \
exit $$status
README: README.md
${PANDOC} --email-obfuscation=none -s --metadata title="README" -f markdown-smart -t html README.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
HISTORY: HISTORY.md
${PANDOC} --email-obfuscation=none -s --metadata title="HISTORY" -f markdown-smart -t html HISTORY.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
OPTIONS: OPTIONS.md
${PANDOC} --email-obfuscation=none -s --metadata title="OPTIONS" -f markdown-smart -t html OPTIONS.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
CONTRIBUTING: CONTRIBUTING.md
${PANDOC} --email-obfuscation=none -s --metadata title="CONTRIBUTING" -f markdown-smart -t html CONTRIBUTING.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
PLATFORMS: PLATFORMS.md
${PANDOC} --email-obfuscation=none -s --metadata title="PLATFORMS" -f markdown-smart -t html PLATFORMS.md | \
${W3M} -dump -cols 75 -O ascii -T text/html | \
sed -e '$${/^$$/d;}' > $@
unit::
sh ${top_builddir}/unit/unittest.sh
clean::

View File

@@ -1,23 +0,0 @@
# Hey Emacs, this is -*- makefile-automake -*- file!
# vim: filetype=automake
unit-local: check
if HAVE_CMOCKA
TESTS = $(check_PROGRAMS)
endif HAVE_CMOCKA
LOG_COMPILER = $(top_builddir)/tests/unit-test-driver.sh
AM_CFLAGS += \
-I$(top_srcdir)/tests/include \
$(TEST_CFLAGS)
AM_CPPFLAGS += \
$(CMOCKA_CFLAGS) \
-DNAMED_PLUGINDIR=\"$(pkglibdir)\" \
-DTESTS_DIR=\"$(abs_srcdir)\"
LDADD += \
$(top_builddir)/tests/libtest/libtest.la \
$(CMOCKA_LIBS)

View File

@@ -1,53 +0,0 @@
# Hey Emacs, this is -*- makefile-automake -*- file!
# vim: filetype=automake
ACLOCAL_AMFLAGS = -I $(top_srcdir)/m4
AM_CFLAGS = \
$(STD_CFLAGS)
AM_CPPFLAGS = \
$(STD_CPPFLAGS) \
-include $(top_builddir)/config.h \
-I$(srcdir)/include
AM_LDFLAGS = \
$(STD_LDFLAGS)
LDADD =
if HOST_MACOS
AM_LDFLAGS += \
-Wl,-flat_namespace
endif HOST_MACOS
LIBISC_CFLAGS = \
-I$(top_srcdir)/include \
-I$(top_srcdir)/lib/isc/include \
-I$(top_builddir)/lib/isc/include
LIBISC_LIBS = $(top_builddir)/lib/isc/libisc.la
LIBDNS_CFLAGS = \
-I$(top_srcdir)/lib/dns/include \
-I$(top_builddir)/lib/dns/include
LIBDNS_LIBS = \
$(top_builddir)/lib/dns/libdns.la
LIBNS_CFLAGS = \
-I$(top_srcdir)/lib/ns/include
LIBNS_LIBS = \
$(top_builddir)/lib/ns/libns.la
LIBISCCFG_CFLAGS = \
-I$(top_srcdir)/lib/isccfg/include
LIBISCCFG_LIBS = \
$(top_builddir)/lib/isccfg/libisccfg.la
LIBISCCC_CFLAGS = \
-I$(top_srcdir)/lib/isccc/include/
LIBISCCC_LIBS = \
$(top_builddir)/lib/isccc/libisccc.la

1
NEWS
View File

@@ -1 +0,0 @@
CHANGES

28
OPTIONS Normal file
View File

@@ -0,0 +1,28 @@
OPTIONS
Setting the STD_CDEFINES environment variable before running configure can
be used to enable certain compile-time options that are not explicitly
defined in configure.
Some of these settings are:
Setting Description
Overwrite memory with tag values when allocating
-DISC_MEM_DEFAULTFILL=1 or freeing it; this impairs performance but
makes debugging of memory problems easier.
Don't track memory allocations by file and line
-DISC_MEM_TRACKLINES=0 number; this improves performance but makes
debugging more difficult.
-DISC_FACILITY=LOG_LOCAL0 Change the default syslog facility for named
-DNS_CLIENT_DROPPORT=0 Disable dropping queries from particular
well-known ports:
-DCHECK_SIBLING=0 Don't check sibling glue in named-checkzone
-DCHECK_LOCAL=0 Don't check out-of-zone addresses in
named-checkzone
-DNS_RUN_PID_DIR=0 Create default PID files in ${localstatedir}/run
rather than ${localstatedir}/run/named/
Disable the use of inline functions to implement
-DISC_BUFFER_USEINLINE=0 the isc_buffer API: this reduces performance but
may be useful when debugging
-DISC_HEAP_CHECK Test heap consistency after every heap
operation; used when debugging

View File

@@ -1,29 +1,27 @@
<!--
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
SPDX-License-Identifier: MPL-2.0
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
Setting the `CPPFLAGS` environment variable before running `configure`
can be used to enable certain compile-time options that are not
explicitly defined in `configure`.
Setting the `STD_CDEFINES` environment variable before running `configure`
can be used to enable certain compile-time options that are not explicitly
defined in `configure`.
Some of these settings are:
| Setting | Description |
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `-DCHECK_LOCAL=0` | Don't check out-of-zone addresses in `named-checkzone` |
| `-DCHECK_SIBLING=0` | Don't check sibling glue in `named-checkzone` |
| `-DISC_FACILITY=LOG_LOCAL0` | Change the default syslog facility for `named` |
| `-DISC_HEAP_CHECK` | Test heap consistency after every heap operation; used when debugging |
| `-DISC_MEM_DEFAULTFILL=1` | Overwrite memory with tag values when allocating or freeing it; this impairs performance but makes debugging of memory problems easier |
| `-DISC_MEM_TRACKLINES=0` | Don't track memory allocations by file and line number; this improves performance but makes debugging more difficult |
| `-DNAMED_RUN_PID_DIR=0` | Create default PID files in `${localstatedir}/run` rather than `${localstatedir}/run/named/` |
| `-DNS_CLIENT_DROPPORT=0` | Disable dropping queries from particular well-known ports |
| `-DOPENSSL_API_COMPAT=10100` | Build using the deprecated OpenSSL APIs so that the `engine` API is available when building with OpenSSL 3.0.0 for PKCS#11 support |
|Setting |Description |
|-----------------------------------|----------------------------------------|
|`-DISC_MEM_DEFAULTFILL=1`|Overwrite memory with tag values when allocating or freeing it; this impairs performance but makes debugging of memory problems easier.|
|`-DISC_MEM_TRACKLINES=0`|Don't track memory allocations by file and line number; this improves performance but makes debugging more difficult.|
|<nobr>`-DISC_FACILITY=LOG_LOCAL0`</nobr>|Change the default syslog facility for `named`|
|`-DNS_CLIENT_DROPPORT=0`|Disable dropping queries from particular well-known ports:|
|`-DCHECK_SIBLING=0`|Don't check sibling glue in `named-checkzone`|
|`-DCHECK_LOCAL=0`|Don't check out-of-zone addresses in `named-checkzone`|
|`-DNS_RUN_PID_DIR=0`|Create default PID files in `${localstatedir}/run` rather than `${localstatedir}/run/named/`|
|`-DISC_BUFFER_USEINLINE=0`|Disable the use of inline functions to implement the `isc_buffer` API: this reduces performance but may be useful when debugging |
|`-DISC_HEAP_CHECK`|Test heap consistency after every heap operation; used when debugging|

74
PLATFORMS Normal file
View File

@@ -0,0 +1,74 @@
PLATFORMS
Supported platforms
In general, this version of BIND will build and run on any POSIX-compliant
system with a C99-compliant C compiler, BSD-style sockets with
RFC-compliant IPv6 support, POSIX-compliant threads, and the OpenSSL
cryptography library. Atomic operations support from the compiler is
needed, either in the form of builtin operations, C11 atomics or the
Interlocked family of functions on Windows.
ISC regularly tests BIND on many operating systems and architectures, but
lacks the resources to test all of them. Consequently, ISC is only able to
offer support on a "best effort" basis for some.
Regularly tested platforms
As of Mar 2020, BIND 9.14 is fully supported and regularly tested on the
following systems:
* Debian 8, 9, 10
* Ubuntu LTS 16.04, 18.04
* Fedora 31
* Red Hat Enterprise Linux / CentOS 6, 7, 8
* FreeBSD 11.3, 12.1
* OpenBSD 6.6
* Alpine Linux
The amd64, i386, armhf and arm64 CPU architectures are all fully
supported.
Best effort
The following are platforms on which BIND is known to build and run. ISC
makes every effort to fix bugs on these platforms, but may be unable to do
so quickly due to lack of hardware, less familiarity on the part of
engineering staff, and other constraints. With the exception of Windows
Server 2012 R2, none of these are tested regularly by ISC.
* Windows Server 2012 R2, 2016 / x64
* Windows 10 / x64
* macOS 10.12+
* Solaris 11
* NetBSD
* Other Linux distributions still supported by their vendors, such as:
+ Ubuntu 14.04, 18.10+
+ Gentoo
+ Arch Linux
+ Alpine Linux
* OpenWRT/LEDE 17.01+
* Other CPU architectures (mips, mipsel, sparc, ...)
Unsupported platforms
These are platforms on which BIND 9.14 is known not to build or run:
* Platforms without at least OpenSSL 1.0.2
* Windows 10 / x86
* Windows Server 2012 and older
* Solaris 10 and older
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
* Platforms that don't support atomic operations (via compiler or
library)
* Linux without NPTL (Native POSIX Thread Library)
Platform quirks
NetBSD 6 i386
The i386 build of NetBSD requires the libatomic library, available from
the gcc5-libs package. Because this library is in a non-standard path, its
location must be specified in the configure command line:
LDFLAGS="-L/usr/pkg/gcc5/i486--netbsdelf/lib/ -Wl,-R/usr/pkg/gcc5/i486--netbsdelf/lib/" ./configure

82
PLATFORMS.md Normal file
View File

@@ -0,0 +1,82 @@
<!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
## Supported platforms
In general, this version of BIND will build and run on any POSIX-compliant
system with a C99-compliant C compiler, BSD-style sockets with RFC-compliant
IPv6 support, POSIX-compliant threads, and the OpenSSL cryptography library.
Atomic operations support from the compiler is needed, either in the form of
builtin operations, C11 atomics or the Interlocked family of functions on
Windows.
ISC regularly tests BIND on many operating systems and architectures, but
lacks the resources to test all of them. Consequently, ISC is only able to
offer support on a "best effort" basis for some.
### Regularly tested platforms
As of Mar 2020, BIND 9.14 is fully supported and regularly tested on the
following systems:
* Debian 8, 9, 10
* Ubuntu LTS 16.04, 18.04
* Fedora 31
* Red Hat Enterprise Linux / CentOS 6, 7, 8
* FreeBSD 11.3, 12.1
* OpenBSD 6.6
* Alpine Linux
The amd64, i386, armhf and arm64 CPU architectures are all fully supported.
### Best effort
The following are platforms on which BIND is known to build and run.
ISC makes every effort to fix bugs on these platforms, but may be unable to
do so quickly due to lack of hardware, less familiarity on the part of
engineering staff, and other constraints. With the exception of Windows
Server 2012 R2, none of these are tested regularly by ISC.
* Windows Server 2012 R2, 2016 / x64
* Windows 10 / x64
* macOS 10.12+
* Solaris 11
* NetBSD
* Other Linux distributions still supported by their vendors, such as:
* Ubuntu 14.04, 18.10+
* Gentoo
* Arch Linux
* Alpine Linux
* OpenWRT/LEDE 17.01+
* Other CPU architectures (mips, mipsel, sparc, ...)
## Unsupported platforms
These are platforms on which BIND 9.14 is known *not* to build or run:
* Platforms without at least OpenSSL 1.0.2
* Windows 10 / x86
* Windows Server 2012 and older
* Solaris 10 and older
* Platforms that don't support IPv6 Advanced Socket API (RFC 3542)
* Platforms that don't support atomic operations (via compiler or library)
* Linux without NPTL (Native POSIX Thread Library)
## Platform quirks
### NetBSD 6 i386
The i386 build of NetBSD requires the `libatomic` library, available from
the `gcc5-libs` package. Because this library is in a non-standard path,
its location must be specified in the `configure` command line:
```
LDFLAGS="-L/usr/pkg/gcc5/i486--netbsdelf/lib/ -Wl,-R/usr/pkg/gcc5/i486--netbsdelf/lib/" ./configure
```

468
README Normal file
View File

@@ -0,0 +1,468 @@
README
BIND 9
Contents
1. Introduction
2. Reporting bugs and getting help
3. Contributing to BIND
4. BIND 9.14 features
5. Building BIND
6. macOS
7. Dependencies
8. Compile-time options
9. Automated testing
10. Documentation
11. Change log
12. Acknowledgments
Introduction
BIND (Berkeley Internet Name Domain) is a complete, highly portable
implementation of the DNS (Domain Name System) protocol.
The BIND name server, named, is able to serve as an authoritative name
server, recursive resolver, DNS forwarder, or all three simultaneously. It
implements views for split-horizon DNS, automatic DNSSEC zone signing and
key management, catalog zones to facilitate provisioning of zone data
throughout a name server constellation, response policy zones (RPZ) to
protect clients from malicious data, response rate limiting (RRL) and
recursive query limits to reduce distributed denial of service attacks,
and many other advanced DNS features. BIND also includes a suite of
administrative tools, including the dig and delv DNS lookup tools,
nsupdate for dynamic DNS zone updates, rndc for remote name server
administration, and more.
BIND 9 began as a complete re-write of the BIND architecture that was used
in versions 4 and 8. Internet Systems Consortium (https://www.isc.org), a
501(c)(3) public benefit corporation dedicated to providing software and
services in support of the Internet infrastructure, developed BIND 9 and
is responsible for its ongoing maintenance and improvement. BIND is open
source software licensed under the terms of the Mozilla Public License,
version 2.0.
For a summary of features introduced in past major releases of BIND, see
the file HISTORY.
For a detailed list of changes made throughout the history of BIND 9, see
the file CHANGES. See below for details on the CHANGES file format.
For up-to-date versions and release notes, see https://www.isc.org/
download/.
For information about supported platforms, see PLATFORMS.
Reporting bugs and getting help
To report non-security-sensitive bugs or request new features, you may
open an Issue in the BIND 9 project on the ISC GitLab server at https://
gitlab.isc.org/isc-projects/bind9.
Please note that, unless you explicitly mark the newly created Issue as
"confidential", it will be publicly readable. Please do not include any
information in bug reports that you consider to be confidential unless the
issue has been marked as such. In particular, if submitting the contents
of your configuration file in a non-confidential Issue, it is advisable to
obscure key secrets: this can be done automatically by using
named-checkconf -px.
If the bug you are reporting is a potential security issue, such as an
assertion failure or other crash in named, please do NOT use GitLab to
report it. Instead, send mail to security-officer@isc.org using our
OpenPGP key to secure your message. (Information about OpenPGP and links
to our key can be found at https://www.isc.org/pgpkey.) Please do not
discuss the bug on any public mailing list.
For a general overview of ISC security policies, read the Knowledge Base
article at https://kb.isc.org/docs/aa-00861.
Professional support and training for BIND are available from ISC at
https://www.isc.org/support.
To join the BIND Users mailing list, or view the archives, visit https://
lists.isc.org/mailman/listinfo/bind-users.
If you're planning on making changes to the BIND 9 source code, you may
also want to join the BIND Workers mailing list, at https://lists.isc.org/
mailman/listinfo/bind-workers.
Contributing to BIND
ISC maintains a public git repository for BIND; details can be found at
http://www.isc.org/git/.
Information for BIND contributors can be found in the following files: -
General information: CONTRIBUTING.md - BIND 9 code style: doc/dev/style.md
- BIND architecture and developer guide: doc/dev/dev.md
Patches for BIND may be submitted as merge requests in the ISC GitLab
server at at https://gitlab.isc.org/isc-projects/bind9/merge_requests.
By default, external contributors don't have ability to fork BIND in the
GitLab server, but if you wish to contribute code to BIND, you may request
permission to do so. Thereafter, you can create git branches and directly
submit requests that they be reviewed and merged.
If you prefer, you may also submit code by opening a GitLab Issue and
including your patch as an attachment, preferably generated by git
format-patch.
BIND 9.14 features
BIND 9.14.0 is the first release from a new stable branch of BIND 9,
incorporating all changes from the 9.13 development branch, updating the
most recent stable branch, 9.12. These changes include:
* A new "plugin" mechanism has been added to allow query functionality
to be extended using dynamically loadable libraries. The "filter-aaaa"
feature has been removed from named and is now implemented as a
plugin.
* QNAME minimization, as described in RFC 7816, is now supported.
* Socket and task code has been refactored to improve performance on
most modern machines.
* "Root key sentinel" support, enabling validating resolvers to indicate
via a special query which trust anchors are configured for the root
zone.
* Secondary zones can now be configured as "mirror" zones; their
contents are transferred in as with traditional slave zones, but are
subject to DNSSEC validation and are not treated as authoritative data
when answering. This makes it easier to configure a local copy of the
root zone as described in RFC 7706.
* The "validate-except" option allows configuration of domains below
which DNSSEC validation should not be performed.
* The default value of "dnssec-validation" is now "auto".
* IDNA2008 is now supported when linking with libidn2.
* "named -V" now outputs the default paths for files used by named and
other tools.
In addition, workarounds that were formerly in place to enable resolution
of domains whose authoritative servers did not respond to EDNS queries
have been removed. See https://dnsflagday.net for more details.
Cryptographic support has been modernized. BIND now uses the best
available pseudo-random number generator for the platform on which it's
built. Very old versions of OpenSSL are no longer supported. Cryptography
is now mandatory: building BIND without DNSSEC is no longer supported.
Special code to support certain legacy operating systems has also been
removed; see the file PLATFORMS.md for details of supported platforms. In
addition to OpenSSL, BIND now requires support for IPv6, threads, and
standard atomic operations provided by the C compiler. Non-threaded builds
are no longer supported.
BIND 9.14.1
BIND 9.14.1 is a maintenance release, and addresses security
vulnerabilities disclosed in CVE-2018-5743 and CVE-2019-6467.
BIND 9.14.2
BIND 9.14.2 is a maintenance release.
BIND 9.14.3
BIND 9.14.3 is a maintenance release, and addresses the security
vulnerability disclosed in CVE-2019-6471.
BIND 9.14.4
BIND 9.14.4 is a maintenance release, and also adds support for the new
MaxMind GeoIP2 geolocation API when built with configure --with-geoip2.
BIND 9.14.5
BIND 9.14.5 is a maintenance release.
BIND 9.14.6
BIND 9.14.6 is a maintenance release.
BIND 9.14.7
BIND 9.14.7 is a maintenance release, and also addresses the security
vulnerabilities disclosed in CVE-2019-6475 and CVE-2019-6476.
BIND 9.14.8
BIND 9.14.8 is a maintenance release, and also addresses the security
vulnerability disclosed in CVE-2019-6477.
BIND 9.14.9
BIND 9.14.9 is a maintenance release.
BIND 9.14.10
BIND 9.14.10 is a maintenance release.
BIND 9.14.11
BIND 9.14.11 is a maintenance release.
BIND 9.14.12
BIND 9.14.12 is a maintenance release, and also addresses the security
vulnerabilities disclosed in CVE-2020-8616 and CVE-2020-8617.
Building BIND
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
basic POSIX support, and a 64-bit integer type. Successful builds have
been observed on many versions of Linux and UNIX, including RHEL/CentOS,
Fedora, Debian, Ubuntu, SLES, openSUSE, Slackware, Alpine, FreeBSD,
NetBSD, OpenBSD, macOS, Solaris, OpenIndiana, OmniOS CE, HP-UX, and
OpenWRT.
BIND requires a cryptography provider library such as OpenSSL or a
hardware service module supporting PKCS#11. On Linux, BIND requires the
libcap library to set process privileges, though this requirement can be
overridden by disabling capability support at compile time. See
Compile-time options below for details on other libraries that may be
required to support optional features.
BIND is also available for Windows Server 2008 and higher. See win32utils/
build.txt for details on building for Windows systems.
To build on a UNIX or Linux system, use:
$ ./configure
$ make
If you're planning on making changes to the BIND 9 source, you should run
make depend. If you're using Emacs, you might find make tags helpful.
Several environment variables that can be set before running configure
will affect compilation. Significant ones are:
Variable Description
CC The C compiler to use. configure tries to figure out the
right one for supported systems.
C compiler flags. Defaults to include -g and/or -O2 as
CFLAGS supported by the compiler. Please include '-g' if you need
to set CFLAGS.
System header file directories. Can be used to specify
STD_CINCLUDES where add-on thread or IPv6 support is, for example.
Defaults to empty string.
Any additional preprocessor symbols you want defined.
STD_CDEFINES Defaults to empty string. For a list of possible settings,
see the file OPTIONS.
LDFLAGS Linker flags. Defaults to empty string.
BUILD_CC Needed when cross-compiling: the native C compiler to use
when building for the target system.
BUILD_CFLAGS CFLAGS for the target system during cross-compiling.
BUILD_CPPFLAGS CPPFLAGS for the target system during cross-compiling.
BUILD_LDFLAGS LDFLAGS for the target system during cross-compiling.
BUILD_LIBS LIBS for the target system during cross-compiling.
Additional environment variables affecting the build are listed at the end
of the configure help text, which can be obtained by running the command:
$ ./configure --help
macOS
Building on macOS assumes that the "Command Tools for Xcode" is installed.
This can be downloaded from https://developer.apple.com/download/more/ or,
if you have Xcode already installed, you can run xcode-select --install.
(Note that an Apple ID may be required to access the download page.)
Dependencies
Portions of BIND that are written in Python, including dnssec-keymgr,
dnssec-coverage, dnssec-checkds, and some of the system tests, require the
argparse, ply and distutils.core modules to be available. argparse is a
standard module as of Python 2.7 and Python 3.2. ply is available from
https://pypi.python.org/pypi/ply. distutils.core is required for
installation.
Compile-time options
To see a full list of configuration options, run configure --help.
To build shared libraries, specify --with-libtool on the configure command
line.
For the server to support DNSSEC, you need to build it with crypto
support. To use OpenSSL, you should have OpenSSL 1.0.2e or newer
installed. If the OpenSSL library is installed in a nonstandard location,
specify the prefix using --with-openssl=<PREFIX> on the configure command
line. To use a PKCS#11 hardware service module for cryptographic
operations, specify the path to the PKCS#11 provider library using
--with-pkcs11=<PREFIX>, and configure BIND with --enable-native-pkcs11.
To support the HTTP statistics channel, the server must be linked with at
least one of the following libraries: libxml2 http://xmlsoft.org or json-c
https://github.com/json-c/json-c. If these are installed at a nonstandard
location, then:
* for libxml2, specify the prefix using --with-libxml2=/prefix,
* for json-c, adjust PKG_CONFIG_PATH.
To support compression on the HTTP statistics channel, the server must be
linked against libzlib. If this is installed in a nonstandard location,
specify the prefix using --with-zlib=/prefix.
To support storing configuration data for runtime-added zones in an LMDB
database, the server must be linked with liblmdb. If this is installed in
a nonstandard location, specify the prefix using with-lmdb=/prefix.
To support GeoIP location-based ACLs, the server must be linked with
libGeoIP. This is not turned on by default; BIND must be configured with
--with-geoip. If the library is installed in a nonstandard location,
specify the prefix using --with-geoip=/prefix.
For DNSTAP packet logging, you must have installed libfstrm https://
github.com/farsightsec/fstrm and libprotobuf-c https://
developers.google.com/protocol-buffers, and BIND must be configured with
--enable-dnstap.
Certain compiled-in constants and default settings can be increased to
values better suited to large servers with abundant memory resources (e.g,
64-bit servers with 12G or more of memory) by specifying --with-tuning=
large on the configure command line. This can improve performance on big
servers, but will consume more memory and may degrade performance on
smaller systems.
On Linux, process capabilities are managed in user space using the libcap
library, which can be installed on most Linux systems via the libcap-dev
or libcap-devel package. Process capability support can also be disabled
by configuring with --disable-linux-caps.
On some platforms it is necessary to explicitly request large file support
to handle files bigger than 2GB. This can be done by using
--enable-largefile on the configure command line.
Support for the "fixed" rrset-order option can be enabled or disabled by
specifying --enable-fixed-rrset or --disable-fixed-rrset on the configure
command line. By default, fixed rrset-order is disabled to reduce memory
footprint.
The --enable-querytrace option causes named to log every step of
processing every query. This should only be enabled when debugging,
because it has a significant negative impact on query performance.
make install will install named and the various BIND 9 libraries. By
default, installation is into /usr/local, but this can be changed with the
--prefix option when running configure.
You may specify the option --sysconfdir to set the directory where
configuration files like named.conf go by default, and --localstatedir to
set the default parent directory of run/named.pid. For backwards
compatibility with BIND 8, --sysconfdir defaults to /etc and
--localstatedir defaults to /var if no --prefix option is given. If there
is a --prefix option, sysconfdir defaults to $prefix/etc and localstatedir
defaults to $prefix/var.
Automated testing
A system test suite can be run with make test. The system tests require
you to configure a set of virtual IP addresses on your system (this allows
multiple servers to run locally and communicate with one another). These
IP addresses can be configured by running the command bin/tests/system/
ifconfig.sh up as root.
Some tests require Perl and the Net::DNS and/or IO::Socket::INET6 modules,
and will be skipped if these are not available. Some tests require Python
and the dnspython module and will be skipped if these are not available.
See bin/tests/system/README for further details.
Unit tests are implemented using the CMocka unit testing framework. To
build them, use configure --with-cmocka. Execution of tests is done by the
Kyua test execution engine; if the kyua command is available, then unit
tests can be run via make test or make unit.
Documentation
The BIND 9 Administrator Reference Manual is included with the source
distribution, in DocBook XML, HTML, and PDF format, in the doc/arm
directory.
Some of the programs in the BIND 9 distribution have man pages in their
directories. In particular, the command line options of named are
documented in bin/named/named.8.
Frequently (and not-so-frequently) asked questions and their answers can
be found in the ISC Knowledge Base at https://kb.isc.org.
Additional information on various subjects can be found in other README
files throughout the source tree.
Change log
A detailed list of all changes that have been made throughout the
development BIND 9 is included in the file CHANGES, with the most recent
changes listed first. Change notes include tags indicating the category of
the change that was made; these categories are:
Category Description
[func] New feature
[bug] General bug fix
[security] Fix for a significant security flaw
[experimental] Used for new features when the syntax or other aspects of
the design are still in flux and may change
[port] Portability enhancement
[maint] Updates to built-in data such as root server addresses and
keys
[tuning] Changes to built-in configuration defaults and constants to
improve performance
[performance] Other changes to improve server performance
[protocol] Updates to the DNS protocol such as new RR types
[test] Changes to the automatic tests, not affecting server
functionality
[cleanup] Minor corrections and refactoring
[doc] Documentation
[contrib] Changes to the contributed tools and libraries in the
'contrib' subdirectory
Used in the master development branch to reserve change
[placeholder] numbers for use in other branches, e.g. when fixing a bug
that only exists in older releases
In general, [func] and [experimental] tags will only appear in new-feature
releases (i.e., those with version numbers ending in zero). Some new
functionality may be backported to older releases on a case-by-case basis.
All other change types may be applied to all currently-supported releases.
Bug report identifiers
Most notes in the CHANGES file include a reference to a bug report or
issue number. Prior to 2018, these were usually of the form [RT #NNN] and
referred to entries in the "bind9-bugs" RT database, which was not open to
the public. More recent entries use the form [GL #NNN] or, less often, [GL
!NNN], which, respectively, refer to issues or merge requests in the
GitLab database. Most of these are publicly readable, unless they include
information which is confidential or security sensitive.
To look up a GitLab issue by its number, use the URL https://
gitlab.isc.org/isc-projects/bind9/issues/NNN. To look up a merge request,
use https://gitlab.isc.org/isc-projects/bind9/merge_requests/NNN.
In rare cases, an issue or merge request number may be followed with the
letter "P". This indicates that the information is in the private ISC
GitLab instance, which is not visible to the public.
Acknowledgments
* The original development of BIND 9 was underwritten by the following
organizations:
Sun Microsystems, Inc.
Hewlett Packard
Compaq Computer Corporation
IBM
Process Software Corporation
Silicon Graphics, Inc.
Network Associates, Inc.
U.S. Defense Information Systems Agency
USENIX Association
Stichting NLnet - NLnet Foundation
Nominum, Inc.
* This product includes software developed by the OpenSSL Project for
use in the OpenSSL Toolkit. http://www.OpenSSL.org/
* This product includes cryptographic software written by Eric Young
(eay@cryptsoft.com)
* This product includes software written by Tim Hudson
(tjh@cryptsoft.com)

374
README.md
View File

@@ -1,14 +1,12 @@
<!--
Copyright (C) Internet Systems Consortium, Inc. ("ISC")
SPDX-License-Identifier: MPL-2.0
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, you can obtain one at https://mozilla.org/MPL/2.0/.
See the COPYRIGHT file distributed with this work for additional
information regarding copyright ownership.
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
# BIND 9
@@ -17,7 +15,11 @@ information regarding copyright ownership.
1. [Introduction](#intro)
1. [Reporting bugs and getting help](#help)
1. [Contributing to BIND](#contrib)
1. [BIND 9.14 features](#features)
1. [Building BIND](#build)
1. [macOS](#macos)
1. [Dependencies](#dependencies)
1. [Compile-time options](#opts)
1. [Automated testing](#testing)
1. [Documentation](#doc)
1. [Change log](#changes)
@@ -26,28 +28,31 @@ information regarding copyright ownership.
### <a name="intro"/> Introduction
BIND (Berkeley Internet Name Domain) is a complete, highly portable
implementation of the Domain Name System (DNS) protocol.
implementation of the DNS (Domain Name System) protocol.
The BIND name server, `named`, can act as an authoritative name
server, recursive resolver, DNS forwarder, or all three simultaneously. It
The BIND name server, `named`, is able to serve as an authoritative name
server, recursive resolver, DNS forwarder, or all three simultaneously. It
implements views for split-horizon DNS, automatic DNSSEC zone signing and
key management, catalog zones to facilitate provisioning of zone data
throughout a name server constellation, response policy zones (RPZ) to
protect clients from malicious data, response rate limiting (RRL) and
recursive query limits to reduce distributed denial of service attacks,
and many other advanced DNS features. BIND also includes a suite of
and many other advanced DNS features. BIND also includes a suite of
administrative tools, including the `dig` and `delv` DNS lookup tools,
`nsupdate` for dynamic DNS zone updates, `rndc` for remote name server
administration, and more.
BIND 9 began as a complete rewrite of the BIND architecture that was
BIND 9 began as a complete re-write of the BIND architecture that was
used in versions 4 and 8. Internet Systems Consortium
([https://www.isc.org](https://www.isc.org)), a 501(c)(3) US public benefit
([https://www.isc.org](https://www.isc.org)), a 501(c)(3) public benefit
corporation dedicated to providing software and services in support of the
Internet infrastructure, developed BIND 9 and is responsible for its
ongoing maintenance and improvement. BIND is open source software
ongoing maintenance and improvement. BIND is open source software
licensed under the terms of the Mozilla Public License, version 2.0.
For a summary of features introduced in past major releases of BIND,
see the file [HISTORY](HISTORY.md).
For a detailed list of changes made throughout the history of BIND 9, see
the file [CHANGES](CHANGES). See [below](#changes) for details on the
CHANGES file format.
@@ -55,26 +60,24 @@ CHANGES file format.
For up-to-date versions and release notes, see
[https://www.isc.org/download/](https://www.isc.org/download/).
For information about supported platforms, see the
["Supported Platforms"](doc/arm/platforms.rst) section in the BIND 9
Administrator Reference Manual.
For information about supported platforms, see [PLATFORMS](PLATFORMS.md).
### <a name="help"/> Reporting bugs and getting help
To report non-security-sensitive bugs or request new features, you may
open an issue in the BIND 9 project on the
open an Issue in the BIND 9 project on the
[ISC GitLab server](https://gitlab.isc.org) at
[https://gitlab.isc.org/isc-projects/bind9](https://gitlab.isc.org/isc-projects/bind9).
Please note that, unless you explicitly mark the newly created issue as
"confidential," it will be publicly readable. Please do not include any
Please note that, unless you explicitly mark the newly created Issue as
"confidential", it will be publicly readable. Please do not include any
information in bug reports that you consider to be confidential unless
the issue has been marked as such. In particular, if submitting the
contents of your configuration file in a non-confidential issue, it is
advisable to obscure key secrets; this can be done automatically by
the issue has been marked as such. In particular, if submitting the
contents of your configuration file in a non-confidential Issue, it is
advisable to obscure key secrets: this can be done automatically by
using `named-checkconf -px`.
If you are reporting a bug that is a potential security issue, such as an
If the bug you are reporting is a potential security issue, such as an
assertion failure or other crash in `named`, please do *NOT* use GitLab to
report it. Instead, send mail to
[security-officer@isc.org](mailto:security-officer@isc.org) using our
@@ -83,12 +86,11 @@ to our key can be found at
[https://www.isc.org/pgpkey](https://www.isc.org/pgpkey).) Please do not
discuss the bug on any public mailing list.
For a general overview of ISC security policies, read the Knowledgebase
For a general overview of ISC security policies, read the Knowledge Base
article at [https://kb.isc.org/docs/aa-00861](https://kb.isc.org/docs/aa-00861).
Professional support and training for BIND are available from
ISC. Contact us at [https://www.isc.org/contact](https://www.isc.org/contact)
for more information.
ISC at [https://www.isc.org/support](https://www.isc.org/support).
To join the __BIND Users__ mailing list, or view the archives, visit
[https://lists.isc.org/mailman/listinfo/bind-users](https://lists.isc.org/mailman/listinfo/bind-users).
@@ -100,63 +102,305 @@ may also want to join the __BIND Workers__ mailing list, at
### <a name="contrib"/> Contributing to BIND
ISC maintains a public git repository for BIND; details can be found
at [https://www.isc.org/sourceaccess/](https://www.isc.org/sourceaccess/).
at [http://www.isc.org/git/](http://www.isc.org/git/).
Information for BIND contributors can be found in the following files:
- General information: [CONTRIBUTING.md](CONTRIBUTING.md)
- Code of Conduct: [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
- General information: [CONTRIBUTING.md](CONTRIBUTING)
- BIND 9 code style: [doc/dev/style.md](doc/dev/style.md)
- BIND architecture and developer guide: [doc/dev/dev.md](doc/dev/dev.md)
Patches for BIND may be submitted as
[merge requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests)
on the [ISC GitLab server](https://gitlab.isc.org).
in the [ISC GitLab server](https://gitlab.isc.org) at
at [https://gitlab.isc.org/isc-projects/bind9/merge_requests](https://gitlab.isc.org/isc-projects/bind9/merge_requests).
By default, external contributors do not have the ability to fork BIND on the
GitLab server; if you wish to contribute code to BIND, you may request
By default, external contributors don't have ability to fork BIND in the
GitLab server, but if you wish to contribute code to BIND, you may request
permission to do so. Thereafter, you can create git branches and directly
submit requests that they be reviewed and merged.
If you prefer, you may also submit code by opening a
[GitLab issue](https://gitlab.isc.org/isc-projects/bind9/issues) and
[GitLab Issue](https://gitlab.isc.org/isc-projects/bind9/issues) and
including your patch as an attachment, preferably generated by
`git format-patch`.
### <a name="build"/> Building BIND 9
### <a name="features"/> BIND 9.14 features
For information about building BIND 9, see the
["Building BIND 9"](doc/arm/build.inc.rst) section in the BIND 9
Administrator Reference Manual.
BIND 9.14.0 is the first release from a new stable branch of BIND 9,
incorporating all changes from the 9.13 development branch, updating
the most recent stable branch, 9.12. These changes include:
* A new "plugin" mechanism has been added to allow query functionality
to be extended using dynamically loadable libraries. The "filter-aaaa"
feature has been removed from named and is now implemented as a plugin.
* QNAME minimization, as described in RFC 7816, is now supported.
* Socket and task code has been refactored to improve performance on most
modern machines.
* "Root key sentinel" support, enabling validating resolvers to indicate
via a special query which trust anchors are configured for the root zone.
* Secondary zones can now be configured as "mirror" zones; their contents
are transferred in as with traditional slave zones, but are subject to
DNSSEC validation and are not treated as authoritative data when
answering. This makes it easier to configure a local copy of the root
zone as described in RFC 7706.
* The "validate-except" option allows configuration of domains below which
DNSSEC validation should not be performed.
* The default value of "dnssec-validation" is now "auto".
* IDNA2008 is now supported when linking with `libidn2`.
* "named -V" now outputs the default paths for files used by named
and other tools.
In addition, workarounds that were formerly in place to enable resolution
of domains whose authoritative servers did not respond to EDNS queries
have been removed. See [https://dnsflagday.net](https://dnsflagday.net)
for more details.
Cryptographic support has been modernized. BIND now uses the
best available pseudo-random number generator for the platform on which
it's built. Very old versions of OpenSSL are no longer supported.
Cryptography is now mandatory: building BIND without DNSSEC is no
longer supported.
Special code to support certain legacy operating systems has also
been removed; see the file [PLATFORMS.md](PLATFORMS.md) for details
of supported platforms. In addition to OpenSSL, BIND now requires
support for IPv6, threads, and standard atomic operations provided
by the C compiler. Non-threaded builds are no longer supported.
#### BIND 9.14.1
BIND 9.14.1 is a maintenance release, and addresses security
vulnerabilities disclosed in CVE-2018-5743 and CVE-2019-6467.
#### BIND 9.14.2
BIND 9.14.2 is a maintenance release.
#### BIND 9.14.3
BIND 9.14.3 is a maintenance release, and addresses the security
vulnerability disclosed in CVE-2019-6471.
#### BIND 9.14.4
BIND 9.14.4 is a maintenance release, and also adds support for
the new MaxMind GeoIP2 geolocation API when built with
`configure --with-geoip2`.
#### BIND 9.14.5
BIND 9.14.5 is a maintenance release.
#### BIND 9.14.6
BIND 9.14.6 is a maintenance release.
#### BIND 9.14.7
BIND 9.14.7 is a maintenance release, and also addresses the security
vulnerabilities disclosed in CVE-2019-6475 and CVE-2019-6476.
#### BIND 9.14.8
BIND 9.14.8 is a maintenance release, and also addresses the security
vulnerability disclosed in CVE-2019-6477.
#### BIND 9.14.9
BIND 9.14.9 is a maintenance release.
#### BIND 9.14.10
BIND 9.14.10 is a maintenance release.
#### BIND 9.14.11
BIND 9.14.11 is a maintenance release.
#### BIND 9.14.12
BIND 9.14.12 is a maintenance release, and also addresses the security
vulnerabilities disclosed in CVE-2020-8616 and CVE-2020-8617.
### <a name="build"/> Building BIND
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
basic POSIX support, and a 64-bit integer type. Successful builds have been
observed on many versions of Linux and UNIX, including RHEL/CentOS, Fedora,
Debian, Ubuntu, SLES, openSUSE, Slackware, Alpine, FreeBSD, NetBSD,
OpenBSD, macOS, Solaris, OpenIndiana, OmniOS CE, HP-UX, and OpenWRT.
BIND requires a cryptography provider library such as OpenSSL or a
hardware service module supporting PKCS#11. On Linux, BIND requires
the `libcap` library to set process privileges, though this requirement
can be overridden by disabling capability support at compile time.
See [Compile-time options](#opts) below for details on other libraries
that may be required to support optional features.
BIND is also available for Windows Server 2008 and higher. See
`win32utils/build.txt` for details on building for Windows
systems.
To build on a UNIX or Linux system, use:
$ ./configure
$ make
If you're planning on making changes to the BIND 9 source, you should run
`make depend`. If you're using Emacs, you might find `make tags` helpful.
Several environment variables that can be set before running `configure` will
affect compilation. Significant ones are:
|Variable|Description |
|--------------------|-----------------------------------------------|
|`CC`|The C compiler to use. `configure` tries to figure out the right one for supported systems.|
|`CFLAGS`|C compiler flags. Defaults to include -g and/or -O2 as supported by the compiler. Please include '-g' if you need to set `CFLAGS`. |
|`STD_CINCLUDES`|System header file directories. Can be used to specify where add-on thread or IPv6 support is, for example. Defaults to empty string.|
|`STD_CDEFINES`|Any additional preprocessor symbols you want defined. Defaults to empty string. For a list of possible settings, see the file [OPTIONS](OPTIONS.md).|
|`LDFLAGS`|Linker flags. Defaults to empty string.|
|`BUILD_CC`|Needed when cross-compiling: the native C compiler to use when building for the target system.|
|`BUILD_CFLAGS`|`CFLAGS` for the target system during cross-compiling.|
|`BUILD_CPPFLAGS`|`CPPFLAGS` for the target system during cross-compiling.|
|`BUILD_LDFLAGS`|`LDFLAGS` for the target system during cross-compiling.|
|`BUILD_LIBS`|`LIBS` for the target system during cross-compiling.|
Additional environment variables affecting the build are listed at the
end of the `configure` help text, which can be obtained by running the
command:
$ ./configure --help
#### <a name="macos"> macOS
Building on macOS assumes that the "Command Tools for Xcode" is installed.
This can be downloaded from
[https://developer.apple.com/download/more/](https://developer.apple.com/download/more/)
or, if you have Xcode already installed, you can run `xcode-select
--install`. (Note that an Apple ID may be required to access the download
page.)
### <a name="dependencies"/> Dependencies
Portions of BIND that are written in Python, including
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
system tests, require the `argparse`, `ply` and `distutils.core` modules
to be available.
`argparse` is a standard module as of Python 2.7 and Python 3.2.
`ply` is available from [https://pypi.python.org/pypi/ply](https://pypi.python.org/pypi/ply).
`distutils.core` is required for installation.
#### <a name="opts"/> Compile-time options
To see a full list of configuration options, run `configure --help`.
To build shared libraries, specify `--with-libtool` on the `configure`
command line.
For the server to support DNSSEC, you need to build it with crypto support.
To use OpenSSL, you should have OpenSSL 1.0.2e or newer installed. If the
OpenSSL library is installed in a nonstandard location, specify the prefix
using `--with-openssl=<PREFIX>` on the configure command line. To use a
PKCS#11 hardware service module for cryptographic operations, specify the
path to the PKCS#11 provider library using `--with-pkcs11=<PREFIX>`, and
configure BIND with `--enable-native-pkcs11`.
To support the HTTP statistics channel, the server must be linked with at
least one of the following libraries: `libxml2`
[http://xmlsoft.org](http://xmlsoft.org) or `json-c`
[https://github.com/json-c/json-c](https://github.com/json-c/json-c).
If these are installed at a nonstandard location, then:
* for `libxml2`, specify the prefix using `--with-libxml2=/prefix`,
* for `json-c`, adjust `PKG_CONFIG_PATH`.
To support compression on the HTTP statistics channel, the server must be
linked against `libzlib`. If this is installed in a nonstandard location,
specify the prefix using `--with-zlib=/prefix`.
To support storing configuration data for runtime-added zones in an LMDB
database, the server must be linked with liblmdb. If this is installed in a
nonstandard location, specify the prefix using `with-lmdb=/prefix`.
To support GeoIP location-based ACLs, the server must be linked with
libGeoIP. This is not turned on by default; BIND must be configured with
`--with-geoip`. If the library is installed in a nonstandard location,
specify the prefix using `--with-geoip=/prefix`.
For DNSTAP packet logging, you must have installed `libfstrm`
[https://github.com/farsightsec/fstrm](https://github.com/farsightsec/fstrm)
and `libprotobuf-c`
[https://developers.google.com/protocol-buffers](https://developers.google.com/protocol-buffers),
and BIND must be configured with `--enable-dnstap`.
Certain compiled-in constants and default settings can be increased to
values better suited to large servers with abundant memory resources (e.g,
64-bit servers with 12G or more of memory) by specifying
`--with-tuning=large` on the `configure` command line. This can improve
performance on big servers, but will consume more memory and may degrade
performance on smaller systems.
On Linux, process capabilities are managed in user space using
the `libcap` library, which can be installed on most Linux systems via
the `libcap-dev` or `libcap-devel` package. Process capability support can
also be disabled by configuring with `--disable-linux-caps`.
On some platforms it is necessary to explicitly request large file support
to handle files bigger than 2GB. This can be done by using
`--enable-largefile` on the `configure` command line.
Support for the "fixed" rrset-order option can be enabled or disabled by
specifying `--enable-fixed-rrset` or `--disable-fixed-rrset` on the
configure command line. By default, fixed rrset-order is disabled to
reduce memory footprint.
The `--enable-querytrace` option causes `named` to log every step of
processing every query. This should only be enabled when debugging, because
it has a significant negative impact on query performance.
`make install` will install `named` and the various BIND 9 libraries. By
default, installation is into /usr/local, but this can be changed with the
`--prefix` option when running `configure`.
You may specify the option `--sysconfdir` to set the directory where
configuration files like `named.conf` go by default, and `--localstatedir`
to set the default parent directory of `run/named.pid`. For backwards
compatibility with BIND 8, `--sysconfdir` defaults to `/etc` and
`--localstatedir` defaults to `/var` if no `--prefix` option is given. If
there is a `--prefix` option, sysconfdir defaults to `$prefix/etc` and
localstatedir defaults to `$prefix/var`.
### <a name="testing"/> Automated testing
A system test suite can be run with `make check`. The system tests require
A system test suite can be run with `make test`. The system tests require
you to configure a set of virtual IP addresses on your system (this allows
multiple servers to run locally and communicate with each other). These
multiple servers to run locally and communicate with one another). These
IP addresses can be configured by running the command
`bin/tests/system/ifconfig.sh up` as root.
Some tests require Perl and the `Net::DNS` and/or `IO::Socket::INET6` modules,
and are skipped if these are not available. Some tests require Python
and the `dnspython` module and are skipped if these are not available.
and will be skipped if these are not available. Some tests require Python
and the `dnspython` module and will be skipped if these are not available.
See bin/tests/system/README for further details.
Unit tests are implemented using the CMocka unit testing framework. To build
them, use `configure --with-cmocka`. Execution of tests is done by the automake
parallel test driver; unit tests are also run by `make check`.
Unit tests are implemented using the [CMocka unit testing framework](https://cmocka.org/).
To build them, use `configure --with-cmocka`. Execution of tests is done
by the [Kyua test execution engine](https://github.com/jmmv/kyua); if the
`kyua` command is available, then unit tests can be run via `make test`
or `make unit`.
### <a name="doc"/> Documentation
The *BIND 9 Administrator Reference Manual* (ARM) is included with the source
distribution, and in .rst format, in the `doc/arm`
directory. HTML and PDF versions are automatically generated and can
be viewed at [https://bind9.readthedocs.io/en/latest/index.html](https://bind9.readthedocs.io/en/latest/index.html).
The *BIND 9 Administrator Reference Manual* is included with the source
distribution, in DocBook XML, HTML, and PDF format, in the `doc/arm`
directory.
Man pages for some of the programs in the BIND 9 distribution
are also included in the BIND ARM.
Some of the programs in the BIND 9 distribution have man pages in their
directories. In particular, the command line options of `named` are
documented in `bin/named/named.8`.
Frequently (and not-so-frequently) asked questions and their answers
can be found in the ISC Knowledgebase at
can be found in the ISC Knowledge Base at
[https://kb.isc.org](https://kb.isc.org).
Additional information on various subjects can be found in other
@@ -165,8 +409,8 @@ Additional information on various subjects can be found in other
### <a name="changes"/> Change log
A detailed list of all changes that have been made throughout the
development of BIND 9 is included in the file CHANGES, with the most recent
changes listed first. Change notes include tags indicating the category of
development BIND 9 is included in the file CHANGES, with the most recent
changes listed first. Change notes include tags indicating the category of
the change that was made; these categories are:
|Category |Description |
@@ -184,12 +428,12 @@ the change that was made; these categories are:
| [cleanup] | Minor corrections and refactoring |
| [doc] | Documentation |
| [contrib] | Changes to the contributed tools and libraries in the 'contrib' subdirectory |
| [placeholder] | Used in the main development branch to reserve change numbers for use in other branches, e.g., when fixing a bug that only exists in older releases |
| [placeholder] | Used in the master development branch to reserve change numbers for use in other branches, e.g. when fixing a bug that only exists in older releases |
In general, [func] and [experimental] tags only appear in new-feature
releases (i.e., those with version numbers ending in zero). Some new
In general, [func] and [experimental] tags will only appear in new-feature
releases (i.e., those with version numbers ending in zero). Some new
functionality may be backported to older releases on a case-by-case basis.
All other change types may be applied to all currently supported releases.
All other change types may be applied to all currently-supported releases.
#### Bug report identifiers
@@ -199,7 +443,7 @@ and referred to entries in the "bind9-bugs" RT database, which was not open
to the public. More recent entries use the form `[GL #NNN]` or, less often,
`[GL !NNN]`, which, respectively, refer to issues or merge requests in the
GitLab database. Most of these are publicly readable, unless they include
information which is confidential or security-sensitive.
information which is confidential or security sensitive.
To look up a GitLab issue by its number, use the URL
[https://gitlab.isc.org/isc-projects/bind9/issues/NNN](https://gitlab.isc.org/isc-projects/bind9/issues).
@@ -229,7 +473,7 @@ GitLab instance, which is not visible to the public.
* This product includes software developed by the OpenSSL Project for use
in the OpenSSL Toolkit.
[https://www.OpenSSL.org/](https://www.OpenSSL.org/)
[http://www.OpenSSL.org/](http://www.OpenSSL.org/)
* This product includes cryptographic software written by Eric Young
(eay@cryptsoft.com).
* This product includes software written by Tim Hudson (tjh@cryptsoft.com).
(eay@cryptsoft.com)
* This product includes software written by Tim Hudson (tjh@cryptsoft.com)

300
aclocal.m4 vendored Normal file
View File

@@ -0,0 +1,300 @@
# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 12 (pkg-config-0.29.2)
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
dnl 02111-1307, USA.
dnl
dnl As a special exception to the GNU General Public License, if you
dnl distribute this file as part of a program that contains a
dnl configuration script generated by Autoconf, you may include it under
dnl the same distribution terms that you use for the rest of that
dnl program.
dnl PKG_PREREQ(MIN-VERSION)
dnl -----------------------
dnl Since: 0.29
dnl
dnl Verify that the version of the pkg-config macros are at least
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
dnl installed version of pkg-config, this checks the developer's version
dnl of pkg.m4 when generating configure.
dnl
dnl To ensure that this macro is defined, also add:
dnl m4_ifndef([PKG_PREREQ],
dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
dnl
dnl See the "Since" comment for each macro you use to see what version
dnl of the macros you require.
m4_defun([PKG_PREREQ],
[m4_define([PKG_MACROS_VERSION], [0.29.2])
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
])dnl PKG_PREREQ
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
dnl ----------------------------------
dnl Since: 0.16
dnl
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
dnl first found in the path. Checks that the version of pkg-config found
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
dnl used since that's the first version where most current features of
dnl pkg-config existed.
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])dnl PKG_PROG_PKG_CONFIG
dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------------------------------
dnl Since: 0.18
dnl
dnl Check to see whether a particular set of modules exists. Similar to
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
dnl
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
dnl only at the first occurence in configure.ac, so if the first place
dnl it's called might be skipped (such as if it is within an "if", you
dnl have to call PKG_CHECK_EXISTS manually
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_default([$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
dnl ---------------------------------------------
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
dnl pkg_failed based on the result.
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
test "x$?" != "x0" && pkg_failed=yes ],
[pkg_failed=yes])
else
pkg_failed=untried
fi[]dnl
])dnl _PKG_CONFIG
dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl ---------------------------
dnl Internal check to see if pkg-config supports short errors.
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])dnl _PKG_SHORT_ERRORS_SUPPORTED
dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl --------------------------------------------------------------
dnl Since: 0.4.0
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $2])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
$3
fi[]dnl
])dnl PKG_CHECK_MODULES
dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
dnl [ACTION-IF-NOT-FOUND])
dnl ---------------------------------------------------------------------
dnl Since: 0.29
dnl
dnl Checks for existence of MODULES and gathers its build flags with
dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
dnl and VARIABLE-PREFIX_LIBS from --libs.
dnl
dnl Note that if there is a possibility the first call to
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
dnl configure.ac.
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
_save_PKG_CONFIG=$PKG_CONFIG
PKG_CONFIG="$PKG_CONFIG --static"
PKG_CHECK_MODULES($@)
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
])dnl PKG_CHECK_MODULES_STATIC
dnl PKG_INSTALLDIR([DIRECTORY])
dnl -------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable pkgconfigdir as the location where a module
dnl should install pkg-config .pc files. By default the directory is
dnl $libdir/pkgconfig, but the default can be changed by passing
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
dnl parameter.
AC_DEFUN([PKG_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([pkgconfigdir],
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
[with_pkgconfigdir=]pkg_default)
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_INSTALLDIR
dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
dnl --------------------------------
dnl Since: 0.27
dnl
dnl Substitutes the variable noarch_pkgconfigdir as the location where a
dnl module should install arch-independent pkg-config .pc files. By
dnl default the directory is $datadir/pkgconfig, but the default can be
dnl changed by passing DIRECTORY. The user can override through the
dnl --with-noarch-pkgconfigdir parameter.
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
m4_pushdef([pkg_description],
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
AC_ARG_WITH([noarch-pkgconfigdir],
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
[with_noarch_pkgconfigdir=]pkg_default)
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
m4_popdef([pkg_default])
m4_popdef([pkg_description])
])dnl PKG_NOARCH_INSTALLDIR
dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
dnl -------------------------------------------
dnl Since: 0.28
dnl
dnl Retrieves the value of the pkg-config variable for the given module.
AC_DEFUN([PKG_CHECK_VAR],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])dnl PKG_CHECK_VAR
m4_include([m4/ax_check_openssl.m4])
m4_include([m4/ax_posix_shell.m4])
m4_include([m4/ax_pthread.m4])
m4_include([m4/ax_restore_flags.m4])
m4_include([m4/ax_save_flags.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
m4_include([m4/ltsugar.m4])
m4_include([m4/ltversion.m4])
m4_include([m4/lt~obsolete.m4])

13
autogen.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
#
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
# Run this script after modifying configure.in to generate configure
autoreconf -f -i

View File

@@ -1 +0,0 @@
SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen tests plugins

18
bin/Makefile.in Normal file
View File

@@ -0,0 +1,18 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
SUBDIRS = named rndc dig delv dnssec tools nsupdate check confgen \
@NZD_TOOLS@ @PYTHON_TOOLS@ @PKCS11_TOOLS@ plugins tests
TARGETS =
@BIND9_MAKE_RULES@

View File

@@ -1,32 +0,0 @@
include $(top_srcdir)/Makefile.top
AM_CPPFLAGS += \
$(LIBISC_CFLAGS) \
$(LIBDNS_CFLAGS) \
$(LIBNS_CFLAGS) \
$(LIBISCCFG_CFLAGS)
AM_CPPFLAGS += \
-DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
noinst_LTLIBRARIES = libcheck-tool.la
libcheck_tool_la_SOURCES = \
check-tool.h \
check-tool.c
LDADD += \
libcheck-tool.la \
$(LIBISC_LIBS) \
$(LIBDNS_LIBS) \
$(LIBNS_LIBS) \
$(LIBISCCFG_LIBS)
bin_PROGRAMS = named-checkconf named-checkzone
install-exec-hook:
ln -f $(DESTDIR)$(bindir)/named-checkzone \
$(DESTDIR)$(bindir)/named-compilezone
uninstall-hook:
-rm -f $(DESTDIR)$(bindir)/named-compilezone

102
bin/check/Makefile.in Normal file
View File

@@ -0,0 +1,102 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
VERSION=@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \
${ISC_INCLUDES} @OPENSSL_INCLUDES@
CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
CWARNINGS =
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
NSLIBS = ../../lib/ns/libns.@A@
DNSDEPLIBS = ../../lib/dns/libdns.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
ISCDEPLIBS = ../../lib/isc/libisc.@A@
BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
NSDEPENDLIBS = ../../lib/ns/libns.@A@
LIBS = ${ISCLIBS} @LIBS@
NOSYMLIBS = ${ISCNOSYMLIBS} @LIBS@
SUBDIRS =
# Alphabetically
TARGETS = named-checkconf@EXEEXT@ named-checkzone@EXEEXT@
# Alphabetically
SRCS = named-checkconf.c named-checkzone.c check-tool.c
MANPAGES = named-checkconf.8 named-checkzone.8
HTMLPAGES = named-checkconf.html named-checkzone.html
MANOBJS = ${MANPAGES} ${HTMLPAGES}
@BIND9_MAKE_RULES@
named-checkconf.@O@: named-checkconf.c
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
-DVERSION=\"${VERSION}\" \
-c ${srcdir}/named-checkconf.c
named-checkzone.@O@: named-checkzone.c
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
-DVERSION=\"${VERSION}\" \
-c ${srcdir}/named-checkzone.c
named-checkconf@EXEEXT@: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \
${NSDEPENDLIBS} ${DNSDEPLIBS} ${ISCCFGDEPLIBS} ${BIND9DEPLIBS}
export BASEOBJS="named-checkconf.@O@ check-tool.@O@"; \
export LIBS0="${BIND9LIBS} ${NSLIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
${FINALBUILDCMD}
named-checkzone@EXEEXT@: named-checkzone.@O@ check-tool.@O@ ${ISCDEPLIBS} \
${NSDEPENDLIBS} ${DNSDEPLIBS}
export BASEOBJS="named-checkzone.@O@ check-tool.@O@"; \
export LIBS0="${NSLIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
${FINALBUILDCMD}
doc man:: ${MANOBJS}
docclean manclean maintainer-clean::
rm -f ${MANOBJS}
installdirs:
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
install:: named-checkconf@EXEEXT@ named-checkzone@EXEEXT@ installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkconf@EXEEXT@ ${DESTDIR}${sbindir}
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named-checkzone@EXEEXT@ ${DESTDIR}${sbindir}
(cd ${DESTDIR}${sbindir}; rm -f named-compilezone@EXEEXT@; ${LINK_PROGRAM} named-checkzone@EXEEXT@ named-compilezone@EXEEXT@)
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8 || exit 1; done
(cd ${DESTDIR}${mandir}/man8; rm -f named-compilezone.8; ${LINK_PROGRAM} named-checkzone.8 named-compilezone.8)
uninstall::
rm -f ${DESTDIR}${mandir}/man8/named-compilezone.8
for m in ${MANPAGES}; do rm -f ${DESTDIR}${mandir}/man8/$$m || exit 1; done
rm -f ${DESTDIR}${sbindir}/named-compilezone@EXEEXT@
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named-checkconf@EXEEXT@
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/named-checkzone@EXEEXT@
clean distclean::
rm -f ${TARGETS} r1.htm

View File

@@ -1,29 +1,35 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
#include <inttypes.h>
#include <netdb.h>
#include <config.h>
#include <stdbool.h>
#include <stdio.h>
#include <inttypes.h>
#ifdef _WIN32
#include <Winsock2.h>
#endif
#include "check-tool.h"
#include <isc/buffer.h>
#include <isc/log.h>
#include <isc/mem.h>
#include <isc/netdb.h>
#include <isc/net.h>
#include <isc/print.h>
#include <isc/region.h>
#include <isc/result.h>
#include <isc/stdio.h>
#include <isc/string.h>
#include <isc/symtab.h>
@@ -40,6 +46,7 @@
#include <dns/rdataset.h>
#include <dns/rdatasetiter.h>
#include <dns/rdatatype.h>
#include <dns/result.h>
#include <dns/types.h>
#include <dns/zone.h>
@@ -47,31 +54,29 @@
#include <ns/log.h>
#include "check-tool.h"
#ifndef CHECK_SIBLING
#define CHECK_SIBLING 1
#endif /* ifndef CHECK_SIBLING */
#endif
#ifndef CHECK_LOCAL
#define CHECK_LOCAL 1
#endif /* ifndef CHECK_LOCAL */
#endif
#define CHECK(r) \
do { \
result = (r); \
#define CHECK(r) \
do { \
result = (r); \
if (result != ISC_R_SUCCESS) \
goto cleanup; \
goto cleanup; \
} while (0)
#define ERR_IS_CNAME 1
#define ERR_NO_ADDRESSES 2
#define ERR_IS_CNAME 1
#define ERR_NO_ADDRESSES 2
#define ERR_LOOKUP_FAILURE 3
#define ERR_EXTRA_A 4
#define ERR_EXTRA_AAAA 5
#define ERR_MISSING_GLUE 5
#define ERR_IS_MXCNAME 6
#define ERR_IS_SRVCNAME 7
#define ERR_EXTRA_A 4
#define ERR_EXTRA_AAAA 5
#define ERR_MISSING_GLUE 5
#define ERR_IS_MXCNAME 6
#define ERR_IS_SRVCNAME 7
static const char *dbtype[] = { "rbt" };
@@ -82,26 +87,31 @@ bool nomerge = true;
bool docheckmx = true;
bool dochecksrv = true;
bool docheckns = true;
#else /* if CHECK_LOCAL */
#else
bool docheckmx = false;
bool dochecksrv = false;
bool docheckns = false;
#endif /* if CHECK_LOCAL */
dns_zoneopt_t zone_options = DNS_ZONEOPT_CHECKNS | DNS_ZONEOPT_CHECKMX |
DNS_ZONEOPT_MANYERRORS | DNS_ZONEOPT_CHECKNAMES |
#endif
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 |
#endif /* if CHECK_SIBLING */
DNS_ZONEOPT_CHECKSVCB | DNS_ZONEOPT_CHECKWILDCARD |
DNS_ZONEOPT_WARNMXCNAME | DNS_ZONEOPT_WARNSRVCNAME;
#endif
DNS_ZONEOPT_CHECKWILDCARD |
DNS_ZONEOPT_WARNMXCNAME |
DNS_ZONEOPT_WARNSRVCNAME;
/*
* This needs to match the list in bin/named/log.c.
*/
static isc_logcategory_t categories[] = { { "", 0 },
{ "unmatched", 0 },
{ NULL, 0 } };
static isc_logcategory_t categories[] = {
{ "", 0 },
{ "unmatched", 0 },
{ NULL, 0 }
};
static isc_symtab_t *symtab = NULL;
static isc_mem_t *sym_mctx;
@@ -119,45 +129,46 @@ add(char *key, int value) {
isc_symvalue_t symvalue;
if (sym_mctx == NULL) {
isc_mem_create(&sym_mctx);
result = isc_mem_create(0, 0, &sym_mctx);
if (result != ISC_R_SUCCESS)
return;
}
if (symtab == NULL) {
result = isc_symtab_create(sym_mctx, 100, freekey, sym_mctx,
false, &symtab);
if (result != ISC_R_SUCCESS) {
if (result != ISC_R_SUCCESS)
return;
}
}
key = isc_mem_strdup(sym_mctx, key);
if (key == NULL)
return;
symvalue.as_pointer = NULL;
result = isc_symtab_define(symtab, key, value, symvalue,
isc_symexists_reject);
if (result != ISC_R_SUCCESS) {
if (result != ISC_R_SUCCESS)
isc_mem_free(sym_mctx, key);
}
}
static bool
logged(char *key, int value) {
isc_result_t result;
if (symtab == NULL) {
if (symtab == NULL)
return (false);
}
result = isc_symtab_lookup(symtab, key, value, NULL);
if (result == ISC_R_SUCCESS) {
if (result == ISC_R_SUCCESS)
return (true);
}
return (false);
}
static bool
checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
dns_rdataset_t *a, dns_rdataset_t *aaaa) {
dns_rdataset_t *a, dns_rdataset_t *aaaa)
{
dns_rdataset_t *rdataset;
dns_rdata_t rdata = DNS_RDATA_INIT;
struct addrinfo hints, *ai, *cur;
@@ -175,9 +186,8 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
REQUIRE(aaaa == NULL || !dns_rdataset_isassociated(aaaa) ||
aaaa->type == dns_rdatatype_aaaa);
if (a == NULL || aaaa == NULL) {
if (a == NULL || aaaa == NULL)
return (answer);
}
memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_CANONNAME;
@@ -205,17 +215,15 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
cur = ai;
while (cur != NULL && cur->ai_canonname == NULL &&
cur->ai_next != NULL)
{
cur = cur->ai_next;
}
if (cur != NULL && cur->ai_canonname != NULL &&
strcasecmp(cur->ai_canonname, namebuf) != 0 &&
!logged(namebuf, ERR_IS_CNAME))
{
!logged(namebuf, ERR_IS_CNAME)) {
dns_zone_log(zone, ISC_LOG_ERROR,
"%s/NS '%s' (out of zone) "
"is a CNAME '%s' (illegal)",
ownerbuf, namebuf, cur->ai_canonname);
ownerbuf, namebuf,
cur->ai_canonname);
/* XXX950 make fatal for 9.5.0 */
/* answer = false; */
add(namebuf, ERR_IS_CNAME);
@@ -224,7 +232,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
case EAI_NONAME:
#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME)
case EAI_NODATA:
#endif /* if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME) */
#endif
if (!logged(namebuf, ERR_NO_ADDRESSES)) {
dns_zone_log(zone, ISC_LOG_ERROR,
"%s/NS '%s' (out of zone) "
@@ -238,8 +246,8 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
default:
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
dns_zone_log(zone, ISC_LOG_WARNING,
"getaddrinfo(%s) failed: %s", namebuf,
gai_strerror(result));
"getaddrinfo(%s) failed: %s",
namebuf, gai_strerror(result));
add(namebuf, ERR_LOOKUP_FAILURE);
}
return (true);
@@ -248,17 +256,15 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
/*
* Check that all glue records really exist.
*/
if (!dns_rdataset_isassociated(a)) {
if (!dns_rdataset_isassociated(a))
goto checkaaaa;
}
result = dns_rdataset_first(a);
while (result == ISC_R_SUCCESS) {
dns_rdataset_current(a, &rdata);
match = false;
for (cur = ai; cur != NULL; cur = cur->ai_next) {
if (cur->ai_family != AF_INET) {
if (cur->ai_family != AF_INET)
continue;
}
ptr = &((struct sockaddr_in *)(cur->ai_addr))->sin_addr;
if (memcmp(ptr, rdata.data, rdata.length) == 0) {
match = true;
@@ -266,12 +272,11 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
}
}
if (!match && !logged(namebuf, ERR_EXTRA_A)) {
dns_zone_log(zone, ISC_LOG_ERROR,
"%s/NS '%s' "
dns_zone_log(zone, ISC_LOG_ERROR, "%s/NS '%s' "
"extra GLUE A record (%s)",
ownerbuf, namebuf,
inet_ntop(AF_INET, rdata.data, addrbuf,
sizeof(addrbuf)));
inet_ntop(AF_INET, rdata.data,
addrbuf, sizeof(addrbuf)));
add(namebuf, ERR_EXTRA_A);
/* XXX950 make fatal for 9.5.0 */
/* answer = false; */
@@ -280,32 +285,28 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
result = dns_rdataset_next(a);
}
checkaaaa:
if (!dns_rdataset_isassociated(aaaa)) {
checkaaaa:
if (!dns_rdataset_isassociated(aaaa))
goto checkmissing;
}
result = dns_rdataset_first(aaaa);
while (result == ISC_R_SUCCESS) {
dns_rdataset_current(aaaa, &rdata);
match = false;
for (cur = ai; cur != NULL; cur = cur->ai_next) {
if (cur->ai_family != AF_INET6) {
if (cur->ai_family != AF_INET6)
continue;
}
ptr = &((struct sockaddr_in6 *)(cur->ai_addr))
->sin6_addr;
ptr = &((struct sockaddr_in6 *)(cur->ai_addr))->sin6_addr;
if (memcmp(ptr, rdata.data, rdata.length) == 0) {
match = true;
break;
}
}
if (!match && !logged(namebuf, ERR_EXTRA_AAAA)) {
dns_zone_log(zone, ISC_LOG_ERROR,
"%s/NS '%s' "
dns_zone_log(zone, ISC_LOG_ERROR, "%s/NS '%s' "
"extra GLUE AAAA record (%s)",
ownerbuf, namebuf,
inet_ntop(AF_INET6, rdata.data, addrbuf,
sizeof(addrbuf)));
inet_ntop(AF_INET6, rdata.data,
addrbuf, sizeof(addrbuf)));
add(namebuf, ERR_EXTRA_AAAA);
/* XXX950 make fatal for 9.5.0. */
/* answer = false; */
@@ -314,7 +315,7 @@ checkaaaa:
result = dns_rdataset_next(aaaa);
}
checkmissing:
checkmissing:
/*
* Check that all addresses appear in the glue.
*/
@@ -324,50 +325,42 @@ checkmissing:
switch (cur->ai_family) {
case AF_INET:
rdataset = a;
ptr = &((struct sockaddr_in *)(cur->ai_addr))
->sin_addr;
ptr = &((struct sockaddr_in *)(cur->ai_addr))->sin_addr;
type = "A";
break;
case AF_INET6:
rdataset = aaaa;
ptr = &((struct sockaddr_in6 *)(cur->ai_addr))
->sin6_addr;
ptr = &((struct sockaddr_in6 *)(cur->ai_addr))->sin6_addr;
type = "AAAA";
break;
default:
continue;
continue;
}
match = false;
if (dns_rdataset_isassociated(rdataset)) {
if (dns_rdataset_isassociated(rdataset))
result = dns_rdataset_first(rdataset);
} else {
else
result = ISC_R_FAILURE;
}
while (result == ISC_R_SUCCESS && !match) {
dns_rdataset_current(rdataset, &rdata);
if (memcmp(ptr, rdata.data, rdata.length) == 0)
{
match = true;
}
dns_rdata_reset(&rdata);
result = dns_rdataset_next(rdataset);
}
if (!match) {
dns_zone_log(zone, ISC_LOG_ERROR,
"%s/NS '%s' "
dns_zone_log(zone, ISC_LOG_ERROR, "%s/NS '%s' "
"missing GLUE %s record (%s)",
ownerbuf, namebuf, type,
inet_ntop(cur->ai_family, ptr,
addrbuf,
sizeof(addrbuf)));
addrbuf, sizeof(addrbuf)));
/* XXX950 make fatal for 9.5.0. */
/* answer = false; */
missing_glue = true;
}
}
if (missing_glue) {
if (missing_glue)
add(namebuf, ERR_MISSING_GLUE);
}
}
freeaddrinfo(ai);
return (answer);
@@ -408,15 +401,11 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
cur = ai;
while (cur != NULL && cur->ai_canonname == NULL &&
cur->ai_next != NULL)
{
cur = cur->ai_next;
}
if (cur != NULL && cur->ai_canonname != NULL &&
strcasecmp(cur->ai_canonname, namebuf) != 0)
{
if ((zone_options & DNS_ZONEOPT_WARNMXCNAME) != 0) {
strcasecmp(cur->ai_canonname, namebuf) != 0) {
if ((zone_options & DNS_ZONEOPT_WARNMXCNAME) != 0)
level = ISC_LOG_WARNING;
}
if ((zone_options & DNS_ZONEOPT_IGNOREMXCNAME) == 0) {
if (!logged(namebuf, ERR_IS_MXCNAME)) {
dns_zone_log(zone, level,
@@ -427,9 +416,8 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
cur->ai_canonname);
add(namebuf, ERR_IS_MXCNAME);
}
if (level == ISC_LOG_ERROR) {
if (level == ISC_LOG_ERROR)
answer = false;
}
}
}
freeaddrinfo(ai);
@@ -438,7 +426,7 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
case EAI_NONAME:
#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME)
case EAI_NODATA:
#endif /* if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME) */
#endif
if (!logged(namebuf, ERR_NO_ADDRESSES)) {
dns_zone_log(zone, ISC_LOG_ERROR,
"%s/MX '%s' (out of zone) "
@@ -452,8 +440,8 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
default:
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
dns_zone_log(zone, ISC_LOG_WARNING,
"getaddrinfo(%s) failed: %s", namebuf,
gai_strerror(result));
"getaddrinfo(%s) failed: %s",
namebuf, gai_strerror(result));
add(namebuf, ERR_LOOKUP_FAILURE);
}
return (true);
@@ -495,28 +483,22 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
cur = ai;
while (cur != NULL && cur->ai_canonname == NULL &&
cur->ai_next != NULL)
{
cur = cur->ai_next;
}
if (cur != NULL && cur->ai_canonname != NULL &&
strcasecmp(cur->ai_canonname, namebuf) != 0)
{
if ((zone_options & DNS_ZONEOPT_WARNSRVCNAME) != 0) {
strcasecmp(cur->ai_canonname, namebuf) != 0) {
if ((zone_options & DNS_ZONEOPT_WARNSRVCNAME) != 0)
level = ISC_LOG_WARNING;
}
if ((zone_options & DNS_ZONEOPT_IGNORESRVCNAME) == 0) {
if (!logged(namebuf, ERR_IS_SRVCNAME)) {
dns_zone_log(zone, level,
"%s/SRV '%s'"
dns_zone_log(zone, level, "%s/SRV '%s'"
" (out of zone) is a "
"CNAME '%s' (illegal)",
ownerbuf, namebuf,
cur->ai_canonname);
add(namebuf, ERR_IS_SRVCNAME);
}
if (level == ISC_LOG_ERROR) {
if (level == ISC_LOG_ERROR)
answer = false;
}
}
}
freeaddrinfo(ai);
@@ -525,7 +507,7 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
case EAI_NONAME:
#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME)
case EAI_NODATA:
#endif /* if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME) */
#endif
if (!logged(namebuf, ERR_NO_ADDRESSES)) {
dns_zone_log(zone, ISC_LOG_ERROR,
"%s/SRV '%s' (out of zone) "
@@ -539,8 +521,8 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
default:
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
dns_zone_log(zone, ISC_LOG_WARNING,
"getaddrinfo(%s) failed: %s", namebuf,
gai_strerror(result));
"getaddrinfo(%s) failed: %s",
namebuf, gai_strerror(result));
add(namebuf, ERR_LOOKUP_FAILURE);
}
return (true);
@@ -553,7 +535,7 @@ setup_logging(isc_mem_t *mctx, FILE *errout, isc_log_t **logp) {
isc_logconfig_t *logconfig = NULL;
isc_log_t *log = NULL;
isc_log_create(mctx, &log, &logconfig);
RUNTIME_CHECK(isc_log_create(mctx, &log, &logconfig) == ISC_R_SUCCESS);
isc_log_registercategories(log, categories);
isc_log_setcontext(log);
dns_log_init(log);
@@ -565,21 +547,104 @@ setup_logging(isc_mem_t *mctx, FILE *errout, isc_log_t **logp) {
destination.file.name = NULL;
destination.file.versions = ISC_LOG_ROLLNEVER;
destination.file.maximum_size = 0;
isc_log_createchannel(logconfig, "stderr", ISC_LOG_TOFILEDESC,
ISC_LOG_DYNAMIC, &destination, 0);
RUNTIME_CHECK(isc_log_usechannel(logconfig, "stderr", NULL, NULL) ==
ISC_R_SUCCESS);
RUNTIME_CHECK(isc_log_createchannel(logconfig, "stderr",
ISC_LOG_TOFILEDESC,
ISC_LOG_DYNAMIC,
&destination, 0) == ISC_R_SUCCESS);
RUNTIME_CHECK(isc_log_usechannel(logconfig, "stderr",
NULL, NULL) == ISC_R_SUCCESS);
*logp = log;
return (ISC_R_SUCCESS);
}
/*% scan the zone for oversize TTLs */
static isc_result_t
check_ttls(dns_zone_t *zone, dns_ttl_t maxttl) {
isc_result_t result;
dns_db_t *db = NULL;
dns_dbversion_t *version = NULL;
dns_dbnode_t *node = NULL;
dns_dbiterator_t *dbiter = NULL;
dns_rdatasetiter_t *rdsiter = NULL;
dns_rdataset_t rdataset;
dns_fixedname_t fname;
dns_name_t *name;
name = dns_fixedname_initname(&fname);
dns_rdataset_init(&rdataset);
CHECK(dns_zone_getdb(zone, &db));
INSIST(db != NULL);
CHECK(dns_db_newversion(db, &version));
CHECK(dns_db_createiterator(db, 0, &dbiter));
for (result = dns_dbiterator_first(dbiter);
result == ISC_R_SUCCESS;
result = dns_dbiterator_next(dbiter)) {
result = dns_dbiterator_current(dbiter, &node, name);
if (result == DNS_R_NEWORIGIN)
result = ISC_R_SUCCESS;
CHECK(result);
CHECK(dns_db_allrdatasets(db, node, version, 0, &rdsiter));
for (result = dns_rdatasetiter_first(rdsiter);
result == ISC_R_SUCCESS;
result = dns_rdatasetiter_next(rdsiter)) {
dns_rdatasetiter_current(rdsiter, &rdataset);
if (rdataset.ttl > maxttl) {
char nbuf[DNS_NAME_FORMATSIZE];
char tbuf[255];
isc_buffer_t b;
isc_region_t r;
dns_name_format(name, nbuf, sizeof(nbuf));
isc_buffer_init(&b, tbuf, sizeof(tbuf) - 1);
CHECK(dns_rdatatype_totext(rdataset.type, &b));
isc_buffer_usedregion(&b, &r);
r.base[r.length] = 0;
dns_zone_log(zone, ISC_LOG_ERROR,
"%s/%s TTL %d exceeds "
"maximum TTL %d",
nbuf, tbuf, rdataset.ttl, maxttl);
dns_rdataset_disassociate(&rdataset);
CHECK(ISC_R_RANGE);
}
dns_rdataset_disassociate(&rdataset);
}
if (result == ISC_R_NOMORE)
result = ISC_R_SUCCESS;
CHECK(result);
dns_rdatasetiter_destroy(&rdsiter);
dns_db_detachnode(db, &node);
}
if (result == ISC_R_NOMORE)
result = ISC_R_SUCCESS;
cleanup:
if (node != NULL)
dns_db_detachnode(db, &node);
if (rdsiter != NULL)
dns_rdatasetiter_destroy(&rdsiter);
if (dbiter != NULL)
dns_dbiterator_destroy(&dbiter);
if (version != NULL)
dns_db_closeversion(db, &version, false);
if (db != NULL)
dns_db_detach(&db);
return (result);
}
/*% load the zone */
isc_result_t
load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
dns_masterformat_t fileformat, const char *classname,
dns_ttl_t maxttl, dns_zone_t **zonep) {
dns_ttl_t maxttl, dns_zone_t **zonep)
{
isc_result_t result;
dns_rdataclass_t rdclass;
isc_textregion_t region;
@@ -590,31 +655,24 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
REQUIRE(zonep == NULL || *zonep == NULL);
if (debug) {
if (debug)
fprintf(stderr, "loading \"%s\" from \"%s\" class \"%s\"\n",
zonename, filename, classname);
}
CHECK(dns_zone_create(&zone, mctx, 0));
CHECK(dns_zone_create(&zone, mctx));
dns_zone_settype(zone, dns_zone_primary);
dns_zone_settype(zone, dns_zone_master);
isc_buffer_constinit(&buffer, zonename, strlen(zonename));
isc_buffer_add(&buffer, strlen(zonename));
origin = dns_fixedname_initname(&fixorigin);
CHECK(dns_name_fromtext(origin, &buffer, dns_rootname, 0, NULL));
CHECK(dns_zone_setorigin(zone, origin));
dns_zone_setdbtype(zone, 1, (const char *const *)dbtype);
if (strcmp(filename, "-") == 0) {
CHECK(dns_zone_setstream(zone, stdin, fileformat,
&dns_master_style_default));
} else {
CHECK(dns_zone_setfile(zone, filename, fileformat,
&dns_master_style_default));
}
if (journal != NULL) {
CHECK(dns_zone_setdbtype(zone, 1, (const char * const *) dbtype));
CHECK(dns_zone_setfile(zone, filename, fileformat,
&dns_master_style_default));
if (journal != NULL)
CHECK(dns_zone_setjournal(zone, journal));
}
DE_CONST(classname, region.base);
region.length = strlen(classname);
@@ -626,27 +684,31 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
dns_zone_setmaxttl(zone, maxttl);
if (docheckmx) {
if (docheckmx)
dns_zone_setcheckmx(zone, checkmx);
}
if (docheckns) {
if (docheckns)
dns_zone_setcheckns(zone, checkns);
}
if (dochecksrv) {
if (dochecksrv)
dns_zone_setchecksrv(zone, checksrv);
}
CHECK(dns_zone_load(zone, false));
/*
* When loading map files we can't catch oversize TTLs during
* load, so we check for them here.
*/
if (fileformat == dns_masterformat_map && maxttl != 0) {
CHECK(check_ttls(zone, maxttl));
}
if (zonep != NULL) {
*zonep = zone;
zone = NULL;
}
cleanup:
if (zone != NULL) {
cleanup:
if (zone != NULL)
dns_zone_detach(&zone);
}
return (result);
}
@@ -654,7 +716,8 @@ cleanup:
isc_result_t
dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
dns_masterformat_t fileformat, const dns_master_style_t *style,
const uint32_t rawversion) {
const uint32_t rawversion)
{
isc_result_t result;
FILE *output = stdout;
const char *flags;
@@ -662,31 +725,49 @@ dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
flags = (fileformat == dns_masterformat_text) ? "w" : "wb";
if (debug) {
if (filename != NULL && strcmp(filename, "-") != 0) {
fprintf(stderr, "dumping \"%s\" to \"%s\"\n", zonename,
filename);
} else {
if (filename != NULL && strcmp(filename, "-") != 0)
fprintf(stderr, "dumping \"%s\" to \"%s\"\n",
zonename, filename);
else
fprintf(stderr, "dumping \"%s\"\n", zonename);
}
}
if (filename != NULL && strcmp(filename, "-") != 0) {
result = isc_stdio_open(filename, flags, &output);
if (result != ISC_R_SUCCESS) {
fprintf(stderr,
"could not open output "
"file \"%s\" for writing\n",
filename);
fprintf(stderr, "could not open output "
"file \"%s\" for writing\n", filename);
return (ISC_R_FAILURE);
}
}
result = dns_zone_dumptostream(zone, output, fileformat, style,
rawversion);
if (output != stdout) {
if (output != stdout)
(void)isc_stdio_close(output);
}
return (result);
}
#ifdef _WIN32
void
InitSockets(void) {
WORD wVersionRequested;
WSADATA wsaData;
int err;
wVersionRequested = MAKEWORD(2, 0);
err = WSAStartup( wVersionRequested, &wsaData );
if (err != 0) {
fprintf(stderr, "WSAStartup() failed: %d\n", err);
exit(1);
}
}
void
DestroySockets(void) {
WSACleanup();
}
#endif

View File

@@ -1,17 +1,17 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#pragma once
#ifndef CHECK_TOOL_H
#define CHECK_TOOL_H
/*! \file */
@@ -41,6 +41,11 @@ dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
dns_masterformat_t fileformat, const dns_master_style_t *style,
const uint32_t rawversion);
#ifdef _WIN32
void InitSockets(void);
void DestroySockets(void);
#endif
extern int debug;
extern const char *journal;
extern bool nomerge;
@@ -50,3 +55,5 @@ extern bool dochecksrv;
extern dns_zoneopt_t zone_options;
ISC_LANG_ENDDECLS
#endif

147
bin/check/named-checkconf.8 Normal file
View File

@@ -0,0 +1,147 @@
.\" Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
.\"
.\" This Source Code Form is subject to the terms of the Mozilla Public
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
.\" file, You can obtain one at http://mozilla.org/MPL/2.0/.
.\"
.hy 0
.ad l
'\" t
.\" Title: named-checkconf
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 2014-01-10
.\" Manual: BIND9
.\" Source: ISC
.\" Language: English
.\"
.TH "NAMED\-CHECKCONF" "8" "2014\-01\-10" "ISC" "BIND9"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
named-checkconf \- named configuration file syntax checking tool
.SH "SYNOPSIS"
.HP \w'\fBnamed\-checkconf\fR\ 'u
\fBnamed\-checkconf\fR [\fB\-chjlvz\fR] [\fB\-p\fR\ [\fB\-x\fR\ ]] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] {filename}
.SH "DESCRIPTION"
.PP
\fBnamed\-checkconf\fR
checks the syntax, but not the semantics, of a
\fBnamed\fR
configuration file\&. The file is parsed and checked for syntax errors, along with all files included by it\&. If no file is specified,
/etc/named\&.conf
is read by default\&.
.PP
Note: files that
\fBnamed\fR
reads in separate parser contexts, such as
rndc\&.key
and
bind\&.keys, are not automatically read by
\fBnamed\-checkconf\fR\&. Configuration errors in these files may cause
\fBnamed\fR
to fail to run, even if
\fBnamed\-checkconf\fR
was successful\&.
\fBnamed\-checkconf\fR
can be run on these files explicitly, however\&.
.SH "OPTIONS"
.PP
\-h
.RS 4
Print the usage summary and exit\&.
.RE
.PP
\-j
.RS 4
When loading a zonefile read the journal if it exists\&.
.RE
.PP
\-l
.RS 4
List all the configured zones\&. Each line of output contains the zone name, class (e\&.g\&. IN), view, and type (e\&.g\&. master or slave)\&.
.RE
.PP
\-c
.RS 4
Check "core" configuration only\&. This suppresses the loading of plugin modules, and causes all parameters to
\fBplugin\fR
statements to be ignored\&.
.RE
.PP
\-p
.RS 4
Print out the
named\&.conf
and included files in canonical form if no errors were detected\&. See also the
\fB\-x\fR
option\&.
.RE
.PP
\-t \fIdirectory\fR
.RS 4
Chroot to
directory
so that include directives in the configuration file are processed as if run by a similarly chrooted
\fBnamed\fR\&.
.RE
.PP
\-v
.RS 4
Print the version of the
\fBnamed\-checkconf\fR
program and exit\&.
.RE
.PP
\-x
.RS 4
When printing the configuration files in canonical form, obscure shared secrets by replacing them with strings of question marks (\*(Aq?\*(Aq)\&. This allows the contents of
named\&.conf
and related files to be shared \(em for example, when submitting bug reports \(em without compromising private data\&. This option cannot be used without
\fB\-p\fR\&.
.RE
.PP
\-z
.RS 4
Perform a test load of all master zones found in
named\&.conf\&.
.RE
.PP
filename
.RS 4
The name of the configuration file to be checked\&. If not specified, it defaults to
/etc/named\&.conf\&.
.RE
.SH "RETURN VALUES"
.PP
\fBnamed\-checkconf\fR
returns an exit status of 1 if errors were detected and 0 otherwise\&.
.SH "SEE ALSO"
.PP
\fBnamed\fR(8),
\fBnamed-checkzone\fR(8),
BIND 9 Administrator Reference Manual\&.
.SH "AUTHOR"
.PP
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
.br

View File

@@ -1,45 +1,47 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
#include <config.h>
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <isc/attributes.h>
#include <isc/commandline.h>
#include <isc/dir.h>
#include <isc/hash.h>
#include <isc/log.h>
#include <isc/mem.h>
#include <isc/print.h>
#include <isc/result.h>
#include <isc/string.h>
#include <isc/util.h>
#include <isccfg/namedconf.h>
#include <bind9/check.h>
#include <dns/db.h>
#include <dns/fixedname.h>
#include <dns/log.h>
#include <dns/name.h>
#include <dns/rdataclass.h>
#include <dns/result.h>
#include <dns/rootns.h>
#include <dns/zone.h>
#include <isccfg/check.h>
#include <isccfg/grammar.h>
#include <isccfg/namedconf.h>
#include "check-tool.h"
static const char *program = "named-checkconf";
@@ -48,23 +50,21 @@ static bool loadplugins = true;
isc_log_t *logc = NULL;
#define CHECK(r) \
do { \
result = (r); \
#define CHECK(r)\
do { \
result = (r); \
if (result != ISC_R_SUCCESS) \
goto cleanup; \
goto cleanup; \
} while (0)
/*% usage */
noreturn static void
usage(void);
ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST;
static void
usage(void) {
fprintf(stderr,
"usage: %s [-chijlvz] [-p [-x]] [-t directory] "
"[named.conf]\n",
program);
fprintf(stderr, "usage: %s [-chjlvz] [-p [-x]] [-t directory] "
"[named.conf]\n", program);
exit(1);
}
@@ -86,8 +86,8 @@ directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
result = isc_dir_chdir(directory);
if (result != ISC_R_SUCCESS) {
cfg_obj_log(obj, logc, ISC_LOG_ERROR,
"change directory to '%s' failed: %s\n", directory,
isc_result_totext(result));
"change directory to '%s' failed: %s\n",
directory, isc_result_totext(result));
return (result);
}
@@ -98,12 +98,10 @@ static bool
get_maps(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
int i;
for (i = 0;; i++) {
if (maps[i] == NULL) {
if (maps[i] == NULL)
return (false);
}
if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS) {
if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS)
return (true);
}
}
}
@@ -117,26 +115,25 @@ get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
int i;
for (i = 0;; i++) {
if (maps[i] == NULL) {
if (maps[i] == NULL)
return (false);
}
checknames = NULL;
result = cfg_map_get(maps[i], "check-names", &checknames);
if (result != ISC_R_SUCCESS) {
if (result != ISC_R_SUCCESS)
continue;
}
if (checknames != NULL && !cfg_obj_islist(checknames)) {
*obj = checknames;
return (true);
}
for (element = cfg_list_first(checknames); element != NULL;
element = cfg_list_next(element))
{
for (element = cfg_list_first(checknames);
element != NULL;
element = cfg_list_next(element)) {
value = cfg_listelt_value(element);
type = cfg_tuple_get(value, "type");
if ((strcasecmp(cfg_obj_asstring(type), "primary") !=
0) &&
(strcasecmp(cfg_obj_asstring(type), "master") != 0))
if ((strcasecmp(cfg_obj_asstring(type),
"primary") != 0) &&
(strcasecmp(cfg_obj_asstring(type),
"master") != 0))
{
continue;
}
@@ -153,21 +150,18 @@ configure_hint(const char *zfile, const char *zclass, isc_mem_t *mctx) {
dns_rdataclass_t rdclass;
isc_textregion_t r;
if (zfile == NULL) {
if (zfile == NULL)
return (ISC_R_FAILURE);
}
DE_CONST(zclass, r.base);
r.length = strlen(zclass);
result = dns_rdataclass_fromtext(&rdclass, &r);
if (result != ISC_R_SUCCESS) {
if (result != ISC_R_SUCCESS)
return (result);
}
result = dns_rootns_create(mctx, rdclass, zfile, &db);
if (result != ISC_R_SUCCESS) {
if (result != ISC_R_SUCCESS)
return (result);
}
dns_db_detach(&db);
return (ISC_R_SUCCESS);
@@ -175,16 +169,17 @@ configure_hint(const char *zfile, const char *zclass, isc_mem_t *mctx) {
/*% configure the zone */
static isc_result_t
configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
const cfg_obj_t *vconfig, const cfg_obj_t *config,
isc_mem_t *mctx, bool list) {
configure_zone(const char *vclass, const char *view,
const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
const cfg_obj_t *config, isc_mem_t *mctx, bool list)
{
int i = 0;
isc_result_t result;
const char *zclass;
const char *zname;
const char *zfile = NULL;
const cfg_obj_t *maps[4];
const cfg_obj_t *primariesobj = NULL;
const cfg_obj_t *mastersobj = NULL;
const cfg_obj_t *inviewobj = NULL;
const cfg_obj_t *zoptions = NULL;
const cfg_obj_t *classobj = NULL;
@@ -201,22 +196,19 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
zname = cfg_obj_asstring(cfg_tuple_get(zconfig, "name"));
classobj = cfg_tuple_get(zconfig, "class");
if (!cfg_obj_isstring(classobj)) {
if (!cfg_obj_isstring(classobj))
zclass = vclass;
} else {
else
zclass = cfg_obj_asstring(classobj);
}
zoptions = cfg_tuple_get(zconfig, "options");
maps[i++] = zoptions;
if (vconfig != NULL) {
if (vconfig != NULL)
maps[i++] = cfg_tuple_get(vconfig, "options");
}
if (config != NULL) {
cfg_map_get(config, "options", &obj);
if (obj != NULL) {
if (obj != NULL)
maps[i++] = obj;
}
}
maps[i] = NULL;
@@ -225,14 +217,12 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
const char *inview = cfg_obj_asstring(inviewobj);
printf("%s %s %s in-view %s\n", zname, zclass, view, inview);
}
if (inviewobj != NULL) {
if (inviewobj != NULL)
return (ISC_R_SUCCESS);
}
cfg_map_get(zoptions, "type", &typeobj);
if (typeobj == NULL) {
if (typeobj == NULL)
return (ISC_R_FAILURE);
}
if (list) {
const char *ztype = cfg_obj_asstring(typeobj);
@@ -244,19 +234,18 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
* Skip checks when using an alternate data source.
*/
cfg_map_get(zoptions, "database", &dbobj);
if (dbobj != NULL && strcmp("rbt", cfg_obj_asstring(dbobj)) != 0) {
if (dbobj != NULL &&
strcmp("rbt", cfg_obj_asstring(dbobj)) != 0 &&
strcmp("rbt64", cfg_obj_asstring(dbobj)) != 0)
return (ISC_R_SUCCESS);
}
cfg_map_get(zoptions, "dlz", &dlzobj);
if (dlzobj != NULL) {
if (dlzobj != NULL)
return (ISC_R_SUCCESS);
}
cfg_map_get(zoptions, "file", &fileobj);
if (fileobj != NULL) {
if (fileobj != NULL)
zfile = cfg_obj_asstring(fileobj);
}
/*
* Check hints files for hint zones.
@@ -273,22 +262,16 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
}
/*
* Is the redirect zone configured as a secondary?
* Is the redirect zone configured as a slave?
*/
if (strcasecmp(cfg_obj_asstring(typeobj), "redirect") == 0) {
cfg_map_get(zoptions, "primaries", &primariesobj);
if (primariesobj == NULL) {
cfg_map_get(zoptions, "masters", &primariesobj);
}
if (primariesobj != NULL) {
cfg_map_get(zoptions, "masters", &mastersobj);
if (mastersobj != NULL)
return (ISC_R_SUCCESS);
}
}
if (zfile == NULL) {
if (zfile == NULL)
return (ISC_R_FAILURE);
}
obj = NULL;
if (get_maps(maps, "check-dup-records", &obj)) {
@@ -302,7 +285,8 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
zone_options &= ~DNS_ZONEOPT_CHECKDUPRR;
zone_options &= ~DNS_ZONEOPT_CHECKDUPRRFAIL;
} else {
UNREACHABLE();
INSIST(0);
ISC_UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_CHECKDUPRR;
@@ -321,7 +305,8 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
zone_options &= ~DNS_ZONEOPT_CHECKMX;
zone_options &= ~DNS_ZONEOPT_CHECKMXFAIL;
} else {
UNREACHABLE();
INSIST(0);
ISC_UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_CHECKMX;
@@ -330,14 +315,12 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
obj = NULL;
if (get_maps(maps, "check-integrity", &obj)) {
if (cfg_obj_asboolean(obj)) {
if (cfg_obj_asboolean(obj))
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
} else {
else
zone_options &= ~DNS_ZONEOPT_CHECKINTEGRITY;
}
} else {
} else
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
}
obj = NULL;
if (get_maps(maps, "check-mx-cname", &obj)) {
@@ -351,7 +334,8 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
zone_options |= DNS_ZONEOPT_IGNOREMXCNAME;
} else {
UNREACHABLE();
INSIST(0);
ISC_UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_WARNMXCNAME;
@@ -370,7 +354,8 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
zone_options |= DNS_ZONEOPT_IGNORESRVCNAME;
} else {
UNREACHABLE();
INSIST(0);
ISC_UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_WARNSRVCNAME;
@@ -379,11 +364,10 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
obj = NULL;
if (get_maps(maps, "check-sibling", &obj)) {
if (cfg_obj_asboolean(obj)) {
if (cfg_obj_asboolean(obj))
zone_options |= DNS_ZONEOPT_CHECKSIBLING;
} else {
else
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
}
}
obj = NULL;
@@ -393,34 +377,13 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
} else if (strcasecmp(cfg_obj_asstring(obj), "ignore") == 0) {
zone_options &= ~DNS_ZONEOPT_CHECKSPF;
} else {
UNREACHABLE();
INSIST(0);
ISC_UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_CHECKSPF;
}
obj = NULL;
if (get_maps(maps, "check-svcb", &obj)) {
if (cfg_obj_asboolean(obj)) {
zone_options |= DNS_ZONEOPT_CHECKSVCB;
} else {
zone_options &= ~DNS_ZONEOPT_CHECKSVCB;
}
} else {
zone_options |= DNS_ZONEOPT_CHECKSVCB;
}
obj = NULL;
if (get_maps(maps, "check-wildcard", &obj)) {
if (cfg_obj_asboolean(obj)) {
zone_options |= DNS_ZONEOPT_CHECKWILDCARD;
} else {
zone_options &= ~DNS_ZONEOPT_CHECKWILDCARD;
}
} else {
zone_options |= DNS_ZONEOPT_CHECKWILDCARD;
}
obj = NULL;
if (get_checknames(maps, &obj)) {
if (strcasecmp(cfg_obj_asstring(obj), "warn") == 0) {
@@ -433,11 +396,12 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
zone_options &= ~DNS_ZONEOPT_CHECKNAMES;
zone_options &= ~DNS_ZONEOPT_CHECKNAMESFAIL;
} else {
UNREACHABLE();
INSIST(0);
ISC_UNREACHABLE();
}
} else {
zone_options |= DNS_ZONEOPT_CHECKNAMES;
zone_options |= DNS_ZONEOPT_CHECKNAMESFAIL;
zone_options |= DNS_ZONEOPT_CHECKNAMES;
zone_options |= DNS_ZONEOPT_CHECKNAMESFAIL;
}
masterformat = dns_masterformat_text;
@@ -448,30 +412,33 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
masterformat = dns_masterformat_text;
} else if (strcasecmp(masterformatstr, "raw") == 0) {
masterformat = dns_masterformat_raw;
} else if (strcasecmp(masterformatstr, "map") == 0) {
masterformat = dns_masterformat_map;
} else {
UNREACHABLE();
INSIST(0);
ISC_UNREACHABLE();
}
}
obj = NULL;
if (get_maps(maps, "max-zone-ttl", &obj)) {
maxttl = cfg_obj_asduration(obj);
maxttl = cfg_obj_asuint32(obj);
zone_options |= DNS_ZONEOPT_CHECKTTL;
}
result = load_zone(mctx, zname, zfile, masterformat, zclass, maxttl,
NULL);
if (result != ISC_R_SUCCESS) {
result = load_zone(mctx, zname, zfile, masterformat,
zclass, maxttl, NULL);
if (result != ISC_R_SUCCESS)
fprintf(stderr, "%s/%s/%s: %s\n", view, zname, zclass,
isc_result_totext(result));
}
dns_result_totext(result));
return (result);
}
/*% configure a view */
static isc_result_t
configure_view(const char *vclass, const char *view, const cfg_obj_t *config,
const cfg_obj_t *vconfig, isc_mem_t *mctx, bool list) {
const cfg_obj_t *vconfig, isc_mem_t *mctx, bool list)
{
const cfg_listelt_t *element;
const cfg_obj_t *voptions;
const cfg_obj_t *zonelist;
@@ -479,33 +446,32 @@ configure_view(const char *vclass, const char *view, const cfg_obj_t *config,
isc_result_t tresult;
voptions = NULL;
if (vconfig != NULL) {
if (vconfig != NULL)
voptions = cfg_tuple_get(vconfig, "options");
}
zonelist = NULL;
if (voptions != NULL) {
if (voptions != NULL)
(void)cfg_map_get(voptions, "zone", &zonelist);
} else {
else
(void)cfg_map_get(config, "zone", &zonelist);
}
for (element = cfg_list_first(zonelist); element != NULL;
for (element = cfg_list_first(zonelist);
element != NULL;
element = cfg_list_next(element))
{
const cfg_obj_t *zconfig = cfg_listelt_value(element);
tresult = configure_zone(vclass, view, zconfig, vconfig, config,
mctx, list);
if (tresult != ISC_R_SUCCESS) {
tresult = configure_zone(vclass, view, zconfig, vconfig,
config, mctx, list);
if (tresult != ISC_R_SUCCESS)
result = tresult;
}
}
return (result);
}
static isc_result_t
config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
dns_rdataclass_t *classp) {
dns_rdataclass_t *classp)
{
isc_textregion_t r;
if (!cfg_obj_isstring(classobj)) {
@@ -520,7 +486,8 @@ config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
/*% load zones from the configuration */
static isc_result_t
load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx,
bool list_zones) {
bool list_zones)
{
const cfg_listelt_t *element;
const cfg_obj_t *views;
const cfg_obj_t *vconfig;
@@ -530,7 +497,8 @@ load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx,
views = NULL;
(void)cfg_map_get(config, "view", &views);
for (element = cfg_list_first(views); element != NULL;
for (element = cfg_list_first(views);
element != NULL;
element = cfg_list_next(element))
{
const cfg_obj_t *classobj;
@@ -539,36 +507,28 @@ load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx,
char buf[sizeof("CLASS65535")];
vconfig = cfg_listelt_value(element);
if (vconfig == NULL) {
if (vconfig == NULL)
continue;
}
classobj = cfg_tuple_get(vconfig, "class");
tresult = config_getclass(classobj, dns_rdataclass_in,
&viewclass);
if (tresult != ISC_R_SUCCESS) {
CHECK(tresult);
}
if (dns_rdataclass_ismeta(viewclass)) {
CHECK(config_getclass(classobj, dns_rdataclass_in,
&viewclass));
if (dns_rdataclass_ismeta(viewclass))
CHECK(ISC_R_FAILURE);
}
dns_rdataclass_format(viewclass, buf, sizeof(buf));
vname = cfg_obj_asstring(cfg_tuple_get(vconfig, "name"));
tresult = configure_view(buf, vname, config, vconfig, mctx,
list_zones);
if (tresult != ISC_R_SUCCESS) {
if (tresult != ISC_R_SUCCESS)
result = tresult;
}
}
if (views == NULL) {
tresult = configure_view("IN", "_default", config, NULL, mctx,
list_zones);
if (tresult != ISC_R_SUCCESS) {
if (tresult != ISC_R_SUCCESS)
result = tresult;
}
}
cleanup:
@@ -597,7 +557,6 @@ main(int argc, char **argv) {
bool load_zones = false;
bool list_zones = false;
bool print = false;
bool nodeprecate = false;
unsigned int flags = 0;
isc_commandline_errprint = false;
@@ -605,22 +564,20 @@ main(int argc, char **argv) {
/*
* Process memory debugging argument first.
*/
#define CMDLINE_FLAGS "cdhijlm:t:pvxz"
#define CMDLINE_FLAGS "cdhjlm:t:pvxz"
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
switch (c) {
case 'm':
if (strcasecmp(isc_commandline_argument, "record") == 0)
{
isc_mem_debugging |= ISC_MEM_DEBUGRECORD;
}
if (strcasecmp(isc_commandline_argument, "trace") == 0)
{
isc_mem_debugging |= ISC_MEM_DEBUGTRACE;
}
if (strcasecmp(isc_commandline_argument, "usage") == 0)
{
isc_mem_debugging |= ISC_MEM_DEBUGUSAGE;
}
if (strcasecmp(isc_commandline_argument, "size") == 0)
isc_mem_debugging |= ISC_MEM_DEBUGSIZE;
if (strcasecmp(isc_commandline_argument, "mctx") == 0)
isc_mem_debugging |= ISC_MEM_DEBUGCTX;
break;
default:
break;
@@ -628,7 +585,7 @@ main(int argc, char **argv) {
}
isc_commandline_reset = true;
isc_mem_create(&mctx);
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
while ((c = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != EOF) {
switch (c) {
@@ -640,10 +597,6 @@ main(int argc, char **argv) {
debug++;
break;
case 'i':
nodeprecate = true;
break;
case 'j':
nomerge = false;
break;
@@ -669,7 +622,7 @@ main(int argc, char **argv) {
break;
case 'v':
printf("%s\n", PACKAGE_VERSION);
printf(VERSION "\n");
exit(0);
case 'x':
@@ -684,17 +637,16 @@ main(int argc, char **argv) {
break;
case '?':
if (isc_commandline_option != '?') {
if (isc_commandline_option != '?')
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
}
FALLTHROUGH;
/* FALLTHROUGH */
case 'h':
usage();
default:
fprintf(stderr, "%s: unhandled option -%c\n", program,
isc_commandline_option);
fprintf(stderr, "%s: unhandled option -%c\n",
program, isc_commandline_option);
exit(1);
}
}
@@ -708,53 +660,55 @@ main(int argc, char **argv) {
exit(1);
}
if (isc_commandline_index + 1 < argc) {
if (isc_commandline_index + 1 < argc)
usage();
}
if (argv[isc_commandline_index] != NULL) {
if (argv[isc_commandline_index] != NULL)
conffile = argv[isc_commandline_index];
}
if (conffile == NULL || conffile[0] == '\0') {
if (conffile == NULL || conffile[0] == '\0')
conffile = NAMED_CONFFILE;
}
#ifdef _WIN32
InitSockets();
#endif
RUNTIME_CHECK(setup_logging(mctx, stdout, &logc) == ISC_R_SUCCESS);
dns_result_register();
RUNTIME_CHECK(cfg_parser_create(mctx, logc, &parser) == ISC_R_SUCCESS);
if (nodeprecate) {
cfg_parser_setflags(parser, CFG_PCTX_NODEPRECATED, true);
}
cfg_parser_setcallback(parser, directory_callback, NULL);
if (cfg_parse_file(parser, conffile, &cfg_type_namedconf, &config) !=
ISC_R_SUCCESS)
{
exit(1);
}
result = isccfg_check_namedconf(config, loadplugins, logc, mctx);
result = bind9_check_namedconf(config, loadplugins, logc, mctx);
if (result != ISC_R_SUCCESS) {
exit_status = 1;
}
if (result == ISC_R_SUCCESS && (load_zones || list_zones)) {
result = load_zones_fromconfig(config, mctx, list_zones);
if (result != ISC_R_SUCCESS) {
if (result != ISC_R_SUCCESS)
exit_status = 1;
}
}
if (print && exit_status == 0) {
if (print && exit_status == 0)
cfg_printx(config, flags, output, NULL);
}
cfg_obj_destroy(parser, &config);
cfg_parser_destroy(&parser);
dns_name_destroy();
isc_log_destroy(&logc);
isc_mem_destroy(&mctx);
#ifdef _WIN32
DestroySockets();
#endif
return (exit_status);
}

View File

@@ -0,0 +1,220 @@
<!DOCTYPE book [
<!ENTITY mdash "&#8212;">]>
<!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.named-checkconf">
<info>
<date>2014-01-10</date>
</info>
<refentryinfo>
<corpname>ISC</corpname>
<corpauthor>Internet Systems Consortium, Inc.</corpauthor>
</refentryinfo>
<refmeta>
<refentrytitle><application>named-checkconf</application></refentrytitle>
<manvolnum>8</manvolnum>
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2000</year>
<year>2001</year>
<year>2002</year>
<year>2004</year>
<year>2005</year>
<year>2007</year>
<year>2009</year>
<year>2014</year>
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
<refnamediv>
<refname><application>named-checkconf</application></refname>
<refpurpose>named configuration file syntax checking tool</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis sepchar=" ">
<command>named-checkconf</command>
<arg choice="opt" rep="norepeat"><option>-chjlvz</option></arg>
<arg choice="opt" rep="norepeat"><option>-p</option>
<arg choice="opt" rep="norepeat"><option>-x</option>
</arg></arg>
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
<arg choice="req" rep="norepeat">filename</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsection><info><title>DESCRIPTION</title></info>
<para><command>named-checkconf</command>
checks the syntax, but not the semantics, of a
<command>named</command> configuration file. The file is parsed
and checked for syntax errors, along with all files included by it.
If no file is specified, <filename>/etc/named.conf</filename> is read
by default.
</para>
<para>
Note: files that <command>named</command> reads in separate
parser contexts, such as <filename>rndc.key</filename> and
<filename>bind.keys</filename>, are not automatically read
by <command>named-checkconf</command>. Configuration
errors in these files may cause <command>named</command> to
fail to run, even if <command>named-checkconf</command> was
successful. <command>named-checkconf</command> can be run
on these files explicitly, however.
</para>
</refsection>
<refsection><info><title>OPTIONS</title></info>
<variablelist>
<varlistentry>
<term>-h</term>
<listitem>
<para>
Print the usage summary and exit.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-j</term>
<listitem>
<para>
When loading a zonefile read the journal if it exists.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-l</term>
<listitem>
<para>
List all the configured zones. Each line of output
contains the zone name, class (e.g. IN), view, and type
(e.g. master or slave).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-c</term>
<listitem>
<para>
Check "core" configuration only. This suppresses the loading
of plugin modules, and causes all parameters to
<command>plugin</command> statements to be ignored.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-p</term>
<listitem>
<para>
Print out the <filename>named.conf</filename> and included files
in canonical form if no errors were detected.
See also the <option>-x</option> option.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-t <replaceable class="parameter">directory</replaceable></term>
<listitem>
<para>
Chroot to <filename>directory</filename> so that include
directives in the configuration file are processed as if
run by a similarly chrooted <command>named</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-v</term>
<listitem>
<para>
Print the version of the <command>named-checkconf</command>
program and exit.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-x</term>
<listitem>
<para>
When printing the configuration files in canonical
form, obscure shared secrets by replacing them with
strings of question marks ('?'). This allows the
contents of <filename>named.conf</filename> and related
files to be shared &mdash; for example, when submitting
bug reports &mdash; without compromising private data.
This option cannot be used without <option>-p</option>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-z</term>
<listitem>
<para>
Perform a test load of all master zones found in
<filename>named.conf</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>filename</term>
<listitem>
<para>
The name of the configuration file to be checked. If not
specified, it defaults to <filename>/etc/named.conf</filename>.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection><info><title>RETURN VALUES</title></info>
<para><command>named-checkconf</command>
returns an exit status of 1 if
errors were detected and 0 otherwise.
</para>
</refsection>
<refsection><info><title>SEE ALSO</title></info>
<para><citerefentry>
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>named-checkzone</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
</para>
</refsection>
</refentry>

View File

@@ -0,0 +1,174 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>named-checkconf</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
<a name="man.named-checkconf"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2>Name</h2>
<p>
<span class="application">named-checkconf</span>
&#8212; named configuration file syntax checking tool
</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p>
<code class="command">named-checkconf</code>
[<code class="option">-chjlvz</code>]
[<code class="option">-p</code>
[<code class="option">-x</code>
]]
[<code class="option">-t <em class="replaceable"><code>directory</code></em></code>]
{filename}
</p></div>
</div>
<div class="refsection">
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
<p><span class="command"><strong>named-checkconf</strong></span>
checks the syntax, but not the semantics, of a
<span class="command"><strong>named</strong></span> configuration file. The file is parsed
and checked for syntax errors, along with all files included by it.
If no file is specified, <code class="filename">/etc/named.conf</code> is read
by default.
</p>
<p>
Note: files that <span class="command"><strong>named</strong></span> reads in separate
parser contexts, such as <code class="filename">rndc.key</code> and
<code class="filename">bind.keys</code>, are not automatically read
by <span class="command"><strong>named-checkconf</strong></span>. Configuration
errors in these files may cause <span class="command"><strong>named</strong></span> to
fail to run, even if <span class="command"><strong>named-checkconf</strong></span> was
successful. <span class="command"><strong>named-checkconf</strong></span> can be run
on these files explicitly, however.
</p>
</div>
<div class="refsection">
<a name="id-1.8"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl class="variablelist">
<dt><span class="term">-h</span></dt>
<dd>
<p>
Print the usage summary and exit.
</p>
</dd>
<dt><span class="term">-j</span></dt>
<dd>
<p>
When loading a zonefile read the journal if it exists.
</p>
</dd>
<dt><span class="term">-l</span></dt>
<dd>
<p>
List all the configured zones. Each line of output
contains the zone name, class (e.g. IN), view, and type
(e.g. master or slave).
</p>
</dd>
<dt><span class="term">-c</span></dt>
<dd>
<p>
Check "core" configuration only. This suppresses the loading
of plugin modules, and causes all parameters to
<span class="command"><strong>plugin</strong></span> statements to be ignored.
</p>
</dd>
<dt><span class="term">-p</span></dt>
<dd>
<p>
Print out the <code class="filename">named.conf</code> and included files
in canonical form if no errors were detected.
See also the <code class="option">-x</code> option.
</p>
</dd>
<dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
<dd>
<p>
Chroot to <code class="filename">directory</code> so that include
directives in the configuration file are processed as if
run by a similarly chrooted <span class="command"><strong>named</strong></span>.
</p>
</dd>
<dt><span class="term">-v</span></dt>
<dd>
<p>
Print the version of the <span class="command"><strong>named-checkconf</strong></span>
program and exit.
</p>
</dd>
<dt><span class="term">-x</span></dt>
<dd>
<p>
When printing the configuration files in canonical
form, obscure shared secrets by replacing them with
strings of question marks ('?'). This allows the
contents of <code class="filename">named.conf</code> and related
files to be shared &#8212; for example, when submitting
bug reports &#8212; without compromising private data.
This option cannot be used without <code class="option">-p</code>.
</p>
</dd>
<dt><span class="term">-z</span></dt>
<dd>
<p>
Perform a test load of all master zones found in
<code class="filename">named.conf</code>.
</p>
</dd>
<dt><span class="term">filename</span></dt>
<dd>
<p>
The name of the configuration file to be checked. If not
specified, it defaults to <code class="filename">/etc/named.conf</code>.
</p>
</dd>
</dl></div>
</div>
<div class="refsection">
<a name="id-1.9"></a><h2>RETURN VALUES</h2>
<p><span class="command"><strong>named-checkconf</strong></span>
returns an exit status of 1 if
errors were detected and 0 otherwise.
</p>
</div>
<div class="refsection">
<a name="id-1.10"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry">
<span class="refentrytitle">named</span>(8)
</span>,
<span class="citerefentry">
<span class="refentrytitle">named-checkzone</span>(8)
</span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>.
</p>
</div>
</div></body>
</html>

View File

@@ -1,109 +0,0 @@
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
.. iscman:: named-checkconf
.. program:: named-checkconf
.. _man_named-checkconf:
named-checkconf - named configuration file syntax checking tool
---------------------------------------------------------------
Synopsis
~~~~~~~~
:program:`named-checkconf` [**-chjlvz**] [**-p** [**-x** ]] [**-t** directory] {filename}
Description
~~~~~~~~~~~
:program:`named-checkconf` checks the syntax, but not the semantics, of a
:iscman:`named` configuration file. The file, along with all files included by it, is parsed and checked for syntax
errors. If no file is specified,
|named_conf| is read by default.
Note: files that :iscman:`named` reads in separate parser contexts, such as
``rndc.conf`` or ``rndc.key``, are not automatically read by
:program:`named-checkconf`. Configuration errors in these files may cause
:iscman:`named` to fail to run, even if :program:`named-checkconf` was
successful. However, :program:`named-checkconf` can be run on these files
explicitly.
Options
~~~~~~~
.. option:: -h
This option prints the usage summary and exits.
.. option:: -j
When loading a zonefile, this option instructs :iscman:`named` to read the journal if it exists.
.. option:: -l
This option lists all the configured zones. Each line of output contains the zone
name, class (e.g. IN), view, and type (e.g. primary or secondary).
.. option:: -c
This option specifies that only the "core" configuration should be checked. This suppresses the loading of
plugin modules, and causes all parameters to ``plugin`` statements to
be ignored.
.. option:: -i
This option ignores warnings on deprecated options.
.. option:: -p
This option prints out the :iscman:`named.conf` and included files in canonical form if
no errors were detected. See also the :option:`-x` option.
.. option:: -t directory
This option instructs :iscman:`named` to chroot to ``directory``, so that ``include`` directives in the
configuration file are processed as if run by a similarly chrooted
:iscman:`named`.
.. option:: -v
This option prints the version of the :program:`named-checkconf` program and exits.
.. option:: -x
When printing the configuration files in canonical form, this option obscures
shared secrets by replacing them with strings of question marks
(``?``). This allows the contents of :iscman:`named.conf` and related files
to be shared - for example, when submitting bug reports -
without compromising private data. This option cannot be used without
:option:`-p`.
.. option:: -z
This option performs a test load of all zones of type ``primary`` found in :iscman:`named.conf`.
.. option:: filename
This indicates the name of the configuration file to be checked. If not specified,
it defaults to |named_conf|.
Return Values
~~~~~~~~~~~~~
:program:`named-checkconf` returns an exit status of 1 if errors were detected
and 0 otherwise.
See Also
~~~~~~~~
:iscman:`named(8) <named>`, :iscman:`named-checkzone(8) <named-checkzone>`, BIND 9 Administrator Reference Manual.

329
bin/check/named-checkzone.8 Normal file
View File

@@ -0,0 +1,329 @@
.\" Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
.\"
.\" This Source Code Form is subject to the terms of the Mozilla Public
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
.\" file, You can obtain one at http://mozilla.org/MPL/2.0/.
.\"
.hy 0
.ad l
'\" t
.\" Title: named-checkzone
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 2014-02-19
.\" Manual: BIND9
.\" Source: ISC
.\" Language: English
.\"
.TH "NAMED\-CHECKZONE" "8" "2014\-02\-19" "ISC" "BIND9"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
named-checkzone, named-compilezone \- zone file validity checking or converting tool
.SH "SYNOPSIS"
.HP \w'\fBnamed\-checkzone\fR\ 'u
\fBnamed\-checkzone\fR [\fB\-d\fR] [\fB\-h\fR] [\fB\-j\fR] [\fB\-q\fR] [\fB\-v\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-f\ \fR\fB\fIformat\fR\fR] [\fB\-F\ \fR\fB\fIformat\fR\fR] [\fB\-J\ \fR\fB\fIfilename\fR\fR] [\fB\-i\ \fR\fB\fImode\fR\fR] [\fB\-k\ \fR\fB\fImode\fR\fR] [\fB\-m\ \fR\fB\fImode\fR\fR] [\fB\-M\ \fR\fB\fImode\fR\fR] [\fB\-n\ \fR\fB\fImode\fR\fR] [\fB\-l\ \fR\fB\fIttl\fR\fR] [\fB\-L\ \fR\fB\fIserial\fR\fR] [\fB\-o\ \fR\fB\fIfilename\fR\fR] [\fB\-r\ \fR\fB\fImode\fR\fR] [\fB\-s\ \fR\fB\fIstyle\fR\fR] [\fB\-S\ \fR\fB\fImode\fR\fR] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] [\fB\-T\ \fR\fB\fImode\fR\fR] [\fB\-w\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] [\fB\-W\ \fR\fB\fImode\fR\fR] {zonename} {filename}
.HP \w'\fBnamed\-compilezone\fR\ 'u
\fBnamed\-compilezone\fR [\fB\-d\fR] [\fB\-j\fR] [\fB\-q\fR] [\fB\-v\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-C\ \fR\fB\fImode\fR\fR] [\fB\-f\ \fR\fB\fIformat\fR\fR] [\fB\-F\ \fR\fB\fIformat\fR\fR] [\fB\-J\ \fR\fB\fIfilename\fR\fR] [\fB\-i\ \fR\fB\fImode\fR\fR] [\fB\-k\ \fR\fB\fImode\fR\fR] [\fB\-m\ \fR\fB\fImode\fR\fR] [\fB\-n\ \fR\fB\fImode\fR\fR] [\fB\-l\ \fR\fB\fIttl\fR\fR] [\fB\-L\ \fR\fB\fIserial\fR\fR] [\fB\-r\ \fR\fB\fImode\fR\fR] [\fB\-s\ \fR\fB\fIstyle\fR\fR] [\fB\-t\ \fR\fB\fIdirectory\fR\fR] [\fB\-T\ \fR\fB\fImode\fR\fR] [\fB\-w\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] [\fB\-W\ \fR\fB\fImode\fR\fR] {\fB\-o\ \fR\fB\fIfilename\fR\fR} {zonename} {filename}
.SH "DESCRIPTION"
.PP
\fBnamed\-checkzone\fR
checks the syntax and integrity of a zone file\&. It performs the same checks as
\fBnamed\fR
does when loading a zone\&. This makes
\fBnamed\-checkzone\fR
useful for checking zone files before configuring them into a name server\&.
.PP
\fBnamed\-compilezone\fR
is similar to
\fBnamed\-checkzone\fR, but it always dumps the zone contents to a specified file in a specified format\&. Additionally, it applies stricter check levels by default, since the dump output will be used as an actual zone file loaded by
\fBnamed\fR\&. When manually specified otherwise, the check levels must at least be as strict as those specified in the
\fBnamed\fR
configuration file\&.
.SH "OPTIONS"
.PP
\-d
.RS 4
Enable debugging\&.
.RE
.PP
\-h
.RS 4
Print the usage summary and exit\&.
.RE
.PP
\-q
.RS 4
Quiet mode \- exit code only\&.
.RE
.PP
\-v
.RS 4
Print the version of the
\fBnamed\-checkzone\fR
program and exit\&.
.RE
.PP
\-j
.RS 4
When loading a zone file, read the journal if it exists\&. The journal file name is assumed to be the zone file name appended with the string
\&.jnl\&.
.RE
.PP
\-J \fIfilename\fR
.RS 4
When loading the zone file read the journal from the given file, if it exists\&. (Implies \-j\&.)
.RE
.PP
\-c \fIclass\fR
.RS 4
Specify the class of the zone\&. If not specified, "IN" is assumed\&.
.RE
.PP
\-i \fImode\fR
.RS 4
Perform post\-load zone integrity checks\&. Possible modes are
\fB"full"\fR
(default),
\fB"full\-sibling"\fR,
\fB"local"\fR,
\fB"local\-sibling"\fR
and
\fB"none"\fR\&.
.sp
Mode
\fB"full"\fR
checks that MX records refer to A or AAAA record (both in\-zone and out\-of\-zone hostnames)\&. Mode
\fB"local"\fR
only checks MX records which refer to in\-zone hostnames\&.
.sp
Mode
\fB"full"\fR
checks that SRV records refer to A or AAAA record (both in\-zone and out\-of\-zone hostnames)\&. Mode
\fB"local"\fR
only checks SRV records which refer to in\-zone hostnames\&.
.sp
Mode
\fB"full"\fR
checks that delegation NS records refer to A or AAAA record (both in\-zone and out\-of\-zone hostnames)\&. It also checks that glue address records in the zone match those advertised by the child\&. Mode
\fB"local"\fR
only checks NS records which refer to in\-zone hostnames or that some required glue exists, that is when the nameserver is in a child zone\&.
.sp
Mode
\fB"full\-sibling"\fR
and
\fB"local\-sibling"\fR
disable sibling glue checks but are otherwise the same as
\fB"full"\fR
and
\fB"local"\fR
respectively\&.
.sp
Mode
\fB"none"\fR
disables the checks\&.
.RE
.PP
\-f \fIformat\fR
.RS 4
Specify the format of the zone file\&. Possible formats are
\fB"text"\fR
(default),
\fB"raw"\fR, and
\fB"map"\fR\&.
.RE
.PP
\-F \fIformat\fR
.RS 4
Specify the format of the output file specified\&. For
\fBnamed\-checkzone\fR, this does not cause any effects unless it dumps the zone contents\&.
.sp
Possible formats are
\fB"text"\fR
(default), which is the standard textual representation of the zone, and
\fB"map"\fR,
\fB"raw"\fR, and
\fB"raw=N"\fR, which store the zone in a binary format for rapid loading by
\fBnamed\fR\&.
\fB"raw=N"\fR
specifies the format version of the raw zone file: if N is 0, the raw file can be read by any version of
\fBnamed\fR; if N is 1, the file can be read by release 9\&.9\&.0 or higher; the default is 1\&.
.RE
.PP
\-k \fImode\fR
.RS 4
Perform
\fB"check\-names"\fR
checks with the specified failure mode\&. Possible modes are
\fB"fail"\fR
(default for
\fBnamed\-compilezone\fR),
\fB"warn"\fR
(default for
\fBnamed\-checkzone\fR) and
\fB"ignore"\fR\&.
.RE
.PP
\-l \fIttl\fR
.RS 4
Sets a maximum permissible TTL for the input file\&. Any record with a TTL higher than this value will cause the zone to be rejected\&. This is similar to using the
\fBmax\-zone\-ttl\fR
option in
named\&.conf\&.
.RE
.PP
\-L \fIserial\fR
.RS 4
When compiling a zone to "raw" or "map" format, set the "source serial" value in the header to the specified serial number\&. (This is expected to be used primarily for testing purposes\&.)
.RE
.PP
\-m \fImode\fR
.RS 4
Specify whether MX records should be checked to see if they are addresses\&. Possible modes are
\fB"fail"\fR,
\fB"warn"\fR
(default) and
\fB"ignore"\fR\&.
.RE
.PP
\-M \fImode\fR
.RS 4
Check if a MX record refers to a CNAME\&. Possible modes are
\fB"fail"\fR,
\fB"warn"\fR
(default) and
\fB"ignore"\fR\&.
.RE
.PP
\-n \fImode\fR
.RS 4
Specify whether NS records should be checked to see if they are addresses\&. Possible modes are
\fB"fail"\fR
(default for
\fBnamed\-compilezone\fR),
\fB"warn"\fR
(default for
\fBnamed\-checkzone\fR) and
\fB"ignore"\fR\&.
.RE
.PP
\-o \fIfilename\fR
.RS 4
Write zone output to
filename\&. If
filename
is
\-
then write to standard out\&. This is mandatory for
\fBnamed\-compilezone\fR\&.
.RE
.PP
\-r \fImode\fR
.RS 4
Check for records that are treated as different by DNSSEC but are semantically equal in plain DNS\&. Possible modes are
\fB"fail"\fR,
\fB"warn"\fR
(default) and
\fB"ignore"\fR\&.
.RE
.PP
\-s \fIstyle\fR
.RS 4
Specify the style of the dumped zone file\&. Possible styles are
\fB"full"\fR
(default) and
\fB"relative"\fR\&. The full format is most suitable for processing automatically by a separate script\&. On the other hand, the relative format is more human\-readable and is thus suitable for editing by hand\&. For
\fBnamed\-checkzone\fR
this does not cause any effects unless it dumps the zone contents\&. It also does not have any meaning if the output format is not text\&.
.RE
.PP
\-S \fImode\fR
.RS 4
Check if a SRV record refers to a CNAME\&. Possible modes are
\fB"fail"\fR,
\fB"warn"\fR
(default) and
\fB"ignore"\fR\&.
.RE
.PP
\-t \fIdirectory\fR
.RS 4
Chroot to
directory
so that include directives in the configuration file are processed as if run by a similarly chrooted
\fBnamed\fR\&.
.RE
.PP
\-T \fImode\fR
.RS 4
Check if Sender Policy Framework (SPF) records exist and issues a warning if an SPF\-formatted TXT record is not also present\&. Possible modes are
\fB"warn"\fR
(default),
\fB"ignore"\fR\&.
.RE
.PP
\-w \fIdirectory\fR
.RS 4
chdir to
directory
so that relative filenames in master file $INCLUDE directives work\&. This is similar to the directory clause in
named\&.conf\&.
.RE
.PP
\-D
.RS 4
Dump zone file in canonical format\&. This is always enabled for
\fBnamed\-compilezone\fR\&.
.RE
.PP
\-W \fImode\fR
.RS 4
Specify whether to check for non\-terminal wildcards\&. Non\-terminal wildcards are almost always the result of a failure to understand the wildcard matching algorithm (RFC 1034)\&. Possible modes are
\fB"warn"\fR
(default) and
\fB"ignore"\fR\&.
.RE
.PP
zonename
.RS 4
The domain name of the zone being checked\&.
.RE
.PP
filename
.RS 4
The name of the zone file\&.
.RE
.SH "RETURN VALUES"
.PP
\fBnamed\-checkzone\fR
returns an exit status of 1 if errors were detected and 0 otherwise\&.
.SH "SEE ALSO"
.PP
\fBnamed\fR(8),
\fBnamed-checkconf\fR(8),
RFC 1035,
BIND 9 Administrator Reference Manual\&.
.SH "AUTHOR"
.PP
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2000-2002, 2004-2007, 2009-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
.br

View File

@@ -1,31 +1,33 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
#include <inttypes.h>
#include <config.h>
#include <stdbool.h>
#include <stdlib.h>
#include <inttypes.h>
#include <isc/attributes.h>
#include <isc/app.h>
#include <isc/commandline.h>
#include <isc/dir.h>
#include <isc/file.h>
#include <isc/hash.h>
#include <isc/log.h>
#include <isc/mem.h>
#include <isc/result.h>
#include <isc/print.h>
#include <isc/socket.h>
#include <isc/string.h>
#include <isc/task.h>
#include <isc/timer.h>
#include <isc/util.h>
@@ -37,6 +39,7 @@
#include <dns/name.h>
#include <dns/rdataclass.h>
#include <dns/rdataset.h>
#include <dns/result.h>
#include <dns/types.h>
#include <dns/zone.h>
@@ -45,38 +48,38 @@
static int quiet = 0;
static isc_mem_t *mctx = NULL;
dns_zone_t *zone = NULL;
dns_zonetype_t zonetype = dns_zone_primary;
dns_zonetype_t zonetype = dns_zone_master;
static int dumpzone = 0;
static const char *output_filename;
static const char *prog_name = NULL;
static const dns_master_style_t *outputstyle = NULL;
static enum { progmode_check, progmode_compile } progmode;
#define ERRRET(result, function) \
do { \
if (result != ISC_R_SUCCESS) { \
if (!quiet) \
fprintf(stderr, "%s() returned %s\n", \
function, isc_result_totext(result)); \
return (result); \
} \
#define ERRRET(result, function) \
do { \
if (result != ISC_R_SUCCESS) { \
if (!quiet) \
fprintf(stderr, "%s() returned %s\n", \
function, dns_result_totext(result)); \
return (result); \
} \
} while (0)
noreturn static void
usage(void);
ISC_PLATFORM_NORETURN_PRE static void
usage(void) ISC_PLATFORM_NORETURN_POST;
static void
usage(void) {
fprintf(stderr,
"usage: %s [-djqvD] [-c class] "
"[-f inputformat] [-F outputformat] [-J filename] "
"[-s (full|relative)] [-t directory] [-w directory] "
"[-k (ignore|warn|fail)] [-m (ignore|warn|fail)] "
"[-n (ignore|warn|fail)] [-r (ignore|warn|fail)] "
"[-t directory] [-w directory] [-k (ignore|warn|fail)] "
"[-n (ignore|warn|fail)] [-m (ignore|warn|fail)] "
"[-r (ignore|warn|fail)] "
"[-i (full|full-sibling|local|local-sibling|none)] "
"[-M (ignore|warn|fail)] [-S (ignore|warn|fail)] "
"[-W (ignore|warn)] "
"%s zonename [ (filename|-) ]\n",
"%s zonename filename\n",
prog_name,
progmode == progmode_check ? "[-o filename]" : "-o filename");
exit(1);
@@ -84,9 +87,9 @@ usage(void) {
static void
destroy(void) {
if (zone != NULL) {
if (zone != NULL)
dns_zone_detach(&zone);
}
dns_name_destroy();
}
/*% main processing routine */
@@ -94,7 +97,7 @@ int
main(int argc, char **argv) {
int c;
char *origin = NULL;
const char *filename = NULL;
char *filename = NULL;
isc_log_t *lctx = NULL;
isc_result_t result;
char classname_in[] = "IN";
@@ -120,21 +123,18 @@ main(int argc, char **argv) {
outputstyle = &dns_master_style_full;
prog_name = strrchr(argv[0], '/');
if (prog_name == NULL) {
if (prog_name == NULL)
prog_name = strrchr(argv[0], '\\');
}
if (prog_name != NULL) {
if (prog_name != NULL)
prog_name++;
} else {
else
prog_name = argv[0];
}
/*
* Libtool doesn't preserve the program name prior to final
* installation. Remove the libtool prefix ("lt-").
*/
if (strncmp(prog_name, "lt-", 3) == 0) {
if (strncmp(prog_name, "lt-", 3) == 0)
prog_name += 3;
}
#define PROGCMP(X) \
(strcasecmp(prog_name, X) == 0 || strcasecmp(prog_name, X ".exe") == 0)
@@ -144,28 +144,30 @@ main(int argc, char **argv) {
} else if (PROGCMP("named-compilezone")) {
progmode = progmode_compile;
} else {
UNREACHABLE();
INSIST(0);
ISC_UNREACHABLE();
}
/* Compilation specific defaults */
if (progmode == progmode_compile) {
zone_options |= (DNS_ZONEOPT_CHECKNS | DNS_ZONEOPT_FATALNS |
DNS_ZONEOPT_CHECKSPF | DNS_ZONEOPT_CHECKDUPRR |
zone_options |= (DNS_ZONEOPT_CHECKNS |
DNS_ZONEOPT_FATALNS |
DNS_ZONEOPT_CHECKSPF |
DNS_ZONEOPT_CHECKDUPRR |
DNS_ZONEOPT_CHECKNAMES |
DNS_ZONEOPT_CHECKNAMESFAIL |
DNS_ZONEOPT_CHECKWILDCARD);
} else {
zone_options |= (DNS_ZONEOPT_CHECKDUPRR | DNS_ZONEOPT_CHECKSPF);
}
} else
zone_options |= (DNS_ZONEOPT_CHECKDUPRR |
DNS_ZONEOPT_CHECKSPF);
#define ARGCMP(X) (strcmp(isc_commandline_argument, X) == 0)
isc_commandline_errprint = false;
while ((c = isc_commandline_parse(argc, argv,
"c:df:hi:jJ:k:L:l:m:n:qr:s:t:o:vw:C:"
"DF:M:S:T:W:")) != EOF)
{
"c:df:hi:jJ:k:L:l:m:n:qr:s:t:o:vw:DF:M:S:T:W:"))
!= EOF) {
switch (c) {
case 'c':
classname = isc_commandline_argument;
@@ -269,15 +271,16 @@ main(int argc, char **argv) {
}
break;
case 'n':
if (ARGCMP("ignore")) {
zone_options &= ~(DNS_ZONEOPT_CHECKNS |
zone_options &= ~(DNS_ZONEOPT_CHECKNS|
DNS_ZONEOPT_FATALNS);
} else if (ARGCMP("warn")) {
zone_options |= DNS_ZONEOPT_CHECKNS;
zone_options &= ~DNS_ZONEOPT_FATALNS;
} else if (ARGCMP("fail")) {
zone_options |= DNS_ZONEOPT_CHECKNS |
zone_options |= DNS_ZONEOPT_CHECKNS|
DNS_ZONEOPT_FATALNS;
} else {
fprintf(stderr, "invalid argument to -n: %s\n",
@@ -329,9 +332,9 @@ main(int argc, char **argv) {
break;
case 's':
if (ARGCMP("full")) {
if (ARGCMP("full"))
outputstyle = &dns_master_style_full;
} else if (ARGCMP("relative")) {
else if (ARGCMP("relative")) {
outputstyle = &dns_master_style_default;
} else {
fprintf(stderr,
@@ -352,25 +355,13 @@ main(int argc, char **argv) {
break;
case 'v':
printf("%s\n", PACKAGE_VERSION);
printf(VERSION "\n");
exit(0);
case 'w':
workdir = isc_commandline_argument;
break;
case 'C':
if (ARGCMP("check-svcb:fail")) {
zone_options |= DNS_ZONEOPT_CHECKSVCB;
} else if (ARGCMP("check-svcb:ignore")) {
zone_options &= ~DNS_ZONEOPT_CHECKSVCB;
} else {
fprintf(stderr, "invalid argument to -C: %s\n",
isc_commandline_argument);
exit(1);
}
break;
case 'D':
dumpzone++;
break;
@@ -422,25 +413,23 @@ main(int argc, char **argv) {
break;
case 'W':
if (ARGCMP("warn")) {
if (ARGCMP("warn"))
zone_options |= DNS_ZONEOPT_CHECKWILDCARD;
} else if (ARGCMP("ignore")) {
else if (ARGCMP("ignore"))
zone_options &= ~DNS_ZONEOPT_CHECKWILDCARD;
}
break;
case '?':
if (isc_commandline_option != '?') {
if (isc_commandline_option != '?')
fprintf(stderr, "%s: invalid argument -%c\n",
prog_name, isc_commandline_option);
}
FALLTHROUGH;
/* FALLTHROUGH */
case 'h':
usage();
default:
fprintf(stderr, "%s: unhandled option -%c\n", prog_name,
isc_commandline_option);
fprintf(stderr, "%s: unhandled option -%c\n",
prog_name, isc_commandline_option);
exit(1);
}
}
@@ -448,24 +437,26 @@ main(int argc, char **argv) {
if (workdir != NULL) {
result = isc_dir_chdir(workdir);
if (result != ISC_R_SUCCESS) {
fprintf(stderr, "isc_dir_chdir: %s: %s\n", workdir,
isc_result_totext(result));
fprintf(stderr, "isc_dir_chdir: %s: %s\n",
workdir, isc_result_totext(result));
exit(1);
}
}
if (inputformatstr != NULL) {
if (strcasecmp(inputformatstr, "text") == 0) {
if (strcasecmp(inputformatstr, "text") == 0)
inputformat = dns_masterformat_text;
} else if (strcasecmp(inputformatstr, "raw") == 0) {
else if (strcasecmp(inputformatstr, "raw") == 0)
inputformat = dns_masterformat_raw;
} else if (strncasecmp(inputformatstr, "raw=", 4) == 0) {
else if (strncasecmp(inputformatstr, "raw=", 4) == 0) {
inputformat = dns_masterformat_raw;
fprintf(stderr, "WARNING: input format raw, version "
"ignored\n");
fprintf(stderr,
"WARNING: input format raw, version ignored\n");
} else if (strcasecmp(inputformatstr, "map") == 0) {
inputformat = dns_masterformat_map;
} else {
fprintf(stderr, "unknown file format: %s\n",
inputformatstr);
inputformatstr);
exit(1);
}
}
@@ -481,11 +472,13 @@ main(int argc, char **argv) {
outputformat = dns_masterformat_raw;
rawversion = strtol(outputformatstr + 4, &end, 10);
if (end == outputformatstr + 4 || *end != '\0' ||
rawversion > 1U)
{
fprintf(stderr, "unknown raw format version\n");
rawversion > 1U) {
fprintf(stderr,
"unknown raw format version\n");
exit(1);
}
} else if (strcasecmp(outputformatstr, "map") == 0) {
outputformat = dns_masterformat_map;
} else {
fprintf(stderr, "unknown file format: %s\n",
outputformatstr);
@@ -494,55 +487,47 @@ main(int argc, char **argv) {
}
if (progmode == progmode_compile) {
dumpzone = 1; /* always dump */
dumpzone = 1; /* always dump */
logdump = !quiet;
if (output_filename == NULL) {
fprintf(stderr, "output file required, but not "
"specified\n");
fprintf(stderr,
"output file required, but not specified\n");
usage();
}
}
if (output_filename != NULL) {
if (output_filename != NULL)
dumpzone = 1;
}
/*
* If we are printing to stdout then send the informational
* If we are outputing to stdout then send the informational
* output to stderr.
*/
if (dumpzone &&
(output_filename == NULL || strcmp(output_filename, "-") == 0 ||
(output_filename == NULL ||
strcmp(output_filename, "-") == 0 ||
strcmp(output_filename, "/dev/fd/1") == 0 ||
strcmp(output_filename, "/dev/stdout") == 0))
{
strcmp(output_filename, "/dev/stdout") == 0)) {
errout = stderr;
logdump = false;
}
if (argc - isc_commandline_index < 1 ||
argc - isc_commandline_index > 2)
{
if (isc_commandline_index + 2 != argc)
usage();
}
isc_mem_create(&mctx);
if (!quiet) {
RUNTIME_CHECK(setup_logging(mctx, errout, &lctx) ==
ISC_R_SUCCESS);
}
#ifdef _WIN32
InitSockets();
#endif
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
if (!quiet)
RUNTIME_CHECK(setup_logging(mctx, errout, &lctx)
== ISC_R_SUCCESS);
dns_result_register();
origin = argv[isc_commandline_index++];
if (isc_commandline_index == argc) {
/* "-" will be interpreted as stdin */
filename = "-";
} else {
filename = argv[isc_commandline_index];
}
isc_commandline_index++;
filename = argv[isc_commandline_index++];
result = load_zone(mctx, origin, filename, inputformat, classname,
maxttl, &zone);
@@ -558,21 +543,20 @@ main(int argc, char **argv) {
fprintf(errout, "dump zone to %s...", output_filename);
fflush(errout);
}
result = dump_zone(origin, zone, output_filename, outputformat,
outputstyle, rawversion);
if (logdump) {
result = dump_zone(origin, zone, output_filename,
outputformat, outputstyle, rawversion);
if (logdump)
fprintf(errout, "done\n");
}
}
if (!quiet && result == ISC_R_SUCCESS) {
if (!quiet && result == ISC_R_SUCCESS)
fprintf(errout, "OK\n");
}
destroy();
if (lctx != NULL) {
if (lctx != NULL)
isc_log_destroy(&lctx);
}
isc_mem_destroy(&mctx);
#ifdef _WIN32
DestroySockets();
#endif
return ((result == ISC_R_SUCCESS) ? 0 : 1);
}

View File

@@ -0,0 +1,529 @@
<!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.named-checkzone">
<info>
<date>2014-02-19</date>
</info>
<refentryinfo>
<corpname>ISC</corpname>
<corpauthor>Internet Systems Consortium, Inc.</corpauthor>
</refentryinfo>
<refmeta>
<refentrytitle><application>named-checkzone</application></refentrytitle>
<manvolnum>8</manvolnum>
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<docinfo>
<copyright>
<year>2000</year>
<year>2001</year>
<year>2002</year>
<year>2004</year>
<year>2005</year>
<year>2006</year>
<year>2007</year>
<year>2009</year>
<year>2010</year>
<year>2011</year>
<year>2012</year>
<year>2013</year>
<year>2014</year>
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
<refnamediv>
<refname><application>named-checkzone</application></refname>
<refname><application>named-compilezone</application></refname>
<refpurpose>zone file validity checking or converting tool</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis sepchar=" ">
<command>named-checkzone</command>
<arg choice="opt" rep="norepeat"><option>-d</option></arg>
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
<arg choice="opt" rep="norepeat"><option>-j</option></arg>
<arg choice="opt" rep="norepeat"><option>-q</option></arg>
<arg choice="opt" rep="norepeat"><option>-v</option></arg>
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-f <replaceable class="parameter">format</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-F <replaceable class="parameter">format</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-J <replaceable class="parameter">filename</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-i <replaceable class="parameter">mode</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-k <replaceable class="parameter">mode</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-m <replaceable class="parameter">mode</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-M <replaceable class="parameter">mode</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-n <replaceable class="parameter">mode</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-l <replaceable class="parameter">ttl</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-L <replaceable class="parameter">serial</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-o <replaceable class="parameter">filename</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">mode</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">style</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-S <replaceable class="parameter">mode</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">mode</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-w <replaceable class="parameter">directory</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-D</option></arg>
<arg choice="opt" rep="norepeat"><option>-W <replaceable class="parameter">mode</replaceable></option></arg>
<arg choice="req" rep="norepeat">zonename</arg>
<arg choice="req" rep="norepeat">filename</arg>
</cmdsynopsis>
<cmdsynopsis sepchar=" ">
<command>named-compilezone</command>
<arg choice="opt" rep="norepeat"><option>-d</option></arg>
<arg choice="opt" rep="norepeat"><option>-j</option></arg>
<arg choice="opt" rep="norepeat"><option>-q</option></arg>
<arg choice="opt" rep="norepeat"><option>-v</option></arg>
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-C <replaceable class="parameter">mode</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-f <replaceable class="parameter">format</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-F <replaceable class="parameter">format</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-J <replaceable class="parameter">filename</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-i <replaceable class="parameter">mode</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-k <replaceable class="parameter">mode</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-m <replaceable class="parameter">mode</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-n <replaceable class="parameter">mode</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-l <replaceable class="parameter">ttl</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-L <replaceable class="parameter">serial</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">mode</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">style</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">mode</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-w <replaceable class="parameter">directory</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-D</option></arg>
<arg choice="opt" rep="norepeat"><option>-W <replaceable class="parameter">mode</replaceable></option></arg>
<arg choice="req" rep="norepeat"><option>-o <replaceable class="parameter">filename</replaceable></option></arg>
<arg choice="req" rep="norepeat">zonename</arg>
<arg choice="req" rep="norepeat">filename</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsection><info><title>DESCRIPTION</title></info>
<para><command>named-checkzone</command>
checks the syntax and integrity of a zone file. It performs the
same checks as <command>named</command> does when loading a
zone. This makes <command>named-checkzone</command> useful for
checking zone files before configuring them into a name server.
</para>
<para>
<command>named-compilezone</command> is similar to
<command>named-checkzone</command>, but it always dumps the
zone contents to a specified file in a specified format.
Additionally, it applies stricter check levels by default,
since the dump output will be used as an actual zone file
loaded by <command>named</command>.
When manually specified otherwise, the check levels must at
least be as strict as those specified in the
<command>named</command> configuration file.
</para>
</refsection>
<refsection><info><title>OPTIONS</title></info>
<variablelist>
<varlistentry>
<term>-d</term>
<listitem>
<para>
Enable debugging.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-h</term>
<listitem>
<para>
Print the usage summary and exit.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-q</term>
<listitem>
<para>
Quiet mode - exit code only.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-v</term>
<listitem>
<para>
Print the version of the <command>named-checkzone</command>
program and exit.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-j</term>
<listitem>
<para>
When loading a zone file, read the journal if it exists.
The journal file name is assumed to be the zone file name
appended with the string <filename>.jnl</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-J <replaceable class="parameter">filename</replaceable></term>
<listitem>
<para>
When loading the zone file read the journal from the given
file, if it exists. (Implies -j.)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-c <replaceable class="parameter">class</replaceable></term>
<listitem>
<para>
Specify the class of the zone. If not specified, "IN" is assumed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-i <replaceable class="parameter">mode</replaceable></term>
<listitem>
<para>
Perform post-load zone integrity checks. Possible modes are
<command>"full"</command> (default),
<command>"full-sibling"</command>,
<command>"local"</command>,
<command>"local-sibling"</command> and
<command>"none"</command>.
</para>
<para>
Mode <command>"full"</command> checks that MX records
refer to A or AAAA record (both in-zone and out-of-zone
hostnames). Mode <command>"local"</command> only
checks MX records which refer to in-zone hostnames.
</para>
<para>
Mode <command>"full"</command> checks that SRV records
refer to A or AAAA record (both in-zone and out-of-zone
hostnames). Mode <command>"local"</command> only
checks SRV records which refer to in-zone hostnames.
</para>
<para>
Mode <command>"full"</command> checks that delegation NS
records refer to A or AAAA record (both in-zone and out-of-zone
hostnames). It also checks that glue address records
in the zone match those advertised by the child.
Mode <command>"local"</command> only checks NS records which
refer to in-zone hostnames or that some required glue exists,
that is when the nameserver is in a child zone.
</para>
<para>
Mode <command>"full-sibling"</command> and
<command>"local-sibling"</command> disable sibling glue
checks but are otherwise the same as <command>"full"</command>
and <command>"local"</command> respectively.
</para>
<para>
Mode <command>"none"</command> disables the checks.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-f <replaceable class="parameter">format</replaceable></term>
<listitem>
<para>
Specify the format of the zone file.
Possible formats are <command>"text"</command> (default),
<command>"raw"</command>, and <command>"map"</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-F <replaceable class="parameter">format</replaceable></term>
<listitem>
<para>
Specify the format of the output file specified.
For <command>named-checkzone</command>,
this does not cause any effects unless it dumps the zone
contents.
</para>
<para>
Possible formats are <command>"text"</command> (default),
which is the standard textual representation of the zone,
and <command>"map"</command>, <command>"raw"</command>,
and <command>"raw=N"</command>, which store the zone in a
binary format for rapid loading by <command>named</command>.
<command>"raw=N"</command> specifies the format version of
the raw zone file: if N is 0, the raw file can be read by
any version of <command>named</command>; if N is 1, the file
can be read by release 9.9.0 or higher; the default is 1.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-k <replaceable class="parameter">mode</replaceable></term>
<listitem>
<para>
Perform <command>"check-names"</command> checks with the
specified failure mode.
Possible modes are <command>"fail"</command>
(default for <command>named-compilezone</command>),
<command>"warn"</command>
(default for <command>named-checkzone</command>) and
<command>"ignore"</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-l <replaceable class="parameter">ttl</replaceable></term>
<listitem>
<para>
Sets a maximum permissible TTL for the input file.
Any record with a TTL higher than this value will cause
the zone to be rejected. This is similar to using the
<command>max-zone-ttl</command> option in
<filename>named.conf</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-L <replaceable class="parameter">serial</replaceable></term>
<listitem>
<para>
When compiling a zone to "raw" or "map" format, set the
"source serial" value in the header to the specified serial
number. (This is expected to be used primarily for testing
purposes.)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-m <replaceable class="parameter">mode</replaceable></term>
<listitem>
<para>
Specify whether MX records should be checked to see if they
are addresses. Possible modes are <command>"fail"</command>,
<command>"warn"</command> (default) and
<command>"ignore"</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-M <replaceable class="parameter">mode</replaceable></term>
<listitem>
<para>
Check if a MX record refers to a CNAME.
Possible modes are <command>"fail"</command>,
<command>"warn"</command> (default) and
<command>"ignore"</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-n <replaceable class="parameter">mode</replaceable></term>
<listitem>
<para>
Specify whether NS records should be checked to see if they
are addresses.
Possible modes are <command>"fail"</command>
(default for <command>named-compilezone</command>),
<command>"warn"</command>
(default for <command>named-checkzone</command>) and
<command>"ignore"</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-o <replaceable class="parameter">filename</replaceable></term>
<listitem>
<para>
Write zone output to <filename>filename</filename>.
If <filename>filename</filename> is <filename>-</filename> then
write to standard out.
This is mandatory for <command>named-compilezone</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-r <replaceable class="parameter">mode</replaceable></term>
<listitem>
<para>
Check for records that are treated as different by DNSSEC but
are semantically equal in plain DNS.
Possible modes are <command>"fail"</command>,
<command>"warn"</command> (default) and
<command>"ignore"</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-s <replaceable class="parameter">style</replaceable></term>
<listitem>
<para>
Specify the style of the dumped zone file.
Possible styles are <command>"full"</command> (default)
and <command>"relative"</command>.
The full format is most suitable for processing
automatically by a separate script.
On the other hand, the relative format is more
human-readable and is thus suitable for editing by hand.
For <command>named-checkzone</command>
this does not cause any effects unless it dumps the zone
contents.
It also does not have any meaning if the output format
is not text.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-S <replaceable class="parameter">mode</replaceable></term>
<listitem>
<para>
Check if a SRV record refers to a CNAME.
Possible modes are <command>"fail"</command>,
<command>"warn"</command> (default) and
<command>"ignore"</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-t <replaceable class="parameter">directory</replaceable></term>
<listitem>
<para>
Chroot to <filename>directory</filename> so that
include
directives in the configuration file are processed as if
run by a similarly chrooted <command>named</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-T <replaceable class="parameter">mode</replaceable></term>
<listitem>
<para>
Check if Sender Policy Framework (SPF) records exist
and issues a warning if an SPF-formatted TXT record is
not also present. Possible modes are <command>"warn"</command>
(default), <command>"ignore"</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-w <replaceable class="parameter">directory</replaceable></term>
<listitem>
<para>
chdir to <filename>directory</filename> so that
relative
filenames in master file $INCLUDE directives work. This
is similar to the directory clause in
<filename>named.conf</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-D</term>
<listitem>
<para>
Dump zone file in canonical format.
This is always enabled for <command>named-compilezone</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-W <replaceable class="parameter">mode</replaceable></term>
<listitem>
<para>
Specify whether to check for non-terminal wildcards.
Non-terminal wildcards are almost always the result of a
failure to understand the wildcard matching algorithm (RFC 1034).
Possible modes are <command>"warn"</command> (default)
and
<command>"ignore"</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>zonename</term>
<listitem>
<para>
The domain name of the zone being checked.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>filename</term>
<listitem>
<para>
The name of the zone file.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection><info><title>RETURN VALUES</title></info>
<para><command>named-checkzone</command>
returns an exit status of 1 if
errors were detected and 0 otherwise.
</para>
</refsection>
<refsection><info><title>SEE ALSO</title></info>
<para><citerefentry>
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>named-checkconf</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citetitle>RFC 1035</citetitle>,
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
</para>
</refsection>
</refentry>

View File

@@ -0,0 +1,429 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>named-checkzone</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
<a name="man.named-checkzone"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2>Name</h2>
<p>
<span class="application">named-checkzone</span>,
<span class="application">named-compilezone</span>
&#8212; zone file validity checking or converting tool
</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p>
<code class="command">named-checkzone</code>
[<code class="option">-d</code>]
[<code class="option">-h</code>]
[<code class="option">-j</code>]
[<code class="option">-q</code>]
[<code class="option">-v</code>]
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
[<code class="option">-f <em class="replaceable"><code>format</code></em></code>]
[<code class="option">-F <em class="replaceable"><code>format</code></em></code>]
[<code class="option">-J <em class="replaceable"><code>filename</code></em></code>]
[<code class="option">-i <em class="replaceable"><code>mode</code></em></code>]
[<code class="option">-k <em class="replaceable"><code>mode</code></em></code>]
[<code class="option">-m <em class="replaceable"><code>mode</code></em></code>]
[<code class="option">-M <em class="replaceable"><code>mode</code></em></code>]
[<code class="option">-n <em class="replaceable"><code>mode</code></em></code>]
[<code class="option">-l <em class="replaceable"><code>ttl</code></em></code>]
[<code class="option">-L <em class="replaceable"><code>serial</code></em></code>]
[<code class="option">-o <em class="replaceable"><code>filename</code></em></code>]
[<code class="option">-r <em class="replaceable"><code>mode</code></em></code>]
[<code class="option">-s <em class="replaceable"><code>style</code></em></code>]
[<code class="option">-S <em class="replaceable"><code>mode</code></em></code>]
[<code class="option">-t <em class="replaceable"><code>directory</code></em></code>]
[<code class="option">-T <em class="replaceable"><code>mode</code></em></code>]
[<code class="option">-w <em class="replaceable"><code>directory</code></em></code>]
[<code class="option">-D</code>]
[<code class="option">-W <em class="replaceable"><code>mode</code></em></code>]
{zonename}
{filename}
</p></div>
<div class="cmdsynopsis"><p>
<code class="command">named-compilezone</code>
[<code class="option">-d</code>]
[<code class="option">-j</code>]
[<code class="option">-q</code>]
[<code class="option">-v</code>]
[<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
[<code class="option">-C <em class="replaceable"><code>mode</code></em></code>]
[<code class="option">-f <em class="replaceable"><code>format</code></em></code>]
[<code class="option">-F <em class="replaceable"><code>format</code></em></code>]
[<code class="option">-J <em class="replaceable"><code>filename</code></em></code>]
[<code class="option">-i <em class="replaceable"><code>mode</code></em></code>]
[<code class="option">-k <em class="replaceable"><code>mode</code></em></code>]
[<code class="option">-m <em class="replaceable"><code>mode</code></em></code>]
[<code class="option">-n <em class="replaceable"><code>mode</code></em></code>]
[<code class="option">-l <em class="replaceable"><code>ttl</code></em></code>]
[<code class="option">-L <em class="replaceable"><code>serial</code></em></code>]
[<code class="option">-r <em class="replaceable"><code>mode</code></em></code>]
[<code class="option">-s <em class="replaceable"><code>style</code></em></code>]
[<code class="option">-t <em class="replaceable"><code>directory</code></em></code>]
[<code class="option">-T <em class="replaceable"><code>mode</code></em></code>]
[<code class="option">-w <em class="replaceable"><code>directory</code></em></code>]
[<code class="option">-D</code>]
[<code class="option">-W <em class="replaceable"><code>mode</code></em></code>]
{<code class="option">-o <em class="replaceable"><code>filename</code></em></code>}
{zonename}
{filename}
</p></div>
</div>
<div class="refsection">
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
<p><span class="command"><strong>named-checkzone</strong></span>
checks the syntax and integrity of a zone file. It performs the
same checks as <span class="command"><strong>named</strong></span> does when loading a
zone. This makes <span class="command"><strong>named-checkzone</strong></span> useful for
checking zone files before configuring them into a name server.
</p>
<p>
<span class="command"><strong>named-compilezone</strong></span> is similar to
<span class="command"><strong>named-checkzone</strong></span>, but it always dumps the
zone contents to a specified file in a specified format.
Additionally, it applies stricter check levels by default,
since the dump output will be used as an actual zone file
loaded by <span class="command"><strong>named</strong></span>.
When manually specified otherwise, the check levels must at
least be as strict as those specified in the
<span class="command"><strong>named</strong></span> configuration file.
</p>
</div>
<div class="refsection">
<a name="id-1.8"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl class="variablelist">
<dt><span class="term">-d</span></dt>
<dd>
<p>
Enable debugging.
</p>
</dd>
<dt><span class="term">-h</span></dt>
<dd>
<p>
Print the usage summary and exit.
</p>
</dd>
<dt><span class="term">-q</span></dt>
<dd>
<p>
Quiet mode - exit code only.
</p>
</dd>
<dt><span class="term">-v</span></dt>
<dd>
<p>
Print the version of the <span class="command"><strong>named-checkzone</strong></span>
program and exit.
</p>
</dd>
<dt><span class="term">-j</span></dt>
<dd>
<p>
When loading a zone file, read the journal if it exists.
The journal file name is assumed to be the zone file name
appended with the string <code class="filename">.jnl</code>.
</p>
</dd>
<dt><span class="term">-J <em class="replaceable"><code>filename</code></em></span></dt>
<dd>
<p>
When loading the zone file read the journal from the given
file, if it exists. (Implies -j.)
</p>
</dd>
<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
<dd>
<p>
Specify the class of the zone. If not specified, "IN" is assumed.
</p>
</dd>
<dt><span class="term">-i <em class="replaceable"><code>mode</code></em></span></dt>
<dd>
<p>
Perform post-load zone integrity checks. Possible modes are
<span class="command"><strong>"full"</strong></span> (default),
<span class="command"><strong>"full-sibling"</strong></span>,
<span class="command"><strong>"local"</strong></span>,
<span class="command"><strong>"local-sibling"</strong></span> and
<span class="command"><strong>"none"</strong></span>.
</p>
<p>
Mode <span class="command"><strong>"full"</strong></span> checks that MX records
refer to A or AAAA record (both in-zone and out-of-zone
hostnames). Mode <span class="command"><strong>"local"</strong></span> only
checks MX records which refer to in-zone hostnames.
</p>
<p>
Mode <span class="command"><strong>"full"</strong></span> checks that SRV records
refer to A or AAAA record (both in-zone and out-of-zone
hostnames). Mode <span class="command"><strong>"local"</strong></span> only
checks SRV records which refer to in-zone hostnames.
</p>
<p>
Mode <span class="command"><strong>"full"</strong></span> checks that delegation NS
records refer to A or AAAA record (both in-zone and out-of-zone
hostnames). It also checks that glue address records
in the zone match those advertised by the child.
Mode <span class="command"><strong>"local"</strong></span> only checks NS records which
refer to in-zone hostnames or that some required glue exists,
that is when the nameserver is in a child zone.
</p>
<p>
Mode <span class="command"><strong>"full-sibling"</strong></span> and
<span class="command"><strong>"local-sibling"</strong></span> disable sibling glue
checks but are otherwise the same as <span class="command"><strong>"full"</strong></span>
and <span class="command"><strong>"local"</strong></span> respectively.
</p>
<p>
Mode <span class="command"><strong>"none"</strong></span> disables the checks.
</p>
</dd>
<dt><span class="term">-f <em class="replaceable"><code>format</code></em></span></dt>
<dd>
<p>
Specify the format of the zone file.
Possible formats are <span class="command"><strong>"text"</strong></span> (default),
<span class="command"><strong>"raw"</strong></span>, and <span class="command"><strong>"map"</strong></span>.
</p>
</dd>
<dt><span class="term">-F <em class="replaceable"><code>format</code></em></span></dt>
<dd>
<p>
Specify the format of the output file specified.
For <span class="command"><strong>named-checkzone</strong></span>,
this does not cause any effects unless it dumps the zone
contents.
</p>
<p>
Possible formats are <span class="command"><strong>"text"</strong></span> (default),
which is the standard textual representation of the zone,
and <span class="command"><strong>"map"</strong></span>, <span class="command"><strong>"raw"</strong></span>,
and <span class="command"><strong>"raw=N"</strong></span>, which store the zone in a
binary format for rapid loading by <span class="command"><strong>named</strong></span>.
<span class="command"><strong>"raw=N"</strong></span> specifies the format version of
the raw zone file: if N is 0, the raw file can be read by
any version of <span class="command"><strong>named</strong></span>; if N is 1, the file
can be read by release 9.9.0 or higher; the default is 1.
</p>
</dd>
<dt><span class="term">-k <em class="replaceable"><code>mode</code></em></span></dt>
<dd>
<p>
Perform <span class="command"><strong>"check-names"</strong></span> checks with the
specified failure mode.
Possible modes are <span class="command"><strong>"fail"</strong></span>
(default for <span class="command"><strong>named-compilezone</strong></span>),
<span class="command"><strong>"warn"</strong></span>
(default for <span class="command"><strong>named-checkzone</strong></span>) and
<span class="command"><strong>"ignore"</strong></span>.
</p>
</dd>
<dt><span class="term">-l <em class="replaceable"><code>ttl</code></em></span></dt>
<dd>
<p>
Sets a maximum permissible TTL for the input file.
Any record with a TTL higher than this value will cause
the zone to be rejected. This is similar to using the
<span class="command"><strong>max-zone-ttl</strong></span> option in
<code class="filename">named.conf</code>.
</p>
</dd>
<dt><span class="term">-L <em class="replaceable"><code>serial</code></em></span></dt>
<dd>
<p>
When compiling a zone to "raw" or "map" format, set the
"source serial" value in the header to the specified serial
number. (This is expected to be used primarily for testing
purposes.)
</p>
</dd>
<dt><span class="term">-m <em class="replaceable"><code>mode</code></em></span></dt>
<dd>
<p>
Specify whether MX records should be checked to see if they
are addresses. Possible modes are <span class="command"><strong>"fail"</strong></span>,
<span class="command"><strong>"warn"</strong></span> (default) and
<span class="command"><strong>"ignore"</strong></span>.
</p>
</dd>
<dt><span class="term">-M <em class="replaceable"><code>mode</code></em></span></dt>
<dd>
<p>
Check if a MX record refers to a CNAME.
Possible modes are <span class="command"><strong>"fail"</strong></span>,
<span class="command"><strong>"warn"</strong></span> (default) and
<span class="command"><strong>"ignore"</strong></span>.
</p>
</dd>
<dt><span class="term">-n <em class="replaceable"><code>mode</code></em></span></dt>
<dd>
<p>
Specify whether NS records should be checked to see if they
are addresses.
Possible modes are <span class="command"><strong>"fail"</strong></span>
(default for <span class="command"><strong>named-compilezone</strong></span>),
<span class="command"><strong>"warn"</strong></span>
(default for <span class="command"><strong>named-checkzone</strong></span>) and
<span class="command"><strong>"ignore"</strong></span>.
</p>
</dd>
<dt><span class="term">-o <em class="replaceable"><code>filename</code></em></span></dt>
<dd>
<p>
Write zone output to <code class="filename">filename</code>.
If <code class="filename">filename</code> is <code class="filename">-</code> then
write to standard out.
This is mandatory for <span class="command"><strong>named-compilezone</strong></span>.
</p>
</dd>
<dt><span class="term">-r <em class="replaceable"><code>mode</code></em></span></dt>
<dd>
<p>
Check for records that are treated as different by DNSSEC but
are semantically equal in plain DNS.
Possible modes are <span class="command"><strong>"fail"</strong></span>,
<span class="command"><strong>"warn"</strong></span> (default) and
<span class="command"><strong>"ignore"</strong></span>.
</p>
</dd>
<dt><span class="term">-s <em class="replaceable"><code>style</code></em></span></dt>
<dd>
<p>
Specify the style of the dumped zone file.
Possible styles are <span class="command"><strong>"full"</strong></span> (default)
and <span class="command"><strong>"relative"</strong></span>.
The full format is most suitable for processing
automatically by a separate script.
On the other hand, the relative format is more
human-readable and is thus suitable for editing by hand.
For <span class="command"><strong>named-checkzone</strong></span>
this does not cause any effects unless it dumps the zone
contents.
It also does not have any meaning if the output format
is not text.
</p>
</dd>
<dt><span class="term">-S <em class="replaceable"><code>mode</code></em></span></dt>
<dd>
<p>
Check if a SRV record refers to a CNAME.
Possible modes are <span class="command"><strong>"fail"</strong></span>,
<span class="command"><strong>"warn"</strong></span> (default) and
<span class="command"><strong>"ignore"</strong></span>.
</p>
</dd>
<dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
<dd>
<p>
Chroot to <code class="filename">directory</code> so that
include
directives in the configuration file are processed as if
run by a similarly chrooted <span class="command"><strong>named</strong></span>.
</p>
</dd>
<dt><span class="term">-T <em class="replaceable"><code>mode</code></em></span></dt>
<dd>
<p>
Check if Sender Policy Framework (SPF) records exist
and issues a warning if an SPF-formatted TXT record is
not also present. Possible modes are <span class="command"><strong>"warn"</strong></span>
(default), <span class="command"><strong>"ignore"</strong></span>.
</p>
</dd>
<dt><span class="term">-w <em class="replaceable"><code>directory</code></em></span></dt>
<dd>
<p>
chdir to <code class="filename">directory</code> so that
relative
filenames in master file $INCLUDE directives work. This
is similar to the directory clause in
<code class="filename">named.conf</code>.
</p>
</dd>
<dt><span class="term">-D</span></dt>
<dd>
<p>
Dump zone file in canonical format.
This is always enabled for <span class="command"><strong>named-compilezone</strong></span>.
</p>
</dd>
<dt><span class="term">-W <em class="replaceable"><code>mode</code></em></span></dt>
<dd>
<p>
Specify whether to check for non-terminal wildcards.
Non-terminal wildcards are almost always the result of a
failure to understand the wildcard matching algorithm (RFC 1034).
Possible modes are <span class="command"><strong>"warn"</strong></span> (default)
and
<span class="command"><strong>"ignore"</strong></span>.
</p>
</dd>
<dt><span class="term">zonename</span></dt>
<dd>
<p>
The domain name of the zone being checked.
</p>
</dd>
<dt><span class="term">filename</span></dt>
<dd>
<p>
The name of the zone file.
</p>
</dd>
</dl></div>
</div>
<div class="refsection">
<a name="id-1.9"></a><h2>RETURN VALUES</h2>
<p><span class="command"><strong>named-checkzone</strong></span>
returns an exit status of 1 if
errors were detected and 0 otherwise.
</p>
</div>
<div class="refsection">
<a name="id-1.10"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry">
<span class="refentrytitle">named</span>(8)
</span>,
<span class="citerefentry">
<span class="refentrytitle">named-checkconf</span>(8)
</span>,
<em class="citetitle">RFC 1035</em>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>.
</p>
</div>
</div></body>
</html>

View File

@@ -1,231 +0,0 @@
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
.. BEWARE: Do not forget to edit also named-compilezone.rst!
.. iscman:: named-checkzone
.. program:: named-checkzone
.. _man_named-checkzone:
named-checkzone - zone file validation tool
-------------------------------------------
Synopsis
~~~~~~~~
:program:`named-checkzone` [**-d**] [**-h**] [**-j**] [**-q**] [**-v**] [**-c** class] [**-C** mode] [**-f** format] [**-F** format] [**-J** filename] [**-i** mode] [**-k** mode] [**-m** mode] [**-M** mode] [**-n** mode] [**-l** ttl] [**-L** serial] [**-o** filename] [**-r** mode] [**-s** style] [**-S** mode] [**-t** directory] [**-T** mode] [**-w** directory] [**-D**] [**-W** mode] {zonename} {filename}
Description
~~~~~~~~~~~
:program:`named-checkzone` checks the syntax and integrity of a zone file. It
performs the same checks as :iscman:`named` does when loading a zone. This
makes :program:`named-checkzone` useful for checking zone files before
configuring them into a name server.
Options
~~~~~~~
.. option:: -d
This option enables debugging.
.. option:: -h
This option prints the usage summary and exits.
.. option:: -q
This option sets quiet mode, which only sets an exit code to indicate
successful or failed completion.
.. option:: -v
This option prints the version of the :program:`named-checkzone` program and exits.
.. option:: -j
When loading a zone file, this option tells :iscman:`named` to read the journal if it exists. The journal
file name is assumed to be the zone file name with the
string ``.jnl`` appended.
.. option:: -J filename
When loading the zone file, this option tells :iscman:`named` to read the journal from the given file, if
it exists. This implies :option:`-j`.
.. option:: -c class
This option specifies the class of the zone. If not specified, ``IN`` is assumed.
.. option:: -C mode
This option controls check mode on zone files when loading.
Possible modes are ``check-svcb:fail`` and ``check-svcb:ignore``.
``check-svcb:fail`` turns on additional checks on ``_dns`` SVCB
records and ``check-svcb:ignore`` disables these checks. The
default is ``check-svcb:fail``.
.. option:: -i mode
This option performs post-load zone integrity checks. Possible modes are
``full`` (the default), ``full-sibling``, ``local``,
``local-sibling``, and ``none``.
Mode ``full`` checks that MX records refer to A or AAAA records
(both in-zone and out-of-zone hostnames). Mode ``local`` only
checks MX records which refer to in-zone hostnames.
Mode ``full`` checks that SRV records refer to A or AAAA records
(both in-zone and out-of-zone hostnames). Mode ``local`` only
checks SRV records which refer to in-zone hostnames.
Mode ``full`` checks that delegation NS records refer to A or AAAA
records (both in-zone and out-of-zone hostnames). It also checks that
glue address records in the zone match those advertised by the child.
Mode ``local`` only checks NS records which refer to in-zone
hostnames or verifies that some required glue exists, i.e., when the
name server is in a child zone.
Modes ``full-sibling`` and ``local-sibling`` disable sibling glue
checks, but are otherwise the same as ``full`` and ``local``,
respectively.
Mode ``none`` disables the checks.
.. option:: -f format
This option specifies the format of the zone file. Possible formats are
``text`` (the default), and ``raw``.
.. option:: -F format
This option specifies the format of the output file specified. For
:program:`named-checkzone`, this does not have any effect unless it dumps
the zone contents.
Possible formats are ``text`` (the default), which is the standard
textual representation of the zone, and ``raw`` and ``raw=N``, which
store the zone in a binary format for rapid loading by :iscman:`named`.
``raw=N`` specifies the format version of the raw zone file: if ``N`` is
0, the raw file can be read by any version of :iscman:`named`; if N is 1, the
file can only be read by release 9.9.0 or higher. The default is 1.
.. option:: -k mode
This option performs ``check-names`` checks with the specified failure mode.
Possible modes are ``fail``, ``warn`` (the default), and ``ignore``.
.. option:: -l ttl
This option sets a maximum permissible TTL for the input file. Any record with a
TTL higher than this value causes the zone to be rejected. This
is similar to using the ``max-zone-ttl`` option in :iscman:`named.conf`.
.. option:: -L serial
When compiling a zone to ``raw`` format, this option sets the "source
serial" value in the header to the specified serial number. This is
expected to be used primarily for testing purposes.
.. option:: -m mode
This option specifies whether MX records should be checked to see if they are
addresses. Possible modes are ``fail``, ``warn`` (the default), and
``ignore``.
.. option:: -M mode
This option checks whether a MX record refers to a CNAME. Possible modes are
``fail``, ``warn`` (the default), and ``ignore``.
.. option:: -n mode
This option specifies whether NS records should be checked to see if they are
addresses. Possible modes are ``fail``, ``warn`` (the default), and ``ignore``.
.. option:: -o filename
This option writes the zone output to ``filename``. If ``filename`` is ``-``, then
the zone output is written to standard output.
.. option:: -r mode
This option checks for records that are treated as different by DNSSEC but are
semantically equal in plain DNS. Possible modes are ``fail``,
``warn`` (the default), and ``ignore``.
.. option:: -s style
This option specifies the style of the dumped zone file. Possible styles are
``full`` (the default) and ``relative``. The ``full`` format is most
suitable for processing automatically by a separate script.
The relative format is more human-readable and is thus
suitable for editing by hand. This does not have any effect unless it dumps
the zone contents. It also does not have any meaning if the output format
is not text.
.. option:: -S mode
This option checks whether an SRV record refers to a CNAME. Possible modes are
``fail``, ``warn`` (the default), and ``ignore``.
.. option:: -t directory
This option tells :iscman:`named` to chroot to ``directory``, so that ``include`` directives in the
configuration file are processed as if run by a similarly chrooted
:iscman:`named`.
.. option:: -T mode
This option checks whether Sender Policy Framework (SPF) records exist and issues a
warning if an SPF-formatted TXT record is not also present. Possible
modes are ``warn`` (the default) and ``ignore``.
.. option:: -w directory
This option instructs :iscman:`named` to chdir to ``directory``, so that relative filenames in master file
``$INCLUDE`` directives work. This is similar to the directory clause in
:iscman:`named.conf`.
.. option:: -D
This option dumps the zone file in canonical format.
.. option:: -W mode
This option specifies whether to check for non-terminal wildcards. Non-terminal
wildcards are almost always the result of a failure to understand the
wildcard matching algorithm (:rfc:`4592`). Possible modes are ``warn``
(the default) and ``ignore``.
.. option:: zonename
This indicates the domain name of the zone being checked.
.. option:: filename
This is the name of the zone file.
Return Values
~~~~~~~~~~~~~
:program:`named-checkzone` returns an exit status of 1 if errors were detected
and 0 otherwise.
See Also
~~~~~~~~
:iscman:`named(8) <named>`, :iscman:`named-checkconf(8) <named-checkconf>`, :iscman:`named-compilezone(8) <named-compilezone>`, :rfc:`1035`, BIND 9 Administrator Reference
Manual.

View File

@@ -1,233 +0,0 @@
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
.. BEWARE: Do not forget to edit also named-checkzone.rst!
.. iscman:: named-compilezone
.. program:: named-compilezone
.. _man_named-compilezone:
named-compilezone - zone file converting tool
---------------------------------------------
Synopsis
~~~~~~~~
:program:`named-compilezone` [**-d**] [**-h**] [**-j**] [**-q**] [**-v**] [**-c** class] [**-C** mode] [**-f** format] [**-F** format] [**-J** filename] [**-i** mode] [**-k** mode] [**-m** mode] [**-M** mode] [**-n** mode] [**-l** ttl] [**-L** serial] [**-r** mode] [**-s** style] [**-S** mode] [**-t** directory] [**-T** mode] [**-w** directory] [**-D**] [**-W** mode] {**-o** filename} {zonename} {filename}
Description
~~~~~~~~~~~
:program:`named-compilezone` checks the syntax and integrity of a zone file,
and dumps the zone contents to a specified file in a specified format.
It applies strict check levels by default, since the
dump output is used as an actual zone file loaded by :iscman:`named`.
When manually specified otherwise, the check levels must at least be as
strict as those specified in the :iscman:`named` configuration file.
Options
~~~~~~~
.. option:: -d
This option enables debugging.
.. option:: -h
This option prints the usage summary and exits.
.. option:: -q
This option sets quiet mode, which only sets an exit code to indicate
successful or failed completion.
.. option:: -v
This option prints the version of the :iscman:`named-checkzone` program and exits.
.. option:: -j
When loading a zone file, this option tells :iscman:`named` to read the journal if it exists. The journal
file name is assumed to be the zone file name with the
string ``.jnl`` appended.
.. option:: -J filename
When loading the zone file, this option tells :iscman:`named` to read the journal from the given file, if
it exists. This implies :option:`-j`.
.. option:: -c class
This option specifies the class of the zone. If not specified, ``IN`` is assumed.
.. option:: -C mode
This option controls check mode on zone files when loading.
Possible modes are ``check-svcb:fail`` and ``check-svcb:ignore``.
``check-svcb:fail`` turns on additional checks on ``_dns`` SVCB
records and ``check-svcb:ignore`` disables these checks. The
default is ``check-svcb:fail``.
.. option:: -i mode
This option performs post-load zone integrity checks. Possible modes are
``full`` (the default), ``full-sibling``, ``local``,
``local-sibling``, and ``none``.
Mode ``full`` checks that MX records refer to A or AAAA records
(both in-zone and out-of-zone hostnames). Mode ``local`` only
checks MX records which refer to in-zone hostnames.
Mode ``full`` checks that SRV records refer to A or AAAA records
(both in-zone and out-of-zone hostnames). Mode ``local`` only
checks SRV records which refer to in-zone hostnames.
Mode ``full`` checks that delegation NS records refer to A or AAAA
records (both in-zone and out-of-zone hostnames). It also checks that
glue address records in the zone match those advertised by the child.
Mode ``local`` only checks NS records which refer to in-zone
hostnames or verifies that some required glue exists, i.e., when the
name server is in a child zone.
Modes ``full-sibling`` and ``local-sibling`` disable sibling glue
checks, but are otherwise the same as ``full`` and ``local``,
respectively.
Mode ``none`` disables the checks.
.. option:: -f format
This option specifies the format of the zone file. Possible formats are
``text`` (the default), and ``raw``.
.. option:: -F format
This option specifies the format of the output file specified. For
:iscman:`named-checkzone`, this does not have any effect unless it dumps
the zone contents.
Possible formats are ``text`` (the default), which is the standard
textual representation of the zone, and ``raw`` and ``raw=N``, which
store the zone in a binary format for rapid loading by :iscman:`named`.
``raw=N`` specifies the format version of the raw zone file: if ``N`` is
0, the raw file can be read by any version of :iscman:`named`; if N is 1, the
file can only be read by release 9.9.0 or higher. The default is 1.
.. option:: -k mode
This option performs ``check-names`` checks with the specified failure mode.
Possible modes are ``fail`` (the default), ``warn``, and ``ignore``.
.. option:: -l ttl
This option sets a maximum permissible TTL for the input file. Any record with a
TTL higher than this value causes the zone to be rejected. This
is similar to using the ``max-zone-ttl`` option in :iscman:`named.conf`.
.. option:: -L serial
When compiling a zone to ``raw`` format, this option sets the "source
serial" value in the header to the specified serial number. This is
expected to be used primarily for testing purposes.
.. option:: -m mode
This option specifies whether MX records should be checked to see if they are
addresses. Possible modes are ``fail``, ``warn`` (the default), and
``ignore``.
.. option:: -M mode
This option checks whether a MX record refers to a CNAME. Possible modes are
``fail``, ``warn`` (the default), and ``ignore``.
.. option:: -n mode
This option specifies whether NS records should be checked to see if they are
addresses. Possible modes are ``fail`` (the default), ``warn``, and
``ignore``.
.. option:: -o filename
This option writes the zone output to ``filename``. If ``filename`` is ``-``, then
the zone output is written to standard output. This is mandatory for :program:`named-compilezone`.
.. option:: -r mode
This option checks for records that are treated as different by DNSSEC but are
semantically equal in plain DNS. Possible modes are ``fail``,
``warn`` (the default), and ``ignore``.
.. option:: -s style
This option specifies the style of the dumped zone file. Possible styles are
``full`` (the default) and ``relative``. The ``full`` format is most
suitable for processing automatically by a separate script.
The relative format is more human-readable and is thus
suitable for editing by hand.
.. option:: -S mode
This option checks whether an SRV record refers to a CNAME. Possible modes are
``fail``, ``warn`` (the default), and ``ignore``.
.. option:: -t directory
This option tells :iscman:`named` to chroot to ``directory``, so that ``include`` directives in the
configuration file are processed as if run by a similarly chrooted
:iscman:`named`.
.. option:: -T mode
This option checks whether Sender Policy Framework (SPF) records exist and issues a
warning if an SPF-formatted TXT record is not also present. Possible
modes are ``warn`` (the default) and ``ignore``.
.. option:: -w directory
This option instructs :iscman:`named` to chdir to ``directory``, so that relative filenames in master file
``$INCLUDE`` directives work. This is similar to the directory clause in
:iscman:`named.conf`.
.. option:: -D
This option dumps the zone file in canonical format. This is always enabled for
:program:`named-compilezone`.
.. option:: -W mode
This option specifies whether to check for non-terminal wildcards. Non-terminal
wildcards are almost always the result of a failure to understand the
wildcard matching algorithm (:rfc:`4592`). Possible modes are ``warn``
(the default) and ``ignore``.
.. option:: zonename
This indicates the domain name of the zone being checked.
.. option:: filename
This is the name of the zone file.
Return Values
~~~~~~~~~~~~~
:program:`named-compilezone` returns an exit status of 1 if errors were detected
and 0 otherwise.
See Also
~~~~~~~~
:iscman:`named(8) <named>`, :iscman:`named-checkconf(8) <named-checkconf>`, :iscman:`named-checkzone(8) <named-checkzone>`, :rfc:`1035`,
BIND 9 Administrator Reference Manual.

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\check-tool.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\named-checkconf.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
<Platform>@PLATFORM@</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|@PLATFORM@">
<Configuration>Release</Configuration>
<Platform>@PLATFORM@</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{03A96113-CB14-43AA-AEB2-48950E3915C5}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>checkconf</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
<LinkIncremental>true</LinkIncremental>
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
<IntDir>.\$(Configuration)\</IntDir>
<TargetName>named-$(ProjectName)</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
<LinkIncremental>false</LinkIncremental>
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
<IntDir>.\$(Configuration)\</IntDir>
<TargetName>named-$(ProjectName)</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;..\..\..\lib\bind9\include;..\..\..\lib\isccfg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\isccc\win32\$(Configuration);..\..\..\lib\bind9\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libisccc.lib;libbind9.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\check-tool.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\named-checkconf.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\check-tool.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
<Platform>@PLATFORM@</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|@PLATFORM@">
<Configuration>Release</Configuration>
<Platform>@PLATFORM@</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\check-tool.c" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{2C1F7096-C5B5-48D4-846F-A7ACA454335D}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>checktool</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
<OutDir>.\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
<IntDir>.\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
<OutDir>.\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
<IntDir>.\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\ns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Lib>
<OutputFile>.\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\include;..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\isccfg\include;..\..\..\lib\dns\include;..\..\..\lib\ns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Lib>
<OutputFile>.\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
</Lib>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\check-tool.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\named-checkzone.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,129 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="@TOOLS_VERSION@" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
<Platform>@PLATFORM@</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|@PLATFORM@">
<Configuration>Release</Configuration>
<Platform>@PLATFORM@</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{66028555-7DD5-4016-B601-9EF9A1EE8BFA}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>checkzone</RootNamespace>
@WINDOWS_TARGET_PLATFORM_VERSION@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
@PLATFORM_TOOLSET@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
<LinkIncremental>true</LinkIncremental>
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
<IntDir>.\$(Configuration)\</IntDir>
<TargetName>named-$(ProjectName)</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
<LinkIncremental>false</LinkIncremental>
<OutDir>..\..\..\Build\$(Configuration)\</OutDir>
<IntDir>.\$(Configuration)\</IntDir>
<TargetName>named-$(ProjectName)</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>cd ..\..\..\Build\$(Configuration)
copy /Y named-checkzone.exe named-compilezone.exe
copy /Y named-checkzone.ilk named-compilezone.ilk
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<AdditionalIncludeDirectories>.\;..\..\..\;@LIBXML2_INC@@OPENSSL_INC@..\..\..\lib\isc\win32;..\..\..\lib\isc\win32\include;..\..\..\lib\isc\include;..\..\..\lib\dns\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>$(Configuration);..\..\..\lib\isc\win32\$(Configuration);..\..\..\lib\dns\win32\$(Configuration);..\..\..\lib\isccfg\win32\$(Configuration);..\..\..\lib\ns\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@OPENSSL_LIB@checktool.lib;libisc.lib;libdns.lib;libisccfg.lib;libns.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link>
<PostBuildEvent>
<Command>cd ..\..\..\Build\$(Configuration)
copy /Y named-checkzone.exe named-compilezone.exe
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\check-tool.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\named-checkzone.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>

View File

@@ -1,30 +0,0 @@
include $(top_srcdir)/Makefile.top
AM_CPPFLAGS += \
$(LIBISC_CFLAGS) \
$(LIBDNS_CFLAGS) \
-DRNDC_KEYFILE=\"${sysconfdir}/rndc.key\"
LDADD += \
libconfgen.la \
$(LIBISC_LIBS) \
$(LIBDNS_LIBS)
noinst_LTLIBRARIES = libconfgen.la
libconfgen_la_SOURCES = \
include/confgen/os.h \
keygen.c \
keygen.h \
os.c \
util.c \
util.h
sbin_PROGRAMS = tsig-keygen rndc-confgen
install-exec-hook:
ln -f $(DESTDIR)$(sbindir)/tsig-keygen \
$(DESTDIR)$(sbindir)/ddns-confgen
uninstall-hook:
-rm -f $(DESTDIR)$(sbindir)/ddns-confgen

113
bin/confgen/Makefile.in Normal file
View File

@@ -0,0 +1,113 @@
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
# Attempt to disable parallel processing.
.NOTPARALLEL:
.NO_PARALLEL:
VERSION=@BIND9_VERSION@
@BIND9_MAKE_INCLUDES@
CINCLUDES = -I${srcdir}/include ${ISC_INCLUDES} ${ISCCC_INCLUDES} \
${ISCCFG_INCLUDES} ${DNS_INCLUDES} ${BIND9_INCLUDES}
CDEFINES =
CWARNINGS =
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
BIND9LIBS = ../../lib/bind9/libbind9.@A@
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
ISCCCDEPLIBS = ../../lib/isccc/libisccc.@A@
ISCDEPLIBS = ../../lib/isc/libisc.@A@
DNSDEPLIBS = ../../lib/dns/libdns.@A@
BIND9DEPLIBS = ../../lib/bind9/libbind9.@A@
RNDCLIBS = ${ISCCFGLIBS} ${ISCCCLIBS} ${BIND9LIBS} ${DNSLIBS} ${ISCLIBS} @LIBS@
RNDCDEPLIBS = ${ISCCFGDEPLIBS} ${ISCCCDEPLIBS} ${BIND9DEPLIBS} ${DNSDEPLIBS} ${ISCDEPLIBS}
LIBS = ${DNSLIBS} ${ISCLIBS} @LIBS@
NOSYMLIBS = ${DNSLIBS} ${ISCNOSYMLIBS} @LIBS@
CONFDEPLIBS = ${DNSDEPLIBS} ${ISCDEPLIBS}
SRCS= rndc-confgen.c ddns-confgen.c
SUBDIRS = unix
TARGETS = rndc-confgen@EXEEXT@ ddns-confgen@EXEEXT@ tsig-keygen@EXEEXT@
MANPAGES = rndc-confgen.8 ddns-confgen.8
HTMLPAGES = rndc-confgen.html ddns-confgen.html
MANOBJS = ${MANPAGES} ${HTMLPAGES}
UOBJS = unix/os.@O@
@BIND9_MAKE_RULES@
rndc-confgen.@O@: rndc-confgen.c
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
-DRNDC_KEYFILE=\"${sysconfdir}/rndc.key\" \
-c ${srcdir}/rndc-confgen.c
ddns-confgen.@O@: ddns-confgen.c
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c ${srcdir}/ddns-confgen.c
rndc-confgen@EXEEXT@: rndc-confgen.@O@ util.@O@ keygen.@O@ ${CONFDEPLIBS}
export BASEOBJS="rndc-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS}"; \
${FINALBUILDCMD}
ddns-confgen@EXEEXT@: ddns-confgen.@O@ util.@O@ keygen.@O@ ${CONFDEPLIBS}
export BASEOBJS="ddns-confgen.@O@ util.@O@ keygen.@O@ ${UOBJS}"; \
${FINALBUILDCMD}
# make a link in the build directory to assist with testing
tsig-keygen@EXEEXT@: ddns-confgen@EXEEXT@
rm -f tsig-keygen@EXEEXT@
${LINK_PROGRAM} ddns-confgen@EXEEXT@ tsig-keygen@EXEEXT@
doc man:: ${MANOBJS}
docclean manclean maintainer-clean::
rm -f ${MANOBJS}
installdirs:
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${sbindir}
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
install:: rndc-confgen@EXEEXT@ ddns-confgen@EXEEXT@ installdirs
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} rndc-confgen@EXEEXT@ ${DESTDIR}${sbindir}
${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} ddns-confgen@EXEEXT@ ${DESTDIR}${sbindir}
${INSTALL_DATA} ${srcdir}/rndc-confgen.8 ${DESTDIR}${mandir}/man8
${INSTALL_DATA} ${srcdir}/ddns-confgen.8 ${DESTDIR}${mandir}/man8
(cd ${DESTDIR}${sbindir}; rm -f tsig-keygen@EXEEXT@; ${LINK_PROGRAM} ddns-confgen@EXEEXT@ tsig-keygen@EXEEXT@)
(cd ${DESTDIR}${mandir}/man8; rm -f tsig-keygen.8; ${LINK_PROGRAM} ddns-confgen.8 tsig-keygen.8)
uninstall::
rm -f ${DESTDIR}${mandir}/man8/tsig-keygen.8
rm -f ${DESTDIR}${sbindir}/tsig-keygen@EXEEXT@
rm -f ${DESTDIR}${mandir}/man8/ddns-confgen.8
rm -f ${DESTDIR}${mandir}/man8/rndc-confgen.8
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/ddns-confgen@EXEEXT@
${LIBTOOL_MODE_UNINSTALL} rm -f ${DESTDIR}${sbindir}/rndc-confgen@EXEEXT@
clean distclean maintainer-clean::
rm -f ${TARGETS}

148
bin/confgen/ddns-confgen.8 Normal file
View File

@@ -0,0 +1,148 @@
.\" Copyright (C) 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
.\"
.\" This Source Code Form is subject to the terms of the Mozilla Public
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
.\" file, You can obtain one at http://mozilla.org/MPL/2.0/.
.\"
.hy 0
.ad l
'\" t
.\" Title: ddns-confgen
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 2014-03-06
.\" Manual: BIND9
.\" Source: ISC
.\" Language: English
.\"
.TH "DDNS\-CONFGEN" "8" "2014\-03\-06" "ISC" "BIND9"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ddns-confgen \- ddns key generation tool
.SH "SYNOPSIS"
.HP \w'\fBtsig\-keygen\fR\ 'u
\fBtsig\-keygen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-h\fR] [name]
.HP \w'\fBddns\-confgen\fR\ 'u
\fBddns\-confgen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkeyname\fR\fR] [\fB\-q\fR] [\fB\-r\ \fR\fB\fIrandomfile\fR\fR] [\-s\ \fIname\fR | \-z\ \fIzone\fR]
.SH "DESCRIPTION"
.PP
\fBtsig\-keygen\fR
and
\fBddns\-confgen\fR
are invocation methods for a utility that generates keys for use in TSIG signing\&. The resulting keys can be used, for example, to secure dynamic DNS updates to a zone or for the
\fBrndc\fR
command channel\&.
.PP
When run as
\fBtsig\-keygen\fR, a domain name can be specified on the command line which will be used as the name of the generated key\&. If no name is specified, the default is
\fBtsig\-key\fR\&.
.PP
When run as
\fBddns\-confgen\fR, the generated key is accompanied by configuration text and instructions that can be used with
\fBnsupdate\fR
and
\fBnamed\fR
when setting up dynamic DNS, including an example
\fBupdate\-policy\fR
statement\&. (This usage similar to the
\fBrndc\-confgen\fR
command for setting up command channel security\&.)
.PP
Note that
\fBnamed\fR
itself can configure a local DDNS key for use with
\fBnsupdate \-l\fR: it does this when a zone is configured with
\fBupdate\-policy local;\fR\&.
\fBddns\-confgen\fR
is only needed when a more elaborate configuration is required: for instance, if
\fBnsupdate\fR
is to be used from a remote system\&.
.SH "OPTIONS"
.PP
\-a \fIalgorithm\fR
.RS 4
Specifies the algorithm to use for the TSIG key\&. Available choices are: hmac\-md5, hmac\-sha1, hmac\-sha224, hmac\-sha256, hmac\-sha384 and hmac\-sha512\&. The default is hmac\-sha256\&. Options are case\-insensitive, and the "hmac\-" prefix may be omitted\&.
.RE
.PP
\-h
.RS 4
Prints a short summary of options and arguments\&.
.RE
.PP
\-k \fIkeyname\fR
.RS 4
Specifies the key name of the DDNS authentication key\&. The default is
\fBddns\-key\fR
when neither the
\fB\-s\fR
nor
\fB\-z\fR
option is specified; otherwise, the default is
\fBddns\-key\fR
as a separate label followed by the argument of the option, e\&.g\&.,
\fBddns\-key\&.example\&.com\&.\fR
The key name must have the format of a valid domain name, consisting of letters, digits, hyphens and periods\&.
.RE
.PP
\-q
.RS 4
(\fBddns\-confgen\fR
only\&.) Quiet mode: Print only the key, with no explanatory text or usage examples; This is essentially identical to
\fBtsig\-keygen\fR\&.
.RE
.PP
\-s \fIname\fR
.RS 4
(\fBddns\-confgen\fR
only\&.) Generate configuration example to allow dynamic updates of a single hostname\&. The example
\fBnamed\&.conf\fR
text shows how to set an update policy for the specified
\fIname\fR
using the "name" nametype\&. The default key name is ddns\-key\&.\fIname\fR\&. Note that the "self" nametype cannot be used, since the name to be updated may differ from the key name\&. This option cannot be used with the
\fB\-z\fR
option\&.
.RE
.PP
\-z \fIzone\fR
.RS 4
(\fBddns\-confgen\fR
only\&.) Generate configuration example to allow dynamic updates of a zone: The example
\fBnamed\&.conf\fR
text shows how to set an update policy for the specified
\fIzone\fR
using the "zonesub" nametype, allowing updates to all subdomain names within that
\fIzone\fR\&. This option cannot be used with the
\fB\-s\fR
option\&.
.RE
.SH "SEE ALSO"
.PP
\fBnsupdate\fR(1),
\fBnamed.conf\fR(5),
\fBnamed\fR(8),
BIND 9 Administrator Reference Manual\&.
.SH "AUTHOR"
.PP
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
.br

301
bin/confgen/ddns-confgen.c Normal file
View File

@@ -0,0 +1,301 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
/**
* ddns-confgen generates configuration files for dynamic DNS. It can
* be used as a convenient alternative to writing the ddns.key file
* and the corresponding key and update-policy statements in named.conf.
*/
#include <config.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h>
#include <isc/assertions.h>
#include <isc/base64.h>
#include <isc/buffer.h>
#include <isc/commandline.h>
#include <isc/file.h>
#include <isc/mem.h>
#include <isc/net.h>
#include <isc/print.h>
#include <isc/result.h>
#include <isc/string.h>
#include <isc/time.h>
#include <isc/util.h>
#if USE_PKCS11
#include <pk11/result.h>
#endif
#include <dns/keyvalues.h>
#include <dns/name.h>
#include <dns/result.h>
#include <dst/dst.h>
#include <confgen/os.h>
#include "util.h"
#include "keygen.h"
#define KEYGEN_DEFAULT "tsig-key"
#define CONFGEN_DEFAULT "ddns-key"
static char program[256];
const char *progname;
static enum { progmode_keygen, progmode_confgen} progmode;
bool verbose = false; /* needed by util.c but not used here */
ISC_PLATFORM_NORETURN_PRE static void
usage(int status) ISC_PLATFORM_NORETURN_POST;
static void
usage(int status) {
if (progmode == progmode_confgen) {
fprintf(stderr, "\
Usage:\n\
%s [-a alg] [-k keyname] [-q] [-s name | -z zone]\n\
-a alg: algorithm (default hmac-sha256)\n\
-k keyname: name of the key as it will be used in named.conf\n\
-s name: domain name to be updated using the created key\n\
-z zone: name of the zone as it will be used in named.conf\n\
-q: quiet mode: print the key, with no explanatory text\n",
progname);
} else {
fprintf(stderr, "\
Usage:\n\
%s [-a alg] [keyname]\n\
-a alg: algorithm (default hmac-sha256)\n\n",
progname);
}
exit (status);
}
int
main(int argc, char **argv) {
isc_result_t result = ISC_R_SUCCESS;
bool show_final_mem = false;
bool quiet = false;
isc_buffer_t key_txtbuffer;
char key_txtsecret[256];
isc_mem_t *mctx = NULL;
const char *keyname = NULL;
const char *zone = NULL;
const char *self_domain = NULL;
char *keybuf = NULL;
dns_secalg_t alg = DST_ALG_HMACSHA256;
const char *algname;
int keysize = 256;
int len = 0;
int ch;
#if USE_PKCS11
pk11_result_register();
#endif
dns_result_register();
result = isc_file_progname(*argv, program, sizeof(program));
if (result != ISC_R_SUCCESS)
memmove(program, "tsig-keygen", 11);
progname = program;
/*
* Libtool doesn't preserve the program name prior to final
* installation. Remove the libtool prefix ("lt-").
*/
if (strncmp(progname, "lt-", 3) == 0)
progname += 3;
#define PROGCMP(X) \
(strcasecmp(progname, X) == 0 || strcasecmp(progname, X ".exe") == 0)
if (PROGCMP("tsig-keygen")) {
progmode = progmode_keygen;
quiet = true;
} else if (PROGCMP("ddns-confgen")) {
progmode = progmode_confgen;
} else {
INSIST(0);
ISC_UNREACHABLE();
}
isc_commandline_errprint = false;
while ((ch = isc_commandline_parse(argc, argv,
"a:hk:Mmr:qs:y:z:")) != -1) {
switch (ch) {
case 'a':
algname = isc_commandline_argument;
alg = alg_fromtext(algname);
if (alg == DST_ALG_UNKNOWN)
fatal("Unsupported algorithm '%s'", algname);
keysize = alg_bits(alg);
break;
case 'h':
usage(0);
case 'k':
case 'y':
if (progmode == progmode_confgen)
keyname = isc_commandline_argument;
else
usage(1);
break;
case 'M':
isc_mem_debugging = ISC_MEM_DEBUGTRACE;
break;
case 'm':
show_final_mem = true;
break;
case 'q':
if (progmode == progmode_confgen)
quiet = true;
else
usage(1);
break;
case 'r':
fatal("The -r option has been deprecated.");
break;
case 's':
if (progmode == progmode_confgen)
self_domain = isc_commandline_argument;
else
usage(1);
break;
case 'z':
if (progmode == progmode_confgen)
zone = isc_commandline_argument;
else
usage(1);
break;
case '?':
if (isc_commandline_option != '?') {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
usage(1);
} else
usage(0);
break;
default:
fprintf(stderr, "%s: unhandled option -%c\n",
program, isc_commandline_option);
exit(1);
}
}
if (progmode == progmode_keygen)
keyname = argv[isc_commandline_index++];
POST(argv);
if (self_domain != NULL && zone != NULL)
usage(1); /* -s and -z cannot coexist */
if (argc > isc_commandline_index)
usage(1);
/* Use canonical algorithm name */
algname = alg_totext(alg);
DO("create memory context", isc_mem_create(0, 0, &mctx));
if (keyname == NULL) {
const char *suffix = NULL;
keyname = ((progmode == progmode_keygen)
? KEYGEN_DEFAULT
: CONFGEN_DEFAULT);
if (self_domain != NULL)
suffix = self_domain;
else if (zone != NULL)
suffix = zone;
if (suffix != NULL) {
len = strlen(keyname) + strlen(suffix) + 2;
keybuf = isc_mem_get(mctx, len);
if (keybuf == NULL)
fatal("failed to allocate memory for keyname");
snprintf(keybuf, len, "%s.%s", keyname, suffix);
keyname = (const char *) keybuf;
}
}
isc_buffer_init(&key_txtbuffer, &key_txtsecret, sizeof(key_txtsecret));
generate_key(mctx, alg, keysize, &key_txtbuffer);
if (!quiet)
printf("\
# To activate this key, place the following in named.conf, and\n\
# in a separate keyfile on the system or systems from which nsupdate\n\
# will be run:\n");
printf("\
key \"%s\" {\n\
algorithm %s;\n\
secret \"%.*s\";\n\
};\n",
keyname, algname,
(int)isc_buffer_usedlength(&key_txtbuffer),
(char *)isc_buffer_base(&key_txtbuffer));
if (!quiet) {
if (self_domain != NULL) {
printf("\n\
# Then, in the \"zone\" statement for the zone containing the\n\
# name \"%s\", place an \"update-policy\" statement\n\
# like this one, adjusted as needed for your preferred permissions:\n\
update-policy {\n\
grant %s name %s ANY;\n\
};\n",
self_domain, keyname, self_domain);
} else if (zone != NULL) {
printf("\n\
# Then, in the \"zone\" definition statement for \"%s\",\n\
# place an \"update-policy\" statement like this one, adjusted as \n\
# needed for your preferred permissions:\n\
update-policy {\n\
grant %s zonesub ANY;\n\
};\n",
zone, keyname);
} else {
printf("\n\
# Then, in the \"zone\" statement for each zone you wish to dynamically\n\
# update, place an \"update-policy\" statement granting update permission\n\
# to this key. For example, the following statement grants this key\n\
# permission to update any name within the zone:\n\
update-policy {\n\
grant %s zonesub ANY;\n\
};\n",
keyname);
}
printf("\n\
# After the keyfile has been placed, the following command will\n\
# execute nsupdate using this key:\n\
nsupdate -k <keyfile>\n");
}
if (keybuf != NULL)
isc_mem_put(mctx, keybuf, len);
if (show_final_mem)
isc_mem_stats(mctx, stderr);
isc_mem_destroy(&mctx);
return (0);
}

View File

@@ -0,0 +1,213 @@
<!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.ddns-confgen">
<info>
<date>2014-03-06</date>
</info>
<refentryinfo>
<corpname>ISC</corpname>
<corpauthor>Internet Systems Consortium, Inc.</corpauthor>
</refentryinfo>
<refmeta>
<refentrytitle><application>ddns-confgen</application></refentrytitle>
<manvolnum>8</manvolnum>
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<refnamediv>
<refname><application>ddns-confgen</application></refname>
<refpurpose>ddns key generation tool</refpurpose>
</refnamediv>
<docinfo>
<copyright>
<year>2009</year>
<year>2014</year>
<year>2015</year>
<year>2016</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
<refsynopsisdiv>
<cmdsynopsis sepchar=" ">
<command>tsig-keygen</command>
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
<arg choice="opt" rep="norepeat">name</arg>
</cmdsynopsis>
<cmdsynopsis sepchar=" ">
<command>ddns-confgen</command>
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
<arg choice="opt" rep="norepeat"><option>-k <replaceable class="parameter">keyname</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-q</option></arg>
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">randomfile</replaceable></option></arg>
<group choice="opt" rep="norepeat">
<arg choice="plain" rep="norepeat">-s <replaceable class="parameter">name</replaceable></arg>
<arg choice="plain" rep="norepeat">-z <replaceable class="parameter">zone</replaceable></arg>
</group>
</cmdsynopsis>
</refsynopsisdiv>
<refsection><info><title>DESCRIPTION</title></info>
<para>
<command>tsig-keygen</command> and <command>ddns-confgen</command>
are invocation methods for a utility that generates keys for use
in TSIG signing. The resulting keys can be used, for example,
to secure dynamic DNS updates to a zone or for the
<command>rndc</command> command channel.
</para>
<para>
When run as <command>tsig-keygen</command>, a domain name
can be specified on the command line which will be used as
the name of the generated key. If no name is specified,
the default is <constant>tsig-key</constant>.
</para>
<para>
When run as <command>ddns-confgen</command>, the generated
key is accompanied by configuration text and instructions
that can be used with <command>nsupdate</command> and
<command>named</command> when setting up dynamic DNS,
including an example <command>update-policy</command>
statement. (This usage similar to the
<command>rndc-confgen</command> command for setting
up command channel security.)
</para>
<para>
Note that <command>named</command> itself can configure a
local DDNS key for use with <command>nsupdate -l</command>:
it does this when a zone is configured with
<command>update-policy local;</command>.
<command>ddns-confgen</command> is only needed when a
more elaborate configuration is required: for instance,
if <command>nsupdate</command> is to be used from a remote
system.
</para>
</refsection>
<refsection><info><title>OPTIONS</title></info>
<variablelist>
<varlistentry>
<term>-a <replaceable class="parameter">algorithm</replaceable></term>
<listitem>
<para>
Specifies the algorithm to use for the TSIG key. Available
choices are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256,
hmac-sha384 and hmac-sha512. The default is hmac-sha256.
Options are case-insensitive, and the "hmac-" prefix
may be omitted.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-h</term>
<listitem>
<para>
Prints a short summary of options and arguments.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-k <replaceable class="parameter">keyname</replaceable></term>
<listitem>
<para>
Specifies the key name of the DDNS authentication key.
The default is <constant>ddns-key</constant> when neither
the <option>-s</option> nor <option>-z</option> option is
specified; otherwise, the default
is <constant>ddns-key</constant> as a separate label
followed by the argument of the option, e.g.,
<constant>ddns-key.example.com.</constant>
The key name must have the format of a valid domain name,
consisting of letters, digits, hyphens and periods.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-q</term>
<listitem>
<para>
(<command>ddns-confgen</command> only.) Quiet mode: Print
only the key, with no explanatory text or usage examples;
This is essentially identical to <command>tsig-keygen</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-s <replaceable class="parameter">name</replaceable></term>
<listitem>
<para>
(<command>ddns-confgen</command> only.)
Generate configuration example to allow dynamic updates
of a single hostname. The example <command>named.conf</command>
text shows how to set an update policy for the specified
<replaceable class="parameter">name</replaceable>
using the "name" nametype. The default key name is
ddns-key.<replaceable class="parameter">name</replaceable>.
Note that the "self" nametype cannot be used, since
the name to be updated may differ from the key name.
This option cannot be used with the <option>-z</option> option.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-z <replaceable class="parameter">zone</replaceable></term>
<listitem>
<para>
(<command>ddns-confgen</command> only.)
Generate configuration example to allow dynamic updates
of a zone: The example <command>named.conf</command> text
shows how to set an update policy for the specified
<replaceable class="parameter">zone</replaceable>
using the "zonesub" nametype, allowing updates to
all subdomain names within that
<replaceable class="parameter">zone</replaceable>.
This option cannot be used with the <option>-s</option> option.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection><info><title>SEE ALSO</title></info>
<para><citerefentry>
<refentrytitle>nsupdate</refentrytitle><manvolnum>1</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>named.conf</refentrytitle><manvolnum>5</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
</para>
</refsection>
</refentry>

View File

@@ -0,0 +1,187 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2009, 2014-2016, 2018-2020 Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>ddns-confgen</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
<a name="man.ddns-confgen"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2>Name</h2>
<p>
<span class="application">ddns-confgen</span>
&#8212; ddns key generation tool
</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p>
<code class="command">tsig-keygen</code>
[<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>]
[<code class="option">-h</code>]
[name]
</p></div>
<div class="cmdsynopsis"><p>
<code class="command">ddns-confgen</code>
[<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>]
[<code class="option">-h</code>]
[<code class="option">-k <em class="replaceable"><code>keyname</code></em></code>]
[<code class="option">-q</code>]
[<code class="option">-r <em class="replaceable"><code>randomfile</code></em></code>]
[
-s <em class="replaceable"><code>name</code></em>
| -z <em class="replaceable"><code>zone</code></em>
]
</p></div>
</div>
<div class="refsection">
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
<p>
<span class="command"><strong>tsig-keygen</strong></span> and <span class="command"><strong>ddns-confgen</strong></span>
are invocation methods for a utility that generates keys for use
in TSIG signing. The resulting keys can be used, for example,
to secure dynamic DNS updates to a zone or for the
<span class="command"><strong>rndc</strong></span> command channel.
</p>
<p>
When run as <span class="command"><strong>tsig-keygen</strong></span>, a domain name
can be specified on the command line which will be used as
the name of the generated key. If no name is specified,
the default is <code class="constant">tsig-key</code>.
</p>
<p>
When run as <span class="command"><strong>ddns-confgen</strong></span>, the generated
key is accompanied by configuration text and instructions
that can be used with <span class="command"><strong>nsupdate</strong></span> and
<span class="command"><strong>named</strong></span> when setting up dynamic DNS,
including an example <span class="command"><strong>update-policy</strong></span>
statement. (This usage similar to the
<span class="command"><strong>rndc-confgen</strong></span> command for setting
up command channel security.)
</p>
<p>
Note that <span class="command"><strong>named</strong></span> itself can configure a
local DDNS key for use with <span class="command"><strong>nsupdate -l</strong></span>:
it does this when a zone is configured with
<span class="command"><strong>update-policy local;</strong></span>.
<span class="command"><strong>ddns-confgen</strong></span> is only needed when a
more elaborate configuration is required: for instance,
if <span class="command"><strong>nsupdate</strong></span> is to be used from a remote
system.
</p>
</div>
<div class="refsection">
<a name="id-1.8"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl class="variablelist">
<dt><span class="term">-a <em class="replaceable"><code>algorithm</code></em></span></dt>
<dd>
<p>
Specifies the algorithm to use for the TSIG key. Available
choices are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256,
hmac-sha384 and hmac-sha512. The default is hmac-sha256.
Options are case-insensitive, and the "hmac-" prefix
may be omitted.
</p>
</dd>
<dt><span class="term">-h</span></dt>
<dd>
<p>
Prints a short summary of options and arguments.
</p>
</dd>
<dt><span class="term">-k <em class="replaceable"><code>keyname</code></em></span></dt>
<dd>
<p>
Specifies the key name of the DDNS authentication key.
The default is <code class="constant">ddns-key</code> when neither
the <code class="option">-s</code> nor <code class="option">-z</code> option is
specified; otherwise, the default
is <code class="constant">ddns-key</code> as a separate label
followed by the argument of the option, e.g.,
<code class="constant">ddns-key.example.com.</code>
The key name must have the format of a valid domain name,
consisting of letters, digits, hyphens and periods.
</p>
</dd>
<dt><span class="term">-q</span></dt>
<dd>
<p>
(<span class="command"><strong>ddns-confgen</strong></span> only.) Quiet mode: Print
only the key, with no explanatory text or usage examples;
This is essentially identical to <span class="command"><strong>tsig-keygen</strong></span>.
</p>
</dd>
<dt><span class="term">-s <em class="replaceable"><code>name</code></em></span></dt>
<dd>
<p>
(<span class="command"><strong>ddns-confgen</strong></span> only.)
Generate configuration example to allow dynamic updates
of a single hostname. The example <span class="command"><strong>named.conf</strong></span>
text shows how to set an update policy for the specified
<em class="replaceable"><code>name</code></em>
using the "name" nametype. The default key name is
ddns-key.<em class="replaceable"><code>name</code></em>.
Note that the "self" nametype cannot be used, since
the name to be updated may differ from the key name.
This option cannot be used with the <code class="option">-z</code> option.
</p>
</dd>
<dt><span class="term">-z <em class="replaceable"><code>zone</code></em></span></dt>
<dd>
<p>
(<span class="command"><strong>ddns-confgen</strong></span> only.)
Generate configuration example to allow dynamic updates
of a zone: The example <span class="command"><strong>named.conf</strong></span> text
shows how to set an update policy for the specified
<em class="replaceable"><code>zone</code></em>
using the "zonesub" nametype, allowing updates to
all subdomain names within that
<em class="replaceable"><code>zone</code></em>.
This option cannot be used with the <code class="option">-s</code> option.
</p>
</dd>
</dl></div>
</div>
<div class="refsection">
<a name="id-1.9"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry">
<span class="refentrytitle">nsupdate</span>(1)
</span>,
<span class="citerefentry">
<span class="refentrytitle">named.conf</span>(5)
</span>,
<span class="citerefentry">
<span class="refentrytitle">named</span>(8)
</span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>.
</p>
</div>
</div></body>
</html>

View File

@@ -1,96 +0,0 @@
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
.. BEWARE: Do not forget to edit also tsig-keygen.rst!
.. iscman:: ddns-confgen
.. program:: ddns-confgen
.. _man_ddns-confgen:
ddns-confgen - TSIG key generation tool
---------------------------------------
Synopsis
~~~~~~~~
:program:`ddns-confgen` [**-a** algorithm] [**-h**] [**-k** keyname] [**-q**] [**-s** name] [**-z** zone]
Description
~~~~~~~~~~~
:program:`ddns-confgen` is an utility that generates keys for use in TSIG signing.
The resulting keys can be used, for example, to secure dynamic DNS updates
to a zone, or for the :iscman:`rndc` command channel.
The key name can specified using :option:`-k` parameter and defaults to ``ddns-key``.
The generated key is accompanied by configuration text and instructions that
can be used with :iscman:`nsupdate` and :iscman:`named` when setting up dynamic DNS,
including an example ``update-policy`` statement.
(This usage is similar to the :iscman:`rndc-confgen` command for setting up
command-channel security.)
Note that :iscman:`named` itself can configure a local DDNS key for use with
:option:`nsupdate -l`; it does this when a zone is configured with
``update-policy local;``. :program:`ddns-confgen` is only needed when a more
elaborate configuration is required: for instance, if :iscman:`nsupdate` is to
be used from a remote system.
Options
~~~~~~~
.. option:: -a algorithm
This option specifies the algorithm to use for the TSIG key. Available
choices are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha384,
and hmac-sha512. The default is hmac-sha256. Options are
case-insensitive, and the "hmac-" prefix may be omitted.
.. option:: -h
This option prints a short summary of options and arguments.
.. option:: -k keyname
This option specifies the key name of the DDNS authentication key. The
default is ``ddns-key`` when neither the :option:`-s` nor :option:`-z` option is
specified; otherwise, the default is ``ddns-key`` as a separate label
followed by the argument of the option, e.g., ``ddns-key.example.com.``
The key name must have the format of a valid domain name, consisting of
letters, digits, hyphens, and periods.
.. option:: -q
This option enables quiet mode, which prints only the key, with no
explanatory text or usage examples. This is essentially identical to
:iscman:`tsig-keygen`.
.. option:: -s name
This option generates a configuration example to allow dynamic updates
of a single hostname. The example :iscman:`named.conf` text shows how to set
an update policy for the specified name using the "name" nametype. The
default key name is ``ddns-key.name``. Note that the "self" nametype
cannot be used, since the name to be updated may differ from the key
name. This option cannot be used with the :option:`-z` option.
.. option:: -z zone
This option generates a configuration example to allow
dynamic updates of a zone. The example :iscman:`named.conf` text shows how
to set an update policy for the specified zone using the "zonesub"
nametype, allowing updates to all subdomain names within that zone.
This option cannot be used with the :option:`-s` option.
See Also
~~~~~~~~
:iscman:`nsupdate(1) <nsupdate>`, :iscman:`named.conf(5) <named.conf>`, :iscman:`named(8) <named>`, BIND 9 Administrator Reference Manual.

View File

@@ -1 +0,0 @@
../../../.clang-format.headers

View File

@@ -1,28 +1,26 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
#pragma once
#include <stdio.h>
#ifndef RNDC_OS_H
#define RNDC_OS_H 1
#include <isc/lang.h>
#include <stdio.h>
ISC_LANG_BEGINDECLS
int
set_user(FILE *fd, const char *user);
int set_user(FILE *fd, const char *user);
/*%<
* Set the owner of the file referenced by 'fd' to 'user'.
* Returns:
@@ -31,3 +29,5 @@ set_user(FILE *fd, const char *user);
*/
ISC_LANG_ENDDECLS
#endif

View File

@@ -1,37 +1,63 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
#include "keygen.h"
#include <stdarg.h>
#include <config.h>
#include <stdlib.h>
#include <stdarg.h>
#include <isc/base64.h>
#include <isc/buffer.h>
#include <isc/file.h>
#include <isc/mem.h>
#include <isc/print.h>
#include <isc/result.h>
#include <isc/string.h>
#include <pk11/site.h>
#include <dns/keyvalues.h>
#include <dns/name.h>
#include <dst/dst.h>
#include <confgen/os.h>
#include "util.h"
#include "keygen.h"
/*%
* Convert algorithm type to string.
*/
const char *
alg_totext(dns_secalg_t alg) {
switch (alg) {
case DST_ALG_HMACMD5:
return "hmac-md5";
case DST_ALG_HMACSHA1:
return "hmac-sha1";
case DST_ALG_HMACSHA224:
return "hmac-sha224";
case DST_ALG_HMACSHA256:
return "hmac-sha256";
case DST_ALG_HMACSHA384:
return "hmac-sha384";
case DST_ALG_HMACSHA512:
return "hmac-sha512";
default:
return "(unknown)";
}
}
/*%
* Convert string to algorithm type.
@@ -39,29 +65,22 @@
dns_secalg_t
alg_fromtext(const char *name) {
const char *p = name;
if (strncasecmp(p, "hmac-", 5) == 0) {
if (strncasecmp(p, "hmac-", 5) == 0)
p = &name[5];
}
if (strcasecmp(p, "md5") == 0) {
return (DST_ALG_HMACMD5);
}
if (strcasecmp(p, "sha1") == 0) {
return (DST_ALG_HMACSHA1);
}
if (strcasecmp(p, "sha224") == 0) {
return (DST_ALG_HMACSHA224);
}
if (strcasecmp(p, "sha256") == 0) {
return (DST_ALG_HMACSHA256);
}
if (strcasecmp(p, "sha384") == 0) {
return (DST_ALG_HMACSHA384);
}
if (strcasecmp(p, "sha512") == 0) {
return (DST_ALG_HMACSHA512);
}
return (DST_ALG_UNKNOWN);
if (strcasecmp(p, "md5") == 0)
return DST_ALG_HMACMD5;
if (strcasecmp(p, "sha1") == 0)
return DST_ALG_HMACSHA1;
if (strcasecmp(p, "sha224") == 0)
return DST_ALG_HMACSHA224;
if (strcasecmp(p, "sha256") == 0)
return DST_ALG_HMACSHA256;
if (strcasecmp(p, "sha384") == 0)
return DST_ALG_HMACSHA384;
if (strcasecmp(p, "sha512") == 0)
return DST_ALG_HMACSHA512;
return DST_ALG_UNKNOWN;
}
/*%
@@ -70,20 +89,20 @@ alg_fromtext(const char *name) {
int
alg_bits(dns_secalg_t alg) {
switch (alg) {
case DST_ALG_HMACMD5:
return (128);
case DST_ALG_HMACSHA1:
return (160);
case DST_ALG_HMACSHA224:
return (224);
case DST_ALG_HMACSHA256:
return (256);
case DST_ALG_HMACSHA384:
return (384);
case DST_ALG_HMACSHA512:
return (512);
default:
return (0);
case DST_ALG_HMACMD5:
return 128;
case DST_ALG_HMACSHA1:
return 160;
case DST_ALG_HMACSHA224:
return 224;
case DST_ALG_HMACSHA256:
return 256;
case DST_ALG_HMACSHA384:
return 384;
case DST_ALG_HMACSHA512:
return 512;
default:
return 0;
}
}
@@ -100,31 +119,30 @@ generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
dst_key_t *key = NULL;
switch (alg) {
case DST_ALG_HMACMD5:
case DST_ALG_HMACSHA1:
case DST_ALG_HMACSHA224:
case DST_ALG_HMACSHA256:
if (keysize < 1 || keysize > 512) {
case DST_ALG_HMACMD5:
case DST_ALG_HMACSHA1:
case DST_ALG_HMACSHA224:
case DST_ALG_HMACSHA256:
if (keysize < 1 || keysize > 512)
fatal("keysize %d out of range (must be 1-512)\n",
keysize);
}
break;
case DST_ALG_HMACSHA384:
case DST_ALG_HMACSHA512:
if (keysize < 1 || keysize > 1024) {
case DST_ALG_HMACSHA384:
case DST_ALG_HMACSHA512:
if (keysize < 1 || keysize > 1024)
fatal("keysize %d out of range (must be 1-1024)\n",
keysize);
}
break;
default:
default:
fatal("unsupported algorithm %d\n", alg);
}
DO("initialize dst library", dst_lib_init(mctx, NULL));
DO("generate key",
dst_key_generate(dns_rootname, alg, keysize, 0, 0, DNS_KEYPROTO_ANY,
dns_rdataclass_in, mctx, &key, NULL));
DO("generate key", dst_key_generate(dns_rootname, alg,
keysize, 0, 0, DNS_KEYPROTO_ANY,
dns_rdataclass_in, mctx, &key,
NULL));
isc_buffer_init(&key_rawbuffer, &key_rawsecret, sizeof(key_rawsecret));
@@ -132,12 +150,11 @@ generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
isc_buffer_usedregion(&key_rawbuffer, &key_rawregion);
DO("bsse64 encode secret",
isc_base64_totext(&key_rawregion, -1, "", key_txtbuffer));
DO("bsse64 encode secret", isc_base64_totext(&key_rawregion, -1, "",
key_txtbuffer));
if (key != NULL) {
if (key != NULL)
dst_key_free(&key);
}
dst_lib_destroy();
}
@@ -148,30 +165,29 @@ generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
* the name 'keyname' and the secret in the buffer 'secret'.
*/
void
write_key_file(const char *keyfile, const char *user, const char *keyname,
isc_buffer_t *secret, dns_secalg_t alg) {
write_key_file(const char *keyfile, const char *user,
const char *keyname, isc_buffer_t *secret,
dns_secalg_t alg) {
isc_result_t result;
const char *algname = dst_hmac_algorithm_totext(alg);
const char *algname = alg_totext(alg);
FILE *fd = NULL;
DO("create keyfile", isc_file_safecreate(keyfile, &fd));
if (user != NULL) {
if (set_user(fd, user) == -1) {
if (set_user(fd, user) == -1)
fatal("unable to set file owner\n");
}
}
fprintf(fd,
"key \"%s\" {\n\talgorithm %s;\n"
fprintf(fd, "key \"%s\" {\n\talgorithm %s;\n"
"\tsecret \"%.*s\";\n};\n",
keyname, algname, (int)isc_buffer_usedlength(secret),
keyname, algname,
(int)isc_buffer_usedlength(secret),
(char *)isc_buffer_base(secret));
fflush(fd);
if (ferror(fd)) {
if (ferror(fd))
fatal("write to %s failed\n", keyfile);
}
if (fclose(fd)) {
if (fclose(fd))
fatal("fclose(%s) failed\n", keyfile);
}
fprintf(stderr, "wrote key file \"%s\"\n", keyfile);
}

View File

@@ -1,41 +1,35 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
#pragma once
#ifndef RNDC_KEYGEN_H
#define RNDC_KEYGEN_H 1
/*! \file */
#include <isc/buffer.h>
#include <isc/lang.h>
#include <isc/mem.h>
#include <dns/secalg.h>
ISC_LANG_BEGINDECLS
void
generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
isc_buffer_t *key_txtbuffer);
void generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
isc_buffer_t *key_txtbuffer);
void
write_key_file(const char *keyfile, const char *user, const char *keyname,
isc_buffer_t *secret, dns_secalg_t alg);
void write_key_file(const char *keyfile, const char *user,
const char *keyname, isc_buffer_t *secret,
dns_secalg_t alg);
const char *
alg_totext(dns_secalg_t alg);
dns_secalg_t
alg_fromtext(const char *name);
int
alg_bits(dns_secalg_t alg);
const char *alg_totext(dns_secalg_t alg);
dns_secalg_t alg_fromtext(const char *name);
int alg_bits(dns_secalg_t alg);
ISC_LANG_ENDDECLS
#endif /* RNDC_KEYGEN_H */

View File

@@ -1,36 +0,0 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
*/
/*! \file */
#include <errno.h>
#include <fcntl.h>
#include <pwd.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <confgen/os.h>
int
set_user(FILE *fd, const char *user) {
struct passwd *pw;
pw = getpwnam(user);
if (pw == NULL) {
errno = EINVAL;
return (-1);
}
return (fchown(fileno(fd), pw->pw_uid, -1));
}

210
bin/confgen/rndc-confgen.8 Normal file
View File

@@ -0,0 +1,210 @@
.\" Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2020 Internet Systems Consortium, Inc. ("ISC")
.\"
.\" This Source Code Form is subject to the terms of the Mozilla Public
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
.\" file, You can obtain one at http://mozilla.org/MPL/2.0/.
.\"
.hy 0
.ad l
'\" t
.\" Title: rndc-confgen
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 2013-03-14
.\" Manual: BIND9
.\" Source: ISC
.\" Language: English
.\"
.TH "RNDC\-CONFGEN" "8" "2013\-03\-14" "ISC" "BIND9"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
rndc-confgen \- rndc key generation tool
.SH "SYNOPSIS"
.HP \w'\fBrndc\-confgen\fR\ 'u
\fBrndc\-confgen\fR [\fB\-a\fR] [\fB\-A\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-c\ \fR\fB\fIkeyfile\fR\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkeyname\fR\fR] [\fB\-p\ \fR\fB\fIport\fR\fR] [\fB\-s\ \fR\fB\fIaddress\fR\fR] [\fB\-t\ \fR\fB\fIchrootdir\fR\fR] [\fB\-u\ \fR\fB\fIuser\fR\fR]
.SH "DESCRIPTION"
.PP
\fBrndc\-confgen\fR
generates configuration files for
\fBrndc\fR\&. It can be used as a convenient alternative to writing the
rndc\&.conf
file and the corresponding
\fBcontrols\fR
and
\fBkey\fR
statements in
named\&.conf
by hand\&. Alternatively, it can be run with the
\fB\-a\fR
option to set up a
rndc\&.key
file and avoid the need for a
rndc\&.conf
file and a
\fBcontrols\fR
statement altogether\&.
.SH "OPTIONS"
.PP
\-a
.RS 4
Do automatic
\fBrndc\fR
configuration\&. This creates a file
rndc\&.key
in
/etc
(or whatever
\fIsysconfdir\fR
was specified as when
BIND
was built) that is read by both
\fBrndc\fR
and
\fBnamed\fR
on startup\&. The
rndc\&.key
file defines a default command channel and authentication key allowing
\fBrndc\fR
to communicate with
\fBnamed\fR
on the local host with no further configuration\&.
.sp
Running
\fBrndc\-confgen \-a\fR
allows BIND 9 and
\fBrndc\fR
to be used as drop\-in replacements for BIND 8 and
\fBndc\fR, with no changes to the existing BIND 8
named\&.conf
file\&.
.sp
If a more elaborate configuration than that generated by
\fBrndc\-confgen \-a\fR
is required, for example if rndc is to be used remotely, you should run
\fBrndc\-confgen\fR
without the
\fB\-a\fR
option and set up a
rndc\&.conf
and
named\&.conf
as directed\&.
.RE
.PP
\-A \fIalgorithm\fR
.RS 4
Specifies the algorithm to use for the TSIG key\&. Available choices are: hmac\-md5, hmac\-sha1, hmac\-sha224, hmac\-sha256, hmac\-sha384 and hmac\-sha512\&. The default is hmac\-sha256\&.
.RE
.PP
\-b \fIkeysize\fR
.RS 4
Specifies the size of the authentication key in bits\&. Must be between 1 and 512 bits; the default is the hash size\&.
.RE
.PP
\-c \fIkeyfile\fR
.RS 4
Used with the
\fB\-a\fR
option to specify an alternate location for
rndc\&.key\&.
.RE
.PP
\-h
.RS 4
Prints a short summary of the options and arguments to
\fBrndc\-confgen\fR\&.
.RE
.PP
\-k \fIkeyname\fR
.RS 4
Specifies the key name of the rndc authentication key\&. This must be a valid domain name\&. The default is
\fBrndc\-key\fR\&.
.RE
.PP
\-p \fIport\fR
.RS 4
Specifies the command channel port where
\fBnamed\fR
listens for connections from
\fBrndc\fR\&. The default is 953\&.
.RE
.PP
\-s \fIaddress\fR
.RS 4
Specifies the IP address where
\fBnamed\fR
listens for command channel connections from
\fBrndc\fR\&. The default is the loopback address 127\&.0\&.0\&.1\&.
.RE
.PP
\-t \fIchrootdir\fR
.RS 4
Used with the
\fB\-a\fR
option to specify a directory where
\fBnamed\fR
will run chrooted\&. An additional copy of the
rndc\&.key
will be written relative to this directory so that it will be found by the chrooted
\fBnamed\fR\&.
.RE
.PP
\-u \fIuser\fR
.RS 4
Used with the
\fB\-a\fR
option to set the owner of the
rndc\&.key
file generated\&. If
\fB\-t\fR
is also specified only the file in the chroot area has its owner changed\&.
.RE
.SH "EXAMPLES"
.PP
To allow
\fBrndc\fR
to be used with no manual configuration, run
.PP
\fBrndc\-confgen \-a\fR
.PP
To print a sample
rndc\&.conf
file and corresponding
\fBcontrols\fR
and
\fBkey\fR
statements to be manually inserted into
named\&.conf, run
.PP
\fBrndc\-confgen\fR
.SH "SEE ALSO"
.PP
\fBrndc\fR(8),
\fBrndc.conf\fR(5),
\fBnamed\fR(8),
BIND 9 Administrator Reference Manual\&.
.SH "AUTHOR"
.PP
\fBInternet Systems Consortium, Inc\&.\fR
.SH "COPYRIGHT"
.br
Copyright \(co 2001, 2003-2005, 2007, 2009, 2013-2020 Internet Systems Consortium, Inc. ("ISC")
.br

View File

@@ -1,11 +1,9 @@
/*
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
*
* SPDX-License-Identifier: MPL-2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* See the COPYRIGHT file distributed with this work for additional
* information regarding copyright ownership.
@@ -22,36 +20,39 @@
* controls statement altogether.
*/
#include <config.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdlib.h>
#include <isc/assertions.h>
#include <isc/attributes.h>
#include <isc/base64.h>
#include <isc/buffer.h>
#include <isc/commandline.h>
#include <isc/file.h>
#include <isc/mem.h>
#include <isc/net.h>
#include <isc/print.h>
#include <isc/result.h>
#include <isc/string.h>
#include <isc/time.h>
#include <isc/util.h>
#include <pk11/site.h>
#include <dns/keyvalues.h>
#include <dns/name.h>
#include <dst/dst.h>
#include <confgen/os.h>
#include "keygen.h"
#include "util.h"
#include "keygen.h"
#define DEFAULT_KEYNAME "rndc-key"
#define DEFAULT_SERVER "127.0.0.1"
#define DEFAULT_PORT 953
#define DEFAULT_KEYNAME "rndc-key"
#define DEFAULT_SERVER "127.0.0.1"
#define DEFAULT_PORT 953
static char program[256];
const char *progname;
@@ -60,11 +61,12 @@ bool verbose = false;
const char *keyfile, *keydef;
noreturn static void
usage(int status);
ISC_PLATFORM_NORETURN_PRE static void
usage(int status) ISC_PLATFORM_NORETURN_POST;
static void
usage(int status) {
fprintf(stderr, "\
Usage:\n\
%s [-a] [-b bits] [-c keyfile] [-k keyname] [-p port] \
@@ -75,13 +77,12 @@ Usage:\n\
-c keyfile: specify an alternate key file (requires -a)\n\
-k keyname: the name as it will be used in named.conf and rndc.conf\n\
-p port: the port named will listen on and rndc will connect to\n\
-q: suppress printing written key path\n\
-s addr: the address to which rndc should connect\n\
-t chrootdir: write a keyfile in chrootdir as well (requires -a)\n\
-u user: set the keyfile owner to \"user\" (requires -a)\n",
progname, keydef);
progname, keydef);
exit(status);
exit (status);
}
int
@@ -104,15 +105,13 @@ main(int argc, char **argv) {
char *chrootdir = NULL;
char *user = NULL;
bool keyonly = false;
bool quiet = false;
int len;
keydef = keyfile = RNDC_KEYFILE;
result = isc_file_progname(*argv, program, sizeof(program));
if (result != ISC_R_SUCCESS) {
if (result != ISC_R_SUCCESS)
memmove(program, "rndc-confgen", 13);
}
progname = program;
keyname = DEFAULT_KEYNAME;
@@ -132,15 +131,13 @@ main(int argc, char **argv) {
case 'A':
algname = isc_commandline_argument;
alg = alg_fromtext(algname);
if (alg == DST_ALG_UNKNOWN) {
if (alg == DST_ALG_UNKNOWN)
fatal("Unsupported algorithm '%s'", algname);
}
break;
case 'b':
keysize = strtol(isc_commandline_argument, &p, 10);
if (*p != '\0' || keysize < 0) {
if (*p != '\0' || keysize < 0)
fatal("-b requires a non-negative number");
}
break;
case 'c':
keyfile = isc_commandline_argument;
@@ -148,7 +145,7 @@ main(int argc, char **argv) {
case 'h':
usage(0);
case 'k':
case 'y': /* Compatible with rndc -y. */
case 'y': /* Compatible with rndc -y. */
keyname = isc_commandline_argument;
break;
case 'M':
@@ -160,13 +157,9 @@ main(int argc, char **argv) {
break;
case 'p':
port = strtol(isc_commandline_argument, &p, 10);
if (*p != '\0' || port < 0 || port > 65535) {
if (*p != '\0' || port < 0 || port > 65535)
fatal("port '%s' out of range",
isc_commandline_argument);
}
break;
case 'q':
quiet = true;
break;
case 'r':
fatal("The -r option has been deprecated.");
@@ -175,9 +168,7 @@ main(int argc, char **argv) {
serveraddr = isc_commandline_argument;
if (inet_pton(AF_INET, serveraddr, &addr4_dummy) != 1 &&
inet_pton(AF_INET6, serveraddr, &addr6_dummy) != 1)
{
fatal("-s should be an IPv4 or IPv6 address");
}
break;
case 't':
chrootdir = isc_commandline_argument;
@@ -193,13 +184,12 @@ main(int argc, char **argv) {
fprintf(stderr, "%s: invalid argument -%c\n",
program, isc_commandline_option);
usage(1);
} else {
} else
usage(0);
}
break;
default:
fprintf(stderr, "%s: unhandled option -%c\n", program,
isc_commandline_option);
fprintf(stderr, "%s: unhandled option -%c\n",
program, isc_commandline_option);
exit(1);
}
}
@@ -208,22 +198,20 @@ main(int argc, char **argv) {
argv += isc_commandline_index;
POST(argv);
if (argc > 0) {
if (argc > 0)
usage(1);
}
if (alg == DST_ALG_HMACMD5) {
fprintf(stderr, "warning: use of hmac-md5 for RNDC keys "
"is deprecated; hmac-sha256 is now "
"recommended.\n");
fprintf(stderr,
"warning: use of hmac-md5 for RNDC keys "
"is deprecated; hmac-sha256 is now recommended.\n");
}
if (keysize < 0) {
if (keysize < 0)
keysize = alg_bits(alg);
}
algname = dst_hmac_algorithm_totext(alg);
algname = alg_totext(alg);
isc_mem_create(&mctx);
DO("create memory context", isc_mem_create(0, 0, &mctx));
isc_buffer_init(&key_txtbuffer, &key_txtsecret, sizeof(key_txtsecret));
generate_key(mctx, alg, keysize, &key_txtbuffer);
@@ -231,21 +219,17 @@ main(int argc, char **argv) {
if (keyonly) {
write_key_file(keyfile, chrootdir == NULL ? user : NULL,
keyname, &key_txtbuffer, alg);
if (!quiet) {
printf("wrote key file \"%s\"\n", keyfile);
}
if (chrootdir != NULL) {
char *buf;
len = strlen(chrootdir) + strlen(keyfile) + 2;
buf = isc_mem_get(mctx, len);
if (buf == NULL)
fatal("isc_mem_get(%d) failed\n", len);
snprintf(buf, len, "%s%s%s", chrootdir,
(*keyfile != '/') ? "/" : "", keyfile);
write_key_file(buf, user, keyname, &key_txtbuffer, alg);
if (!quiet) {
printf("wrote key file \"%s\"\n", buf);
}
isc_mem_put(mctx, buf, len);
}
} else {
@@ -276,16 +260,16 @@ options {\n\
# End of named.conf\n",
keyname, algname,
(int)isc_buffer_usedlength(&key_txtbuffer),
(char *)isc_buffer_base(&key_txtbuffer), keyname,
serveraddr, port, keyname, algname,
(char *)isc_buffer_base(&key_txtbuffer),
keyname, serveraddr, port,
keyname, algname,
(int)isc_buffer_usedlength(&key_txtbuffer),
(char *)isc_buffer_base(&key_txtbuffer), serveraddr,
port, serveraddr, keyname);
(char *)isc_buffer_base(&key_txtbuffer),
serveraddr, port, serveraddr, keyname);
}
if (show_final_mem) {
if (show_final_mem)
isc_mem_stats(mctx, stderr);
}
isc_mem_destroy(&mctx);

View File

@@ -0,0 +1,271 @@
<!--
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
- See the COPYRIGHT file distributed with this work for additional
- information regarding copyright ownership.
-->
<!-- Converted by db4-upgrade version 1.0 -->
<refentry xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="man.rndc-confgen">
<info>
<date>2013-03-14</date>
</info>
<refentryinfo>
<corpname>ISC</corpname>
<corpauthor>Internet Systems Consortium, Inc.</corpauthor>
</refentryinfo>
<refmeta>
<refentrytitle><application>rndc-confgen</application></refentrytitle>
<manvolnum>8</manvolnum>
<refmiscinfo>BIND9</refmiscinfo>
</refmeta>
<refnamediv>
<refname><application>rndc-confgen</application></refname>
<refpurpose>rndc key generation tool</refpurpose>
</refnamediv>
<docinfo>
<copyright>
<year>2001</year>
<year>2003</year>
<year>2004</year>
<year>2005</year>
<year>2007</year>
<year>2009</year>
<year>2013</year>
<year>2014</year>
<year>2015</year>
<year>2016</year>
<year>2017</year>
<year>2018</year>
<year>2019</year>
<year>2020</year>
<holder>Internet Systems Consortium, Inc. ("ISC")</holder>
</copyright>
</docinfo>
<refsynopsisdiv>
<cmdsynopsis sepchar=" ">
<command>rndc-confgen</command>
<arg choice="opt" rep="norepeat"><option>-a</option></arg>
<arg choice="opt" rep="norepeat"><option>-A <replaceable class="parameter">algorithm</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-b <replaceable class="parameter">keysize</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">keyfile</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
<arg choice="opt" rep="norepeat"><option>-k <replaceable class="parameter">keyname</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-p <replaceable class="parameter">port</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">address</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">chrootdir</replaceable></option></arg>
<arg choice="opt" rep="norepeat"><option>-u <replaceable class="parameter">user</replaceable></option></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsection><info><title>DESCRIPTION</title></info>
<para><command>rndc-confgen</command>
generates configuration files
for <command>rndc</command>. It can be used as a
convenient alternative to writing the
<filename>rndc.conf</filename> file
and the corresponding <command>controls</command>
and <command>key</command>
statements in <filename>named.conf</filename> by hand.
Alternatively, it can be run with the <command>-a</command>
option to set up a <filename>rndc.key</filename> file and
avoid the need for a <filename>rndc.conf</filename> file
and a <command>controls</command> statement altogether.
</para>
</refsection>
<refsection><info><title>OPTIONS</title></info>
<variablelist>
<varlistentry>
<term>-a</term>
<listitem>
<para>
Do automatic <command>rndc</command> configuration.
This creates a file <filename>rndc.key</filename>
in <filename>/etc</filename> (or whatever
<varname>sysconfdir</varname>
was specified as when <acronym>BIND</acronym> was
built)
that is read by both <command>rndc</command>
and <command>named</command> on startup. The
<filename>rndc.key</filename> file defines a default
command channel and authentication key allowing
<command>rndc</command> to communicate with
<command>named</command> on the local host
with no further configuration.
</para>
<para>
Running <command>rndc-confgen -a</command> allows
BIND 9 and <command>rndc</command> to be used as
drop-in
replacements for BIND 8 and <command>ndc</command>,
with no changes to the existing BIND 8
<filename>named.conf</filename> file.
</para>
<para>
If a more elaborate configuration than that
generated by <command>rndc-confgen -a</command>
is required, for example if rndc is to be used remotely,
you should run <command>rndc-confgen</command> without
the
<command>-a</command> option and set up a
<filename>rndc.conf</filename> and
<filename>named.conf</filename>
as directed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-A <replaceable class="parameter">algorithm</replaceable></term>
<listitem>
<para>
Specifies the algorithm to use for the TSIG key. Available
choices are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256,
hmac-sha384 and hmac-sha512. The default is hmac-sha256.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-b <replaceable class="parameter">keysize</replaceable></term>
<listitem>
<para>
Specifies the size of the authentication key in bits.
Must be between 1 and 512 bits; the default is the
hash size.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-c <replaceable class="parameter">keyfile</replaceable></term>
<listitem>
<para>
Used with the <command>-a</command> option to specify
an alternate location for <filename>rndc.key</filename>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-h</term>
<listitem>
<para>
Prints a short summary of the options and arguments to
<command>rndc-confgen</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-k <replaceable class="parameter">keyname</replaceable></term>
<listitem>
<para>
Specifies the key name of the rndc authentication key.
This must be a valid domain name.
The default is <constant>rndc-key</constant>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-p <replaceable class="parameter">port</replaceable></term>
<listitem>
<para>
Specifies the command channel port where <command>named</command>
listens for connections from <command>rndc</command>.
The default is 953.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-s <replaceable class="parameter">address</replaceable></term>
<listitem>
<para>
Specifies the IP address where <command>named</command>
listens for command channel connections from
<command>rndc</command>. The default is the loopback
address 127.0.0.1.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-t <replaceable class="parameter">chrootdir</replaceable></term>
<listitem>
<para>
Used with the <command>-a</command> option to specify
a directory where <command>named</command> will run
chrooted. An additional copy of the <filename>rndc.key</filename>
will be written relative to this directory so that
it will be found by the chrooted <command>named</command>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>-u <replaceable class="parameter">user</replaceable></term>
<listitem>
<para>
Used with the <command>-a</command> option to set the
owner
of the <filename>rndc.key</filename> file generated.
If
<command>-t</command> is also specified only the file
in
the chroot area has its owner changed.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection><info><title>EXAMPLES</title></info>
<para>
To allow <command>rndc</command> to be used with
no manual configuration, run
</para>
<para><userinput>rndc-confgen -a</userinput>
</para>
<para>
To print a sample <filename>rndc.conf</filename> file and
corresponding <command>controls</command> and <command>key</command>
statements to be manually inserted into <filename>named.conf</filename>,
run
</para>
<para><userinput>rndc-confgen</userinput>
</para>
</refsection>
<refsection><info><title>SEE ALSO</title></info>
<para><citerefentry>
<refentrytitle>rndc</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>rndc.conf</refentrytitle><manvolnum>5</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citetitle>BIND 9 Administrator Reference Manual</citetitle>.
</para>
</refsection>
</refentry>

View File

@@ -0,0 +1,226 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
- Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2020 Internet Systems Consortium, Inc. ("ISC")
-
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>rndc-confgen</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
<a name="man.rndc-confgen"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2>Name</h2>
<p>
<span class="application">rndc-confgen</span>
&#8212; rndc key generation tool
</p>
</div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<div class="cmdsynopsis"><p>
<code class="command">rndc-confgen</code>
[<code class="option">-a</code>]
[<code class="option">-A <em class="replaceable"><code>algorithm</code></em></code>]
[<code class="option">-b <em class="replaceable"><code>keysize</code></em></code>]
[<code class="option">-c <em class="replaceable"><code>keyfile</code></em></code>]
[<code class="option">-h</code>]
[<code class="option">-k <em class="replaceable"><code>keyname</code></em></code>]
[<code class="option">-p <em class="replaceable"><code>port</code></em></code>]
[<code class="option">-s <em class="replaceable"><code>address</code></em></code>]
[<code class="option">-t <em class="replaceable"><code>chrootdir</code></em></code>]
[<code class="option">-u <em class="replaceable"><code>user</code></em></code>]
</p></div>
</div>
<div class="refsection">
<a name="id-1.7"></a><h2>DESCRIPTION</h2>
<p><span class="command"><strong>rndc-confgen</strong></span>
generates configuration files
for <span class="command"><strong>rndc</strong></span>. It can be used as a
convenient alternative to writing the
<code class="filename">rndc.conf</code> file
and the corresponding <span class="command"><strong>controls</strong></span>
and <span class="command"><strong>key</strong></span>
statements in <code class="filename">named.conf</code> by hand.
Alternatively, it can be run with the <span class="command"><strong>-a</strong></span>
option to set up a <code class="filename">rndc.key</code> file and
avoid the need for a <code class="filename">rndc.conf</code> file
and a <span class="command"><strong>controls</strong></span> statement altogether.
</p>
</div>
<div class="refsection">
<a name="id-1.8"></a><h2>OPTIONS</h2>
<div class="variablelist"><dl class="variablelist">
<dt><span class="term">-a</span></dt>
<dd>
<p>
Do automatic <span class="command"><strong>rndc</strong></span> configuration.
This creates a file <code class="filename">rndc.key</code>
in <code class="filename">/etc</code> (or whatever
<code class="varname">sysconfdir</code>
was specified as when <acronym class="acronym">BIND</acronym> was
built)
that is read by both <span class="command"><strong>rndc</strong></span>
and <span class="command"><strong>named</strong></span> on startup. The
<code class="filename">rndc.key</code> file defines a default
command channel and authentication key allowing
<span class="command"><strong>rndc</strong></span> to communicate with
<span class="command"><strong>named</strong></span> on the local host
with no further configuration.
</p>
<p>
Running <span class="command"><strong>rndc-confgen -a</strong></span> allows
BIND 9 and <span class="command"><strong>rndc</strong></span> to be used as
drop-in
replacements for BIND 8 and <span class="command"><strong>ndc</strong></span>,
with no changes to the existing BIND 8
<code class="filename">named.conf</code> file.
</p>
<p>
If a more elaborate configuration than that
generated by <span class="command"><strong>rndc-confgen -a</strong></span>
is required, for example if rndc is to be used remotely,
you should run <span class="command"><strong>rndc-confgen</strong></span> without
the
<span class="command"><strong>-a</strong></span> option and set up a
<code class="filename">rndc.conf</code> and
<code class="filename">named.conf</code>
as directed.
</p>
</dd>
<dt><span class="term">-A <em class="replaceable"><code>algorithm</code></em></span></dt>
<dd>
<p>
Specifies the algorithm to use for the TSIG key. Available
choices are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256,
hmac-sha384 and hmac-sha512. The default is hmac-sha256.
</p>
</dd>
<dt><span class="term">-b <em class="replaceable"><code>keysize</code></em></span></dt>
<dd>
<p>
Specifies the size of the authentication key in bits.
Must be between 1 and 512 bits; the default is the
hash size.
</p>
</dd>
<dt><span class="term">-c <em class="replaceable"><code>keyfile</code></em></span></dt>
<dd>
<p>
Used with the <span class="command"><strong>-a</strong></span> option to specify
an alternate location for <code class="filename">rndc.key</code>.
</p>
</dd>
<dt><span class="term">-h</span></dt>
<dd>
<p>
Prints a short summary of the options and arguments to
<span class="command"><strong>rndc-confgen</strong></span>.
</p>
</dd>
<dt><span class="term">-k <em class="replaceable"><code>keyname</code></em></span></dt>
<dd>
<p>
Specifies the key name of the rndc authentication key.
This must be a valid domain name.
The default is <code class="constant">rndc-key</code>.
</p>
</dd>
<dt><span class="term">-p <em class="replaceable"><code>port</code></em></span></dt>
<dd>
<p>
Specifies the command channel port where <span class="command"><strong>named</strong></span>
listens for connections from <span class="command"><strong>rndc</strong></span>.
The default is 953.
</p>
</dd>
<dt><span class="term">-s <em class="replaceable"><code>address</code></em></span></dt>
<dd>
<p>
Specifies the IP address where <span class="command"><strong>named</strong></span>
listens for command channel connections from
<span class="command"><strong>rndc</strong></span>. The default is the loopback
address 127.0.0.1.
</p>
</dd>
<dt><span class="term">-t <em class="replaceable"><code>chrootdir</code></em></span></dt>
<dd>
<p>
Used with the <span class="command"><strong>-a</strong></span> option to specify
a directory where <span class="command"><strong>named</strong></span> will run
chrooted. An additional copy of the <code class="filename">rndc.key</code>
will be written relative to this directory so that
it will be found by the chrooted <span class="command"><strong>named</strong></span>.
</p>
</dd>
<dt><span class="term">-u <em class="replaceable"><code>user</code></em></span></dt>
<dd>
<p>
Used with the <span class="command"><strong>-a</strong></span> option to set the
owner
of the <code class="filename">rndc.key</code> file generated.
If
<span class="command"><strong>-t</strong></span> is also specified only the file
in
the chroot area has its owner changed.
</p>
</dd>
</dl></div>
</div>
<div class="refsection">
<a name="id-1.9"></a><h2>EXAMPLES</h2>
<p>
To allow <span class="command"><strong>rndc</strong></span> to be used with
no manual configuration, run
</p>
<p><strong class="userinput"><code>rndc-confgen -a</code></strong>
</p>
<p>
To print a sample <code class="filename">rndc.conf</code> file and
corresponding <span class="command"><strong>controls</strong></span> and <span class="command"><strong>key</strong></span>
statements to be manually inserted into <code class="filename">named.conf</code>,
run
</p>
<p><strong class="userinput"><code>rndc-confgen</code></strong>
</p>
</div>
<div class="refsection">
<a name="id-1.10"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry">
<span class="refentrytitle">rndc</span>(8)
</span>,
<span class="citerefentry">
<span class="refentrytitle">rndc.conf</span>(5)
</span>,
<span class="citerefentry">
<span class="refentrytitle">named</span>(8)
</span>,
<em class="citetitle">BIND 9 Administrator Reference Manual</em>.
</p>
</div>
</div></body>
</html>

View File

@@ -1,121 +0,0 @@
.. Copyright (C) Internet Systems Consortium, Inc. ("ISC")
..
.. SPDX-License-Identifier: MPL-2.0
..
.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, you can obtain one at https://mozilla.org/MPL/2.0/.
..
.. See the COPYRIGHT file distributed with this work for additional
.. information regarding copyright ownership.
.. highlight: console
.. iscman:: rndc-confgen
.. program:: rndc-confgen
.. _man_rndc-confgen:
rndc-confgen - rndc key generation tool
---------------------------------------
Synopsis
~~~~~~~~
:program:`rndc-confgen` [**-a**] [**-A** algorithm] [**-b** keysize] [**-c** keyfile] [**-h**] [**-k** keyname] [**-p** port] [**-s** address] [**-t** chrootdir] [**-u** user]
Description
~~~~~~~~~~~
:program:`rndc-confgen` generates configuration files for :iscman:`rndc`. It can be
used as a convenient alternative to writing the :iscman:`rndc.conf` file and
the corresponding ``controls`` and ``key`` statements in :iscman:`named.conf`
by hand. Alternatively, it can be run with the :option:`-a` option to set up a
``rndc.key`` file and avoid the need for a :iscman:`rndc.conf` file and a
``controls`` statement altogether.
Options
~~~~~~~
.. option:: -a
This option sets automatic :iscman:`rndc` configuration, which creates a file
|rndc_key| that is read by both :iscman:`rndc` and :iscman:`named` on startup.
The ``rndc.key`` file defines a default command channel and
authentication key allowing :iscman:`rndc` to communicate with :iscman:`named` on
the local host with no further configuration.
If a more elaborate configuration than that generated by
:option:`rndc-confgen -a` is required, for example if rndc is to be used
remotely, run :program:`rndc-confgen` without the :option:`-a` option
and set up :iscman:`rndc.conf` and :iscman:`named.conf` as directed.
.. option:: -A algorithm
This option specifies the algorithm to use for the TSIG key. Available choices
are: hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha384, and
hmac-sha512. The default is hmac-sha256.
.. option:: -b keysize
This option specifies the size of the authentication key in bits. The size must be between
1 and 512 bits; the default is the hash size.
.. option:: -c keyfile
This option is used with the :option:`-a` option to specify an alternate location for
``rndc.key``.
.. option:: -h
This option prints a short summary of the options and arguments to
:program:`rndc-confgen`.
.. option:: -k keyname
This option specifies the key name of the :iscman:`rndc` authentication key. This must be a
valid domain name. The default is ``rndc-key``.
.. option:: -p port
This option specifies the command channel port where :iscman:`named` listens for
connections from :iscman:`rndc`. The default is 953.
.. option:: -q
This option prevets printing the written path in automatic configuration mode.
.. option:: -s address
This option specifies the IP address where :iscman:`named` listens for command-channel
connections from :iscman:`rndc`. The default is the loopback address
127.0.0.1.
.. option:: -t chrootdir
This option is used with the :option:`-a` option to specify a directory where :iscman:`named`
runs chrooted. An additional copy of the ``rndc.key`` is
written relative to this directory, so that it is found by the
chrooted :iscman:`named`.
.. option:: -u user
This option is used with the :option:`-a` option to set the owner of the generated ``rndc.key`` file.
If :option:`-t` is also specified, only the file in the chroot
area has its owner changed.
Examples
~~~~~~~~
To allow :iscman:`rndc` to be used with no manual configuration, run:
``rndc-confgen -a``
To print a sample :iscman:`rndc.conf` file and the corresponding ``controls`` and
``key`` statements to be manually inserted into :iscman:`named.conf`, run:
:program:`rndc-confgen`
See Also
~~~~~~~~
:iscman:`rndc(8) <rndc>`, :iscman:`rndc.conf(5) <rndc.conf>`, :iscman:`named(8) <named>`, BIND 9 Administrator Reference Manual.

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