Support parsing KRB-ERROR passed back from windows server when the time is out of sync, modify krb5_cc_[sg]et_config interface to handle principals too, add tests for this

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23420 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-07-26 18:37:48 +00:00
parent 82570534fc
commit 39fe446983
11 changed files with 438 additions and 65 deletions

View File

@@ -50,6 +50,7 @@ nokeytab="FILE:no-such-keytab"
cache="FILE:krb5ccfile"
kinit="${TESTS_ENVIRONMENT} ../../kuser/kinit -c $cache --no-afslog"
klist="${TESTS_ENVIRONMENT} ../../kuser/klist -c $cache"
kadmin="${TESTS_ENVIRONMENT} ../../kadmin/kadmin -l -r $R"
kdc="${TESTS_ENVIRONMENT} ../../kdc/kdc --addresses=localhost -P $port"
@@ -266,6 +267,28 @@ ${context} \
--name-type=hostbased-service host@lucid.test.h5l.se || \
{ exitcode=1 ; echo "test failed"; }
echo "Getting client initial ticket"
${kinit} --password-file=${objdir}/foopassword user1@${R} || exitcode=1
echo "No time offset"
${context} \
--mech-type=krb5 \
--name-type=hostbased-service host@lucid.test.h5l.se || \
{ exitcode=1 ; echo "test failed"; }
echo "Server time offset"
../../libtool --mode=execute gdb --arg \
${context} \
--verbose \
--mech-type=krb5 \
--mutual-auth \
--server-time-offset=3600 \
--name-type=hostbased-service host@lucid.test.h5l.se || \
{ exitcode=1 ; echo "test failed"; }
${klist} --hidden
echo "killing kdc (${kdcpid})"
kill ${kdcpid} 2> /dev/null