All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: David Drysdale <drysdale@google.com>,
	linux-kernel@vger.kernel.org,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Kees Cook <keescook@chromium.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Meredydd Luff <meredydd@senatehouse.org>,
	Will Drewry <wad@chromium.org>,
	Jorge Lucangeli Obes <jorgelo@google.com>,
	Ricky Zhou <rickyz@google.com>, Lee Campbell <leecam@google.com>,
	Julien Tinnes <jln@google.com>,
	Mike Depinet <mdepinet@google.com>,
	James Morris <james.l.morris@oracle.com>,
	Andy Lutomirski <luto@amacapital.net>,
	Paul Moore <paul@paul-moore.com>,
	Christoph Hellwig <hch@infradead.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	linux-api@vger.kernel.org, linux-security-module@vger.kernel.org
Subject: Re: [PATCH man-pages 3/3] open.2: describe O_BENEATH flag
Date: Mon, 03 Nov 2014 12:56:42 +0100	[thread overview]
Message-ID: <54576D7A.1010900@redhat.com> (raw)
In-Reply-To: <1415015305-15494-4-git-send-email-drysdale@google.com>

On 03/11/2014 12:48, David Drysdale wrote:
> +.I pathname
> +is beneath the current working directory (for
> +.BR open (2))
> +or the
> +.I dirfd
> +(for
> +.BR openat (2)).
> +If the
> +.I pathname
> +is absolute or contains a path component of "..", the
> +.BR open ()
> +fails with the error
> +.BR EACCES.
> +This occurs even if ".." path component would not actually
> +escape the original directory; for example, a
> +.I pathname
> +of "subdir/../filename" would be rejected.
> +Path components that are symbolic links to absolute paths, or that are
> +relative paths containing a ".." component, will also cause the
> +.BR open ()
> +operation to fail with the error
> +.BR EACCES.

I wonder if EPERM is more appropriate than EACCES.

Apart from this, the patches look fine.

Paolo

      reply	other threads:[~2014-11-03 11:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-03 11:48 [PATCH 0/3] fs: add O_BENEATH flag to openat(2) David Drysdale
2014-11-03 11:48 ` David Drysdale
     [not found] ` <1415015305-15494-1-git-send-email-drysdale-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2014-11-03 11:48   ` [PATCH 1/3] " David Drysdale
2014-11-03 11:48     ` David Drysdale
2014-11-03 15:20     ` Al Viro
     [not found]       ` <20141103152036.GA7996-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2014-11-03 15:42         ` Andy Lutomirski
2014-11-03 15:42           ` Andy Lutomirski
2014-11-03 17:22           ` Eric W.Biederman
2014-11-04  9:40             ` David Drysdale
2014-11-05 17:21               ` David Drysdale
     [not found]                 ` <CAHse=S8ZmYLkOb9hmOMPkvHabqXH1sCUBTJWVO-++PMJXES=sg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-05 17:28                   ` Andy Lutomirski
2014-11-05 17:28                     ` Andy Lutomirski
2014-11-03 17:37           ` David Drysdale
2014-11-03 18:26             ` Julien Tinnes
     [not found]             ` <CAKyRK=hRX1xk_0cRNhZ341HwU9Nim5_vhpM5twJHUOt8fH29=w@mail.gmail.com>
2014-11-03 18:29               ` Andy Lutomirski
2014-11-03 18:29                 ` Andy Lutomirski
2014-11-03 11:48   ` [PATCH 2/3] selftests: Add test of O_BENEATH & openat(2) David Drysdale
2014-11-03 11:48     ` David Drysdale
2014-11-03 11:48   ` [PATCH man-pages 3/3] open.2: describe O_BENEATH flag David Drysdale
2014-11-03 11:48     ` David Drysdale
2014-11-03 11:56     ` Paolo Bonzini [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=54576D7A.1010900@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=drysdale@google.com \
    --cc=ebiederm@xmission.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=james.l.morris@oracle.com \
    --cc=jln@google.com \
    --cc=jorgelo@google.com \
    --cc=keescook@chromium.org \
    --cc=leecam@google.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mdepinet@google.com \
    --cc=meredydd@senatehouse.org \
    --cc=paul@paul-moore.com \
    --cc=rickyz@google.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=wad@chromium.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.