priv_sep

Crates.iopriv_sep
lib.rspriv_sep
version1.0.1
sourcesrc
created_at2023-07-25 06:19:55.703818
updated_at2024-03-27 18:40:55.366778
descriptionFFI for pledge(2) and unveil(2) on OpenBSD.
homepage
repositoryhttps://git.philomathiclife.com/repos/priv_sep/
max_upload_size
id925219
size58,919
philomathic_life (zacknewman)

documentation

https://docs.rs/priv_sep/latest/priv_sep/

README

priv_sep

priv_sep is a library for privilege separation. It is currently designed around pledge(2) and unveil(2) for OpenBSD-stable—that is correct, -stable not -current—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 Error.

Status

This package will be actively maintained to stay in-sync with the latest version of OpenBSD-stable; as a result, the crate is only tested on the x86_64-unknown-openbsd target. While OpenBSD supports both the most recent -release/-stable release as well as the previous version, only the most recent version will be supported by this library. For that reason any removal of promises in subsequent releases of pledge(2) will lead to breaking changes in this library as the corresponding Promise variant will be removed.

Commit count: 0

cargo fmt