Commit Graph
24456 Commits
Author SHA1 Message Date
Michał KępieńandEvan Hunt 02da03b17f Add a framework for dns__zone_updatesigs() unit tests
Add a new ATF test, sigs_test, containing everything required to start
defining test cases for dns__zone_updatesigs().  The framework is
written in a way which ensures that changes to zone database applied by
any dns__zone_updatesigs() invocation are preserved between subsequent
checks.

(cherry picked from commit 1f10186476)
(cherry picked from commit 3dde7c42db)
(cherry picked from commit e787e54ea1)
(cherry picked from commit 7394dd8732)
2018-05-10 09:45:48 -07:00
Michał KępieńandEvan Hunt 781105c046 Move find_zone_keys() to lib/dns/zone_p.h
Rename find_zone_keys() to dns__zone_findkeys() and move it to
lib/dns/zone_p.h, so that it can be used in unit tests.  Add a comment
describing the purpose of this function.

(cherry picked from commit d7143986b1)
(cherry picked from commit fc0e99c7d7)
(cherry picked from commit a6be59ce08)
(cherry picked from commit b8720b8f50)
2018-05-10 09:42:39 -07:00
Michał KępieńandEvan Hunt b767528e13 Move update_sigs() to lib/dns/zone_p.h
Rename update_sigs() to dns__zone_updatesigs() and move it to
lib/dns/zone_p.h, so that it can be unit tested.  Add a comment
describing the purpose of this function.

(cherry picked from commit b1947cee82)
(cherry picked from commit 4d06f50ba8)
(cherry picked from commit 5c71a025c6)
(cherry picked from commit ae03a5c1fa)
2018-05-10 09:42:13 -07:00
Michał KępieńandEvan Hunt 645c43d09c Move zonediff_t to lib/dns/zone_p.h
Rename zonediff_t to dns__zonediff_t and move it to lib/dns/zone_p.h, so
that unit tests can be written for functions taking pointers to
structures of this type as arguments.

(cherry picked from commit ace465a9f9)
(cherry picked from commit ea15c54d8a)
(cherry picked from commit 5712d9528f)
(cherry picked from commit 5f0b4eaf70)
2018-05-10 09:42:13 -07:00
Michał KępieńandEvan Hunt 0d126920e6 Add lib/dns/zone_p.h
Add a new private header file, lib/dns/zone_p.h, which will hold type
definitions and function prototypes not meant to be exported by libdns,
but required by zone-related unit tests.

(cherry picked from commit c1bc3be806)
(cherry picked from commit 2b0add6d1a)
(cherry picked from commit 536d6dc0c5)
(cherry picked from commit 27f777c61a)
2018-05-10 09:42:13 -07:00
Michał KępieńandEvan Hunt f7a84380dd Add a helper function to facilitate preparing dns_diff_t structures
Implement dns_test_difffromchanges(), a function which enables preparing
a dns_diff_t structure from a mostly-textual representation of zone
database changes to be applied.  This will improve readability of test
case definitions by allowing contents of a dns_diff_t structure, passed
e.g. to update_sigs(), to be represented in a human-friendly manner.

(cherry picked from commit 3c22af0d35)
(cherry picked from commit d4c603eb8a)
(cherry picked from commit 1f454b8d91)
(cherry picked from commit 7193496b6e)
2018-05-10 09:42:13 -07:00
Michał KępieńandEvan Hunt 1eec107a94 Rename dns_test_rdata_fromstring() to dns_test_rdatafromstring()
Remove the underscore from "rdata_fromstring" so that all helper
functions for libdns tests use a common naming covention.

(cherry picked from commit 2980cbd55f)
(cherry picked from commit 107102d333)
(cherry picked from commit 5097723d1b)
(cherry picked from commit 94caf8ebdb)
2018-05-10 09:42:13 -07:00
Michał KępieńandEvan Hunt c7d9100dcb Rework dns_test_makezone()
The dns_test_makezone() helper function always assigns the created zone
to some view, which is not always necessary and complicates cleanup of
non-managed zones as they are required not to be assigned to any view.

Rework dns_test_makezone() in order to make it easier to use in unit
tests operating on non-managed zones.  Use dns_name_fromstring() instead
of dns_name_fromtext() to simplify code.  Do not use the CHECK() macro
and add comments to make code flow simpler to follow.  Use
dns_test_makeview() instead of dns_view_create().

Adjust existing unit tests using this function so that they still pass.

(cherry picked from commit bfbeef3609)
(cherry picked from commit f70c02d2c2)
(cherry picked from commit d45ee39bae)
(cherry picked from commit d76fdb8718)
2018-05-10 09:42:13 -07:00
Ondřej Surý a1e279669b Merge branch 'gitlab-ci-amd64-v9_9' into 'v9_9'
Tag docker images with appropriate architectures

See merge request isc-projects/bind9!258
2018-05-10 03:35:38 -04:00
Ondřej Surý b6fd49c749 Tag docker images with appropriate architectures
(cherry picked from commit ab112d2c4f)
2018-05-10 09:28:10 +02:00
Ondřej Surý 98fb050c25 Merge branch '236-silence-cppcheck-issues-in-lib-dns-dst_parse-c-v9_9' into 'v9_9'
[v9_9] Resolve "silence cppcheck issues in lib/dns/dst_parse.c"

See merge request isc-projects/bind9!243
2018-05-03 11:23:39 -04:00
Mark AndrewsandOndřej Surý d1d04fdffd simplify mask construction
(cherry picked from commit 22fab3199f)
2018-05-03 17:17:38 +02:00
Evan Hunt beb08ef52d Merge branch '208-dig-doc' into 'v9_9'
Resolve "Added -t TYPEnn description to dig"

Closes #208

See merge request isc-projects/bind9!221
2018-04-27 00:01:44 -07:00
Paul HoffmanandEvan Hunt 33be1f76cb add -t type### description to the dig man page
(cherry picked from commit 2d957c6b9f)
(cherry picked from commit d742db122e)
(cherry picked from commit efcad103e7)
2018-04-27 00:01:41 -07:00
Evan Hunt acabf5a689 Merge branch '159-improve-handling-of-inline-signed-zones-with-missing-signing-keys' into 'v9_9'
Improve handling of inline signed zones with missing signing keys

Closes #159

See merge request isc-projects/bind9!133
2018-04-25 12:24:51 -07:00
Michał KępieńandEvan Hunt cac0073e5b Add CHANGES entries
4916.	[bug]		Not creating signing keys for an inline signed zone
			prevented changes applied to the raw zone from being
			reflected in the secure zone until signing keys were
			made available. [GL #159]

4915.	[bug]		Bumped signed serial of an inline signed zone was
			logged even when an error occurred while updating
			signatures. [GL #159]

(cherry picked from commit 7d2c09c905)
(cherry picked from commit e4995efe24)
(cherry picked from commit 821c27bb7c)
2018-04-25 12:24:39 -07:00
Michał KępieńandEvan Hunt 8b0f7f1b8d Apply raw zone deltas to yet unsigned secure zones
When inline signing is enabled for a zone without creating signing keys
for it, changes subsequently applied to the raw zone will not be
reflected in the secure zone due to the dns_update_signaturesinc() call
inside receive_secure_serial() failing.  Given that an inline zone will
be served (without any signatures) even with no associated signing keys
being present, keep applying raw zone deltas to the secure zone until
keys become available in an attempt to follow the principle of least
astonishment.

(cherry picked from commit 6acf326969)
(cherry picked from commit 8a58a60772)
(cherry picked from commit fcbdeed802)
2018-04-25 12:24:36 -07:00
Michał KępieńandEvan Hunt 0d4750a8e9 Only log bumped signed serial after a successful secure zone update
If a raw zone is modified, but the dns_update_signaturesinc() call in
receive_secure_serial() fails, the corresponding secure zone's database
will not be modified, even though by that time a message containing the
bumped signed serial will already have been logged.  This creates
confusion, because a different secure zone version will be served than
the one announced in the logs.  Move the relevant dns_zone_log() call so
that it is only performed if the secure zone's database is modified.

(cherry picked from commit cfbc8e264d)
(cherry picked from commit cdc7ab42b1)
(cherry picked from commit c042ec70d2)
2018-04-25 12:19:30 -07:00
Evan Hunt eaf4b8b4fc Merge branch '171-lgtm-issues-v9_9' into 'v9_9'
Resolve "problems detected by LGTM static analyzer"

Closes #171

See merge request isc-projects/bind9!213
2018-04-22 13:01:18 -07:00
Evan Hunt 0795311bce remove unnecessary comparison
(cherry picked from commit 8b1baa10ee)
(cherry picked from commit f9da5a735e)
2018-04-22 13:01:08 -07:00
Evan Hunt d0410a0783 silence warnings about unnecessary comparisons
- these are cases where result has been explicitly set, so
  if (result != ISC_R_SUCCESS) is unnecessary

(cherry picked from commit e00eb55cd2)
(cherry picked from commit 0dcff8f93c)
2018-04-22 13:01:08 -07:00
Evan Hunt d5456e7318 add header guards in files that were missing them
(cherry picked from commit 4247477b61)
(cherry picked from commit 7f61e9d50e)
2018-04-22 13:01:07 -07:00
Evan Hunt 2515c9d6ef add header guard when generating bind.keys.h
(cherry picked from commit bfbe6925df)
(cherry picked from commit f7755696a5)
2018-04-22 13:00:47 -07:00
Evan Hunt ade69509e6 change "key" to "tsigkey" to silence "short global name" warning
(cherry picked from commit 0cc7aa250e)
(cherry picked from commit 9d99bf0f4b)
2018-04-22 12:59:06 -07:00
Evan Hunt 54f07c3b1a fix shadowed global variables
(cherry picked from commit 9ca3ab1168)
(cherry picked from commit 694a1486ca)
2018-04-22 12:59:06 -07:00
Evan Hunt a3c1b18794 fix duplicate include guard in dnsconf.h
- IMHO we should consider removing dnsconf.c and deprecating the
  /etc/dns.conf file, though, as I don't think it's likely anyone
  is using it

(cherry picked from commit a08ba418ef)
(cherry picked from commit b9db91aa64)
2018-04-22 12:59:06 -07:00
Evan Hunt 54c3af7598 Merge branch '193-fix-variable-definitions-in-bin-tests-Makefile.in-v9_9' into 'v9_9'
Fix variable definitions in bin/tests/Makefile.in

Closes #193

See merge request isc-projects/bind9!183
2018-04-10 20:06:04 -07:00
Evan Hunt 0e2b568b69 Alter distclean rule to prevent recursing into the same directory twice
Commit f87e0c03ee removed the "system" directory from the TESTDIRS
variable in bin/tests/Makefile.in in an attempt to fix "make distclean"
which was broken since commit 0d784de16a.  However, this change
prevented any system tests from being run when "make test" is invoked.

We now put it back into both SUBDIRS and TESTDIRS, but with a modified
rule to check for the existence of a Makefile in each subdirectory before
trying to run make there. This prevents "make distclean" from trying to
run again in a directory where it's already been run.

(cherry picked from commit 93ee6b8a22)
2018-04-10 20:05:59 -07:00
Michał KępieńandEvan Hunt 5b2b47336d Fail CI pipeline when "make test" does not run any system tests
Apart from ensuring "make test" returns 0, also check whether any system
test output was generated as a result of running it.  This prevents the
CI job running system tests from succeeding unless it actually tests
something.

(cherry picked from commit 80ab2c0f22)
2018-04-10 20:04:56 -07:00
Mark Andrews 6166107a80 Merge branch 'ssl-double-free-v9_9' into 'v9_9'
Fix double free after keygen error in dnssec-keygen

Closes #109

See merge request isc-projects/bind9!70
2018-04-06 14:28:02 +10:00
Ondřej SurýandMark Andrews b703087d5a Add CHANGES entry
(cherry picked from commit ef2b2a6c92)
2018-04-06 14:27:48 +10:00
Ondřej SurýandMark Andrews 3c2f6922f5 A couple of more cleanups after free in opensslrsa_generate()
(cherry picked from commit d2b3188c61)
2018-04-06 14:27:23 +10:00
Petr MensikandMark Andrews fcb5795560 Do not assign NULL conditionally in OpenSSL < 1.1, make it always explicit.
(cherry picked from commit edaafacf36)
2018-04-06 14:27:23 +10:00
Petr MensikandMark Andrews 3bce97740f Fix double free on RSA_generate_key_ex failure
(cherry picked from commit 01cc622e7b)
2018-04-06 14:27:22 +10:00
Mark Andrews 1890455159 system should only be in SUBDIRS
(cherry picked from commit 342e146fe3)
2018-04-06 13:27:45 +10:00
Mark Andrews 3683026ffd Merge branch '167-coverity-dereferencing-a-null-pointer-in-lib-dns-tests-rbt_test-c-v9_9' into 'v9_9'
Resolve "coverity: Dereferencing a null pointer in lib/dns/tests/rbt_test.c"

Closes #167

See merge request isc-projects/bind9!150
2018-03-20 09:56:09 +11:00
Mukund SivaramanandMark Andrews eb98f2759e Check return value of isc_mem_get()
(cherry picked from commit de3a4af1bf)
2018-03-20 09:56:09 +11:00
Ondřej SurýandMark Andrews f8af167008 Update libtool files to 2.4.6
(cherry picked from commit fe06778be7)
2018-03-19 13:02:26 +11:00
Ondřej Surý d774c9ee04 Merge branch '164-remove-openssl-warning-v9_9' into 'v9_9'
[v9_9] Remove useless OpenSSL warning from configure script

See merge request isc-projects/bind9!143
2018-03-17 10:50:13 -04:00
Ondřej Surý c599299cc9 Remove obsolete OpenSSL version check
(cherry picked from commit e9571d29af)
2018-03-17 14:44:14 +00:00
Evan Hunt da01100893 Merge branch 'copyrights' into v9_9 2018-03-15 18:56:26 -07:00
Evan Hunt ce137d2380 update file headers 2018-03-15 18:56:10 -07:00
Evan Hunt 6c02f55d59 ensure COPYRIGHT file retains years; edit file headers for consistency 2018-03-15 18:54:50 -07:00
Evan Hunt a19e6b9b21 Merge branch '157-cleanup-win-libtests-v9_9' into 'v9_9'
Resolve "Windows build fails"

Closes #157

See merge request isc-projects/bind9!131
2018-03-15 13:48:52 -07:00
Evan Hunt 1c2ecdfc44 remove references to lib/tests in the windows build
(cherry picked from commit e2bb9824f8)
2018-03-15 13:48:49 -07:00
Evan Hunt 0af7848dad Merge branch '154-fix-atomic-test-v9_9' into 'v9_9'
Resolve "Build failure on OSX with --disable-atomic --enable-developer"

Closes #154

See merge request isc-projects/bind9!130
2018-03-15 12:09:45 -07:00
Evan Hunt edb2282379 add an 'untested' case when none of the atomic operations are available
- this fixes a build failure introduced in change 4913 when
  compiling with ATF and --disable-atomic

(cherry picked from commit 1b3eac926e)
2018-03-15 12:09:45 -07:00
Evan Hunt 01e20887b3 Merge branch 'fix-copyright' into v9_9 2018-03-15 11:32:15 -07:00
Evan Hunt 5a21193fdd update file headers 2018-03-15 11:30:37 -07:00
Evan Hunt 7dc45efb62 some script updates were missing 2018-03-15 11:26:25 -07:00