]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
capsicum_helpers: split stream cap bits out of caph_limit_stream()
authorkevans <kevans@FreeBSD.org>
Thu, 2 Jan 2020 23:07:45 +0000 (23:07 +0000)
committerkevans <kevans@FreeBSD.org>
Thu, 2 Jan 2020 23:07:45 +0000 (23:07 +0000)
commitdfb681901d3575dbf1f177a97604dfa2b37fba70
treea2d2cfb6ecea267f510b025b8055ca96373bb2ca
parent18163998ea85561f8c78842b5f72c11e8e67b924
capsicum_helpers: split stream cap bits out of caph_limit_stream()

The goal here is to make it so applications can take the rights one would
normally get by calling caph_limit_stream() on a descriptor and build on
them as needed.

The tentatively planned use-case is an application that takes a socket and
hooks it up to std{err,out,in} for a fork()d child. It may be feasible to
apply limitations to such descriptors as long as it's a superset of those
normally applied to stdio.

Reviewed by: markj, oshobo (prior version; sans manpage addition)
Differential Revision: https://reviews.freebsd.org/D22993
lib/libcapsicum/Makefile
lib/libcapsicum/capsicum_helpers.3
lib/libcapsicum/capsicum_helpers.h