From: "Serge E. Hallyn" <serge@hallyn.com>
To: Eric Paris <eparis@redhat.com>
Cc: "Serge E. Hallyn" <serge@hallyn.com>,
James Morris <jmorris@namei.org>,
Stephen Smalley <sds@tycho.nsa.gov>,
dwalsh@redhat.com, Kees Cook <kees.cook@canonical.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] syslog: check cap_syslog when dmesg_restrict
Date: Wed, 8 Dec 2010 16:42:35 +0000 [thread overview]
Message-ID: <20101208164235.GA21062@mail.hallyn.com> (raw)
In-Reply-To: <1291822780.3072.40.camel@localhost.localdomain>
Quoting Eric Paris (eparis@redhat.com):
> On Wed, 2010-12-08 at 15:19 +0000, Serge E. Hallyn wrote:
> Doesn't this return -EPERM right now?
Yes.
> I think the code might be
> incorrect today as well......
>
> I thought the flow was supposed to be
>
> if (capable(CAP_SYSLOG))
> all good
> else if (capable(CAP_SYS_ADMIN))
> WARN, but still good for now
I prefer warn and deny. Otherwise it's too easy to ignore warnings. So
I prefer the msg to be there to explain why it failed - not that I expect
it to fail for anyone today.
> else
> EPERM
>
> But it looks to me like the flow is
>
> if (capable(CAP_SYSLOG))
> all good
> else if (capable(CAP_SYS_ADMIN))
> WARN, EPERM
> else
> EPERM
>
> > }
Yup.
-serge
next prev parent reply other threads:[~2010-12-08 16:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-08 15:19 [PATCH] syslog: check cap_syslog when dmesg_restrict Serge E. Hallyn
2010-12-08 15:39 ` Eric Paris
2010-12-08 16:42 ` Serge E. Hallyn [this message]
2010-12-08 16:46 ` Eric Paris
2010-12-08 17:53 ` Kees Cook
2010-12-08 22:56 ` James Morris
2010-12-10 14:02 ` Daniel J Walsh
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=20101208164235.GA21062@mail.hallyn.com \
--to=serge@hallyn.com \
--cc=dwalsh@redhat.com \
--cc=eparis@redhat.com \
--cc=jmorris@namei.org \
--cc=kees.cook@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sds@tycho.nsa.gov \
/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