linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Brian Foster <bfoster@redhat.com>,
	linux-fsdevel@vger.kernel.org,
	linux-security-module@vger.kernel.org, xfs@oss.sgi.com,
	Eric Paris <eparis@parisplace.org>,
	Paul Moore <paul@paul-moore.com>
Subject: Re: [PATCH v3 2/4] xfs: initialize inode security on tmpfile creation
Date: Wed, 16 Apr 2014 07:14:09 -0700	[thread overview]
Message-ID: <20140416141409.GA21743@infradead.org> (raw)
In-Reply-To: <534E7CDA.2060805@tycho.nsa.gov>

On Wed, Apr 16, 2014 at 08:51:38AM -0400, Stephen Smalley wrote:
> Maybe I spoke too soon.  IIUC, I_LINKABLE doesn't necessarily
> distinguish tmpfiles from other files, as some tmpfiles may be linkable
> and others not.  But what we want is a way to identify all tmpfiles when
> security_inode_init_security() is called if we are going to label them
> independently of the provided dir.

Oh, right.  If O_EXCL is specified (another annoying overload of the
flag..) the tmpfile can't ever be linked back into the filesystem
and thus doesn't have I_LINKABLE set.

I guess the best way to fix this is using the magic qstr you suggested
before.  That means security_inode_init_security would need to be
called after d_tmpfile, which most filesystems don't do right now.


  reply	other threads:[~2014-04-16 14:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1397578706-5385-1-git-send-email-bfoster@redhat.com>
     [not found] ` <1397578706-5385-3-git-send-email-bfoster@redhat.com>
2014-04-15 17:50   ` [PATCH v3 2/4] xfs: initialize inode security on tmpfile creation Christoph Hellwig
2014-04-15 20:04     ` Stephen Smalley
2014-04-15 20:16       ` Stephen Smalley
2014-04-15 20:22       ` Christoph Hellwig
2014-04-15 20:21         ` Stephen Smalley
2014-04-16 12:51           ` Stephen Smalley
2014-04-16 14:14             ` Christoph Hellwig [this message]
2014-04-16 14:14               ` Stephen Smalley

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=20140416141409.GA21743@infradead.org \
    --to=hch@infradead.org \
    --cc=bfoster@redhat.com \
    --cc=eparis@parisplace.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=sds@tycho.nsa.gov \
    --cc=xfs@oss.sgi.com \
    /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;
as well as URLs for NNTP newsgroup(s).