From: Evan Broder Date: Sun, 22 Nov 2009 23:19:48 +0000 (-0500) Subject: Add afs.pts.PTS.getEntryFromKrbname, which converts a Kerberos X-Git-Tag: 0.1.0~5 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/python-afs.git/commitdiff_plain/28bd6503bcc8b1c09f4f12196ea9c0172a450160?hp=0e2974f1af7500997666a21880af9a88947a8125 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 --- 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.