]> git.ipfire.org Git - thirdparty/pdns.git/blob - regression-tests.nobackend/rectify-axfr/command
auth: add bind primary, secondary and primaries keywords
[thirdparty/pdns.git] / regression-tests.nobackend / rectify-axfr / command
1 #!/usr/bin/env bash
2
3 MAKE=${MAKE:-make}
4 source ../regression-tests/common
5
6 rm -f pdns*.pid pdns-gsqlite3.conf pdns.sqlite3 named.conf
7
8 sed '/directory/ { s@./zones@../regression-tests/zones@ }' ../regression-tests/named.conf > ./named.conf
9
10 cat >> ./named.conf << __EOF__
11 zone "."{
12 type primary;
13 file "../../regression-tests.rootzone/zones/ROOT";
14 };
15 __EOF__
16
17 cat > pdns-gsqlite3.conf << __EOF__
18 launch=gsqlite3
19 gsqlite3-database=pdns.sqlite3
20 gsqlite3-dnssec
21 module-dir=../regression-tests/modules
22 __EOF__
23
24 ARGS="--config-dir=. --config-name=gsqlite3"
25
26 port=5501
27 nameserver=localhost
28
29 sqlite3 pdns.sqlite3 < ../modules/gsqlite3backend/schema.sqlite3.sql
30 tosql gsqlite | sqlite3 pdns.sqlite3
31 echo ANALYZE\; | sqlite3 pdns.sqlite3
32
33 for zone in $(grep 'zone ' named.conf | cut -f2 -d\")
34 do
35 $PDNSUTIL $ARGS set-nsec3 $zone "1 0 1 abcd" >&2
36 $PDNSUTIL $ARGS add-zone-key $zone rsasha256 1024 zsk active >&2
37 done
38
39 $RUNWRAPPER $PDNS --daemon=no --local-port=$port --socket-dir=./ \
40 $ARGS \
41 --allow-axfr-ips=127.0.0.1 \
42 --cache-ttl=60 --module-dir=../regression-tests/modules >&2 &
43
44 check_process
45
46 set +e
47
48 skipreasons='nsec3'
49
50 . ../regression-tests/tests/verify-dnssec-zone/command
51
52 kill $(cat pdns-gsqlite3.pid)