[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54576D7A.1010900@redhat.com>
Date: Mon, 03 Nov 2014 12:56:42 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: David Drysdale <drysdale@...gle.com>, linux-kernel@...r.kernel.org,
Alexander Viro <viro@...iv.linux.org.uk>,
Kees Cook <keescook@...omium.org>
CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Meredydd Luff <meredydd@...atehouse.org>,
Will Drewry <wad@...omium.org>,
Jorge Lucangeli Obes <jorgelo@...gle.com>,
Ricky Zhou <rickyz@...gle.com>,
Lee Campbell <leecam@...gle.com>,
Julien Tinnes <jln@...gle.com>,
Mike Depinet <mdepinet@...gle.com>,
James Morris <james.l.morris@...cle.com>,
Andy Lutomirski <luto@...capital.net>,
Paul Moore <paul@...l-moore.com>,
Christoph Hellwig <hch@...radead.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
linux-api@...r.kernel.org, linux-security-module@...r.kernel.org
Subject: Re: [PATCH man-pages 3/3] open.2: describe O_BENEATH flag
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists