krb5 commit [krb5-1.11]: Tests for kinit's detection of a keytab request
Tom Yu
tlyu at MIT.EDU
Fri Nov 16 17:46:35 EST 2012
https://github.com/krb5/krb5/commit/35a5dd9ef11cc9c0bd52bcc856af556ac29790a7
commit 35a5dd9ef11cc9c0bd52bcc856af556ac29790a7
Author: Ben Kaduk <kaduk at mit.edu>
Date: Wed Nov 14 15:20:16 2012 -0500
Tests for kinit's detection of a keytab request
We must check that 'kinit -t keytab' and 'kinit -i' successfully
produce tickets, and have the specified warning output.
(cherry picked from commit 76259be582f1e0d07c2a8993741e4893c7fd6f74)
ticket: 7218
version_fixed: 1.11
status: resolved
src/tests/t_keytab.py | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/tests/t_keytab.py b/src/tests/t_keytab.py
index f8cea68..bc547d9 100644
--- a/src/tests/t_keytab.py
+++ b/src/tests/t_keytab.py
@@ -26,6 +26,18 @@ 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 implicit request for keytab (-i or -t without -k)
+realm.run_as_client([kdestroy])
+output = realm.kinit(realm.host_princ, flags=['-t', realm.keytab])
+if 'keytab specified, forcing -k' not in output:
+ fail('Expected output not seen from kinit -t keytab')
+realm.klist(realm.host_princ)
+realm.run_as_client([kdestroy])
+output = realm.kinit(realm.user_princ, flags=['-i'])
+if 'keytab specified, forcing -k' not in output:
+ fail('Expected output not seen from kinit -i')
+realm.klist(realm.user_princ)
+
# Test handling of kvno values beyond 255.
princ = 'foo/bar@%s' % realm.realm
realm.addprinc(princ)
More information about the cvs-krb5
mailing list