From 9dcdb2c02c81395f9a1997baab024d5970cfd695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Wed, 15 Jul 2009 22:17:17 +0000 Subject: [PATCH] Test two realms. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25325 ec53bebd-3082-4978-b11e-865c3cabbd6b --- tests/kdc/check-kpasswdd.in | 46 +++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/tests/kdc/check-kpasswdd.in b/tests/kdc/check-kpasswdd.in index a1baaf06a..7159a400f 100644 --- a/tests/kdc/check-kpasswdd.in +++ b/tests/kdc/check-kpasswdd.in @@ -44,6 +44,7 @@ testfailed="echo test failed; cat messages.log; exit \$ec" ../db/have-db || exit 77 R=TEST.H5L.SE +R2=TEST2.H5L.SE port=@port@ pwport=@pwport@ @@ -74,7 +75,7 @@ rm -f mkey.file* > messages.log -echo Creating database +echo "Creating database for $R" ${kadmin} \ init \ --realm-max-ticket-life=1day \ @@ -85,8 +86,18 @@ ${kadmin} add -p foo --use-defaults foo@${R} || exit 1 ${kadmin} add -p kaka --use-defaults ${server}@${R} || exit 1 ${kadmin} ext -k ${keytab} ${server}@${R} || exit 1 -echo "Doing database check" +echo "Creating database for ${R2}" +${kadmin} \ + init \ + --realm-max-ticket-life=1day \ + --realm-max-renewable-life=1month \ + ${R2} || exit 1 + +${kadmin} add -p foo --use-defaults bar@${R2} || exit 1 + +echo "Doing database check for ${R} ${R2}" ${kadmin} check ${R} || exit 1 +${kadmin} check ${R2} || exit 1 echo foo > ${objdir}/foopassword @@ -101,6 +112,7 @@ if [ "$?" != 0 ] ; then fi echo Starting kpasswdd +env MallocStackLogging=1 MallocStackLoggingNoCompact=1 MallocErrorAbort=1 MallocLogFile=${objdir}/malloc-log \ ${kpasswdd} & kpasswddpid=$! @@ -119,6 +131,7 @@ ${test_apreq} ${server}@${R} ${keytab} ${cache} || \ { ec=1 ; eval "${testfailed}"; } ${kdestroy} +echo "checking ${R}" pw=ak4unandsop39NuJ @@ -138,11 +151,11 @@ ${rkpty} cpw.tmp ../../kpasswd/kpasswd foo@${R} || \ rm cpw.tmp -echo ${pw} > ${objdir}/foopassword +echo ${pw} > ${objdir}/barpassword -echo "Getting client initial tickets"; > messages.log -${kinit} --password-file=${objdir}/foopassword foo@$R || \ +echo "Getting client initial tickets for ${R}"; > messages.log +${kinit} --password-file=${objdir}/barpassword foo@$R || \ { ec=1 ; eval "${testfailed}"; } echo "Getting tickets"; > messages.log ${kgetcred} ${server}@${R} || { ec=1 ; eval "${testfailed}"; } @@ -153,6 +166,29 @@ ${test_apreq} ${server}@${R} ${keytab} ${cache} || \ ${kdestroy} +echo "checking ${R2}" + +cat > cpw.tmp < messages.log +${kinit} --password-file=${objdir}/barpassword bar@${R2} || \ + { ec=1 ; eval "${testfailed}"; } +${kdestroy} + echo "killing kdc (${kdcpid} ${kpasswddpid})" sh ${srcdir}/leaks-kill.sh kdc $kdcpid || exit 1