]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Check zonefile is untouched if dnssec-policy none
authorMatthijs Mekking <matthijs@isc.org>
Tue, 13 Apr 2021 07:38:14 +0000 (09:38 +0200)
committerMatthijs Mekking <matthijs@isc.org>
Wed, 5 May 2021 17:13:55 +0000 (19:13 +0200)
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).

bin/tests/system/kasp/ns3/setup.sh
bin/tests/system/kasp/tests.sh

index 7e451934382a497b7a05f6deda69f3ba491b1018..b70fce7cdd141ef7529f021651adeeb529d54951 100644 (file)
@@ -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.
index d8a96c3d9f807e650ca9fb1219b4fb8a9d296064..d970491f2c2c46a32bcb2c9444938fbef0bc4a22 100644 (file)
@@ -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.