diff --git a/tests/gss/check-context.in b/tests/gss/check-context.in index ef28edc59..1adf518fd 100644 --- a/tests/gss/check-context.in +++ b/tests/gss/check-context.in @@ -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