summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author T.J. Mercier <tjmercier@google.com> 2024-02-26 14:05:58 +0000
committer T.J. Mercier <tjmercier@google.com> 2024-02-26 22:25:28 +0000
commit461c2d0938c23a7d3340a336163f0f17b7521d9c (patch)
tree2194639132a8d3669254678694d5709757516127
parent095f7f73a6a0628fe385ddb7143f07b541bf6433 (diff)
Don't skip proess group creation for system_server
Otherwise system_server incorrectly shows up in the uid_0 (root) cgroup in the v2 hierarchy. Change-Id: I6123b649dabd8c752e527c776d611f5899abfe2c Bug: 326301963
-rw-r--r--core/jni/com_android_internal_os_Zygote.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp
index 2a2e9038c27a..cc1649464626 100644
--- a/core/jni/com_android_internal_os_Zygote.cpp
+++ b/core/jni/com_android_internal_os_Zygote.cpp
@@ -1828,7 +1828,7 @@ static void SpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArray gids,
// If this zygote isn't root, it won't be able to create a process group,
// since the directory is owned by root.
- if (!is_system_server && getuid() == 0) {
+ if (getuid() == 0) {
const int rc = createProcessGroup(uid, getpid());
if (rc != 0) {
fail_fn(rc == -EROFS ? CREATE_ERROR("createProcessGroup failed, kernel missing "