diff options
author | Greg Hudson <ghudson@mit.edu> | 2012-07-16 10:13:29 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2012-07-16 10:24:17 -0400 |
commit | 194e0433f07e244aab59edcb22ea0c6e359f9f0d (patch) | |
tree | e8c550ea4ee37b439de81b94e5541771a9f28a95 /src/tests/t_keytab.py | |
parent | 6931507c87d6139b1dcea2ea97a6e3b145287438 (diff) | |
download | krb5-194e0433f07e244aab59edcb22ea0c6e359f9f0d.tar.gz krb5-194e0433f07e244aab59edcb22ea0c6e359f9f0d.tar.xz krb5-194e0433f07e244aab59edcb22ea0c6e359f9f0d.zip |
Add kinit/klist -i options to use client keytab
In combination with -k, -i will cause kinit or klist to use the
default client keytab instead of the default acceptor keytab. This
gives an easy way to figure out what default client keytab name is in
use and to get credentials using it.
ticket: 7216 (new)
Diffstat (limited to 'src/tests/t_keytab.py')
-rw-r--r-- | src/tests/t_keytab.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tests/t_keytab.py b/src/tests/t_keytab.py index ef303f1975..8d73636c8d 100644 --- a/src/tests/t_keytab.py +++ b/src/tests/t_keytab.py @@ -18,6 +18,14 @@ output = realm.kinit(realm.user_princ, flags=['-k'], expected_code=1) if 'no suitable keys' not in output: fail('Expected error not seen in kinit output') +# Test kinit and klist with client keytab defaults. +realm.extract_keytab(realm.user_princ, realm.client_keytab); +realm.kinit(realm.user_princ, flags=['-k', '-i']) +realm.klist(realm.user_princ) +out = realm.run_as_client([klist, '-k', '-i']) +if realm.client_keytab not in out or realm.user_princ not in out: + fail('Expected output not seen from klist -k -i') + # Test handling of kvno values beyond 255. princ = 'foo/bar@%s' % realm.realm realm.addprinc(princ) |