mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 22:52:35 +02:00
ANDROID: [RFC]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. Change-Id: I9b7ba2d9be1a469c9636497a6287f840891a91a8 Signed-off-by: John Stultz <john.stultz@linaro.org>
This commit is contained in:
parent
579a63bf28
commit
8cc698d951
|
|
@ -2857,7 +2857,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)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user