Registry / crypto / unveil

unveil

JSON →
library0.3.2rscratesunverified

Rust binding for OpenBSD's unveil(2) system call to restrict filesystem access.

# Cargo.toml [dependencies] unveil = "0.3.2"
INSTALL
IMPORT
SIG · UNVEIL
U
unveil
cryptorustv0.3.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

unveil
use unveil::unveil;

Restricts filesystem access to /tmp with read/write/create permissions.

use unveil::unveil; fn main() { unveil("/tmp", "rwc").expect("unveil failed"); println!("Filesystem restricted"); }
Debug
Known issues
gotchaOnly available on OpenBSD; will fail on other platforms.
fix
Use conditional compilation or only run on OpenBSD.
affects: >=0.1.0
Upgrade
Version history
0.3.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
38 hits · last 30 days
node
33
Resources
unveil — cargo add unveil · libregistry