• O
    do_wait: do take security_task_wait() into account · 78a3d9d5
    Oleg Nesterov 提交于
    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: NOleg Nesterov <oleg@redhat.com>
    Acked-by: NRoland McGrath <roland@redhat.com>
    Signed-off-by: NJames Morris <jmorris@namei.org>
    78a3d9d5
exit.c 45.8 KB