userns: Convert cgroup permission checks to use uid_eq
Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
This commit is contained in:
@@ -2160,9 +2160,9 @@ retry_find_task:
|
||||
* only need to check permissions on one of them.
|
||||
*/
|
||||
tcred = __task_cred(tsk);
|
||||
if (cred->euid &&
|
||||
cred->euid != tcred->uid &&
|
||||
cred->euid != tcred->suid) {
|
||||
if (!uid_eq(cred->euid, GLOBAL_ROOT_UID) &&
|
||||
!uid_eq(cred->euid, tcred->uid) &&
|
||||
!uid_eq(cred->euid, tcred->suid)) {
|
||||
rcu_read_unlock();
|
||||
ret = -EACCES;
|
||||
goto out_unlock_cgroup;
|
||||
|
Reference in New Issue
Block a user