Crate priv_sep

Crate priv_sep 

Source
Available on crate feature openbsd only.
Expand description

gitcrates-iodocs-rs

priv_sep is a library for privilege separation. It is currently designed around pledge(2) and unveil(2) for OpenBSD, but in the future may contain functionality for Linux’s seccomp(2).

§Pledge

Calls to pledge(2) are done via Promises::pledge and pledge_none. Note that since the use of execpromises is quite rare, NULL is always used for it.

§Unveil

Calls to unveil(2) are done via Permissions::unveil and unveil_no_more.

§Errors

Any error returned from the underlying system call is propagated via io::Error.

Structs§

Permissions
permissions to unveil(2).
Promises
A set of Promises that can only have Promises removed after creation.

Enums§

Permission
A permission in Permissions.
Promise
A promise to pledge(2).
UnveilErr
Error returned by Permissions::unveil.

Functions§

pledge_none
Invokes pledge(2) with NULL for both promises and execpromises.
unveil_no_more
Invokes unveil(2) by passing NULL for both path and permissions.