krb5 commit: Tests for kinit's detection of a keytab request
Benjamin Kaduk
kaduk at MIT.EDU
Fri Nov 16 12:15:37 EST 2012
https://github.com/krb5/krb5/commit/76259be582f1e0d07c2a8993741e4893c7fd6f74
commit 76259be582f1e0d07c2a8993741e4893c7fd6f74
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.
ticket: 7218
tags: pullup
target_version: 1.11
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