From: Christoph Hellwig <hch@infradead.org>
To: "Andrew G. Morgan" <morgan@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cleanup: correct tabbing of check_kill_permission()
Date: Sat, 1 Mar 2008 19:49:20 -0500 [thread overview]
Message-ID: <20080302004920.GA31969@infradead.org> (raw)
In-Reply-To: <47C9D986.3040805@kernel.org>
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;
}
next prev parent reply other threads:[~2008-03-02 0:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-01 22:32 [PATCH] cleanup: correct tabbing of check_kill_permission() Andrew G. Morgan
2008-03-02 0:49 ` Christoph Hellwig [this message]
2008-03-02 5:15 ` Andrew G. Morgan
2008-03-02 8:16 ` Adrian Bunk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080302004920.GA31969@infradead.org \
--to=hch@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=morgan@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox