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-25 21:53:04 +0800 |
| commit | 273daee0be36235886622396eedb618fc5de0213 (patch) | |
| tree | b07ed7db54850e77a1d924ab5e8203b7db17e6ab /kernel | |
| parent | 9d37de65aae1e8783547445f17a1d2b72b94e3ce (diff) | |
cgroup: Change from CAP_SYS_NICE to CAP_SYS_RESOURCE for cgroup migration permissions
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.
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'kernel')
| -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 fcb037068e3f..e4552a3cbf41 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -2686,7 +2686,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)) { |
