tuple(x.encode('iso-8859-1') for x in py.gr_mem))
def getgrgid(uid):
- return _group_from_py(pwd.getgrgid(uid))
+ return _group_from_py(grp.getgrgid(uid))
def getgrnam(name):
- return _group_from_py(pwd.getgrnam(name))
+ return _group_from_py(grp.getgrnam(name))
_uid_to_pwd_cache = {}
Return None if no entry is found.
"""
global _gid_to_grp_cache, _name_to_grp_cache
- entry, cached = cache_key_value(grp.getgrgid, gid, _gid_to_grp_cache)
+ entry, cached = cache_key_value(getgrgid, gid, _gid_to_grp_cache)
if entry and not cached:
_name_to_grp_cache[entry.gr_name] = entry
return entry
"""
assert type(name) == bytes
global _gid_to_grp_cache, _name_to_grp_cache
- entry, cached = cache_key_value(grp.getgrnam, name, _name_to_grp_cache)
+ entry, cached = cache_key_value(getgrnam, name, _name_to_grp_cache)
if entry and not cached:
_gid_to_grp_cache[entry.gr_gid] = entry
return entry