[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080302004920.GA31969@infradead.org>
Date: Sat, 1 Mar 2008 19:49:20 -0500
From: Christoph Hellwig <hch@...radead.org>
To: "Andrew G. Morgan" <morgan@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cleanup: correct tabbing of check_kill_permission()
On Sat, Mar 01, 2008 at 02:32:38PM -0800, Andrew G. Morgan wrote:
> + if (info == SEND_SIG_NOINFO
> + || (!is_si_special(info) && SI_FROMUSER(info))) {
> + /* Let audit system see the signal */
> + error = audit_signal_info(sig, t);
> if (error)
> return error;
> error = -EPERM;
> - if (((sig != SIGCONT) ||
> - (task_session_nr(current) != task_session_nr(t)))
> + if (((sig != SIGCONT)
> + || (task_session_nr(current) != task_session_nr(t)))
> && (current->euid ^ t->suid) && (current->euid ^ t->uid)
> && (current->uid ^ t->suid) && (current->uid ^ t->uid)
> && !capable(CAP_KILL))
> - return error;
> + return error;
If you start reformmating it please get it completely right:
if (info == SEND_SIG_NOINFO ||
(!is_si_special(info) && SI_FROMUSER(info))) {
/* Let audit system see the signal */
error = audit_signal_info(sig, t);
if (error)
return error;
error = -EPERM;
if ((sig != SIGCONT ||
(task_session_nr(current) != task_session_nr(t))) &&
(current->euid ^ t->suid) && (current->euid ^ t->uid) &&
(current->uid ^ t->suid) && (current->uid ^ t->uid) &&
!capable(CAP_KILL))
return error;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists