From: Matthijs Mekking Date: Tue, 13 Apr 2021 07:38:14 +0000 (+0200) Subject: Check zonefile is untouched if dnssec-policy none X-Git-Tag: v9.17.13~11^2~3 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=2d1b3a9899ba6c3bd23a5cd4ccdddac6d351c878;p=thirdparty%2Fbind9.git Check zonefile is untouched if dnssec-policy none Make sure no DNSSEC contents are added to the zonefile if dnssec-policy is set to "none" (and no .state files exist for the zone). --- diff --git a/bin/tests/system/kasp/ns3/setup.sh b/bin/tests/system/kasp/ns3/setup.sh index 7e451934382..b70fce7cdd1 100644 --- a/bin/tests/system/kasp/ns3/setup.sh +++ b/bin/tests/system/kasp/ns3/setup.sh @@ -77,6 +77,7 @@ zone="unsigned.kasp" echo_i "setting up zone: $zone" zonefile="${zone}.db" infile="${zone}.db.infile" +cp template.db.in $infile cp template.db.in $zonefile # Set up zone that stays unsigned. diff --git a/bin/tests/system/kasp/tests.sh b/bin/tests/system/kasp/tests.sh index d8a96c3d9f8..d970491f2c2 100644 --- a/bin/tests/system/kasp/tests.sh +++ b/bin/tests/system/kasp/tests.sh @@ -804,6 +804,13 @@ check_keys check_dnssecstatus "$SERVER" "$POLICY" "$ZONE" check_apex check_subdomain +# Make sure the zone file is untouched. +n=$((n+1)) +echo_i "Make sure the zonefile for zone ${ZONE} is not edited ($n)" +ret=0 +diff "${DIR}/${ZONE}.db.infile" "${DIR}/${ZONE}.db" || ret=1 +test "$ret" -eq 0 || echo_i "failed" +status=$((status+ret)) # # Zone: insecure.kasp.