From 113ad32e9cd2dcda12f12aa8a72d56b73ff4f4cc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 01:51:29 +0200 Subject: Merging upstream version 1:9.16.48. Signed-off-by: Daniel Baumann --- bin/tests/system/nsupdate/krb/setup.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'bin/tests/system/nsupdate/krb/setup.sh') diff --git a/bin/tests/system/nsupdate/krb/setup.sh b/bin/tests/system/nsupdate/krb/setup.sh index 5ac116c..d32f32e 100644 --- a/bin/tests/system/nsupdate/krb/setup.sh +++ b/bin/tests/system/nsupdate/krb/setup.sh @@ -13,7 +13,7 @@ set -x -PWD=`pwd` +PWD=$(pwd) KRB5_CONFIG="${PWD}/krb5.conf" export KRB5_CONFIG @@ -21,11 +21,11 @@ export KRB5_CONFIG KRB5_KDC_PROFILE=${PWD}/krb5kdc export KRB5_KDC_PROFILE -now=`date +%s` -lifetime=`expr 2147483647 - $now` -lifetime=`expr $lifetime / 3600 / 24 - 30` +now=$(date +%s) +lifetime=$(expr 2147483647 - $now) +lifetime=$(expr $lifetime / 3600 / 24 - 30) -cat << EOF > "${KRB5_CONFIG}" +cat <"${KRB5_CONFIG}" [libdefaults] default_realm = EXAMPLE.COM dns_lookup_kdc = false @@ -56,7 +56,7 @@ rm -rf ${KRB5_KDC_PROFILE} mkdir -p ${KRB5_KDC_PROFILE} chmod 700 ${KRB5_KDC_PROFILE} -cat << EOF > "${KRB5_KDC_PROFILE}"/kdc.conf +cat <"${KRB5_KDC_PROFILE}"/kdc.conf [kdcdefaults] kdc_ports = 50000 kdc_tcp_ports = 50000 @@ -84,7 +84,6 @@ krb5kdc -n & krb5kdcpid=$! #trap "kill $krb5kdcpid; wait; trap 0; exit" 0 15 - kadmin.local addprinc -maxlife ${lifetime}d -randkey DNS/ns7.example.com@EXAMPLE.COM kadmin.local addprinc -maxlife ${lifetime}d -randkey DNS/ns8.example.com@EXAMPLE.COM kadmin.local addprinc -maxlife ${lifetime}d -randkey host/machine.example.com@EXAMPLE.COM -- cgit v1.2.3