Commit Graph
4071 Commits
Author SHA1 Message Date
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 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
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 936f7a2da9 Prevent Git to expand $systest
CentOS 8 "git status" unexpectedly expands search directory "tsig" to
also search in the "tsiggss" directory, thus incorrectly identifying
files as "not removed" in the "tsig" directory:

$ git status -su --ignored tsig
$ touch tsiggss/ns1/{named.run,named.memstats}
$ git status -su --ignored tsig
!! tsiggss/ns1/named.memstats
!! tsiggss/ns1/named.run

(cherry picked from commit f310b75250)
2021-02-18 10:16:30 +01:00
Michal Nowak c6fcb29a27 Clean omitted files from system tests
Any CI job:
- I:dns64:file ns1/Ksigned.+005+*.key not removed
- I:dns64:file ns1/Ksigned.ns1/Ksigned.+005+*.private
- I:dns64:file ns1/Ksigned.ns1/Ksigned.+005+*.key
- I:dns64:file ns1/Ksigned.ns1/Ksigned.+005+*.private
- I:dns64:file ns1/Ksigned.ns1/dsset-signed.
- I:dns64:file ns1/Ksigned.ns1/named.conf
- I:dns64:file ns1/Ksigned.ns1/signed.db
- I:dns64:file ns1/Ksigned.ns1/signed.db.signed
- I:dns64:file ns1/Ksigned.ns2/named.conf
- I:ixfr:file ns5/named.run.prev not removed
- I:legacy:file ns1/named_dump.db.test20 not removed

(cherry picked from commit 14a104d121)
2021-02-18 10:05:18 +01:00
Michal Nowak eb26769b45 Add system test name to "file not removed" info
(cherry picked from commit 10bf725ee2)
2021-02-18 09:42:12 +01:00
Michal Nowak aee29f7c17 Add README.md file to rsabigexponent system test
This README.md describes why is bigkey needed.

(cherry picked from commit a247f24dfa)
2021-01-29 15:48:39 +01:00
Mark AndrewsandEvan Hunt ca9dc40634 Fix DNAME when QTYPE is CNAME or ANY
The synthesised CNAME is not supposed to be followed when the
QTYPE is CNAME or ANY as the lookup is satisfied by the CNAME
record.
2020-12-01 11:46:32 -08:00
Mark Andrews 81e5877520 Check that missing cookies are handled
(cherry picked from commit bd9155590e)
2020-11-27 10:20:40 +11:00
Michal Nowak 76d1c90ef7 Write traceback file to the same directory as core file
The traceback files could overwrite each other on systems which do not
use different core dump file names for different processes.  Prevent
that by writing the traceback file to the same directory as the core
dump file.

These changes still do not prevent the operating system from overwriting
a core dump file if the same binary crashes multiple times in the same
directory and core dump files are named identically for different
processes.

(cherry picked from commit 6428fc26af)
2020-11-26 18:25:44 +01:00
Mark AndrewsandMichal Nowak 43c1e5be46 Unify whitespace in bin/tests/system/run.sh
Replace tabs with spaces to make whitespace consistent across the entire
bin/tests/system/run.sh script.

(cherry picked from commit 0f0a006c)
2020-11-26 18:21:05 +01:00
Havard EidnesandMichal Nowak e73d2f6bbe Avoid a non-standard bashism: use of "==" in "test".
(cherry picked from commit 1f83daa4ac)
2020-11-10 14:13:57 +01:00
Mark Andrews 1b8b355ec5 Add CHANGES note for [GL #2236]
(cherry picked from commit decf117eb6)
2020-10-30 09:08:44 +11:00
Mark Andrews 8d2e091d46 Check that a zone in the process of being signed resolves
ans10 simulates a local anycast server which has both signed and
unsigned instances of a zone.  'A' queries get answered from the
signed instance.  Everything else gets answered from the unsigned
instance.  The resulting answer should be insecure.

(cherry picked from commit d7840f4b93)
2020-10-30 08:25:34 +11:00
Evan Hunt c94559480e fix a typo in rpz test
"tcp-only" was not being tested correctly in the RPZ system test
because the option to the "digcmd" function that causes queries to
be sent via TCP was misspelled in one case, and was being interpreted
as a query name.

the "ckresult" function has also been changed to be case sensitive
for consistency with "digcmd".

(cherry picked from commit 78af071c11)
2020-10-28 22:42:37 -07:00
Michal Nowak 523050f054 Fix system test backtrace generation on OpenBSD
On Linux core dump contains absolute path to crashed binary

    Core was generated by `/home/newman/isc/ws/bind9/bin/named/.libs/lt-named -D glue-ns1 -X named.lock -m'.

However, on OpenBSD there's only a basename

    Core was generated by `named'.

This commit adds support for the latter, retains the former.

(cherry picked from commit f0b13873a3)
(cherry picked from commit 659feff963)
2020-10-26 16:58:30 +01:00
Diego Fronza 29043867c7 Update copyrights 2020-10-26 10:45:27 -03:00
Diego Fronza 4fef8acbfa Adjusted additional system test (NS, non-root zone)
After the updates from this branch, BIND now sends glue records for
NS queries even when configured with minimal-responses yes.
2020-10-26 10:45:27 -03:00
Diego Fronza acef95ce44 Added test for the proposed fix
This test is very simple, two nameserver instances are created:
    - ns4: master, with 'minimal-responses yes', authoritative
        for example. zone
    - ns5: slave, stub zone

The first thing verified is the transfer of zone data from master
to slave, which should be saved in ns5/example.db.

After that, a query is issued to ns5 asking for target.example.
TXT, a record present in the master database with the "test" string
as content.

If that query works, it means stub zone successfully request
nameserver addresses from master, ns4.example. A/AAAA

The presence of both A/AAAA records for ns4 is also verified in the
stub zone local file, ns5/example.db.
2020-10-26 10:45:27 -03:00
Michal Nowak e0af53ac0f Ensure use of "echo_i" where possible
In many instances 'echo "I:' construct was used where echo_i function
should have been.
2020-10-22 12:16:24 +02:00
Diego Fronza 0cd414a390 Fix dnstap system test on FreeBSD
This commit ensures that dnstap output files captured
by fstrm_capture are properly flushed before any attempt
on reading them with dnstap-read is done.

By reading fstrm-capture source code it was noticed that
signal SIGHUP is used to flush the capture file.
2020-10-20 10:39:48 -03:00
Mark Andrews 140659c57a Drop the expected minimum number of buckets to 4.
The previous value of 5 produced too many false errors.

(cherry picked from commit 0abb49034e)
2020-10-15 12:32:26 +11:00
Mark Andrews 96399960c1 Try to improve rrl timing
Add a +burst option to mdig so that we have a second to setup the
mdig calls then they run at the start of the next second.

RRL uses 'queries in a second' as a approximation to
'queries per second'. Getting the bursts of traffic to all happen in
the same second should prevent false negatives in the system test.

We now have a second to setup the traffic in.  Then the traffic should
be sent at the start of the next second.  If that still fails we
should move to +burst=<now+2> (further extend mdig) instead of the
implicit <now+1> as the trigger second.

(cherry picked from commit 92cdc7b6c7)
2020-10-15 11:47:08 +11:00
Michal Nowak d7ea583ad0 Bring back --rpz-log-qtype-qclass feature-test option
It was unintentionally removed during a backport.
2020-10-07 11:24:16 +02:00
Ondřej SurýandOndřej Surý d7b16b780f Adjust legacy tests for default 1232 EDNS Buffer Size
* legacy test was just expecting default server EDNS buffer size to be 4096,
  the test needed the adjustment to reset the buffer sizes back to 4096.
2020-10-06 09:34:49 +02:00
Ondřej Surý 3ab08cdaa4 Adjust digdelv tests for default 1232 EDNS Buffer Size
* digdelv test was just expecting default server EDNS buffer size to be
  4096, the test needed only slight adjustment

(cherry picked from commit f1556f8c41)
(cherry picked from commit 6b303721f1ee472dc8ab2d1df03191a98d4e4e5e)
2020-10-05 17:00:24 +02:00
Diego FronzaandOndřej Surý 8781aef52e Refactored dns_message_t for using attach/detach semantics
This commit will be used as a base for the next code updates in order
to have a better control of dns_message_t objects' lifetime.
2020-09-30 13:33:43 +02:00
Evan Hunt 400171aee8 update all copyright headers to eliminate the typo 2020-09-14 17:00:40 -07:00
Mark Andrews e5ecb7f57d Wait for test instance of named to exit before completing subtest.
(cherry picked from commit dda5b7b0b8)
2020-09-10 20:41:00 +10:00
Mark Andrews 6dcdee08e9 Don't use production address (127.0.0.1) in runtime system test.
(cherry picked from commit 1f14705938)
2020-09-10 20:21:03 +10:00
Mark Andrews dc30a355bd Also wait for 'zone_dump: zone example/IN: enter'
use nextpartpeek as we don't want to reset the starting point

(cherry picked from commit 7b65bea6d2)
2020-09-10 18:48:52 +10:00
Mark Andrews 690f557b09 Don't run dyndb and dlzexternal if running TSAN as
the dlopen flags being used are incompatible with TSAN.

(cherry picked from commit 86316ed29d)
2020-09-08 08:46:14 +10:00
Mark Andrews b66b5a096c alphabetize tests/usage
(cherry picked from commit bbece7389e)
2020-09-08 08:43:45 +10:00
Mark Andrews b1c36e7818 Check 'deny name' + 'grant subdomain' for the same name
(cherry picked from commit a402ffbced)
2020-09-03 16:22:54 +10:00
Mark Andrews b2c93102de Increase zone load timeout in the "rndc" test
The "huge.zone" zone can take longer than 100 seconds to load when
running under a sanitizer.  Increase the relevant zone load timeout to
prevent intermittent failures of the "rndc" system test.

(cherry picked from commit fd08918df5)
2020-09-03 07:15:54 +10:00
Mark Andrews 46dc1c34f9 dig +bufsize=0 failed to disable EDNS as a side effect.
(cherry picked from commit 0dc04cb901)
2020-09-02 20:47:19 +10:00
Mark AndrewsandOndřej Surý c237ca4d43 Dump the returned packet 2020-09-02 08:54:40 +02:00
Ondřej Surý 36ec930560 Add -r <repeats> option to packet.pl
For some tests, we need to send big data streams (for TCP) or repeated
packets (for UDP), this commits adds `-r` option to packet.pl that sends
the same input <repeats> times using the specified protocol.

(cherry picked from commit dd46559a19)
2020-09-02 08:54:40 +02:00
Ondřej Surý abae6c0f95 Properly format 2037-pk11_numbits-crash-test.pkt file
(cherry picked from commit 22e0272063)
2020-09-02 08:54:40 +02:00
Ondřej SurýandOndřej Surý a40151fe76 Add PoC system test for pk11_numbits() assertion
(cherry picked from commit a69433ba40)
2020-08-31 11:49:36 +02:00
Mark AndrewsandOndřej Surý 78d0355f30 check that a malformed truncated response to a TSIG query is handled
(cherry picked from commit 8bbf3eb5f3)
2020-08-31 08:35:10 +02:00
Evan Hunt 15d57a425e Merge tag 'v9_11_22' into v9_11
BIND 9.11.22
2020-08-20 12:10:47 -07:00
Michal Nowak d79c96da01 Make sure .txt files are not identified as crashed test
Previously .txt files with full backtrace may be identified as a
crashed test:

    I:Core dumps were found for the following system tests:
    I:	 core.19948-backtrace.txt
    I:   shutdown

Now .txt files are removed from the list.

Change 'run.sh.in' to match the core matching pattern in
'testsummary.sh'.

(cherry picked from commit c2dcd95966)
(cherry picked from commit 01119ac4f9)
2020-08-12 09:56:16 +02:00
Mark AndrewsandMichał Kępień 58e560beb5 Add a test for update-policy 'zonesub'
The new test checks that 'update-policy zonesub' is properly enforced.
2020-08-05 15:55:14 +02:00
Mark AndrewsandMichał Kępień 393e8f643c Add a test for update-policy 'subdomain'
The new test checks that 'update-policy subdomain' is properly enforced.
2020-08-05 15:55:14 +02:00
Mark Andrews d3281b80a9 Check rcode is FORMERR
(cherry picked from commit 88ff6b846c)
2020-08-04 23:08:49 +10:00
Michal Nowak fc1e50e73a Fix name of the test directory of stop.pl in masterformat test 2020-07-31 09:26:51 +02:00
Michal Nowak 9470e9e469 Ensure test fails if packet.pl does not work as expected 2020-07-31 09:26:51 +02:00
Michał Kępień 41e2117866 Only run system tests as root in developer mode
Running system tests with root privileges is potentially dangerous.
Only allow it when explicitly requested (by building with
--enable-developer).

(cherry picked from commit 3ef106f69d)
2020-07-31 07:47:49 +02:00
Diego FronzaandEvan Hunt 4bc9ee1844 Update copyrights 2020-07-27 13:40:50 -07:00