Changeset 3496 for pykota

Show
Ignore:
Timestamp:
04/08/09 11:43:33 (12 years ago)
Author:
jerome
Message:

Implemented a workaround for Kerberized usernames. This workaround
should also take care of removing instances from the principal. Now only
the primary is used as the username. IMPORTANT : in the code we
consider the component separator character is always '/' and the realm
separator character is always '@', this may not always be the case.
Fixes #41.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/cups.py

    r3489 r3496  
    7878        (dummy, self.MimeType) = self.getAttributeTypeAndValue(answer, "document-format") 
    7979 
     80        # handle Kerberized usernames as described here : 
     81        # http://www.mit.edu/~kerberos/krb5-1.5/krb5-1.5.4/doc/krb5-user/What-is-a-Kerberos-Principal_003f.html 
     82        self.OriginatingUserName = self.OriginatingUserName.split("@", 1)[0].split("/")[0] 
     83 
    8084        for attrib in ("OriginatingUserName", 
    8185                       "OriginatingHostName",