commit | 32a9b1c320d7da18459cf8a49d2d40a29150dc1f | [log] [tgz] |
---|---|---|
author | Bart Van Assche <bvanassche@google.com> | Thu Mar 10 21:42:40 2022 +0000 |
committer | Bart Van Assche <bvanassche@google.com> | Tue Mar 15 23:02:20 2022 +0000 |
tree | 05534359e67b523fe4366d0ac41cdce6c72b1fa9 | |
parent | 990194fe2fce44496ad8e9f9031d47bf9557127e [diff] [blame] |
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>
diff --git a/libprocessgroup/processgroup.cpp b/libprocessgroup/processgroup.cpp index 76d5e13..96b5537 100644 --- a/libprocessgroup/processgroup.cpp +++ b/libprocessgroup/processgroup.cpp
@@ -442,8 +442,8 @@ 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) {