freebsd-dev/sys
Ed Schouten 0f85ff377b Add file_open(): the underlying system call of openat().
CloudABI purely operates on file descriptor rights (CAP_*). File
descriptor access modes (O_ACCMODE) are emulated on top of rights.

Instead of accepting the traditional flags argument, file_open() copies
in an fdstat_t object that contains the initial rights the descriptor
should have, but also file descriptor flags that should persist after
opening (APPEND, NONBLOCK, *SYNC). Only flags that don't persist (EXCL,
TRUNC, CREAT, DIRECTORY) are passed in as an argument.

file_open() first converts the rights, the persistent flags and the
non-persistent flags to fflags. It then calls into vn_open(). If
successful, it installs the file descriptor with the requested
rights, trimming off rights that don't apply to the type of
the file that has been opened.

Unlike kern_openat(), this function does not support /dev/fd/*. I can't
think of a reason why we need to support this for CloudABI.

Obtained from:	https://github.com/NuxiNL/freebsd
Differential Revision:	https://reviews.freebsd.org/D3235
2015-08-06 06:47:28 +00:00
..
amd64 Rationalize BSD license on sys/*/include/in_cksum.h 2015-08-05 19:05:12 +00:00
arm Rationalize BSD license on sys/*/include/float.h 2015-08-05 17:05:35 +00:00
arm64 Rationalize BSD license on sys/*/include/in_cksum.h 2015-08-05 19:05:12 +00:00
boot Fix a problem which made loader(8) load non-kld files twice. 2015-08-03 16:27:36 +00:00
bsm
cam Pass SYNCHRONIZE CACHE command parameters to backends. 2015-08-05 22:24:49 +00:00
cddl Remove a couple of unused fields from the FBT probe struct. 2015-08-03 17:39:36 +00:00
compat Add file_open(): the underlying system call of openat(). 2015-08-06 06:47:28 +00:00
conf cxgbe(4): Update T5 and T4 firmwares bundled with the driver to 1.14.4.0. The 2015-08-05 19:45:11 +00:00
contrib Add a missing method - ath_hal_settsf64(). 2015-08-05 21:16:12 +00:00
crypto const'ify an arg that we don't update... 2015-07-29 23:37:15 +00:00
ddb Various changes to the registers displayed in DDB for x86. 2015-07-22 01:09:02 +00:00
dev Add a hack-around to this fatal taskqueue running whilst the NIC 2015-08-05 21:22:25 +00:00
fs nfsclient: Protest loudly when GETATTR responses are invalid 2015-08-05 22:27:30 +00:00
gdb CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten 2015-05-22 17:05:21 +00:00
geom Fix panic triggered by code like this: 2015-08-04 10:40:08 +00:00
gnu
i386 Rationalize BSD license on sys/*/include/in_cksum.h 2015-08-05 19:05:12 +00:00
isa
kern Allow the creation of kqueues with a restricted set of Capsicum rights. 2015-08-05 07:36:50 +00:00
kgssapi
libkern Remove checks for __ARM_EABI__, we only build for EABI now. 2015-07-09 21:02:40 +00:00
mips Rationalize BSD license on sys/*/include/in_cksum.h 2015-08-05 19:05:12 +00:00
modules cxgbe(4): Update T5 and T4 firmwares bundled with the driver to 1.14.4.0. The 2015-08-05 19:45:11 +00:00
net Remove the mtx_sleep() from the kqueue f_event filter. 2015-08-03 22:14:45 +00:00
net80211 Break out the current 802.11 software scan methods into an indirect table. 2015-06-08 02:35:43 +00:00
netgraph * Address review (and add a bit myself). 2015-07-12 18:14:38 +00:00
netinet The mbuf parameter to ip_output_pfil() must be an output parameter since 2015-08-03 17:47:02 +00:00
netinet6 Decompose TCP INP_INFO lock to increase short-lived TCP connections scalability: 2015-08-03 12:13:54 +00:00
netipsec Make IPsec work with AES-GCM and AES-ICM (aka CTR) in OCF... IPsec 2015-08-04 17:47:11 +00:00
netnatm
netpfil Reduce overhead of ipfw's me6 opcode. 2015-07-29 10:53:42 +00:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed Avoid calling into the random subsystem before it is initialized. 2015-08-04 09:45:10 +00:00
opencrypto Make IPsec work with AES-GCM and AES-ICM (aka CTR) in OCF... IPsec 2015-08-04 17:47:11 +00:00
pc98 Spell crypto correctly. 2015-07-14 10:47:56 +00:00
powerpc Rationalize BSD license on sys/*/include/in_cksum.h 2015-08-05 19:05:12 +00:00
rpc Remove useless acquire semantic from the atomic_add operation before 2015-07-28 06:58:10 +00:00
security fd: make 'rights' a manadatory argument to fget* functions 2015-07-05 19:05:16 +00:00
sparc64 Rationalize BSD license on sys/*/include/in_cksum.h 2015-08-05 19:05:12 +00:00
sys Allow the creation of kqueues with a restricted set of Capsicum rights. 2015-08-05 07:36:50 +00:00
teken
tools
ufs - Make 'struct buf *buf' private to vfs_bio.c. Having a global variable 2015-07-29 02:26:57 +00:00
vm Properly sort the function declarations added in r286296 2015-08-05 10:48:32 +00:00
x86 Fix more style issues. 2015-08-05 17:21:42 +00:00
xdr
xen Add support for Xen blkif indirect segment I/Os. This makes it possible for 2015-07-30 03:50:01 +00:00
Makefile Kill EoL whitespace. 2015-05-29 14:03:07 +00:00