freebsd-dev/sys/compat
Ed Schouten 8328babdd0 Make pipes in CloudABI work.
Summary:
Pipes in CloudABI are unidirectional. The reason for this is that
CloudABI attempts to provide a uniform runtime environment across
different flavours of UNIX.

Instead of implementing a custom pipe that is unidirectional, we can
simply reuse Capsicum permission bits to support this. This is nice,
because CloudABI already attempts to restrict permission bits to
correspond with the operations that apply to a certain file descriptor.

Replace kern_pipe() and kern_pipe2() by a single kern_pipe() that takes
a pair of filecaps. These filecaps are passed to the newly introduced
falloc_caps() function that creates the descriptors with rights in
place.

Test Plan:
CloudABI pipes seem to be created with proper rights in place:

https://github.com/NuxiNL/cloudlibc/blob/master/src/libc/unistd/pipe_test.c#L44

Reviewers: jilles, mjg

Reviewed By: mjg

Subscribers: imp

Differential Revision: https://reviews.freebsd.org/D3236
2015-07-29 17:18:27 +00:00
..
cloudabi Make pipes in CloudABI work. 2015-07-29 17:18:27 +00:00
cloudabi64 Regenerate system call table. 2015-07-27 10:04:28 +00:00
freebsd32 Regenerate syscalls. 2015-07-11 15:22:11 +00:00
ia32 In preparation for switching linuxulator to the use the native 1:1 2015-05-24 14:51:29 +00:00
linprocfs Add support to the jail framework to be able to mount linsysfs(5) and 2015-07-19 08:52:35 +00:00
linsysfs Add support to the jail framework to be able to mount linsysfs(5) and 2015-07-19 08:52:35 +00:00
linux Make pipes in CloudABI work. 2015-07-29 17:18:27 +00:00
ndis Create a dedicated function for ensuring that cdir and rdir are populated. 2015-07-11 16:22:48 +00:00
netbsd Remove some more NetBSD compat shims and other unused bits from these 2012-09-10 18:49:49 +00:00
svr4 The si_status field of the siginfo_t, provided by the waitid(2) and 2015-07-18 09:02:50 +00:00
x86bios Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00