def become_persona (self): if self.persona is not (None, None, None): username, uid, gid = self.persona # Set the group access list. grp2.setgroups(external_auth.getgrouplist(username, gid)) # don't change if it has already been done # the order of these is important! if os.getegid() != gid: os.setegid (gid) if os.geteuid() != uid: os.seteuid (uid)
def become_persona(self): if self.persona is not (None, None, None): username, uid, gid = self.persona # Set the group access list. grp2.setgroups(external_auth.getgrouplist(username, gid)) # don't change if it has already been done # the order of these is important! if os.getegid() != gid: os.setegid(gid) if os.geteuid() != uid: os.seteuid(uid)
def become_nobody (self): if self.persona is not (None, None, None): os.seteuid (self.PROCESS_UID) os.setegid (self.PROCESS_GID) grp2.setgroups(self.PROCESS_GROUPS)
def become_nobody(self): if self.persona is not (None, None, None): os.seteuid(self.PROCESS_UID) os.setegid(self.PROCESS_GID) grp2.setgroups(self.PROCESS_GROUPS)