def getgruuid(self, uuid): tmp = (self.domain_name or "").encode("utf-8") (checksum, gid) = parse_uuid2(uuid) if crc32(tmp) != checksum: return None tmp = self.server.getgrgid(gid) retval = self._convert_group(tmp) return retval
def getgruuid(self, uuid): tmp = (self.domain_name or "").encode('utf-8') (checksum, gid) = parse_uuid2(uuid) if crc32(tmp) != checksum: return None tmp = self.server.getgrgid(gid) retval = self._convert_group(tmp) return retval
def getgruuid(self, id): logger.debug('getgruuid(uuid={0})'.format(id)) try: checksum, gid = parse_uuid2(id) if crc32(dn_to_domain(self.base_dn)) != checksum: return None q = '(gidNumber={0})'.format(gid) except ValueError: q = '(entryUUID={0})'.format(id) group = self.search_one(self.group_dn, q) return self.convert_group(group)
def getpwuuid(self, id): logger.debug('getpwuuid(uuid={0})'.format(id)) try: checksum, uid = parse_uuid2(id) if crc32(dn_to_domain(self.base_dn)) != checksum: return None q = '(uidNumber={0})'.format(uid) except ValueError: q = '(entryUUID={0})'.format(id) user = self.search_one(self.user_dn, q) return self.convert_user(user)
def getpwuuid(self, uuid): tmp = (self.domain_name or "").encode("utf-8") (checksum, uid) = parse_uuid2(uuid) if crc32(tmp) != checksum: return None return self._convert_user(self.server.getpwuid(uid))
def getpwuuid(self, uuid): tmp = (self.domain_name or "").encode('utf-8') (checksum, uid) = parse_uuid2(uuid) if crc32(tmp) != checksum: return None return self._convert_user(self.server.getpwuid(uid))