Re: [PATCH] cleanup: correct tabbing of check_kill_permission()

From: Christoph Hellwig
Date: Sat Mar 01 2008 - 19:50:17 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/