8328babdd0
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 |
||
---|---|---|
.. | ||
cloudabi_clock.c | ||
cloudabi_errno.c | ||
cloudabi_fd.c | ||
cloudabi_file.c | ||
cloudabi_futex.c | ||
cloudabi_mem.c | ||
cloudabi_proc.c | ||
cloudabi_proto.h | ||
cloudabi_random.c | ||
cloudabi_sock.c | ||
cloudabi_syscalldefs.h | ||
cloudabi_thread.c | ||
cloudabi_util.h |