Commit Graph

33995 Commits

Author SHA1 Message Date
Ondřej Surý
4b93ec0805 Fix typo in qname-wait-recurse
In the RPZ documentation, there's a mistake where it states that the
default behavior will be disabled by setting `qname-wait-recurse yes;`
while in fact it's opposite `qname-wait-recurse no;`.

This affects only the RST documentation.

(cherry picked from commit 1e711dcccb)
2022-01-27 12:55:47 +01:00
Michał Kępień
0362d04fcc Merge branch 'michal/misc-test-framework-fixes-v9_16' into 'v9_16'
[v9_16] Miscellaneous test framework fixes

See merge request isc-projects/bind9!5764
2022-01-26 14:59:54 +00:00
Michał Kępień
d995bd8dec Fix waiting for lock file removal upon exit
Commit c787a539d2 fixed a certain class of
intermittent system test failures caused by named instances unable to
restart.  The root cause was bin/tests/system/stop.pl returning without
waiting for a named instance to remove its lock file.

Later on, it turned out that the above change causes other issues on
Windows due to the way named handles signals on that platform.  Commit
761ba4514f intended to address those
issues by making the server_lock_file() subroutine in
bin/tests/system/stop.pl return an empty value on Windows, in order to
prevent the script for waiting for lock file cleanup on that platform.
Note, however, that Windows detection in that subroutine is limited to
checking whether the CYGWIN environment variable is set.

While that environment variable was not set on Unix-like systems before
commit 761ba4514f, another commit
(a33237f070, merged a few weeks later)
changed that by setting the CYGWIN environment variable to an empty
value on Unix-like systems.  This made the defined($ENV{'CYGWIN'}) check
in server_lock_file() return true, inadvertently preventing
bin/tests/system/stop.pl from waiting for lock file removal before
exiting on Unix-like systems and therefore reintroducing the original
issue.

Fix by making server_lock_file() only return an empty value when the
CYGWIN environment variable is set to a non-empty value (which is what
bin/tests/system/conf.sh.win32 does).  Adjust a similar check in the
pid_file_exists() subroutine in the same way for consistency.

(cherry picked from commit a938db2170)
2022-01-26 15:29:39 +01:00
Michał Kępień
93ad500f38 Do not strip leading whitespace from test output
The echo_*() and cat_*() functions in bin/tests/system/conf.sh.common
call the "read" builtin command without specifying the field separator
to use.  This results in leading whitespace getting stripped from each
line of the texts passed to those functions, which mangles e.g. pytest
output, hindering test failure troubleshooting.

Address by setting IFS to an empty value for the "read" calls used in
the aforementioned helper functions.

(cherry picked from commit fb87022115)
2022-01-26 15:29:39 +01:00
Michał Kępień
318adbee61 Retain all named.run files from each test run
The bin/tests/system/start.pl script truncates the named.run file for a
given named instance unless it is invoked with the --restart
command-line option.  Ever since Python-based tests were introduced,
bin/tests/system/run.sh may start named instances used by a given system
test multiple times within a single run, causing the
bin/tests/system/start.pl script to truncate some of the log files
written during the test.  This makes troubleshooting certain test
failures hard or even impossible.

Fix by calling bin/tests/system/start.pl with the --restart command-line
option for every start_servers() invocation except the first one.

(cherry picked from commit 65abbca79b)
2022-01-26 15:29:39 +01:00
Petr Špaček
e9673d7cd1 Merge branch 'pspacek/misc-doc-cleanups-v9_16' into 'v9_16'
Miscellaneous documentation cleanups [v9_16]

See merge request isc-projects/bind9!5754
2022-01-26 11:14:21 +00:00
Petr Špaček
57f5a2f6e0 Fix incorrect RFC footnote about A6 RR type in RFC4033
A6 type is not mentioned anywhere in RFC4033.

(cherry-picked from commit ee3ba3cac9)
2022-01-26 12:03:35 +01:00
Petr Špaček
c843c73e42 Remove RFCs not implemented in BIND from list in the ARM
This commit partially removes extra RFCs which are not listed in
file doc/misc/rfc-compliance.

Most of the removed RFCs are either outright obsolete, irrelevant,
or not implemented. Rationale:
- 974 - obsolete
- 1033 - ops info, hardly followed today
- 1464 - ops info
- 1591 - policy
- 1537 - obsolete
- 1713 - obsolete
- 1794 - notimp
- 2010 - ops info
- 2052 - obsolete
- 2065 - obsolete
- 2137 - obsolete
- 2168 - obsolete
- 2240 - obsolete
- 2345 - not dns
- 2352 - not dns
- 2540 - notimp
- 2825 - notimp, info, obsolete
- 2826 - notimp
- 2929 - obsolete
- 3071 - policy
- 3090 - obsolete
- 3258 - notimp
- 6594 - iana, SSHFP
- 7216 - not dns
- 8482 - notimp
- 8490 - notimp

Probably most notable RFCs removed are:
- 8482 for special ANY handling
- 8490 for Stateful Operations
As far as I can tell BIND does not implement those.

(cherry-picked from commit 8c82b0f2d0)
2022-01-26 12:03:35 +01:00
Petr Špaček
e538995890 Reword RFC section in the ARM
Add couple links and caveant for uninitiated readers.

(cherry-picked from commit 4379e16996)
2022-01-26 12:03:35 +01:00
Petr Špaček
b73623370e Add RFCs listed in doc/misc/rfc-compliance to doc/arm/general.rst
There were three RFCs listed in list of "RFCs we implement" but missing
in the ARM.

Command to compare lists in the two documents:

    diff <(grep -o '^  RFC[0-9]\+' doc/misc/rfc-compliance | sed -e 's/[^0-9]//g' | sort -n) <(grep  '^:rfc:`' doc/arm/general.rst | sed -e 's/^.*`\([0-9]*\)`.*$/\1/' | sort -n)

(cherry-picked from commit b1af79acc7)
2022-01-26 12:03:35 +01:00
Petr Špaček
fc77d0e4bf Rework doc/arm/build.rst
- Revise the list of required libraries.
  - Apply miscellaneous tweaks to style, formatting, and ordering.

(cherry-picked from commit 4b1c70de90)
2022-01-26 12:03:35 +01:00
Petr Špaček
2542fdf059 Deduplicate text between Building BIND 9 / Supported Platforms in the ARM
Supported Platforms section is now really only about platforms and not
libraries. Libraries were moved to the Building BIND section.

We now have section for required libraries, and second with optional
features.  Wordy explanations were taken verbatim from the original
README.md.

(cherry-picked from commit 2c81fa9013)
2022-01-26 12:03:35 +01:00
Petr Špaček
93f782581e Replace Building BIND 9 section in README with reference to ARM
Plain-text README file was regenerated using commands from v9.16
Makefile.

(cherry-picked from commit 933ed9d537)
2022-01-26 12:03:35 +01:00
Petr Špaček
d351f78709 Convert "Building BIND" section from README.md to reStructuredText
Converted using pandoc 2.14.2-14 on Arch Linux:

    $ pandoc --shift-heading-level-by=-1 -f markdown -t rst README.md > doc/arm/build.rst

Plus hand-edit to remove sections other than Building BIND 9, remove
misindentation in section headers, and add a standard copyright header.
2022-01-26 12:03:35 +01:00
Petr Špaček
5058817f5a Link to ISC KB for most up-to-date platform support statuses
(cherry-picked from commit 3bd4318fcc)
2022-01-26 12:03:35 +01:00
Petr Špaček
27cfa574dc Replace all occurences of PLATFORMS file with reference to the ARM
The conf.py exclude_patterns now includes platforms.rst to avoid
problems with redefining labels:
https://github.com/sphinx-doc/sphinx/issues/1668#issuecomment-71376208

Plain-text README file was regenerated using commands from v9.16
Makefile.

(cherry-picked from commit 920a2e730b)
2022-01-26 12:03:35 +01:00
Petr Špaček
dd901b5c42 Replace duplicate Supported Operating Systems in the ARM by PLATFORMS.rst
(cherry-picked from commit f693c9b1a7)
2022-01-26 12:03:35 +01:00
Petr Špaček
b13592f650 Convert PLATFORMS file from Markdown to reStructuredText
Converted using pandoc 2.14.2-14 on Arch Linux:

    $ pandoc -f markdown -t rst PLATFORMS.md > PLATFORMS.rst

The pandoc-generated copyright header was subsequently replaced with
usual one for .rst files.
2022-01-26 12:03:30 +01:00
Arаm Sаrgsyаn
5fba218bf4 Merge branch '3060-revert-view-on-failed-reconfig-v9_16' into 'v9_16'
[v9_16] Improve the view configuration error handling and reverting logic

See merge request isc-projects/bind9!5753
2022-01-26 08:43:31 +00:00
Aram Sargsyan
4ada743291 Don't use RTLD_DEEPBIND with sanitizers
dlopen(3) RTLD_DEEPBIND flag is incompatible with sanitizer runtime
(see https://github.com/google/sanitizers/issues/611 for details).
2022-01-26 08:19:02 +00:00
Aram Sargsyan
254cabb558 Fix a memory leak in dns_dlzcreate()
dns_dlzcreate() fails to free the memory allocated for dlzname
when an error occurs.

Free dlzname's memory (acquired earlier with isc_mem_strdup())
by calling isc_mem_free() before returning an error code.

(cherry picked from commit 4a6c66288f)
2022-01-26 08:19:02 +00:00
Aram Sargsyan
b5735ec37a Fix invalid control port number in the catz system test
When failure is expected, the `rndc` command in the catz system test
is being called directly instead of using a function, i.e.:

    $RNDC -c ../common/rndc.conf -s 10.53.0.2 -p 9953 reconfig \
        > /dev/null 2>&1 && ret=1

... instead of:

    rndccmd 10.53.0.2 reconfig && ret=1

This is done to suppress messages like "lt-rndc: 'reconfig' failed:
failure" appearing in the message log of the test, because failure
is actually expected, and the appearance of that message can be
confusing.

The port value used in this case is not correct, making the
`rndc reload` command to fail.  This error was not detected earlier
only because the failure of the command is actually expected, but
the failure happens for a "wrong" reason, and the test still passes.

Fix the error by using the existing variable instead of the fixed
number.

(cherry picked from commit 5f9d4b5db4)
2022-01-26 08:19:02 +00:00
Aram Sargsyan
094e416fff Add a system test for view reverting after a failed reconfiguration
Test the view reverting code by introducing a faulty dlz configuration
in named.conf and using `rndc reconfig` to check if named handles the
situation correctly.

We use "dlz" because the dlz processing code is located in an ideal
place in the view configuration function for the test to cover the
view reverting code.

This test is specifically added to the catz system test to additionally
cover the catz reconfiguration during the mentioned failed
reconfiguration attempt.

(cherry picked from commit 62337d433f)
2022-01-26 08:19:02 +00:00
Aram Sargsyan
acc774e4dd Add CHANGES and release notes for [GL #3060]
(cherry picked from commit d7dfa2dc4b)
2022-01-26 08:19:02 +00:00
Aram Sargsyan
a663216c0e Improve the zones' view reverting logic when a zone is a catalog zone
When a zone is being configured with a new view, the catalog zones
structure will also be linked to that view. Later on, in case of some
error, should the zone be reverted to the previous view, the link
between the catalog zones structure and the view won't be reverted.

Change the dns_zone_setviewrevert() function so it calls
dns_zone_catz_enable() during a zone revert, which will reset the
link between `catzs` and view.

(cherry picked from commit 2fd967136a)
2022-01-26 08:19:02 +00:00
Aram Sargsyan
885e44650b Separate the locked parts of dns_zone_catz_enable/disable functions
Separate the locked parts of dns_zone_catz_enable() and
dns_zone_catz_disable() functions into static functions.  This will
let us perform those tasks from the other parts of the module while
the zone is locked, avoiding one pair of additional unlocking and
locking operations.

(cherry picked from commit 6b937ed5f6)
2022-01-26 08:19:02 +00:00
Aram Sargsyan
f555f1d2eb Improve the view configuration error handling and reverting logic
If a view configuration error occurs during a named reconfiguration
procedure, BIND can end up having twin views (old and new), with some
zones and internal structures attached to the old one, and others
attached to the new one, which essentially creates chaos.

Implement some additional view reverting mechanisms to avoid the
situation described above:

 1. Revert rpz configuration.

 2. Revert catz configuration.

 3. Revert zones to view attachments.

(cherry picked from commit 3697560f04)
2022-01-26 08:19:02 +00:00
Evan Hunt
8e9e2d7608 Merge branch '3111-fix-dlz-pthreads' into 'v9_16'
restore missing lines in dlz_pthread.h

See merge request isc-projects/bind9!5757
2022-01-26 05:09:10 +00:00
Evan Hunt
5996c73516 restore missing lines in dlz_pthread.h
some lines were accidentally deleted during a backport that
made it imposisble to build DLZ modules.
2022-01-25 12:28:48 -08:00
Petr Špaček
7b50984350 Merge branch 'pspacek/fix-historical-relnotes' into 'v9_16'
[v9_16] Fix historical release notes

See merge request isc-projects/bind9!5722
2022-01-24 16:39:22 +00:00
Petr Špaček
675f6c6b57 Remove reference to (unavailable) nsdname-wait-recurse option from ARM
This option is available only in 9.16-S edition, but docs for it were
accidentally imported when documentation was migrated to Sphinx in
!3536.
2022-01-24 17:34:53 +01:00
Petr Špaček
ea4a90a96a Fix inconsistent release note for #1807
This was an omission in !3495.
2022-01-24 17:34:53 +01:00
Petr Špaček
c3a1287e1f Add missing release notes for CVE-2020-8616 and CVE-2020-8617
These release notes were lost when converting docs from XML to RST
formats. These two notes were removed by commit
5a855f6754.

Related: #1388, #1703, !3536
2022-01-24 17:34:48 +01:00
Ondřej Surý
5656609879 Merge branch 'ondrej/use-utc-for-reproducible-builds-v9_16' into 'v9_16'
Use UTC datetime for reproducible builds

See merge request isc-projects/bind9!5751
2022-01-24 15:35:09 +00:00
Ondřej Surý
7df5065c75 Use UTC datetime for reproducible builds
For reproducible builds, we use last modification time of the CHANGES
file.  This works pretty well, unless the builds are made in different
timezones.

Use UTC option to date command to make the builds reproducible.
2022-01-24 16:24:36 +01:00
Petr Špaček
c4769937a5 Merge branch 'pspacek/remove-duplicate-named.conf.rst-v9_16' into 'v9_16'
Remove duplicate named.conf.rst file [v9_16]

See merge request isc-projects/bind9!5746
2022-01-21 14:43:21 +00:00
Petr Špaček
da70d59f40 Remove duplicate named.conf.rst file
As far as I can tell, it is some leftover from the times when Sphinx
docs were introduced (commit 9fb6d11abb).
It seems like it is not referenced from anywhere.

(cherry picked from commit 0a5c2c23bb)
2022-01-21 15:33:40 +01:00
Michał Kępień
fbb824c167 Merge branch 'v9_16_25-release' into 'v9_16'
Merge 9.16.25 release branch

See merge request isc-projects/bind9!5742
2022-01-20 10:43:21 +00:00
Michał Kępień
5111a76eb0 Prepare release notes for BIND 9.16.26 2022-01-20 11:38:18 +01:00
Tinderbox User
f4cdb2448c Merge branch 'prep-release' into v9_16_25-release 2022-01-20 11:37:08 +01:00
Michał Kępień
4a2f91272c Merge branch 'pspacek/prepare-documentation-for-bind-9.16.25' into 'v9_16_25-release'
Prepare documentation for BIND 9.16.25

See merge request isc-private/bind9!343
2022-01-20 11:37:08 +01:00
Tinderbox User
4e0d55cdcd prep 9.16.25 2022-01-20 11:37:08 +01:00
Michał Kępień
9987ff1edf Prepare release notes for BIND 9.16.25 2022-01-20 11:37:08 +01:00
Michał Kępień
c5f7ece3ad Reorder release notes 2022-01-20 11:37:08 +01:00
Petr Špaček
00aeba54c9 Tweak and reword release notes 2022-01-20 11:37:08 +01:00
Michał Kępień
3d1544726b Merge branch '3080-rndc-catch-canceled-v9_16' into 'v9_16'
rndc: add an extra task reference

See merge request isc-projects/bind9!5740
2022-01-20 08:06:21 +00:00
Evan Hunt
3aa529a9e0 CHANGES for [GL #3080] 2022-01-19 12:01:45 -08:00
Evan Hunt
075722f8a2 rndc: add an extra task reference
adding an extra task before launching the rndc app prevents
a use-after-free when task events fire after the app has been
shut down by a signal.
2022-01-19 11:05:00 -08:00
Ondřej Surý
65314e437f Merge branch 'each-fix-changes-v9_16' into 'v9_16'
fix CHANGES

See merge request isc-projects/bind9!5723
2022-01-17 10:59:39 +00:00
Evan Hunt
e437ef6d6b fix misplaced CHANGES note
Change #5676 was incorrectly placed under 9.16.24 when backporting,
but is actually in 9.16.25.
2022-01-17 11:55:46 +01:00