Commit Graph
29294 Commits
Author SHA1 Message Date
Michał Kępień 796df91217 Test "--without-gssapi" in GitLab CI
GitLab CI pipelines do not currently include a Linux job that would have
GSSAPI support disabled.  Add the "--without-gssapi" option to the
./configure invocation on Debian 9 to address that deficiency and also
to continuously test that build-time switch.

(cherry picked from commit a3957af864)
2021-04-26 09:46:23 +02:00
Michał Kępień 7a06b8aefe Test "tkey-gssapi-credential" conditionally
If "tkey-gssapi-credential" is set in the configuration and GSSAPI
support is not available, named will refuse to start.  As the test
system framework does not support starting named instances
conditionally, ensure that "tkey-gssapi-credential" is only present in
named.conf if GSSAPI support is available.

(cherry picked from commit 6feac68b50)
2021-04-26 09:46:23 +02:00
Petr Špaček 19f0f0aa1a Merge branch '2634-test-tkey-gssapi-credential-v9_11' into 'v9_11'
Add tests for the "tkey-gssapi-credential" option

See merge request isc-projects/bind9!4934
2021-04-23 10:33:08 +00:00
Petr Špaček d0a16000dd Add tests for the "tkey-gssapi-credential" option
Four named instances in the "nsupdate" system test have GSS-TSIG support
enabled.  All of them currently use "tkey-gssapi-keytab".  Configure two
of them with "tkey-gssapi-credential" to test that option.

As "tkey-gssapi-keytab" and "tkey-gssapi-credential" both provide the
same functionality, no test modifications are required.  The difference
between the two options is that the value of "tkey-gssapi-keytab" is an
explicit path to the keytab file to acquire credentials from, while the
value of "tkey-gssapi-credential" is the name of the principal whose
credentials should be used; those credentials are looked up in the
keytab file expected by the Kerberos library, i.e. /etc/krb5.keytab by
default.  The path to the default keytab file can be overridden using by
setting the KRB5_KTNAME environment variable.  Utilize that variable to
use existing keytab files with the "tkey-gssapi-credential" option.

The KRB5_KTNAME environment variable should not interfere with the
"tkey-gssapi-keytab" option.  Nevertheless, rename one of the keytab
files used with "tkey-gssapi-keytab" to something else than the contents
of the KRB5_KTNAME environment variable in order to make sure that both
"tkey-gssapi-keytab" and "tkey-gssapi-credential" are actually tested.

(cherry picked from commit 1746d2e84a)
2021-04-23 10:24:00 +02:00
Michał Kępień c92b2d4b30 Merge branch '2634-fix-handling-undefined-GSS_SPNEGO_MECHANISM-macro-v9_11' into 'v9_11'
[v9_11] Fix handling undefined GSS_SPNEGO_MECHANISM macro

See merge request isc-projects/bind9!4903
2021-04-16 13:00:08 +00:00
Michał Kępień 86a3b8e269 Add CHANGES entry
(cherry picked from commit 381202629e)
2021-04-16 14:54:31 +02:00
Michał Kępień 870701c336 Fix handling undefined GSS_SPNEGO_MECHANISM macro
BIND 9 attempts to look up GSSAPI OIDs for the Kerberos 5 and SPNEGO
mechanisms in the relevant header files provided by the Kerberos/GSSAPI
library used.  Due to the differences between various Kerberos/GSSAPI
implementations, if any of the expected preprocessor macros
(GSS_KRB5_MECHANISM, GSS_SPNEGO_MECHANISM) is not defined in the header
files provided by the library used, the code in lib/dns/gssapictx.c
defines its own version of each missing macro, so that BIND 9 can
attempt to use the relevant security mechanisms anyway.

Commit 7f08c756aa, which contains a
partial backport of the changes introduced in commit
978c7b2e89, left a block of code in the
lib/dns/include/dst/gssapi.h header which defines the
GSS_SPNEGO_MECHANISM preprocessor macro to NULL if it is not defined by
any header file provided by the Kerberos/GSSAPI library used.  This
causes the gss_add_oid_set_member() call in the mech_oid_set_create()
helper function to always return an error.  This in turn causes the
dst_gssapi_acquirecred() function to also always return an error, which
ultimately prevents any named instance whose configuration includes the
"tkey-gssapi-credential" option from starting.

Remove the offending conditional definition of the GSS_SPNEGO_MECHANISM
preprocessor macro from lib/dns/include/dst/gssapi.h, so that a proper
GSSAPI OID is assigned to that macro in lib/dns/gssapictx.c when the
Kerberos/GSSAPI library used does not define it.

(cherry picked from commit 648ef3a2b4)
2021-04-16 14:54:31 +02:00
Michał Kępień ca42d0c93f Roll back unnecessary libtool updates
Commit 7f08c756aa inadvertently included
libtool updates which were unrelated to the removal of custom SPNEGO
code.  Roll these updates back to avoid confusion.

(cherry picked from commit 87f1db2ce4)
2021-04-16 14:54:31 +02:00
Mark Andrews e4c36e78ac Merge branch '2597-make-calling-generic-rdata-methods-consistent-v9_11' into 'v9_11'
Make calling generic rdata methods consistent

See merge request isc-projects/bind9!4844
2021-04-13 02:11:05 +00:00
Mark Andrews 25ba866b62 Make calling generic rdata methods consistent
add matching macros to pass arguments from called methods
to generic methods.  This will reduce the amount of work
required when extending methods.

Also cleanup unnecessary UNUSED declarations.

(cherry picked from commit a88d3963e2)
2021-04-13 01:53:26 +00:00
Michał Kępień bca041aa5b Merge branch '2620-free-resources-when-gss_accept_sec_context-fails-v9_11' into 'v9_11'
[v9_11] Free resources when gss_accept_sec_context() fails

See merge request isc-projects/bind9!4876
2021-04-08 09:26:56 +00:00
Michał Kępień 3726321304 Add CHANGES entry
(cherry picked from commit 7eb87270a4)
2021-04-08 11:04:42 +02:00
Michał Kępień dc1ed88776 Free resources when gss_accept_sec_context() fails
Even if a call to gss_accept_sec_context() fails, it might still cause a
GSS-API response token to be allocated and left for the caller to
release.  Make sure the token is released before an early return from
dst_gssapi_acceptctx().

(cherry picked from commit d954e152d9)
2021-04-08 11:04:21 +02:00
Michał Kępień 0c04b83106 Merge branch 'michal/fix-triggering-rules-for-the-tarball-create-job-v9_11' into 'v9_11'
[v9_11] Fix triggering rules for the "tarball-create" job

See merge request isc-projects/bind9!4872
2021-04-07 20:37:25 +00:00
Michał Kępień ba106468a9 Fix triggering rules for the "tarball-create" job
Commit de35d321f0 (a backport of commit
4d5d3b75da) did not account for the fact
that the "tarball-create" GitLab CI job is not created for manually
triggered pipelines.  This prevents manual pipeline creation from
succeeding as it causes the "gcc:tarball" job to have unsatisfied
dependencies.  Make sure the "tarball-create" job is created for
manually triggered pipelines to allow such pipelines to be started
again.

(cherry picked from commit 233294d750)
2021-04-07 22:34:15 +02:00
Diego dos Santos Fronza e4d6bf4434 Merge branch '2582-threadsanitizer-data-race-lib-dns-zone-c-10272-7-in-zone_maintenance-v9_11' into 'v9_11'
Resolve TSAN data race in zone_maintenance

See merge request isc-projects/bind9!4868
2021-04-07 14:47:29 +00:00
Diego Fronza e2e6fd4fa0 Resolve TSAN data race in zone_maintenance
Fix race between zone_maintenance and dns_zone_notifyreceive functions,
zone_maintenance was attempting to read a zone flag calling
DNS_ZONE_FLAG(zone, flag) while dns_zone_notifyreceive was updating
a flag in the same zone calling DNS_ZONE_SETFLAG(zone, ...).

The code reading the flag in zone_maintenance was not protected by the
zone's lock, to avoid a race the zone's lock is now being acquired
before an attempt to read the zone flag is made.
2021-04-07 10:48:12 -03:00
Ondřej Surý 58808db133 Merge branch '2607-remove-custom-spnego-v9_11' into 'v9_11'
Remove custom ISC SPNEGO implementation (v9.11)

See merge request isc-projects/bind9!4857
2021-04-01 14:14:58 +00:00
Mark AndrewsandOndřej Surý 858b2aaf00 Add CHANGES and release note for GL #2607 2021-04-01 16:12:41 +02:00
Ondřej SurýandOndřej Surý 224ce9e0c0 Move the dummy shims to single ifndef GSSAPI block
Previously, every function had it's own #ifdef GSSAPI #else #endif block
that defined shim function in case GSSAPI was not being used.  Now the
dummy shim functions have be split out into a single #else #endif block
at the end of the file.

This makes the gssapictx.c similar to 9.17.x code, making the backports
and reviews easier.
2021-04-01 10:39:48 +02:00
Mark AndrewsandOndřej Surý 57de8df75b Add Heimdal compatibility support
The Heimdal Kerberos library handles the OID sets in a different manner.
Unify the handling of the OID sets between MIT and Heimdal
implementations by dynamically creating the OID sets instead of using
static predefined set.  This is how upstream recommends to handle the
OID sets.
2021-04-01 10:39:48 +02:00
Mark AndrewsandOndřej Surý 383297f80b Request krb5 CFLAGS and LIBS from $KRB5_CONFIG
The GSSAPI now needs both gssapi and krb5 libraries, so we need to
request both CFLAGS and LIBS from the configure script.
2021-04-01 10:39:48 +02:00
Mark AndrewsandOndřej Surý 7f08c756aa Remove custom ISC SPNEGO implementation
The custom ISC SPNEGO mechanism implementation is no longer needed on
the basis that all major Kerberos 5/GSSAPI (mit-krb5, heimdal and
Windows) implementations support SPNEGO mechanism since 2006.

This commit removes the custom ISC SPNEGO implementation, and removes
the option from both autoconf and win32 Configure script.  Unknown
options are being ignored, so this doesn't require any special handling.
2021-04-01 10:39:48 +02:00
Mark AndrewsandOndřej Surý 0e9cd93c06 Handle expected signals in tsiggss authsock.pl script
When the authsock.pl script would be terminated with a signal,
it would leave the pidfile around.  This commit adds a signal
handler that cleanups the pidfile on signals that are expected.
2021-04-01 10:19:33 +02:00
Michal Nowak 4034b703fd Merge branch 'mnowak/web-run-gcc-tarball-ci-job-v9_11' into 'v9_11'
[v9_11] Run gcc:tarball CI job in web-triggered pipelines

See merge request isc-projects/bind9!4853
2021-03-31 15:04:22 +00:00
Michal Nowak de35d321f0 Run gcc:tarball CI job in web-triggered pipelines
The gcc:tarball CI job may identify problems with tarballs created by
"make dist" of the tarball-create CI job. Enabling the gcc:tarball CI
job in web-triggered pipelines provides developers with a test vector.

(cherry picked from commit 4d5d3b75da)
2021-03-31 16:55:34 +02:00
Michal Nowak 697e0c1178 Merge branch 'v9_11_29-release' into 'v9_11'
Merge 9.11.29 release branch

See merge request isc-projects/bind9!4822
2021-03-19 09:38:22 +00:00
Michal Nowak 136fc17bd3 Set up release notes for BIND 9.11.30 2021-03-18 18:27:34 +01:00
Michal Nowak 9dbd9c7abd Bump BIND_BASELINE_VERSION for ABI checks 2021-03-18 18:08:28 +01:00
Tinderbox User a35739f6ad Merge branch 'prep-release' into v9_11_29-release v9.11.29 2021-03-09 12:49:28 +00:00
Tinderbox User c06787e095 prep 9.11.29 2021-03-09 12:49:04 +00:00
Michal Nowak 8253f9829f Merge branch 'mnowak/prepare-documentation-for-bind-9.11.29' into 'v9_11_29-release'
Prepare documentation for BIND 9.11.29

See merge request isc-private/bind9!268
2021-03-09 09:18:13 +00:00
Michal Nowak ac1c862bb9 Prepare release notes for BIND 9.11.29 2021-03-08 18:28:02 +01:00
Michal Nowak 94e4c071c0 Tweak and reword release notes 2021-03-08 18:27:45 +01:00
Michal Nowak b44eca143b Tweak and reword recent CHANGES entries 2021-03-08 12:52:02 +01:00
Ondřej Surý ff463f375f Merge branch '2238-fix-back-port-issues-missing-checks' into 'v9_11'
Resolve "Fix back port issues:  missing checks."

See merge request isc-projects/bind9!4637
2021-02-25 08:16:15 +00:00
Mark Andrews dc88bd641d Address unchecked returns leading to NULL pointer dereferences
on out of memory conditions.
2021-02-25 11:44:28 +11:00
Michal Nowak cfcd42f6a2 Merge branch '2446-query-c-5430-16-runtime-error-v9_11' into 'v9_11'
[v9_11] Initialize checknames field in dns_view_create()

See merge request isc-projects/bind9!4736
2021-02-23 16:48:54 +00:00
Michal Nowak b9ef330fbe Initialize checknames field in dns_view_create()
The 'checknames' field wasn't initialized in dns_view_create(), but it
should otherwise AddressSanitizer identifies the following runtime error
in query_test.c.

    runtime error: load of value 190, which is not a valid value for type '_Bool'

(cherry picked from commit 0c6fa16477)
2021-02-23 16:48:10 +01:00
Michal Nowak aa4d0ab62d Merge branch 'mnowak/alpine-3.13-v9_11' into 'v9_11'
[v9_11] Add Alpine Linux 3.13

See merge request isc-projects/bind9!4733
2021-02-23 15:05:17 +00:00
Michal Nowak 85f7448c37 Add Alpine Linux 3.13
(cherry picked from commit 909c85f7a9)
2021-02-23 15:48:52 +01:00
Michal Nowak d16cba2698 Merge branch 'mnowak/pairwise-pict-keep-stderr-v9_11' into 'v9_11'
[v9_11] Do not remove stderr from pict output

See merge request isc-projects/bind9!4731
2021-02-23 14:32:35 +00:00
Michal Nowak eb576888da Do not remove stderr from pict output
Removing stderr from the pict tool serves no purpose and drops valuable
information, we might use when debugging failed pairwise CI job, such
as:

    Input Error: A parameter names must be unique

(cherry picked from commit 079debaa10)
2021-02-23 15:27:59 +01:00
Mark Andrews e42577800b Merge branch '2499-a-loc-record-with-a-invalid-direction-field-triggers-an-insist-v9_11' into 'v9_11'
Resolve "A LOC record with a invalid direction field triggers an INSIST"

See merge request isc-projects/bind9!4712
2021-02-19 01:07:26 +00:00
Mark Andrews 894f25082e Add release note for [GL #2499]
(cherry picked from commit 3d340ecfd2)
2021-02-19 11:44:08 +11:00
Mark Andrews 5e2b287f63 Add CHANGES for [GL #2499]
(cherry picked from commit 6f47e0956c)
2021-02-19 11:41:02 +11:00
Mark Andrews 0ee76590d6 Correctly detect when get_direction failed
(cherry picked from commit 009358d77d)
2021-02-19 11:40:05 +11:00
Mark Andrews 4af7a5f1b1 Test a LOC record with an invalid direction field
(cherry picked from commit 07902d9f9d)
2021-02-19 11:40:04 +11:00
Michal Nowak 4e8f6962f0 Merge branch 'mnowak/make-kyua-report-html-less-verbose-v9_11' into 'v9_11'
[v9_11] Make "kyua report-html" less verbose on stdout

See merge request isc-projects/bind9!4708
2021-02-18 14:58:05 +00:00
Michal Nowak b3cc0b6128 Make "kyua report-html" less verbose on stdout
"kyua report-html" command in CI generates more than two pages of output
to stdout, which is nothing but which HTML pages Kyua generated, e.g.:

  Generating kyua_html/context.html
  Generating kyua_html/lib_dns_tests_acl_test_main.html
  ...
  Generating kyua_html/lib_ns_tests_query_test_main.html
  Generating kyua_html/report.css
  Generating kyua_html/index.html

This is seldomly useful and requires the user to scroll three pages
upwards to get to unit test results.

(cherry picked from commit 74fa196286)
2021-02-18 15:49:37 +01:00