lkml.org 
[lkml]   [2012]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[PATCH 42/43] userns: Convert cgroup permission checks to use uid_eq
    From: Eric W. Biederman <ebiederm@xmission.com>

    Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
    ---
    kernel/cgroup.c | 6 +++---
    1 files changed, 3 insertions(+), 3 deletions(-)

    diff --git a/kernel/cgroup.c b/kernel/cgroup.c
    index ed64cca..c8329b0 100644
    --- a/kernel/cgroup.c
    +++ b/kernel/cgroup.c
    @@ -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;
    --
    1.7.2.5


    \
     
     \ /
      Last update: 2012-04-08 07:17    [W:0.025 / U:31.088 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site