lkml.org 
[lkml]   [2010]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[05/89] SECURITY: selinux, fix update_rlimit_cpu parameter
    2.6.31-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Jiri Slaby <jirislaby@gmail.com>

    commit 17740d89785aeb4143770923d67c293849414710 upstream.

    Don't pass current RLIMIT_RTTIME to update_rlimit_cpu() in
    selinux_bprm_committing_creds, since update_rlimit_cpu expects
    RLIMIT_CPU limit.

    Use proper rlim[RLIMIT_CPU].rlim_cur instead to fix that.

    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>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    security/selinux/hooks.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/security/selinux/hooks.c
    +++ b/security/selinux/hooks.c
    @@ -2360,7 +2360,7 @@ static void selinux_bprm_committing_cred
    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);
    }
    }




    \
     
     \ /
      Last update: 2010-03-31 02:35    [W:0.022 / U:1.492 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site