Fix gss_store_cred()

This commit is contained in:
Nicolas Williams
2015-03-19 12:30:26 -05:00
parent df41d53c67
commit f73c4edf69
3 changed files with 76 additions and 27 deletions

View File

@@ -34,9 +34,12 @@
# $Id$
#
env_setup="@env_setup@"
srcdir="@srcdir@"
objdir="@objdir@"
. ${env_setup}
# If there is no useful db support compile in, disable test
../db/have-db || exit 77
@@ -51,14 +54,12 @@ cache="FILE:krb5ccfile"
cache2="FILE:krb5ccfile2"
nocache="FILE:no-such-cache"
kinit="${TESTS_ENVIRONMENT} ../../kuser/kinit -c $cache ${afs_no_afslog}"
kdestroy="${TESTS_ENVIRONMENT} ../../kuser/kdestroy -c $cache ${afs_no_unlog}"
klist="${TESTS_ENVIRONMENT} ../../kuser/klist -c $cache"
kadmin="${TESTS_ENVIRONMENT} ../../kadmin/kadmin -l -r $R"
kdc="${TESTS_ENVIRONMENT} ../../kdc/kdc --addresses=localhost -P $port"
kadmin="${kadmin} -l -r $R"
kdc="${kdc} --addresses=localhost -P $port"
acquire_cred="${TESTS_ENVIRONMENT} ../../lib/gssapi/test_acquire_cred"
test_kcred="${TESTS_ENVIRONMENT} ../../lib/gssapi/test_kcred"
test_add_store_cred="${TESTS_ENVIRONMENT} ../../lib/gssapi/test_add_store_cred"
KRB5_CONFIG="${objdir}/krb5.conf"
export KRB5_CONFIG
@@ -107,7 +108,11 @@ trap "kill ${kdcpid}; echo signal killing kdc; exit 1;" EXIT
exitcode=0
echo "initial ticket"
${kinit} --password-file=${objdir}/foopassword user@${R} || exitcode=1
${kinit} -c ${cache} --password-file=${objdir}/foopassword user@${R} || exitcode=1
echo "copy ccache with gss_store_cred"
${test_add_store_cred} ${cache} ${cache2} || exit 1
${klist} -c ${cache2} || exit 1
echo "keytab"
${acquire_cred} \
@@ -188,7 +193,7 @@ KRB5_KTNAME=${nokeytab}
echo "kcred"
${test_kcred} || exit 1
${kdestroy}
${kdestroy} -c ${cache}
KRB5_KTNAME="${keytab}"