From: James Morris <jmorris@namei.org>
To: Eric Paris <eparis@redhat.com>
Cc: linux-kernel@vger.kernel.org, selinux@tycho.nsa.gov,
torvalds@linux-foundation.org, sds@tycho.nsa.gov,
viro@ZenIV.linux.org.uk
Subject: Re: [PATCH] anon_inodes: mark the anon inode private
Date: Wed, 10 Mar 2010 15:53:56 +1100 (EST) [thread overview]
Message-ID: <alpine.LRH.2.00.1003101553400.23261@tundra.namei.org> (raw)
In-Reply-To: <1268191381-26950-1-git-send-email-eparis@redhat.com>
On Tue, 9 Mar 2010, Eric Paris wrote:
> Inotify was switched to use anon_inode instead of its own private filesystem
> which only had one inode in commit c44dcc56d2b5c7 "switch inotify_user to
> anon_inode"
>
> The problem with this is that now the inotify inode is not a distinct inode
> which can be managed by LSMs. userspace tools which use inotify were allowed
> to use the inotify inode but may not have had permission to do read/write type
> operations on the anon_inode. After looking at the anon_inode and its users
> it looks like the best solution is to just mark the anon_inode as S_PRIVATE
> so the security system will ignore it.
>
> Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: James Morris <jmorris@namei.org>
> ---
> fs/anon_inodes.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c
> index 9f0bf13..2de0095 100644
> --- a/fs/anon_inodes.c
> +++ b/fs/anon_inodes.c
> @@ -209,6 +209,7 @@ static struct inode *anon_inode_mkinode(void)
> inode->i_mode = S_IRUSR | S_IWUSR;
> inode->i_uid = current_fsuid();
> inode->i_gid = current_fsgid();
> + inode->i_flags |= S_PRIVATE;
> inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
> return inode;
> }
> --
> 1.6.5.3
>
--
James Morris
<jmorris@namei.org>
prev parent reply other threads:[~2010-03-10 4:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-10 3:23 Eric Paris
2010-03-10 4:53 ` James Morris [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=alpine.LRH.2.00.1003101553400.23261@tundra.namei.org \
--to=jmorris@namei.org \
--cc=eparis@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
--cc=torvalds@linux-foundation.org \
--cc=viro@ZenIV.linux.org.uk \
/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®