2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00
Commit Graph

34643 Commits

Author SHA1 Message Date
Ondřej Surý
f0e5428f78 Merge branch 'ondrej/introduce-isc_mem_reget' into 'main'
Add isc_mem_reget() function to realloc isc_mem_get allocations

See merge request isc-projects/bind9!5440
2021-09-23 20:35:29 +00:00
Ondřej Surý
d72d0149b0 Add CHANGES note for [GL !5440] 2021-09-23 22:17:15 +02:00
Ondřej Surý
8edbd0929f Use isc_mem_reget() to handle the internal active handle cache
The netmgr, has an internal cache for freed active handles.  This cache
was allocated using isc_mem_allocate()/isc_mem_free() API because it was
simpler to reallocate the cache when we needed to grow it.  The new
isc_mem_reget() function could be used here reducing the need to use
isc_mem_allocate() API which is tad bit slower than isc_mem_get() API.
2021-09-23 22:17:15 +02:00
Ondřej Surý
15d6249260 Use isc_mem_reget() when growing buffer dynamically
Previously, we cannot use isc_mem_reallocate() for growing the buffer
dynamically, because the memory was allocated using the
isc_mem_get()/isc_mem_put() API.  With the introduction of the
isc_mem_reget() function, we can use grow/shrink the memory directly
without always moving the memory around as the allocator might have
reserved some extra space after the initial allocation.
2021-09-23 22:17:15 +02:00
Ondřej Surý
4cdb3abf27 Return non-NULL pointer on zero-sized allocations and reallocations
Previously, the zero-sized allocations would return NULL pointer and the
caller had to make sure to not dereference such pointer.  The C standard
defines the zero-sized calls to malloc() as implementation specific and
jemalloc mallocx() with zero size would be undefined behaviour.  This
complicated the code as it had to handle such cases in a special manner
in all allocator and deallocator functions.

Now, for realloc(), the situation is even more complicated.  In C
standard up to C11, the behavior would be implementation defined, and
actually some implementation would free to orig ptr and some would not.
Since C17 (via DR400) would deprecate such usage and since C23, the
behaviour would be undefined.

This commits changes helper mem_get(), mem_put() and mem_realloc()
functions to grow the zero-allocation from 0 to sizeof(void *).

This way we get a predicable behaviour that all the allocations will
always return valid pointer.
2021-09-23 22:17:15 +02:00
Ondřej Surý
aeb3d1cab3 Add isc_mem_reget() function to realloc isc_mem_get allocations
The isc_mem_get() and isc_mem_put() functions are leaving the memory
allocation size tracking to the users of the API, while
isc_mem_allocate() and isc_mem_free() would track the sizes internally.
This allowed to have isc_mem_rellocate() to manipulate the memory
allocations by the later set, but not the former set of the functions.

This commit introduces isc_mem_reget(ctx, old_ptr, old_size, new_size)
function that operates on the memory allocations with external size
tracking completing the API.
2021-09-23 11:18:07 -07:00
Matthijs Mekking
c5c6a76e8c Merge branch 'matthijs-fix-arm-typos' into 'main'
The s stands for security

See merge request isc-projects/bind9!5428
2021-09-23 07:52:09 +00:00
Matthijs Mekking
4e3ba81696 Remove copy paste error on zone-max-ttl
The "zone-max-ttl" option inside a "dnssec-policy" is not used to cap
the TTLs in a zone, only yo calculate key rollover timings.
2021-09-23 09:51:40 +02:00
Matthijs Mekking
9ddc23b2bf Add a note about salt length
Apparently it is confusing that you don't specify a specific salt,
but a salt length.
2021-09-23 09:51:40 +02:00
Matthijs Mekking
a73a07832e The s stands for security
So "hardware security modules" not "hardware service modules"
2021-09-23 09:51:40 +02:00
Ondřej Surý
db00265dec Merge branch '2814-DLZ-drivers-additional-cleanups' into 'main'
Remove the DLZ driver documentation

Closes #2814

See merge request isc-projects/bind9!5431
2021-09-21 09:37:33 +00:00
Ondřej Surý
c478c77763 Remove CONTRIB_DLZ traces from bin/named/main.c
The named main.c had leftovers guarded by CONTRIB_DLZ macro which
has been removed.  This commit removes the dead code surrounded
by ifdef CONTRIB_DLZ.
2021-09-21 11:16:53 +02:00
Ondřej Surý
5acac71f20 Remove the DLZ driver documentation
Remove the last traces of static DLZ drivers from ARM.
2021-09-21 11:16:53 +02:00
Ondřej Surý
0b983fe2e5 Merge branch 'ondrej/remove-cruft-from-contrib' into 'main'
Remove old-style DLZ drivers linked into named at compile time

Closes #2814

See merge request isc-projects/bind9!5427
2021-09-20 21:01:40 +00:00
Ondřej Surý
e543054d56 Add CHANGES and release note for [GL #2814] 2021-09-20 22:26:17 +02:00
Ondřej Surý
b9319fc998 Remove couple old and rusty scripts from contrib/
* dnssec-keyset.sh - obsoleted by dnssec-policy
* named-bootconf.sh - unmaintained script from NetBSD that would
		      generate named.conf
2021-09-20 22:26:17 +02:00
Ondřej Surý
57b8a12734 Remove scripts to convert KASP to old dnssec-keymgr policy
The dnssec-keymgr has been replaces with dnssec-policy in the named, so
there's no need to carry the conversion script in the contrib/ anymore.
2021-09-20 22:26:17 +02:00
Ondřej Surý
b964e7882b Remove dnspriv example from the contrib directory
BIND 9 has now native DoH support, so there's no need to have nginx
proxy example in the contrib/ directory.
2021-09-20 22:26:17 +02:00
Ondřej Surý
354c5a358b Remove the mkdane.sh script from contrib directory
Better and maintained alternatives exists, f.e. sshfp package contains a
dane tool: https://github.com/xelerance/sshfp/
2021-09-20 22:26:17 +02:00
Ondřej Surý
67f76b1269 Add static Makefile to mysql and mysqldyn DLZ modules
Previously, the Makefiles for mysql and mysqldyn DLZ modules were
generated from autoconf to get CFLAGS and LIBS for MariaDB or MySQL
libraries.  The static Makefiles uses a simpler method by calling
`mysql_config` directly from the Makefile.
2021-09-20 22:26:17 +02:00
Ondřej Surý
e0f84e22ed Remove old-style DLZ drivers linked into named at compile time
The old-style DLZ drivers were already marked as no longer actively
maintained and expected to be removed eventually.  With the new automake
build system, the old-style DLZ drivers were not updated, and instead of
putting an effort into something that's not being maintained, let's
rather remove the unmaintained code.

Closes: #2814
2021-09-20 22:26:16 +02:00
Ondřej Surý
be99fc92b6 Merge branch '2882-deprecate-and-remove-masterfile-map-option' into 'main'
Remove the masterfile-format type 'map'

Closes #2882

See merge request isc-projects/bind9!5417
2021-09-17 07:10:48 +00:00
Ondřej Surý
c6e5a4bbc3 Add CHANGES and release note for [GL #2882] (removal) 2021-09-17 07:09:50 +02:00
Ondřej Surý
edee9440d0 Remove the mastefile-format map option
As previously announced, this commit removes the masterfile-format
format 'map' from named, all the tools, the documentation and the
system tests.
2021-09-17 07:09:50 +02:00
Ondřej Surý
1cc866fdef Merge branch '2882-deprecate-masterfile-map-option' into 'main'
Mark the masterfile-format type 'map' as deprecated

Closes #2882

See merge request isc-projects/bind9!5418
2021-09-17 04:18:19 +00:00
Ondřej Surý
c518036988 Add CHANGES and releases notes for [GL #2882] 2021-09-17 05:58:02 +02:00
Ondřej Surý
f4e6348f29 Add masterfile-format checkconf tests
Add tests that check that masterfile-format map generate deprecation
warning and mastefile-formats text and raw doesn't.
2021-09-17 05:58:02 +02:00
Ondřej Surý
6b7a488cbc Mark the masterfile-format type 'map' as deprecated
The map masterfile-format is very fragile and it needs API bump every
time a RBTDB data structures changes.  Also while testing it, we found
out that files larger than 2GB weren't loading and nobody noticed, and
loading many map files were also failing (subject to kernel limits).

Thus we are marking the masterfile-format type 'map' as deprecated and
to be removed in the next stable BIND 9 release.
2021-09-17 05:58:02 +02:00
Michal Nowak
04e3983817 Merge branch 'mnowak/replace-centos-with-oraclelinux' into 'main'
Replace CentOS 7 & 8 with Oracle Linux

See merge request isc-projects/bind9!5179
2021-09-16 14:02:26 +00:00
Michal Nowak
3085edf1a0 Replace CentOS 7 & 8 with Oracle Linux 2021-09-16 15:33:32 +02:00
Michał Kępień
ba181fe83d Merge branch 'michal/regenerate-man-pages-with-docutils-0.17.1' into 'main'
Regenerate man pages with docutils 0.17.1

See merge request isc-projects/bind9!5415
2021-09-16 09:00:01 +00:00
Michał Kępień
ffd1e71fdf Regenerate man pages with docutils 0.17.1
The Debian 10 (buster) Docker image, which GitLab CI uses for building
documentation, currently contains the following package versions:

  - Sphinx 4.2.0
  - sphinx-rtd-theme 1.0.0
  - docutils 0.17.1

Regenerate the man pages to match contents produced in a Sphinx
environment using the above package versions.  This is necessary to
prevent the "docs" GitLab CI job from failing.
2021-09-16 10:57:04 +02:00
Mark Andrews
f735eead0a Merge branch '2906-sig-signing-type-breaks-named-checkconf-p-pretty-output' into 'main'
Resolve "sig-signing-type breaks `named-checkconf -p` pretty output"

Closes #2906

See merge request isc-projects/bind9!5410
2021-09-16 08:41:26 +00:00
Mark Andrews
1dbca07b5a Add CHANGES for [GL #2906] 2021-09-16 18:19:37 +10:00
Mark Andrews
da0991d93b Check that sig-signing-type works
* showprivate needed to be extended to support the alternate type

* checkprivate updated to error when expected records are not present
2021-09-16 18:17:22 +10:00
Mark Andrews
79d665e841 Test that sig-signing-type is accepted 2021-09-16 18:17:22 +10:00
Mark Andrews
7f5f7b2d7b Specifying sig-signing-type causes named to fail
the range check error was being applied unconditionally
2021-09-16 18:17:22 +10:00
Evan Hunt
06a4c1d068 Merge branch '2903-cache-file' into 'main'
deprecate and remove "cache-file"

Closes #2903

See merge request isc-projects/bind9!5404
2021-09-16 07:39:11 +00:00
Evan Hunt
a27860ba57 mark "cache-file" as ancient and remove all code implementing it
"cache-file" was already documented as intended for testing
purposes only and not to be used, so we can remove it without
waiting.  this commit marks the option as "ancient", and
removes all the documentation and implementing code, including
dns_cache_setfilename() and dns_cache_dump().

it also removes the documentation for the '-x cachefile`
parameter to named, which had already been removed, but the man
page was not updated at the time.
2021-09-16 00:19:02 -07:00
Evan Hunt
a67d008ba5 deprecate "cache-file"
this commit marks the "cache-file" option as deprecated.
2021-09-16 00:19:02 -07:00
Michał Kępień
b3542aec55 Merge branch '2907-address-pylint-2.10.2-warnings' into 'main'
Address PyLint 2.10.2 warnings

Closes #2907

See merge request isc-projects/bind9!5412
2021-09-16 06:51:05 +00:00
Michał Kępień
e5944bc610 Remove redundant prefix from Python 3 strings
Address the following warnings reported by PyLint 2.10.2:

    ************* Module conf
    doc/arm/conf.py:90:10: W1406: The u prefix for strings is no longer necessary in Python >=3.0 (redundant-u-string-prefix)
    doc/arm/conf.py:92:12: W1406: The u prefix for strings is no longer necessary in Python >=3.0 (redundant-u-string-prefix)
    doc/arm/conf.py:93:9: W1406: The u prefix for strings is no longer necessary in Python >=3.0 (redundant-u-string-prefix)
    doc/arm/conf.py:143:31: W1406: The u prefix for strings is no longer necessary in Python >=3.0 (redundant-u-string-prefix)
    doc/man/conf.py:33:10: W1406: The u prefix for strings is no longer necessary in Python >=3.0 (redundant-u-string-prefix)
    doc/man/conf.py:38:12: W1406: The u prefix for strings is no longer necessary in Python >=3.0 (redundant-u-string-prefix)
    doc/man/conf.py:39:9: W1406: The u prefix for strings is no longer necessary in Python >=3.0 (redundant-u-string-prefix)
2021-09-16 08:22:01 +02:00
Michał Kępień
6a4b8b1456 Explicitly specify encoding for open() calls
Address the following warnings reported by PyLint 2.10.2:

    ************* Module tests-checkds
    bin/tests/system/checkds/tests-checkds.py:70:9: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
    bin/tests/system/checkds/tests-checkds.py:120:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
    bin/tests/system/checkds/tests-checkds.py:206:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
    ************* Module yamlget
    bin/tests/system/digdelv/yamlget.py:22:5: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
    ************* Module stress_http_quota
    bin/tests/system/doth/stress_http_quota.py:131:13: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
    ************* Module tests-rpz-passthru-logging
    bin/tests/system/rpzextra/tests-rpz-passthru-logging.py:40:9: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
    bin/tests/system/rpzextra/tests-rpz-passthru-logging.py:44:9: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
2021-09-16 08:22:01 +02:00
Michał Kępień
acb7e61409 Remove redundant zone_keyid() function
The zone_keyid() helper function defined in
bin/tests/system/statschannel/helper.py is not used anywhere.  Remove
it.
2021-09-16 08:22:01 +02:00
Michał Kępień
8bc4e90b10 Merge branch 'v9_17_18-release' into 'main'
Merge 9.17.18 release branch

See merge request isc-projects/bind9!5408
2021-09-15 20:59:39 +00:00
Michał Kępień
81f18aa5c7 Set up release notes for BIND 9.17.19 2021-09-15 22:49:20 +02:00
Michał Kępień
4509a84dbe Update BIND version to 9.17.18 2021-09-15 22:49:20 +02:00
Michał Kępień
8415f87913 Add a CHANGES marker 2021-09-15 22:49:20 +02:00
Michał Kępień
93ac2af667 Merge branch 'michal/prepare-documentation-for-bind-9.17.18' into 'v9_17_18-release'
Prepare documentation for BIND 9.17.18

See merge request isc-private/bind9!320
2021-09-15 22:49:20 +02:00
Michał Kępień
3af61f9672 Prepare release notes for BIND 9.17.18 2021-09-15 22:49:20 +02:00