2 from _acl import READ, WRITE, INSERT, LOOKUP, DELETE, LOCK, ADMINISTER, \
3 USR0, USR1, USR2, USR3, USR4, USR5, USR6, USR7
4 from _acl import getCallerAccess
32 _char2bit = dict(_charBitAssoc)
36 """Canonicalizes string rights to bitmask"""
37 if s in _canonical: s = _canonical[s]
38 return _parseRights(s)
41 def __init__(self, pos, neg):
44 Dictionary of usernames to positive ACL bitmasks
46 Dictionary of usernames to negative ACL bitmasks
52 """Retrieve the ACL for an AFS directory"""
53 pos, neg = _parseAcl(_acl.getAcl(dir))
57 """Takes a bitmask and returns a rwlidka string"""
59 for char,mask in _charBitAssoc:
60 if r & mask == mask: s += char
64 """Parses a rwlid... rights tring to bitmask"""
74 lines = inp.split("\n")
75 npos = int(lines[0].split(" ")[0])