def uids(self): f = open("/proc/%s/status" % self.pid, 'rb') try: UID = b('Uid:') for line in f: if line.startswith(UID): _, real, effective, saved, fs = line.split() return _common.puids(int(real), int(effective), int(saved)) raise NotImplementedError("line not found") finally: f.close()
def gids(self): _, _, _, real, effective, saved = cext.proc_cred(self.pid) return _common.puids(real, effective, saved)
def uids(self): real, effective, saved = cext.proc_uids(self.pid) return _common.puids(real, effective, saved)