]> git.karo-electronics.de Git - karo-tx-linux.git/commit
vfs: make O_PATH file descriptors usable for 'fchdir()'
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 7 Jul 2012 17:17:00 +0000 (10:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Jul 2012 16:04:23 +0000 (09:04 -0700)
commit881aa809b005753a64fe9409c1d229912cc925ce
tree05511e50d03ffe9a6ddd5719b8bf19ef654e6610
parent30716eeec35ce79a2140b4814bd417e02da08450
vfs: make O_PATH file descriptors usable for 'fchdir()'

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