From 28bd6503bcc8b1c09f4f12196ea9c0172a450160 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sun, 22 Nov 2009 18:19:48 -0500 Subject: [PATCH] Add afs.pts.PTS.getEntryFromKrbname, which converts a Kerberos principal to an AFS principal. (This exposes afs._pts.PTS._Krb5ToAfs) Signed-off-by: Evan Broder --- afs/pts.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/afs/pts.py b/afs/pts.py index 47346f7..8bee97e 100644 --- a/afs/pts.py +++ b/afs/pts.py @@ -354,6 +354,14 @@ class PTS(_pts.PTS): else: return PTEntry(self, id=ident) + def getEntryFromKrbname(self, ident): + """Retrieve a PTEntry matching a given Kerberos v5 principal. + + getEntryFromKrb accepts a krb5 principal, converts it to the + equivalent AFS principal, and returns a PTEntry for that + principal.""" + return self.getEntry(self._Krb5ToAfs(ident)) + def expire(self): """Flush the cache of PTEntry objects. -- 1.7.9.5