From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>,
Andrew Morgan <morgan@kernel.org>,
Chris Wright <chrisw@sous-sol.org>,
Andrew Morgan <agm@google.com>,
casey@schaufler-ca.com, Andrew Morton <akpm@google.com>,
KaiGai Kohei <kaigai@kaigai.gr.jp>,
James Morris <jmorris@namei.org>,
linux-security-module@vger.kernel.org,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] file capabilities: clear fcaps on inode change (v2)
Date: Tue, 7 Aug 2007 09:11:49 -0500 [thread overview]
Message-ID: <20070807141149.GC8286@sergelap.austin.ibm.com> (raw)
In-Reply-To: <1186495022.26457.44.camel@moss-spartans.epoch.ncsc.mil>
Quoting Stephen Smalley (sds@tycho.nsa.gov):
> On Mon, 2007-08-06 at 13:52 -0500, Serge E. Hallyn wrote:
> > >From 1376764cbb54243f088cf00c39000c4f4418f461 Mon Sep 17 00:00:00 2001
> > From: Serge E. Hallyn <serue@us.ibm.com>
> > Date: Mon, 6 Aug 2007 14:20:06 -0400
> > Subject: [PATCH 1/1] file capabilities: clear fcaps on inode change (v2)
> >
> > When a file with posix capabilities is overwritten, the
> > file capabilities, like a setuid bit, should be removed.
> >
> > This patch introduces security_inode_killpriv(). This is
> > currently only defined for capability, and is called when
> > an inode is changed to inform the security module that
> > it may want to clear out any privilege attached to that inode.
> > The capability module checks whether any file capabilities
> > are defined for the inode, and, if so, clears them.
> >
> > Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
> > ---
> > fs/attr.c | 7 +++++++
> > fs/nfsd/vfs.c | 4 ++--
> > fs/open.c | 3 ++-
> > fs/splice.c | 4 ++++
> > include/linux/fs.h | 1 +
> > include/linux/security.h | 18 ++++++++++++++++++
> > mm/filemap.c | 5 +++++
> > security/capability.c | 1 +
> > security/commoncap.c | 27 +++++++++++++++++++++++++++
> > security/dummy.c | 6 ++++++
> > security/security.c | 5 +++++
> > 11 files changed, 78 insertions(+), 3 deletions(-)
> >
>
> > diff --git a/security/capability.c b/security/capability.c
> > index dc2b66c..e23864e 100644
> > --- a/security/capability.c
> > +++ b/security/capability.c
> > @@ -37,6 +37,7 @@ static struct security_operations capability_ops = {
> >
> > .inode_setxattr = cap_inode_setxattr,
> > .inode_removexattr = cap_inode_removexattr,
> > + .inode_removexattr = cap_inode_killpriv,
>
> s/inode_removexattr/inode_killpriv/
Well crap - I had fixed that an hour before I sent it. Which makes me
wonder which version I sent...
> Also, doesn't SELinux then need to define a corresponding hook function
> to call the secondary module? Otherwise, it will fall back to the dummy
> implementation and stacking selinux + capabilities with file caps won't
> yield the right behavior.
Yes it does. Will fix that on resend.
thanks,
-serge
prev parent reply other threads:[~2007-08-07 14:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-06 18:52 Serge E. Hallyn
2007-08-07 6:50 ` Andrew Morgan
2007-08-07 13:47 ` James Morris
2007-08-07 14:08 ` Serge E. Hallyn
2007-08-07 14:17 ` James Morris
2007-08-07 15:19 ` Serge E. Hallyn
2007-08-07 13:57 ` Stephen Smalley
2007-08-07 14:11 ` Serge E. Hallyn [this message]
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=20070807141149.GC8286@sergelap.austin.ibm.com \
--to=serue@us.ibm.com \
--cc=agm@google.com \
--cc=akpm@google.com \
--cc=casey@schaufler-ca.com \
--cc=chrisw@sous-sol.org \
--cc=jmorris@namei.org \
--cc=kaigai@kaigai.gr.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=morgan@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
all inboxes | Powered by JetHome®