Beispiel #1
0
 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)
Beispiel #2
0
 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)
Beispiel #3
0
 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)
Beispiel #4
0
 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)