Test unreadable/non existant keytab and its error message.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22536 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-01-27 12:20:33 +00:00
parent d977aceada
commit a0caf44c41

View File

@@ -105,56 +105,74 @@ exitcode=0
echo "Getting client initial tickets"
${kinit} --password-file=${objdir}/foopassword user1@${R} || exitcode=1
echo "======test unreadable/non existant keytab and its error message"
${context} --mech-type=krb5 host@lucid.test.h5l.se || \
{ exitcode=1 ; echo "test failed"; }
chmod 0 ${keytabfile}
echo "checking non readable keytabfile"
${context} --mech-type=krb5 host@lucid.test.h5l.se > test_context.log 2>&1&& \
{ exitcode=1 ; echo "test failed"; }
grep ${keytabfile} test_context.log > /dev/null || \
{ exitcode=1 ; echo "test failed"; }
chmod 600 ${keytabfile}
echo "checking non existant keytabfile"
mv ${keytabfile} ${keytabfile}.no
${context} --mech-type=krb5 host@lucid.test.h5l.se > test_context.log 2>&1&& \
{ exitcode=1 ; echo "test failed"; }
grep ${keytabfile} test_context.log > /dev/null || \
{ exitcode=1 ; echo "test failed"; }
mv ${keytabfile}.no ${keytabfile}
echo "======test naming combinations"
echo "plain"
${context} --name-type=hostbased-service host@lucid.test.h5l.se || \
{ exitcode=1 ; echo test failed; }
{ exitcode=1 ; echo "test failed"; }
echo "plain (krb5)"
${context} --name-type=krb5-principal-name host/lucid.test.h5l.se@${R} || \
{ exitcode=1 ; echo test failed; }
{ exitcode=1 ; echo "test failed"; }
echo "plain (krb5 realmless)"
${context} --name-type=krb5-principal-name host/lucid.test.h5l.se || \
{ exitcode=1 ; echo test failed; }
{ exitcode=1 ; echo "test failed"; }
echo "dns canon on (long name) OFF, need dns_wrapper"
#${context} --dns-canon host@lucid.test.h5l.se || \
# { exitcode=1 ; echo test failed; }
# { exitcode=1 ; echo "test failed"; }
echo "dns canon off (long name)"
${context} --no-dns-canon host@lucid.test.h5l.se || \
{ exitcode=1 ; echo test failed; }
{ exitcode=1 ; echo "test failed"; }
echo "dns canon off (short name)"
${context} --no-dns-canon host@lucid || \
{ exitcode=1 ; echo test failed; }
{ exitcode=1 ; echo "test failed"; }
echo "dns canon off (short name, krb5)"
${context} --no-dns-canon --name-type=krb5-principal-name host/lucid@${R} || \
{ exitcode=1 ; echo test failed; }
{ exitcode=1 ; echo "test failed"; }
echo "dns canon off (short name, krb5)"
${context} --no-dns-canon --name-type=krb5-principal-name host/lucid || \
{ exitcode=1 ; echo test failed; }
{ exitcode=1 ; echo "test failed"; }
echo "======test context building"
for mech in krb5 spnego ; do
echo "${mech} no-mutual"
${context} --mech-type=${mech} \
--name-type=hostbased-service host@lucid.test.h5l.se || \
{ exitcode=1 ; echo test failed; }
{ exitcode=1 ; echo "test failed"; }
echo "${mech} mutual"
${context} --mech-type=${mech} \
--mutual \
--name-type=hostbased-service host@lucid.test.h5l.se || \
{ exitcode=1 ; echo test failed; }
{ exitcode=1 ; echo "test failed"; }
echo "${mech} delegate"
${context} --mech-type=${mech} \
--delegate \
--name-type=hostbased-service host@lucid.test.h5l.se || \
{ exitcode=1 ; echo test failed; }
{ exitcode=1 ; echo "test failed"; }
echo "${mech} mutual delegate"
${context} --mech-type=${mech} \
--mutual --delegate \
--name-type=hostbased-service host@lucid.test.h5l.se || \
{ exitcode=1 ; echo test failed; }
{ exitcode=1 ; echo "test failed"; }
done
#add spnego !
@@ -167,7 +185,7 @@ for mech in krb5 ; do
--mutual \
--dce-style \
--name-type=hostbased-service host@lucid.test.h5l.se || \
{ exitcode=1 ; echo test failed; }
{ exitcode=1 ; echo "test failed"; }
done
@@ -175,7 +193,7 @@ done
#${context} --mech-type=sasl-digest-md5 \
# --name-type=hostbased-service \
# host@lucid.test.h5l.se || \
# { exitcode=1 ; echo test failed; }
# { exitcode=1 ; echo "test failed"; }
trap "" EXIT