Use uid_t for user IDs and gid_t for group IDs

This patch makes the intent of the code more clear without changing any
functionality since uid_t and gid_t are both aliases for uint32_t on
Android systems. See also
https://cs.android.com/android/platform/superproject/+/master:bionic/libc/include/sys/types.h

Bug: 213617178
Test: Compile-tested only.
Change-Id: Ib5012456a7357e79368f00e71e9a280fd6f96063
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
Bart Van Assche 2022-03-10 21:42:40 +00:00
parent 990194fe2f
commit 32a9b1c320

View file

@ -442,8 +442,8 @@ static int createProcessGroupInternal(uid_t uid, int initialPid, std::string cgr
struct stat cgroup_stat;
mode_t cgroup_mode = 0750;
gid_t cgroup_uid = AID_SYSTEM;
uid_t cgroup_gid = AID_SYSTEM;
uid_t cgroup_uid = AID_SYSTEM;
gid_t cgroup_gid = AID_SYSTEM;
int ret = 0;
if (stat(cgroup.c_str(), &cgroup_stat) == 1) {