Lines Matching refs:uid
87 static int convertUidToPath(char *path, size_t size, uid_t uid) in convertUidToPath() argument
92 uid); in convertUidToPath()
95 static int convertUidPidToPath(char *path, size_t size, uid_t uid, int pid) in convertUidPidToPath() argument
100 uid, in convertUidPidToPath()
105 static int initCtx(uid_t uid, int pid, struct ctx *ctx) in initCtx() argument
109 convertUidPidToPath(path, sizeof(path), uid, pid); in initCtx()
151 static pid_t getOneAppProcess(uid_t uid, int appProcessPid, struct ctx *ctx) in getOneAppProcess() argument
154 int ret = initCtx(uid, appProcessPid, ctx); in getOneAppProcess()
188 static int removeProcessGroup(uid_t uid, int pid) in removeProcessGroup() argument
193 convertUidPidToPath(path, sizeof(path), uid, pid); in removeProcessGroup()
196 convertUidToPath(path, sizeof(path), uid); in removeProcessGroup()
204 DIR *uid = opendir(uid_path); in removeUidProcessGroups() local
205 if (uid != NULL) { in removeUidProcessGroups()
208 while ((readdir_r(uid, &cur, &dir) == 0) && dir) { in removeUidProcessGroups()
223 closedir(uid); in removeUidProcessGroups()
256 static int killProcessGroupOnce(uid_t uid, int initialPid, int signal) in killProcessGroupOnce() argument
264 while ((pid = getOneAppProcess(uid, initialPid, &ctx)) >= 0) { in killProcessGroupOnce()
277 SLOGI("Killing pid %d in uid %d as part of process group %d", pid, uid, initialPid); in killProcessGroupOnce()
292 int killProcessGroup(uid_t uid, int initialPid, int signal) in killProcessGroup() argument
299 while ((processes = killProcessGroupOnce(uid, initialPid, signal)) > 0) { in killProcessGroup()
311 SLOGV("Killed process group uid %d pid %d in %" PRId64 "ms, %d procs remain", uid, initialPid, in killProcessGroup()
315 return removeProcessGroup(uid, initialPid); in killProcessGroup()
321 static int mkdirAndChown(const char *path, mode_t mode, uid_t uid, gid_t gid) in mkdirAndChown() argument
330 ret = chown(path, uid, gid); in mkdirAndChown()
340 int createProcessGroup(uid_t uid, int initialPid) in createProcessGroup() argument
345 convertUidToPath(path, sizeof(path), uid); in createProcessGroup()
353 convertUidPidToPath(path, sizeof(path), uid, initialPid); in createProcessGroup()