linux/include
Al Viro 1abf0c718f New kind of open files - "location only".
New flag for open(2) - O_PATH.  Semantics:
	* pathname is resolved, but the file itself is _NOT_ opened
as far as filesystem is concerned.
	* almost all operations on the resulting descriptors shall
fail with -EBADF.  Exceptions are:
	1) operations on descriptors themselves (i.e.
		close(), dup(), dup2(), dup3(), fcntl(fd, F_DUPFD),
		fcntl(fd, F_DUPFD_CLOEXEC, ...), fcntl(fd, F_GETFD),
		fcntl(fd, F_SETFD, ...))
	2) fcntl(fd, F_GETFL), for a common non-destructive way to
		check if descriptor is open
	3) "dfd" arguments of ...at(2) syscalls, i.e. the starting
		points of pathname resolution
	* closing such descriptor does *NOT* affect dnotify or
posix locks.
	* permissions are checked as usual along the way to file;
no permission checks are applied to the file itself.  Of course,
giving such thing to syscall will result in permission checks (at
the moment it means checking that starting point of ....at() is
a directory and caller has exec permissions on it).

fget() and fget_light() return NULL on such descriptors; use of
fget_raw() and fget_raw_light() is needed to get them.  That protects
existing code from dealing with those things.

There are two things still missing (they come in the next commits):
one is handling of symlinks (right now we refuse to open them that
way; see the next commit for semantics related to those) and another
is descriptor passing via SCM_RIGHTS datagrams.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-03-15 02:21:45 -04:00
..
acpi Merge branch 'acpica' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2011-01-20 16:28:34 -08:00
asm-generic New kind of open files - "location only". 2011-03-15 02:21:45 -04:00
crypto crypto: padlock - Move padlock.h into include/crypto 2011-01-07 14:52:00 +11:00
drm drm: fix unsigned vs signed comparison issue in modeset ctl ioctl. 2011-02-28 15:24:35 +10:00
keys RxRPC: Fix v1 keys 2011-03-02 22:18:53 -08:00
linux New kind of open files - "location only". 2011-03-15 02:21:45 -04:00
math-emu
media [media] v4l: Include linux/videodev2.h in media/v4l2-ctrls.h 2011-01-19 11:52:09 -02:00
mtd
net net_sched: long word align struct qdisc_skb_cb data 2011-02-23 14:17:02 -08:00
pcmcia pcmcia: re-enable Zoomed Video support 2011-02-20 12:47:34 +01:00
rdma RDMA: Update workqueue usage 2011-01-16 21:16:31 -08:00
rxrpc
scsi [SCSI] fix incorrect value of SCSI_MAX_SG_CHAIN_SEGMENTS due to include file ordering 2011-01-24 11:49:34 -06:00
sound ASoC: WM8903: Fix mic detection register definitions 2011-02-13 19:38:06 +00:00
target [SCSI] target: fix use after free detected by SLUB poison 2011-02-12 12:32:41 -06:00
trace blktrace: Remove blk_fill_rwbs_rq. 2011-03-03 10:53:20 -05:00
video Merge branch 'fbdev/udlfb' 2011-01-06 18:10:09 +09:00
xen Merge branch 'stable/gntdev' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen 2011-01-13 18:46:48 -08:00
Kbuild