1#!/bin/sh 2 3# Copyright (C) Internet Systems Consortium, Inc. ("ISC") 4# 5# SPDX-License-Identifier: MPL-2.0 6# 7# This Source Code Form is subject to the terms of the Mozilla Public 8# License, v. 2.0. If a copy of the MPL was not distributed with this 9# file, you can obtain one at https://mozilla.org/MPL/2.0/. 10# 11# See the COPYRIGHT file distributed with this work for additional 12# information regarding copyright ownership. 13 14SYSTEMTESTTOP=.. 15. $SYSTEMTESTTOP/conf.sh 16 17# 18# jnl and database files MUST be removed before we start 19# 20$SHELL clean.sh 21 22copy_setports ns1/named.conf.in ns1/named.conf 23copy_setports ns2/named.conf.in ns2/named.conf 24copy_setports ns3/named.conf.in ns3/named.conf 25copy_setports ns5/named.conf.in ns5/named.conf 26copy_setports ns6/named.conf.in ns6/named.conf 27copy_setports ns7/named.conf.in ns7/named.conf 28copy_setports ns8/named.conf.in ns8/named.conf 29 30# If "tkey-gssapi-credential" is set in the configuration and GSSAPI support is 31# not available, named will refuse to start. As the test system framework does 32# not support starting named instances conditionally, ensure that 33# "tkey-gssapi-credential" is only present in named.conf if GSSAPI support is 34# available. 35copy_setports ns9/named.conf.in ns9/named.conf.in.tkey 36copy_setports ns10/named.conf.in ns10/named.conf.in.tkey 37if $FEATURETEST --gssapi; then 38 sed 's|@TKEY_CONFIGURATION@|tkey-gssapi-credential "DNS/ns9.example.com@EXAMPLE.COM";|' ns9/named.conf.in.tkey > ns9/named.conf 39 sed 's|@TKEY_CONFIGURATION@|tkey-gssapi-credential "DNS/ns10.example.com@EXAMPLE.COM";|' ns10/named.conf.in.tkey > ns10/named.conf 40else 41 sed 's|@TKEY_CONFIGURATION@||' ns9/named.conf.in.tkey > ns9/named.conf 42 sed 's|@TKEY_CONFIGURATION@||' ns10/named.conf.in.tkey > ns10/named.conf 43fi 44rm -f ns9/named.conf.in.tkey 45rm -f ns10/named.conf.in.tkey 46 47copy_setports verylarge.in verylarge 48 49cp -f ns1/example1.db ns1/example.db 50sed 's/example.nil/other.nil/g' ns1/example1.db > ns1/other.db 51sed 's/example.nil/unixtime.nil/g' ns1/example1.db > ns1/unixtime.db 52sed 's/example.nil/yyyymmddvv.nil/g' ns1/example1.db > ns1/yyyymmddvv.db 53sed 's/example.nil/keytests.nil/g' ns1/example1.db > ns1/keytests.db 54cp -f ns3/example.db.in ns3/example.db 55cp -f ns3/too-big.test.db.in ns3/too-big.test.db 56 57# update_test.pl has its own zone file because it 58# requires a specific NS record set. 59cat <<\EOF >ns1/update.db 60$ORIGIN . 61$TTL 300 ; 5 minutes 62update.nil IN SOA ns1.example.nil. hostmaster.example.nil. ( 63 1 ; serial 64 2000 ; refresh (2000 seconds) 65 2000 ; retry (2000 seconds) 66 1814400 ; expire (3 weeks) 67 3600 ; minimum (1 hour) 68 ) 69update.nil. NS ns1.update.nil. 70ns1.update.nil. A 10.53.0.2 71ns2.update.nil. AAAA ::1 72EOF 73 74$DDNSCONFGEN -q -z example.nil > ns1/ddns.key 75 76if $FEATURETEST --md5; then 77 $DDNSCONFGEN -q -a hmac-md5 -k md5-key -z keytests.nil > ns1/md5.key 78else 79 echo -n > ns1/md5.key 80fi 81$DDNSCONFGEN -q -a hmac-sha1 -k sha1-key -z keytests.nil > ns1/sha1.key 82$DDNSCONFGEN -q -a hmac-sha224 -k sha224-key -z keytests.nil > ns1/sha224.key 83$DDNSCONFGEN -q -a hmac-sha256 -k sha256-key -z keytests.nil > ns1/sha256.key 84$DDNSCONFGEN -q -a hmac-sha384 -k sha384-key -z keytests.nil > ns1/sha384.key 85$DDNSCONFGEN -q -a hmac-sha512 -k sha512-key -z keytests.nil > ns1/sha512.key 86 87(cd ns3; $SHELL -e sign.sh) 88 89cp -f ns1/many.test.db.in ns1/many.test.db 90 91cp ns1/sample.db.in ns1/sample.db 92cp ns2/sample.db.in ns2/sample.db 93 94cp -f ns1/maxjournal.db.in ns1/maxjournal.db 95 96cp -f ns5/local.db.in ns5/local.db 97cp -f ns6/in-addr.db.in ns6/in-addr.db 98cp -f ns7/in-addr.db.in ns7/in-addr.db 99cp -f ns7/example.com.db.in ns7/example.com.db 100cp -f ns8/in-addr.db.in ns8/in-addr.db 101cp -f ns8/example.com.db.in ns8/example.com.db 102cp -f ns9/in-addr.db.in ns9/in-addr.db 103cp -f ns9/example.com.db.in ns9/example.com.db 104cp -f ns9/example.com.db.in ns9/denyname.example.db 105cp -f ns10/in-addr.db.in ns10/in-addr.db 106cp -f ns10/example.com.db.in ns10/example.com.db 107