Commit Graph

28416 Commits

Author SHA1 Message Date
Evan Hunt
fca5137622 remove redundant ZONEDB_UNLOCK
(cherry picked from commit b54454b7c6)
2020-03-09 16:52:58 -07:00
Michał Kępień
f324c3b74e Merge branch 'michal/do-not-run-openbsd-system-test-jobs-for-tags-v9_11' into 'v9_11'
[v9_11] Do not run OpenBSD system test jobs for tags

See merge request isc-projects/bind9!3190
2020-03-09 13:36:45 +00:00
Michał Kępień
d4c9130891 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:32 +01:00
Mark Andrews
8daed138f7 Merge branch '1628-release-process-failed-to-detect-that-header-file-was-not-installed-v9_11' into 'v9_11'
test installed header files

See merge request isc-projects/bind9!3177
2020-03-06 03:03:24 +00:00
Mark Andrews
c8025d8fed test installed header files
(cherry picked from commit a278b6bd84)
2020-03-06 13:23:48 +11:00
Mark Andrews
61365bd65e Merge branch 'marka-install-missing-header-files-v9_11' into 'v9_11'
Fix lists of installed header files

See merge request isc-projects/bind9!3179
2020-03-06 02:18:42 +00:00
Mark Andrews
8fce52189e Fix lists of installed header files 2020-03-06 13:09:47 +11:00
Mark Andrews
6c3e406d2b Merge branch 'marka-sort-AC_CONFIG_FILES-v9_11' into 'v9_11'
sort AC_CONFIG_FILES

See merge request isc-projects/bind9!3170
2020-03-05 22:32:53 +00:00
Mark Andrews
197842c1b7 sort AC_CONFIG_FILES
(cherry picked from commit fd0d4ba948)
2020-03-06 08:54:53 +11:00
Michal Nowak
2fbfaaabd8 Merge branch 'mnowak/respdiff-v9_11' into 'v9_11'
[v9_11] Add respdiff job

See merge request isc-projects/bind9!3166
2020-03-05 14:49:14 +00:00
Michal Nowak
45d59c50df Add respdiff job
This job leverages respdiff test from the private bind-qa repo.

(cherry picked from commit 04f8b65a8f)
2020-03-05 12:24:16 +01:00
Michal Nowak
7edcbf14e9 Merge branch 'mnowak/pkcs11-test-fix-v9_11' into 'v9_11'
[v9_11] Fix "pkcs11" system test

See merge request isc-projects/bind9!3161
2020-03-05 07:37:52 +00:00
Michal Nowak
5cb50baf50 Fix "pkcs11" system test
- Define the SLOT environment variable before starting the test.  This
    variable defaults to 0 and that does not work with SoftHSM 2.

  - The system test expects the PIN environment variable to be set to
    "1234" while bin/tests/prepare-softhsm2.sh sets it to "0000".
    Update bin/tests/prepare-softhsm2.sh so that it sets the PIN to
    "1234".

  - Move contents of bin/tests/system/pkcs11/prereq.sh to
    bin/tests/system/pkcs11/setup.sh as the former was creating a file
    called "supported" that was getting removed by the latter before
    bin/tests/system/pkcs11/tests.sh could access it.

  - Fix typo in "have_ecx".

(cherry picked from commit 100a230e80f01a777b917b135b4bae9a4ac0e8ae)
2020-03-05 07:57:12 +01:00
Michał Kępień
44e11e0cfe Merge branch 'michal/fix-cppcheck-warnings' into 'v9_11'
Fix cppcheck warnings for 9.11

See merge request isc-projects/bind9!3143
2020-03-04 11:42:43 +00:00
Michał Kępień
be38f0c33a Fix cppcheck 1.90 warnings
cppcheck 1.90 reports the following false positives for
lib/dns/tests/rbt_serialize_test.c:

    lib/dns/tests/rbt_serialize_test.c:412:12: warning: Either the condition 'base!=NULL' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
      p = base + (r % filesize);
               ^
    lib/dns/tests/rbt_serialize_test.c:407:20: note: Assuming that condition 'base!=NULL' is not redundant
      assert_true(base != NULL && base != MAP_FAILED);
                       ^
    lib/dns/tests/rbt_serialize_test.c:405:14: note: Assignment 'base=mmap(NULL,filesize,PROT_READ|PROT_WRITE,0|MAP_PRIVATE,fd,0)', assigned value is 0
      base = mmap(NULL, filesize, PROT_READ|PROT_WRITE,
                 ^
    lib/dns/tests/rbt_serialize_test.c:412:12: note: Null pointer addition
      p = base + (r % filesize);
               ^
    lib/dns/tests/rbt_serialize_test.c:413:12: warning: Either the condition 'base!=NULL' is redundant or there is pointer arithmetic with NULL pointer. [nullPointerArithmeticRedundantCheck]
      q = base + filesize;
               ^
    lib/dns/tests/rbt_serialize_test.c:407:20: note: Assuming that condition 'base!=NULL' is not redundant
      assert_true(base != NULL && base != MAP_FAILED);
                       ^
    lib/dns/tests/rbt_serialize_test.c:405:14: note: Assignment 'base=mmap(NULL,filesize,PROT_READ|PROT_WRITE,0|MAP_PRIVATE,fd,0)', assigned value is 0
      base = mmap(NULL, filesize, PROT_READ|PROT_WRITE,
                 ^
    lib/dns/tests/rbt_serialize_test.c:413:12: note: Null pointer addition
      q = base + filesize;
               ^

This is caused by cppcheck not understanding how cmocka's assert_true()
macro works.  The problem being reported is a false positive: if mmap()
fails, the lines flagged by cppcheck will never be reached.  Address the
problem by suppressing nullPointerArithmeticRedundantCheck warnings for
the affected lines.
2020-03-04 12:41:01 +01:00
Michał Kępień
ab4c911629 Fix cppcheck 1.90 warning
cppcheck 1.90 reports the following issue for bin/named/query.c:

    bin/named/query.c:6838:2: warning: %d in format string (no. 3) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]
     snprintf(mbuf, sizeof(mbuf) - 1,
     ^

Tweak the format specifier for client->query.restarts to address the
problem.
2020-03-04 12:41:01 +01:00
Michał Kępień
2a01bfd851 Fix cppcheck 1.90 warnings
cppcheck 1.90 reports some false positives for lib/dns/client.c:

    lib/dns/client.c:1431:2: warning: Either the condition 'rctx==((void*)0)' is redundant or there is possible null pointer dereference: rctx. [nullPointerRedundantCheck]
     rctx->rdataset = rdataset;
     ^
    lib/dns/client.c:1416:11: note: Assuming that condition 'rctx==((void*)0)' is not redundant
     if (rctx == NULL)
              ^
    lib/dns/client.c:1415:9: note: Assignment 'rctx=isc__mem_get(mctx,sizeof(*rctx),"lib/dns/client.c",1415)', assigned value is 0
     rctx = isc_mem_get(mctx, sizeof(*rctx));
            ^
    lib/dns/client.c:1431:2: note: Null pointer dereference
     rctx->rdataset = rdataset;
     ^
    lib/dns/client.c:1438:2: warning: Either the condition 'rctx==((void*)0)' is redundant or there is possible null pointer dereference: rctx. [nullPointerRedundantCheck]
     rctx->sigrdataset = sigrdataset;
     ^
    lib/dns/client.c:1416:11: note: Assuming that condition 'rctx==((void*)0)' is not redundant
     if (rctx == NULL)
              ^
    lib/dns/client.c:1415:9: note: Assignment 'rctx=isc__mem_get(mctx,sizeof(*rctx),"lib/dns/client.c",1415)', assigned value is 0
     rctx = isc_mem_get(mctx, sizeof(*rctx));
            ^
    lib/dns/client.c:1438:2: note: Null pointer dereference
     rctx->sigrdataset = sigrdataset;
     ^
    lib/dns/client.c:1445:2: warning: Either the condition 'rctx==((void*)0)' is redundant or there is possible null pointer dereference: rctx. [nullPointerRedundantCheck]
     rctx->client = client;
     ^
    lib/dns/client.c:1416:11: note: Assuming that condition 'rctx==((void*)0)' is not redundant
     if (rctx == NULL)
              ^
    lib/dns/client.c:1415:9: note: Assignment 'rctx=isc__mem_get(mctx,sizeof(*rctx),"lib/dns/client.c",1415)', assigned value is 0
     rctx = isc_mem_get(mctx, sizeof(*rctx));
            ^
    lib/dns/client.c:1445:2: note: Null pointer dereference
     rctx->client = client;
     ^
    lib/dns/client.c:1827:2: warning: Either the condition 'ctx==((void*)0)' is redundant or there is possible null pointer dereference: ctx. [nullPointerRedundantCheck]
     ctx->client = client;
     ^
    lib/dns/client.c:1815:10: note: Assuming that condition 'ctx==((void*)0)' is not redundant
     if (ctx == NULL)
             ^
    lib/dns/client.c:1814:8: note: Assignment 'ctx=isc__mem_get(client->mctx,sizeof(*ctx),"lib/dns/client.c",1814)', assigned value is 0
     ctx = isc_mem_get(client->mctx, sizeof(*ctx));
           ^
    lib/dns/client.c:1827:2: note: Null pointer dereference
     ctx->client = client;
     ^

All of them are caused by cppcheck not recognizing the relationship
between isc_mem_get() returning NULL and the result variable being set
to ISC_R_NOMEMORY (with a subsequent jump to a cleanup section).

Move "goto cleanup;" statements into error handling branches to prevent
cppcheck from generating these warnings.
2020-03-04 12:41:01 +01:00
Michał Kępień
ae7c0cca89 Fix cppcheck 1.89 warnings
cppcheck 1.89 enabled certain value flow analysis mechanisms [1] which
trigger null pointer dereference false positives that were previously
not reported.  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)
2020-03-04 12:41:01 +01:00
Mark Andrews
2cc370f4c5 Merge branch '1656-masterformat-system-test-failed-missing-sleep-1-v9_11' into 'v9_11'
properly wait for zone to be loaded

See merge request isc-projects/bind9!3154
2020-03-04 07:41:32 +00:00
Mark Andrews
5c54402889 properly wait for zone to be loaded
(cherry picked from commit 0abcface49)
2020-03-04 18:17:08 +11:00
Mark Andrews
5b23aebb5e Merge branch 'marka-check-touched-v9_11' into 'v9_11'
Marka check touched v9 11

See merge request isc-projects/bind9!3149
2020-03-03 22:41:06 +00:00
Mark Andrews
ae311b8234 Add CHANGES entry
(cherry picked from commit 64474db14e)
2020-03-04 09:20:45 +11:00
Mark Andrews
fe03f7e9c8 Restart zone maintenance if it had been stalled.
(cherry picked from commit f171347b5f)
2020-03-04 09:20:44 +11:00
Mark Andrews
e7a486be25 Check inline master zones that are touched reload correctly.
(cherry picked from commit 50e079d6c3)
2020-03-04 09:20:40 +11:00
Mark Andrews
18ec83cf23 Merge branch '1627-call-set_resigntime-and-zone_settimer-v9_11' into 'v9_11'
Resolve "inline re-signing stops"

See merge request isc-projects/bind9!3139
2020-03-03 05:56:15 +00:00
Mark Andrews
63f845b716 add release note entry
(cherry picked from commit 23ce0f32e5)
2020-03-03 16:36:42 +11:00
Mark Andrews
463a9e385c Add CHANGES note
(cherry picked from commit 905549f061)
2020-03-03 16:29:20 +11:00
Ondřej Surý
14d4bbea61 Adjust lock/unlock in zone_rekey()
(cherry picked from commit aaaa7e67fa)
2020-03-03 16:28:42 +11:00
Mark Andrews
6bf56cdf4d Ensure that resigintime and the zone timer are set
(cherry picked from commit a6626594aa)
2020-03-03 16:28:41 +11:00
Matthijs Mekking
ef99d6bda0 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:28:37 +11:00
Mark Andrews
0536bfc91a Always call set_resigntime with the zone lock held
(cherry picked from commit 7212961849)
2020-03-03 16:17:34 +11:00
Mark Andrews
43ff3b3ad5 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:17:30 +11:00
Mark Andrews
bfef5ce9bc 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:16:38 +11:00
Ondřej Surý
3df6760518 Merge branch 'ondrej/use-pkg-config-for-libxml2-v9_11' into 'v9_11'
use pkg-config for libxml2 (v9.11)

See merge request isc-projects/bind9!3118
2020-03-02 14:33:49 +00:00
Ondřej Surý
2def018af7 Add release notes for pkg-config requirement for libxml2 2020-03-02 15:07:18 +01:00
Ondřej Surý
7110ceb880 Use pkg-config for --with-libxml2=auto/yes
The downstream distributors of BIND 9 (Debian in this case) are in
process of removing xml2-config command from the libxml2-dev package
(see Debian Bug #949056 for details).  The removal of the script will
make BIND 9 to fail to build from the source when --with-libxml2=yes is
specified or not link with libxml2 when --with-libxml2=auto is specified
and then fail ABI changes (Debian Bug #949056).

When --with-libxml2=<path>, the script checks for <path>/bin/xml2-config
and uses the specified path to link with libxml2. This has been kept to
retain backwards compatibility with systems that does not ship
pkg-config.
2020-03-02 15:07:18 +01:00
Ondřej Surý
6050c766de Merge branch '414-use-p11-kit-headers-v9_11' into 'v9_11'
Resolve "Legal issue with pkcs11 headers"

See merge request isc-projects/bind9!3133
2020-03-02 10:29:36 +00:00
Ondřej Surý
5edc8b5338 Use standard PKCS#11 standard error codes instead of custom error codes
* CKR_CRYPTOKI_ALREADY_INITIALIZED: This value can only be returned by
  `C_Initialize`. It means that the Cryptoki library has already been
  initialized (by a previous call to `C_Initialize` which did not have a
  matching `C_Finalize` call).

* CKR_FUNCTION_NOT_SUPPORTED: The requested function is not supported by this
  Cryptoki library. Even unsupported functions in the Cryptoki API should have a
  "stub" in the library; this stub should simply return the value
  CKR_FUNCTION_NOT_SUPPORTED.

* CKR_LIBRARY_LOAD_FAILED: The Cryptoki library could not load a dependent
  shared library.

(cherry picked from commit f6922d6e78)
2020-03-02 11:01:05 +01:00
Ondřej Surý
4b9cdbaf7e Replace the OASIS PKCS#11 header file with one from p11-kit
The OASIS pkcs11.h header has a restrictive license.  Replace the
pkcs11.h pkcs11f.h and pkcs11t.h headers with pkcs11.h from p11-kit.

For source distribution, the license for the OASIS headers itself
doesn't pose any licensing problem when combined with MPL license, but
it possibly creates problem for downstream distributors of BIND 9.

(cherry picked from commit c47fad2431)
2020-03-02 10:43:45 +01:00
Mark Andrews
392430c6dc Merge branch '1638-rrsig-soa-and-re-signing-v9_11' into 'v9_11'
Resolve "RRSIG(SOA) and re-signing."

See merge request isc-projects/bind9!3129
2020-02-27 23:31:02 +00:00
Mark Andrews
a32d952d9d capture named-journalprint output
(cherry picked from commit 88c828cb9f)
2020-02-28 10:14:02 +11:00
Mark Andrews
317e0cf4c9 sort RRSIG(SOA) to be last of RRSIGs with a common re-resign time
(cherry picked from commit a24fd55836)
2020-02-28 10:13:57 +11:00
Mark Andrews
51f3d3781e use the full sig-validity-interval for RRSIG(SOA)
(cherry picked from commit 660dc3eba7)
2020-02-28 10:10:26 +11:00
Evan Hunt
9fe133ceed Merge branch '1632-spelling-v9_11-take2' into 'v9_11'
fix additional spelling errors

See merge request isc-projects/bind9!3115
2020-02-25 06:27:50 +00:00
Evan Hunt
191b616579 fix additional spelling errors 2020-02-24 22:04:43 -08:00
Evan Hunt
e09f0856f0 Merge branch '1632-spelling-v9_11' into 'v9_11'
fix spelling errors reported by Fossies.

See merge request isc-projects/bind9!3112
2020-02-21 23:02:26 +00:00
Evan Hunt
e63223332c fix spelling errors reported by Fossies. 2020-02-21 14:09:59 -08:00
Mark Andrews
75d70433e4 Merge branch 'marka-fix-signature-test-v9_11' into 'v9_11'
Fix code to generate the test signatues.

See merge request isc-projects/bind9!3106
2020-02-21 07:20:38 +00:00
Mark Andrews
4ecf3b8961 fixup! Fix code to generate the test signatues. 2020-02-21 18:10:44 +11:00
Mark Andrews
22422a2f5d 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:45:47 +11:00