diff options
author | John Stultz <john.stultz@linaro.org> | 2016-10-18 16:20:23 -0700 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2016-10-29 13:54:22 +0800 |
commit | 7f61045ad5c0a055e08bb90f779914fe1b585981 (patch) | |
tree | 5a83a3ef752eb8e6132b0b77334c9360fc79a503 | |
parent | d1a3cc4aaf802d906201a224f4f34e65079e5f04 (diff) |
cgroup: Change from CAP_SYS_NICE to CAP_SYS_RESOURCE for cgroup migration permissionslsk-v4.1-16.11-android
Try to better match what we're pushing upstream, use CAP_SYS_RESOURCE
instead of CAP_SYS_NICE, which shoudln't affect Android as Zygote and
system_server already use CAP_SYS_RESOURCE.
Change-Id: I2f8f6715788bc03725696ef8e58429ce0cc330b3
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
-rw-r--r-- | kernel/cgroup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 111f24d37605..14ac4c390582 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -2676,7 +2676,7 @@ static int cgroup_procs_write_permission(struct task_struct *task, if (!uid_eq(cred->euid, GLOBAL_ROOT_UID) && !uid_eq(cred->euid, tcred->uid) && !uid_eq(cred->euid, tcred->suid) && - !ns_capable(tcred->user_ns, CAP_SYS_NICE)) + !ns_capable(tcred->user_ns, CAP_SYS_RESOURCE)) ret = -EACCES; if (!ret && cgroup_on_dfl(dst_cgrp)) { |