Commit graph

1037 commits

Author SHA1 Message Date
Tinderbox User
13b9f23cce prep 9.16.17 2021-06-16 22:29:27 +02:00
Ondřej Surý
ce0083474e Cleanup the remaining of HAVE_UV_<func> macros
While cleaning up the usage of HAVE_UV_<func> macros, we forgot to
cleanup the HAVE_UV_UDP_CONNECT in the actual code and
HAVE_UV_TRANSLATE_SYS_ERROR and this was causing Windows build to fail
on uv_udp_send() because the socket was already connected and we were
falsely assuming that it was not.

The platforms with autoconf support were not affected, because we were
still checking for the functions from the configure.

(cherry picked from commit 67afea6cfc)
2021-06-02 12:01:29 +02:00
Ondřej Surý
4db28d79b1 Add uv_os_getenv() and uv_os_setenv() compatibility shims
The uv_os_getenv() and uv_os_setenv() functions were introduced in the
libuv >= 1.12.0.  Add simple compatibility shims for older versions.

(cherry picked from commit 7477d1b2ed)
2021-05-31 16:57:19 +02:00
Ondřej Surý
0ce462ab8e Add uv_req_get_data() and uv_req_set_data() compatibility shims
The uv_req_get_data() and uv_req_set_data() functions were introduced in
libuv >= 1.19.0, so we need to add compatibility shims with older libuv
versions.

(cherry picked from commit f752840db3)
2021-05-31 16:57:19 +02:00
Ondřej Surý
68cb38fc60 Cleanup the uv_import check
The uv_import() is not needed anymore, so we can remove the autoconf
check for it.

(cherry picked from commit 7b02848865)
2021-05-31 16:57:19 +02:00
Diego Fronza
4ed22937d8 Add malloc attribute to memory allocation functions
The malloc attribute allows compiler to do some optmizations on
functions that behave like malloc/calloc, like assuming that the
returned pointer do not alias other pointers.
2021-05-27 15:42:36 +02:00
Michal Nowak
cfb8cf5294
Add py.test to the list of tested pytest names
OpenBSD changed the name of the pytest script from py.test-3 in OpenBSD
6.8 to py.test in OpenBSD 6.9.

The py.test-3 name which was added in d5562a3e for the sake of OpenBSD
and CentOS is still required for CentOS.

(cherry picked from commit 510b4b70e9)
2021-05-17 11:28:31 +02:00
Ondřej Surý
4d027ab945 Remove TLSDNS, TLS and HTTP protocols from netmgr
For further stabilization of the 9.16 branch, we are removing the unused
protocols from the netmgr.
2021-05-14 12:52:48 +02:00
Evan Hunt
ef1d909fa9 backport of netmgr/taskmgr to 9.16
this rolls up numerous changes that have been applied to the
main branch, including moving isc_task operations into the
netmgr event loops, and other general stabilization.
2021-05-14 12:52:48 +02:00
Michał Kępień
41d18279e4 Regenerate configure 2021-04-29 11:39:56 +02:00
Tinderbox User
b0f44204fa prep 9.16.15 2021-04-29 11:12:38 +02:00
Tinderbox User
4999118246 prep 9.16.14 2021-04-29 11:12:38 +02:00
Evan Hunt
28511bfcfd move samples/resolve.c to bin/tests/system
"resolve" is used by the resolver system tests, and I'm not
certain whether delv exercises the same code, so rather than
remove it, I moved it to bin/tests/system.

(cherry picked from commit d0ec7d1f33)
2021-04-19 14:32:53 +02:00
Mark Andrews
6b0b0c6aba 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:42:32 +02:00
Mark Andrews
a875dcc669 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:42:32 +02:00
Ondřej Surý
2f0f531ee8 Use library constructor/destructor to initialize OpenSSL
Instead of calling isc_tls_initialize()/isc_tls_destroy() explicitly use
gcc/clang attributes on POSIX and DLLMain on Windows to initialize and
shutdown OpenSSL library.

This resolves the issue when isc_nm_create() / isc_nm_destroy() was
called multiple times and it would call OpenSSL library destructors from
isc_nm_destroy().

At the same time, since we now have introduced the ctor/dtor for libisc,
this commit moves the isc_mem API initialization (the list of the
contexts) and changes the isc_mem_checkdestroyed() to schedule the
checking of memory context on library unload instead of executing the
code immediately.
2021-02-26 17:18:06 +01:00
Ondřej Surý
effe3ee595 Refactor TLSDNS module to work with libuv/ssl directly
* Following the example set in 634bdfb16d, the tlsdns netmgr
  module now uses libuv and SSL primitives directly, rather than
  opening a TLS socket which opens a TCP socket, as the previous
  model was difficult to debug.  Closes #2335.

* Remove the netmgr tls layer (we will have to re-add it for DoH)

* Add isc_tls API to wrap the OpenSSL SSL_CTX object into libisc
  library; move the OpenSSL initialization/deinitialization from dstapi
  needed for OpenSSL 1.0.x to the isc_tls_{initialize,destroy}()

* Add couple of new shims needed for OpenSSL 1.0.x

* When LibreSSL is used, require at least version 2.7.0 that
  has the best OpenSSL 1.1.x compatibility and auto init/deinit

* Enforce OpenSSL 1.1.x usage on Windows

(cherry picked from commit e493e04c0f)
2021-02-26 16:14:50 +01:00
Michal Nowak
04aff208fb
Use BIND 9.17 preprocessor macro to skip unit test
BIND 9.17 changed exit code of skipped test to meet Automake
expectations in fa505bfb0e. BIND 9.16 was
not rewritten to Automake, but for consistency reasons, the same
SKIPPED_TEST_EXIT_CODE preprocessor macro is used (though the actual
exit code differs from the one in BIND 9.17).

(cherry picked from commit fa505bfb0e)
2021-02-17 12:09:25 +01:00
Ondřej Surý
0e25af628c Use -release instead of -version-info for internal library SONAMEs
The BIND 9 libraries are considered to be internal only and hence the
API and ABI changes a lot.  Keeping track of the API/ABI changes takes
time and it's a complicated matter as the safest way to make everything
stable would be to bump any library in the dependency chain as in theory
if libns links with libdns, and a binary links with both, and we bump
the libdns SOVERSION, but not the libns SOVERSION, the old libns might
be loaded by binary pulling old libdns together with new libdns loaded
by the binary.  The situation gets even more complicated with loading
the plugins that have been compiled with few versions old BIND 9
libraries and then dynamically loaded into the named.

We are picking the safest option possible and usable for internal
libraries - instead of using -version-info that has only a weak link to
BIND 9 version number, we are using -release libtool option that will
embed the corresponding BIND 9 version number into the library name.

That means that instead of libisc.so.1608 (as an example) the library
will now be named libisc-9.16.10.so.

(cherry picked from commit c605d75ea5)
2021-01-25 15:28:09 +01:00
Tinderbox User
536bc1163a prep 9.16.11 2021-01-21 09:11:54 +01:00
Mark Andrews
cafb021b2a Fix 'configure --with-maxminddb=<path>' 2021-01-06 17:53:10 +11:00
Witold Kręcicki
012946eadc autoconf: link with libssl
This is prerequisite to adding DoT and DoH support to BIND 9.
2020-12-09 10:46:16 +01:00
Tinderbox User
7406ea925a prep 9.16.10 2020-12-09 10:46:16 +01:00
Michal Nowak
d28aca8448
Remove unused Autoconf variables 2020-11-24 18:35:40 +01:00
Michał Kępień
35ca6df072 Fix cross-compilation
Using AC_RUN_IFELSE() in configure.ac breaks cross-compilation:

    configure: error: cannot run test program while cross compiling

Commit 978c7b2e89 caused AC_RUN_IFELSE()
to be used instead of AC_LINK_IFELSE() because the latter had seemingly
been causing the check for --wrap support in the linker to not work as
expected.  However, it later turned out that the problem lied elsewhere:
a minus sign ('-') was missing from the LDFLAGS variable used in the
relevant check [1].

Revert to using AC_LINK_IFELSE() for checking whether the linker
supports the --wrap option in order to make cross-compilation possible
again.

[1] see commit cfa4ea64bc
2020-11-02 12:27:55 +01:00
Michał Kępień
10d7055791 Check for _Unwind_Backtrace() support
Some operating systems (e.g. Linux, FreeBSD) provide the
_Unwind_Backtrace() function in libgcc_s.so, which is automatically
linked into any binary using the functions provided by that library.  On
OpenBSD, though, _Unwind_Backtrace() is provided by libc++abi.so, which
is not automatically linked into binaries produced by the stock system C
compiler.

Meanwhile, lib/isc/backtrace.c assumes that any GNU-compatible toolchain
allows _Unwind_Backtrace() to be used without any extra provisions in
the build system.  This causes build failures on OpenBSD (and possibly
other systems).

Instead of making assumptions, actually check for _Unwind_Backtrace()
support in the toolchain if the backtrace() function is unavailable.
2020-10-30 09:12:50 +01:00
Tinderbox User
44e91206a4 prep 9.16.8 2020-10-22 09:09:07 +02:00
Ondřej Surý
920018c496 Regenerate couple of generated files 2020-09-30 22:14:39 +02:00
Michał Kępień
187dca9cf7 Make native PKCS#11 require dlopen() support
PKCS#11 support in BIND requires dlopen() support from the operating
system and thus building with "--enable-native-pkcs11 --without-dlopen"
should not be possible.  Add an Autoconf check which enforces that
constraint.  Adjust the pairwise testing model accordingly.
2020-09-28 09:21:59 +02:00
Michał Kępień
87d9d10460 Fix function overrides in unit tests on macOS
Since Mac OS X 10.1, Mach-O object files are by default built with a
so-called two-level namespace which prevents symbol lookups in BIND unit
tests that attempt to override the implementations of certain library
functions from working as intended.  This feature can be disabled by
passing the "-flat_namespace" flag to the linker.  Fix unit tests
affected by this issue on macOS by adding "-flat_namespace" to LDFLAGS
used for building all object files on that operating system (it is not
enough to only set that flag for the unit test executables).
2020-09-28 09:16:48 +02:00
Mark Andrews
a7be4e219e Wait for test instance of named to exit before completing subtest.
(cherry picked from commit dda5b7b0b8)
2020-09-10 20:13:03 +10:00
Michal Nowak
5082d60105 Fix generated documentation 2020-08-26 16:30:04 +00:00
Tinderbox User
a195123ad0 prep 9.16.6 2020-08-06 08:14:40 +00:00
Tinderbox User
b03a635f68 prep 9.16.5 2020-07-15 23:10:55 +02:00
Michał Kępień
58c07cc153 Install NZD-related man pages conditionally
Commit b580eb2fb3 inadvertently caused
NZD-related man pages to be installed unconditionally.  Ensure they are
only installed for LMDB-enabled builds.
2020-07-01 22:06:25 +02:00
Michał Kępień
75e322ec08 Install dnstap-related man pages conditionally
Commit b580eb2fb3 inadvertently caused
dnstap-related man pages to be installed unconditionally.  Ensure they
are only installed for dnstap-enabled builds.
2020-07-01 22:06:25 +02:00
Tinderbox User
adab85b815 prep 9.16.4 2020-06-18 10:25:50 +02:00
Ondřej Surý
762a3c866e Skip the unit tests when kyua is not available
The unittest.sh script tried to execute the unit tests when cmocka
development libraries was available, but kyua, the execution engine,
was not.  Now, both need to be installed in the system.
2020-06-17 15:04:43 +02:00
Evan Hunt
b580eb2fb3 add support for building sphinx documentation 2020-06-01 09:54:46 +02:00
Ondřej Surý
58e20fa746 Convert the documentation to Sphinx documentation format
The ARM and the manpages have been converted into Sphinx documentation
format.

Sphinx uses reStructuredText as its markup language, and many of its
strengths come from the power and straightforwardness of
reStructuredText and its parsing and translating suite, the Docutils.

(cherry picked from commit 9fb6d11abb)
2020-06-01 09:54:45 +02:00
Ondřej Surý
af1b56240f Resolve the overlinking of the system libraries
Originally, every library and binaries got linked to everything, which
creates unnecessary overlinking.  This wasn't as straightforward as it
should be as we still support configuration without libtool for 9.16.

Couple of smaller issues related to include headers and an issue where
sanitizer overload dlopen and dlclose symbols, so we were getting false
negatives in the autoconf test.
2020-05-11 09:49:54 +02:00
Ondřej Surý
dc51f720b9 Only print warning when PKCS#11 dnssec-keygen fails from Edwards curves
(cherry picked from commit 9d979d7cd6)
2020-05-01 06:54:26 +02:00
Mark Andrews
363ac686fd Force test for -fno-delete-null-pointer-checks to fail
(cherry picked from commit 82ab846f13)
2020-04-29 18:25:26 +02:00
Michał Kępień
76f0db42ec Make ISC rwlock implementation the default again
Revert the change from ad03c22e97 as
further testing has shown that with hyper-threading disabled, named with
ISC rwlocks outperforms named with pthread rwlocks in cold cache testing
scenarios.  Since building named with pthread rwlocks might still be a
better choice for some workloads, keep the compile-time option which
enables that.

(cherry picked from commit 17101fd093)
2020-04-17 08:39:34 +02:00
Tinderbox User
d2c4cfcf1f regen v9_16 2020-03-20 11:47:02 +01:00
Mark Andrews
fc199384c5 test installed header files
(cherry picked from commit a278b6bd84)
2020-03-06 02:20:03 +00:00
Mark Andrews
5390eee7cf sort AC_CONFIG_FILES
(cherry picked from commit fd0d4ba948)
2020-03-06 08:48:44 +11:00
Witold Kręcicki
16cedf6e45 Use pthread rwlocks by default
(cherry picked from commit ad03c22e97)
2020-03-04 10:11:17 +00:00
Evan Hunt
4926c232cd minor cosmetic fixes
- the configuration summary reported zlib compression was not
  supported even when it was.
- when bind.keys.h was regenerated it violated clang-format style.

(cherry picked from commit beda680f90)
2020-02-25 11:20:58 -08:00
Evan Hunt
11a0d771f9 fix spelling errors reported by Fossies.
(cherry picked from commit ba0313e649)
2020-02-21 07:05:31 +00:00