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:
@@ -105,56 +105,74 @@ exitcode=0
|
|||||||
echo "Getting client initial tickets"
|
echo "Getting client initial tickets"
|
||||||
${kinit} --password-file=${objdir}/foopassword user1@${R} || exitcode=1
|
${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 "======test naming combinations"
|
||||||
echo "plain"
|
echo "plain"
|
||||||
${context} --name-type=hostbased-service host@lucid.test.h5l.se || \
|
${context} --name-type=hostbased-service host@lucid.test.h5l.se || \
|
||||||
{ exitcode=1 ; echo test failed; }
|
{ exitcode=1 ; echo "test failed"; }
|
||||||
echo "plain (krb5)"
|
echo "plain (krb5)"
|
||||||
${context} --name-type=krb5-principal-name host/lucid.test.h5l.se@${R} || \
|
${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)"
|
echo "plain (krb5 realmless)"
|
||||||
${context} --name-type=krb5-principal-name host/lucid.test.h5l.se || \
|
${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"
|
echo "dns canon on (long name) OFF, need dns_wrapper"
|
||||||
#${context} --dns-canon host@lucid.test.h5l.se || \
|
#${context} --dns-canon host@lucid.test.h5l.se || \
|
||||||
# { exitcode=1 ; echo test failed; }
|
# { exitcode=1 ; echo "test failed"; }
|
||||||
echo "dns canon off (long name)"
|
echo "dns canon off (long name)"
|
||||||
${context} --no-dns-canon host@lucid.test.h5l.se || \
|
${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)"
|
echo "dns canon off (short name)"
|
||||||
${context} --no-dns-canon host@lucid || \
|
${context} --no-dns-canon host@lucid || \
|
||||||
{ exitcode=1 ; echo test failed; }
|
{ exitcode=1 ; echo "test failed"; }
|
||||||
echo "dns canon off (short name, krb5)"
|
echo "dns canon off (short name, krb5)"
|
||||||
${context} --no-dns-canon --name-type=krb5-principal-name host/lucid@${R} || \
|
${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)"
|
echo "dns canon off (short name, krb5)"
|
||||||
${context} --no-dns-canon --name-type=krb5-principal-name host/lucid || \
|
${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"
|
echo "======test context building"
|
||||||
for mech in krb5 spnego ; do
|
for mech in krb5 spnego ; do
|
||||||
echo "${mech} no-mutual"
|
echo "${mech} no-mutual"
|
||||||
${context} --mech-type=${mech} \
|
${context} --mech-type=${mech} \
|
||||||
--name-type=hostbased-service host@lucid.test.h5l.se || \
|
--name-type=hostbased-service host@lucid.test.h5l.se || \
|
||||||
{ exitcode=1 ; echo test failed; }
|
{ exitcode=1 ; echo "test failed"; }
|
||||||
|
|
||||||
echo "${mech} mutual"
|
echo "${mech} mutual"
|
||||||
${context} --mech-type=${mech} \
|
${context} --mech-type=${mech} \
|
||||||
--mutual \
|
--mutual \
|
||||||
--name-type=hostbased-service host@lucid.test.h5l.se || \
|
--name-type=hostbased-service host@lucid.test.h5l.se || \
|
||||||
{ exitcode=1 ; echo test failed; }
|
{ exitcode=1 ; echo "test failed"; }
|
||||||
|
|
||||||
echo "${mech} delegate"
|
echo "${mech} delegate"
|
||||||
${context} --mech-type=${mech} \
|
${context} --mech-type=${mech} \
|
||||||
--delegate \
|
--delegate \
|
||||||
--name-type=hostbased-service host@lucid.test.h5l.se || \
|
--name-type=hostbased-service host@lucid.test.h5l.se || \
|
||||||
{ exitcode=1 ; echo test failed; }
|
{ exitcode=1 ; echo "test failed"; }
|
||||||
|
|
||||||
echo "${mech} mutual delegate"
|
echo "${mech} mutual delegate"
|
||||||
${context} --mech-type=${mech} \
|
${context} --mech-type=${mech} \
|
||||||
--mutual --delegate \
|
--mutual --delegate \
|
||||||
--name-type=hostbased-service host@lucid.test.h5l.se || \
|
--name-type=hostbased-service host@lucid.test.h5l.se || \
|
||||||
{ exitcode=1 ; echo test failed; }
|
{ exitcode=1 ; echo "test failed"; }
|
||||||
done
|
done
|
||||||
|
|
||||||
#add spnego !
|
#add spnego !
|
||||||
@@ -167,7 +185,7 @@ for mech in krb5 ; do
|
|||||||
--mutual \
|
--mutual \
|
||||||
--dce-style \
|
--dce-style \
|
||||||
--name-type=hostbased-service host@lucid.test.h5l.se || \
|
--name-type=hostbased-service host@lucid.test.h5l.se || \
|
||||||
{ exitcode=1 ; echo test failed; }
|
{ exitcode=1 ; echo "test failed"; }
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -175,7 +193,7 @@ done
|
|||||||
#${context} --mech-type=sasl-digest-md5 \
|
#${context} --mech-type=sasl-digest-md5 \
|
||||||
# --name-type=hostbased-service \
|
# --name-type=hostbased-service \
|
||||||
# host@lucid.test.h5l.se || \
|
# host@lucid.test.h5l.se || \
|
||||||
# { exitcode=1 ; echo test failed; }
|
# { exitcode=1 ; echo "test failed"; }
|
||||||
|
|
||||||
|
|
||||||
trap "" EXIT
|
trap "" EXIT
|
||||||
|
Reference in New Issue
Block a user