From: Eric Paris <eparis@redhat.com>
To: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org, selinux@tycho.nsa.gov,
jwcart2@tycho.nsa.gov, sds@tycho.nsa.gov, spender@grsecurity.net,
dwalsh@redhat.com, cl@linux-foundation.org, arjan@infradead.org,
alan@lxorguk.ukuu.org.uk, kees@outflux.net, csellers@tresys.com,
penguin-kernel@i-love.sakura.ne.jp
Subject: Re: [PATCH -v3 1/3] Capabilities: move cap_file_mmap to commoncap.c
Date: Thu, 30 Jul 2009 13:53:03 -0400 [thread overview]
Message-ID: <1248976383.2771.4.camel@localhost> (raw)
In-Reply-To: <20090730155403.GA13939@us.ibm.com>
On Thu, 2009-07-30 at 10:54 -0500, Serge E. Hallyn wrote:
> Quoting Eric Paris (eparis@redhat.com):
> > On Thu, 2009-07-30 at 00:14 -0500, Serge E. Hallyn wrote:
> > > Quoting Eric Paris (eparis@redhat.com):
> > > > Currently we duplicate the mmap_min_addr test in cap_file_mmap and in
> > > > security_file_mmap if !CONFIG_SECURITY. This patch moves cap_file_mmap
> > > > into commoncap.c and then calls that function directly from
> > > > security_file_mmap ifndef CONFIG_SECURITY like all of the other capability
> > > > checks are done.
> > >
> > > It also
> > >
> > > 1. changes the return value in error case from -EACCES to
> > > -EPERM
> > > 2. no onger sets PF_SUPERPRIV in t->flags if the capability
> > > is used.
> > >
> > > Do we care about these?
> >
> > Personally, not really, but I'll gladly put them back if you care. #2
> > seems more interesting to me than number 1. I actually kinda like
> > getting EPERM from caps rather than EACCES since them I know if I was
> > denied by selinux or by caps.....
> >
> > -Eric
>
> Yup, I asked bc I didn't particularly care myself.
>
> I think I agree with you about -EPERM being better anyway. However I
> (now) think in this case PF_SUPERPRIV definately should be set, as this
> is a clear use of a capability to do something that couldn't have been
> done without it.
Easy enough, if I add PF_SUPERPRIV can I add your ACK? Basically just
ret = cap_capable();
if (!ret)
current->flags |= PF_SUPERPRIV;
return ret;
next prev parent reply other threads:[~2009-07-30 17:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-29 18:56 [PATCH -v3 1/3] Capabilities: move cap_file_mmap to commoncap.c Eric Paris
2009-07-29 18:56 ` [PATCH -v3 2/3] SELinux: call cap_file_mmap in selinux_file_mmap Eric Paris
2009-07-29 18:56 ` [PATCH -v3 3/3] Security/SELinux: seperate lsm specific mmap_min_addr Eric Paris
2009-07-30 5:14 ` [PATCH -v3 1/3] Capabilities: move cap_file_mmap to commoncap.c Serge E. Hallyn
2009-07-30 15:40 ` Eric Paris
2009-07-30 15:54 ` Serge E. Hallyn
2009-07-30 15:58 ` Stephen Smalley
2009-07-30 17:50 ` Eric Paris
2009-07-30 18:31 ` Eric Paris
2009-07-30 19:47 ` Stephen Smalley
2009-07-30 19:42 ` Stephen Smalley
2009-07-30 19:54 ` Stephen Smalley
2009-07-30 20:01 ` Serge E. Hallyn
2009-07-30 20:05 ` Stephen Smalley
2009-07-30 17:53 ` Eric Paris [this message]
2009-07-30 19:41 ` Serge E. Hallyn
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=1248976383.2771.4.camel@localhost \
--to=eparis@redhat.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arjan@infradead.org \
--cc=cl@linux-foundation.org \
--cc=csellers@tresys.com \
--cc=dwalsh@redhat.com \
--cc=jwcart2@tycho.nsa.gov \
--cc=kees@outflux.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
--cc=serue@us.ibm.com \
--cc=spender@grsecurity.net \
/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