From: Michał Kępień Date: Mon, 26 Apr 2021 05:16:38 +0000 (+0200) Subject: Test "tkey-gssapi-credential" conditionally X-Git-Tag: v9.17.13~43^2~1 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=6feac68b5050e445b2e46b364ab7a0490e57ae52;p=thirdparty%2Fbind9.git 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. --- diff --git a/bin/tests/system/nsupdate/ns10/named.conf.in b/bin/tests/system/nsupdate/ns10/named.conf.in index 0e2fb067826..28fa5b5a295 100644 --- a/bin/tests/system/nsupdate/ns10/named.conf.in +++ b/bin/tests/system/nsupdate/ns10/named.conf.in @@ -20,7 +20,7 @@ options { recursion no; notify yes; minimal-responses no; - tkey-gssapi-credential "DNS/ns10.example.com@EXAMPLE.COM"; + @TKEY_CONFIGURATION@ }; key rndc_key { diff --git a/bin/tests/system/nsupdate/ns9/named.conf.in b/bin/tests/system/nsupdate/ns9/named.conf.in index f95ea4ed268..e80f6775afd 100644 --- a/bin/tests/system/nsupdate/ns9/named.conf.in +++ b/bin/tests/system/nsupdate/ns9/named.conf.in @@ -20,7 +20,7 @@ options { recursion no; notify yes; minimal-responses no; - tkey-gssapi-credential "DNS/ns9.example.com@EXAMPLE.COM"; + @TKEY_CONFIGURATION@ }; key rndc_key { diff --git a/bin/tests/system/nsupdate/setup.sh b/bin/tests/system/nsupdate/setup.sh index 6ef54ac1a38..be8c7f8adf0 100644 --- a/bin/tests/system/nsupdate/setup.sh +++ b/bin/tests/system/nsupdate/setup.sh @@ -23,8 +23,23 @@ copy_setports ns5/named.conf.in ns5/named.conf copy_setports ns6/named.conf.in ns6/named.conf copy_setports ns7/named.conf.in ns7/named.conf copy_setports ns8/named.conf.in ns8/named.conf -copy_setports ns9/named.conf.in ns9/named.conf -copy_setports ns10/named.conf.in ns10/named.conf + +# 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. +copy_setports ns9/named.conf.in ns9/named.conf.in.tkey +copy_setports ns10/named.conf.in ns10/named.conf.in.tkey +if $FEATURETEST --gssapi; then + sed 's|@TKEY_CONFIGURATION@|tkey-gssapi-credential "DNS/ns9.example.com@EXAMPLE.COM";|' ns9/named.conf.in.tkey > ns9/named.conf + sed 's|@TKEY_CONFIGURATION@|tkey-gssapi-credential "DNS/ns10.example.com@EXAMPLE.COM";|' ns10/named.conf.in.tkey > ns10/named.conf +else + sed 's|@TKEY_CONFIGURATION@||' ns9/named.conf.in.tkey > ns9/named.conf + sed 's|@TKEY_CONFIGURATION@||' ns10/named.conf.in.tkey > ns10/named.conf +fi +rm -f ns9/named.conf.in.tkey +rm -f ns10/named.conf.in.tkey copy_setports verylarge.in verylarge