lkml.org 
[lkml]   [2009]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH -repost 1/8] SECURITY: selinux, fix update_rlimit_cpu parameter
    Date
    Don't pass rlim_cur member of RLIM_NLIMITS-1=RLIMIT_RTTIME limit
    to update_rlimit_cpu() in selinux_bprm_committing_creds.

    Use proper rlim[RLIMIT_CPU].rlim_cur instead.

    Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
    Acked-by: James Morris <jmorris@namei.org>
    Cc: Stephen Smalley <sds@tycho.nsa.gov>
    Cc: Eric Paris <eparis@parisplace.org>
    Cc: David Howells <dhowells@redhat.com>
    ---
    security/selinux/hooks.c | 2 +-
    1 files changed, 1 insertions(+), 1 deletions(-)

    diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
    index a29d661..5718abc 100644
    --- a/security/selinux/hooks.c
    +++ b/security/selinux/hooks.c
    @@ -2365,7 +2365,7 @@ static void selinux_bprm_committing_creds(struct linux_binprm *bprm)
    initrlim = init_task.signal->rlim + i;
    rlim->rlim_cur = min(rlim->rlim_max, initrlim->rlim_cur);
    }
    - update_rlimit_cpu(rlim->rlim_cur);
    + update_rlimit_cpu(current->signal->rlim[RLIMIT_CPU].rlim_cur);
    }
    }

    --
    1.6.4.2


    \
     
     \ /
      Last update: 2009-10-17 23:25    [W:0.018 / U:0.400 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site