diff options
author | Greg Hudson <ghudson@mit.edu> | 2012-06-03 20:46:30 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2012-06-03 20:46:30 -0400 |
commit | 9421a2652f645bd0beef3e58b4b8fbc18d98f742 (patch) | |
tree | a6b5b3061d2120e68ba45458c6d4667dabd6d37c /src/tests | |
parent | 71ca96850348569a7358b32301bb0cc60eb08103 (diff) | |
download | krb5-9421a2652f645bd0beef3e58b4b8fbc18d98f742.tar.gz krb5-9421a2652f645bd0beef3e58b4b8fbc18d98f742.tar.xz krb5-9421a2652f645bd0beef3e58b4b8fbc18d98f742.zip |
Fail from gss_acquire_cred if we have no keytab
If a caller tries to acquire krb5 acceptor creds with no desired name
and we have no keytab keys, fail from gss_acquire_cred instead of
deferring until gss_accept_sec_context.
ticket: 7159 (new)
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/gssapi/t_gssapi.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tests/gssapi/t_gssapi.py b/src/tests/gssapi/t_gssapi.py index 3ace215db..18123b392 100644 --- a/src/tests/gssapi/t_gssapi.py +++ b/src/tests/gssapi/t_gssapi.py @@ -78,6 +78,13 @@ output = realm.run_as_client(['./t_imp_cred', 'service2/dwight'], if 'Wrong principal in request' not in output: fail('Expected error message not seen in t_imp_cred output') +# Verify that we can't acquire acceptor creds without a keytab. +os.remove(realm.keytab) +output = realm.run_as_client(['./t_accname', 'abc'], expected_code=1) +if ('gss_acquire_cred: Keytab' not in output or + 'nonexistent or empty' not in output): + fail('Expected error message not seen for nonexistent keytab') + realm.stop() # Re-run the last acceptor name test with ignore_acceptor_hostname set |