Commit Graph

8 Commits

Author SHA1 Message Date
kevans
dfb681901d 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
2020-01-02 23:07:45 +00:00
markj
3e99e8e745 List caph_limit_stream() in the synopsis.
Fix typos while here.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2019-01-21 20:56:29 +00:00
oshogbo
83e1dcf8e5 libcapsicum: Introduce caph_{rights,ioctls,fcntls}_limit
The idea behind those functions is not to force consumers to remember that there
is a need to check errno on failure. We already have a caph_enter(3) function
which does the same for cap_enter(2).

MFC after:	2 weeks
2018-11-04 17:22:58 +00:00
oshogbo
7b74e228a1 Fix description. 2018-07-18 21:57:04 +00:00
oshogbo
b5ecd1b39f Fix declaration. 2018-07-15 17:31:50 +00:00
oshogbo
ce5697ce5d Introduce caph_enter and caph_enter_casper.
The caph_enter function should made it easier to sandbox application
and not force us to remember that we need to check errno on failure.
Another function is also checking if casper is present.

Reviewed by:	emaste, cem (partially)
Differential Revision:	https://reviews.freebsd.org/D14557
2018-05-07 20:38:09 +00:00
oshogbo
f96afa6e71 Fix few sentence in the man page.
Pointed out by:	wblock
2016-10-21 16:31:58 +00:00
oshogbo
06fb13eecd Add man pages for Capsicum helpers.
Reviewed by:	cem
Differential Revision:	https://reviews.freebsd.org/D8154
2016-10-05 20:02:34 +00:00