xfs
[Top] [All Lists]

Re: [PATCH v2 1/2] xfs: fix tmpfile/selinux deadlock and initialize secu

To: Andreas Gruenbacher <andreas.gruenbacher@xxxxxxxxxx>
Subject: Re: [PATCH v2 1/2] xfs: fix tmpfile/selinux deadlock and initialize security/acl
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 18 Apr 2014 09:39:20 -0700
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, Brian Foster <bfoster@xxxxxxxxxx>, linux-man@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, linux-security-module@xxxxxxxxxxxxxxx, Al Viro <viro@xxxxxxxxxxxxxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <359356562.473582.1397669369258.JavaMail.zimbra@xxxxxxxxxx>
References: <1397071311-28371-1-git-send-email-bfoster@xxxxxxxxxx> <1397071311-28371-2-git-send-email-bfoster@xxxxxxxxxx> <20140410102421.GA17641@xxxxxxxxxxxxx> <20140410121947.GA14124@xxxxxxxxxxxxxxx> <20140410122944.GA6579@xxxxxxxxxxxxx> <20140415175228.GE26404@xxxxxxxxxxxxx> <1188577823.463241.1397590262478.JavaMail.zimbra@xxxxxxxxxx> <20140416111402.GA32350@xxxxxxxxxxxxx> <359356562.473582.1397669369258.JavaMail.zimbra@xxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Apr 16, 2014 at 07:29:29PM +0200, Andreas Gruenbacher wrote:
> > Btw, I think the man page is wrong - given that the tmpfile is not
> > visible in the namespace it is obviously not created in the directory.
> > The directory passed in is just a handle for the filesystem it should be
> > created in.
> 
> I don't agree.  If the file is created with O_TMPFILE | O_EXCL, it is clear
> that the file will never be linked into the namespace.  Even then, there are
> operations which are affected by the inode permissions and label of the
> anonymous file, and those should still behave reasonably.  In this context,
> I would expect them to behave as if the file was actually created in the
> specified directory, not in the file system root or "nowhere" with no clearly
> defined permissions and security label.

So you want to define the files as being in a directory, but not
actually visible?  That's defintively a new and strange state to be in.

> > Inheriting any ACL on creating an anonymous file seems utterly wrong.
> 
> Why?

Because it has no parent to inherit it from.

<Prev in Thread] Current Thread [Next in Thread>