linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Valerie Aurora <vaurora@redhat.com>
To: "J. R. Okajima" <hooanon05@yahoo.co.jp>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	Miklos Szeredi <miklos@szeredi.hu>,
	Dmitry Monakhov <dmonakhov@openvz.org>,
	Jeff Layton <jlayton@redhat.com>,
	Christoph Hellwig <hch@infradead.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] Show data flow for file copyup in unions
Date: Wed, 17 Mar 2010 20:53:58 -0400	[thread overview]
Message-ID: <20100318005358.GA24348@shell> (raw)
In-Reply-To: <20335.1268779891@jrobl>

On Wed, Mar 17, 2010 at 07:51:31AM +0900, J. R. Okajima wrote:
> 
> Valerie Aurora:
> > 1. Don't copyup if the operation would fail (e.g., open(O_WRONLY) on a
> > file with mode 444).  It's inefficient and a possible security hole to
> > copy up a file if no write (or maybe even read) can occur anyway.
> 
> Just a question.
> How about this case?
> When the file is writable (0644 or something) but its parent directory
> is readonly (0555), do you think the file should be copied-up?

This problem comes up with readdir() too, since we copy up all the
directory entries from the lower layer on what is ostensibly a
read-only access.

I think what people will expect is that we copy up in that case.  I
can think of ways this can go wrong, but perhaps that should be an
explicit requirement on the top-layer file system, that it can handle
create/unlink() in a directory without write permission.

-VAL

  reply	other threads:[~2010-03-18  0:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-16 18:17 [RFC PATCH] Show data flow for file copyup in unions Valerie Aurora
2010-03-16 22:51 ` J. R. Okajima
2010-03-18  0:53   ` Valerie Aurora [this message]
2010-03-18  8:10     ` J. R. Okajima
2010-03-18 17:55       ` Valerie Aurora
2010-03-18 19:18         ` J. R. Okajima

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=20100318005358.GA24348@shell \
    --to=vaurora@redhat.com \
    --cc=dmonakhov@openvz.org \
    --cc=hch@infradead.org \
    --cc=hooanon05@yahoo.co.jp \
    --cc=jlayton@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --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;
as well as URLs for NNTP newsgroup(s).