Merge "libprocessgroup: UIDs in linux are unsigned" into main am: f8d02eeee1

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

Change-Id: I9bcc66576d12fa017d424ff9a4b505980d9d5f68
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2023-07-27 02:28:58 +00:00 committed by Automerger Merge Worker
commit 01d4fdfad3

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) {