tests: Use here-doc kadmin in Java test

This commit is contained in:
Nicolas Williams
2024-01-20 16:12:59 -06:00
parent 366016b1f6
commit 1b62220778

View File

@@ -78,16 +78,13 @@ javac -d "${objdir}" "${srcdir}/../../appl/test/jgssapi_server.java" || \
echo foo > ${objdir}/foopassword
echo Creating database
${kadmin} \
init \
--realm-max-ticket-life=1day \
--realm-max-renewable-life=1month \
${R} || exit 1
${kadmin} add -p foo --use-defaults lha@${R} || exit 1
${kadmin} modify --attributes=+requires-pre-auth lha@${R} || exit 1
${kadmin} add -p kaka --use-defaults ${server}@${R} || exit 1
${kadmin} ext -k ${keytab} ${server}@${R} || exit 1
${kadmin} <<EOF || exit 1
init --realm-max-ticket-life=1day --realm-max-renewable-life=1month ${R}
add -p foo --use-defaults lha@${R}
modify --attributes=+requires-pre-auth lha@${R}
add -p kaka --use-defaults ${server}@${R}
ext -k ${keytab} ${server}@${R}
EOF
echo Starting kdc
${kdc} --detach --testing || { echo "kdc failed to start"; cat messages.log; exit 1; }