From caf1fdd98690019d9ac9f56125f4916cfbdfd2d4 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Thu, 3 May 2012 19:42:43 +0000 Subject: 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 --- src/util/k5test.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/util') diff --git a/src/util/k5test.py b/src/util/k5test.py index 6097c9be9..f2a36b4d3 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') -- cgit