lkml.org 
[lkml]   [2009]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] do_wait: do take security_task_wait() into account
    I was never able to understand what should we actually do when
    security_task_wait() fails, but the current code doesn't look right.

    If ->task_wait() returns the error, we update *notask_error correctly.
    But then we either reap the child (despite the fact this was forbidden)
    or clear *notask_error (and hide the securiy policy problems).

    This patch assumes that "stolen by ptrace" doesn't matter. If selinux
    denies the child we should ignore it but make sure we report -EACCESS
    instead of -ECHLD if there are no other eligible children.

    Signed-off-by: Oleg Nesterov <oleg@redhat.com>

    --- PTRACE/kernel/exit.c~WAIT_SECURITY 2009-04-29 12:46:15.000000000 +0200
    +++ PTRACE/kernel/exit.c 2009-04-29 16:19:40.000000000 +0200
    @@ -1476,6 +1476,7 @@ static int wait_consider_task(struct tas
    */
    if (*notask_error)
    *notask_error = ret;
    + return 0;
    }

    if (likely(!ptrace) && unlikely(task_ptrace(p))) {


    \
     
     \ /
      Last update: 2009-04-29 18:09    [W:0.034 / U:0.164 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site