summaryrefslogtreecommitdiffstats
path: root/src/util/k5test.py
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-05-03 19:42:43 +0000
committerGreg Hudson <ghudson@mit.edu>2012-05-03 19:42:43 +0000
commitcaf1fdd98690019d9ac9f56125f4916cfbdfd2d4 (patch)
treea43b1b220fc7b12759a507b2d165c2b2b4f10129 /src/util/k5test.py
parentc3ab5fe0b01a68b14d5657740006488721b48b7b (diff)
downloadkrb5-caf1fdd98690019d9ac9f56125f4916cfbdfd2d4.tar.gz
krb5-caf1fdd98690019d9ac9f56125f4916cfbdfd2d4.tar.xz
krb5-caf1fdd98690019d9ac9f56125f4916cfbdfd2d4.zip
Try all host keys by default in vfy_increds
Factor out the core code of krb5_verify_init_creds into a helper, add new helper functions to retrieve the list of unique host principals from a keytab, and make krb5_verify_init_creds drive the helper once per host principal. Augment the test harness and test cases to better test the new behavior. Add a k5test method to retrieve an NFS principal for the test realm for the sake of the new test cases. ticket: 7125 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25845 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/k5test.py')
-rw-r--r--src/util/k5test.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/k5test.py b/src/util/k5test.py
index 6097c9be96..f2a36b4d3d 100644
--- a/src/util/k5test.py
+++ b/src/util/k5test.py
@@ -301,6 +301,9 @@ Scripts may use the following realm methods and attributes:
* realm.host_princ: The name of the host principal for this machine,
with realm.
+* realm.nfs_princ: The name of the nfs principal for this machine,
+ with realm.
+
* realm.krbtgt_princ: The name of the krbtgt principal for the realm.
* realm.keytab: A keytab file in realm.testdir. Initially contains a
@@ -698,6 +701,7 @@ class K5Realm(object):
self.user_princ = 'user@' + self.realm
self.admin_princ = 'user/admin@' + self.realm
self.host_princ = 'host/%s@%s' % (hostname, self.realm)
+ self.nfs_princ = 'nfs/%s@%s' % (hostname, self.realm)
self.krbtgt_princ = 'krbtgt/%s@%s' % (self.realm, self.realm)
self.keytab = os.path.join(self.testdir, 'keytab')
self.ccache = os.path.join(self.testdir, 'ccache')