Merge "libprocessgroup: UIDs in linux are unsigned" into main am: f8d02eeee1 am: 01d4fdfad3 am: 8cabf4bed4

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2677642

Change-Id: Ie6a63b0fd704e754cac063dfba0006712d3a3495
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2023-07-27 03:57:41 +00:00 committed by Automerger Merge Worker
commit 7a5895d0b2

View file

@ -206,11 +206,11 @@ bool SetUserProfiles(uid_t uid, const std::vector<std::string>& profiles) {
}
static std::string ConvertUidToPath(const char* cgroup, uid_t uid) {
return StringPrintf("%s/uid_%d", cgroup, uid);
return StringPrintf("%s/uid_%u", cgroup, uid);
}
static std::string ConvertUidPidToPath(const char* cgroup, uid_t uid, int pid) {
return StringPrintf("%s/uid_%d/pid_%d", cgroup, uid, pid);
return StringPrintf("%s/uid_%u/pid_%d", cgroup, uid, pid);
}
static int RemoveProcessGroup(const char* cgroup, uid_t uid, int pid, unsigned int retries) {