Hi,
I was asked if we can add this patch to our kernel in Fedora.
It's for ability to open a directory with execute permission but without read permission.
Michal
-------- Original Message --------
Michal, can you ask the Fedora Linux kernel people to backport this patch, please (this is going to be needed by both ksh93 and KDE4)?
Josh
---------- Forwarded message ---------- From: Greg KH gregkh@linuxfoundation.org Date: Thu, Jul 12, 2012 at 7:51 PM Subject: [ 42/68] vfs: make O_PATH file descriptors usable for fchdir() To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Al Viro viro@zeniv.linux.org.uk
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Torvalds torvalds@linux-foundation.org
commit 332a2e1244bd08b9e3ecd378028513396a004a24 upstream.
We already use them for openat() and friends, but fchdir() also wants to be able to use O_PATH file descriptors. This should make it comparable to the O_SEARCH of Solaris. In particular, O_PATH allows you to access (not-quite-open) a directory you don't have read persmission to, only execute permission.
Noticed during development of multithread support for ksh93.
Reported-by: ольга крыжановская olga.kryzhanovska@gmail.com Cc: Al Viro viro@zeniv.linux.org.uk Signed-off-by: Linus Torvalds torvalds@linux-foundation.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
--- fs/open.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
--- a/fs/open.c +++ b/fs/open.c @@ -396,10 +396,10 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd { struct file *file; struct inode *inode; - int error; + int error, fput_needed;
error = -EBADF; - file = fget(fd); + file = fget_raw_light(fd, &fput_needed); if (!file) goto out;
@@ -413,7 +413,7 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd if (!error) set_fs_pwd(current->fs, &file->f_path); out_putf: - fput(file); + fput_light(file, fput_needed); out: return error; }
Josh
On Wed, Jul 18, 2012 at 04:15:49PM +0200, Michal Hlavinka wrote:
Hi,
I was asked if we can add this patch to our kernel in Fedora.
It's already in the updates currently available. The mail you linked to was for a backport to 3.0 which we gave up on a long time ago.
Dave
On Wed, Jul 18, 2012 at 04:15:49PM +0200, Michal Hlavinka wrote:
Hi,
I was asked if we can add this patch to our kernel in Fedora.
It's for ability to open a directory with execute permission but without read permission.
Michal
-------- Original Message --------
Michal, can you ask the Fedora Linux kernel people to backport this patch, please (this is going to be needed by both ksh93 and KDE4)?
Josh
It's already in 3.4.5, which we pushed to F16 and F17 yesterday.
commit 881aa809b005753a64fe9409c1d229912cc925ce Author: Linus Torvalds torvalds@linux-foundation.org Date: Sat Jul 7 10:17:00 2012 -0700
vfs: make O_PATH file descriptors usable for 'fchdir()'
commit 332a2e1244bd08b9e3ecd378028513396a004a24 upstream.
[jwboyer@zod linux-2.6]$ git describe --contains 881aa809b005753a64fe9409c1d229912cc925ce v3.4.5~69 [jwboyer@zod linux-2.6]$
josh
On 07/18/2012 04:25 PM, Josh Boyer wrote:
On Wed, Jul 18, 2012 at 04:15:49PM +0200, Michal Hlavinka wrote:
Hi,
I was asked if we can add this patch to our kernel in Fedora.
It's for ability to open a directory with execute permission but without read permission.
Michal
-------- Original Message --------
Michal, can you ask the Fedora Linux kernel people to backport this patch, please (this is going to be needed by both ksh93 and KDE4)?
Josh
It's already in 3.4.5, which we pushed to F16 and F17 yesterday.
Oh, I've missed it. Thanks for the info
kernel@lists.fedoraproject.org