Registry / crypto / pledge

pledge

JSON →
library0.4.2rscratesunverified

Rust binding to OpenBSD's pledge(2) interface for process sandboxing.

# Cargo.toml [dependencies] pledge = "0.4.2"
INSTALL
IMPORT
SIG · PLEDGE
P
pledge
cryptorustv0.4.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.

pledge
use pledge::pledge;

Restricts the process to stdio and read-only file access.

use pledge::pledge; fn main() { pledge!("stdio rpath").expect("pledge failed"); println!("Process restricted"); }
Debug
Known issues
gotchaOnly works on OpenBSD
fix
Use conditional compilation or alternative sandboxing on other platforms
affects: >=0.4.0
Upgrade
Version history
0.4.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
Amazon
1
Resources
pledge — cargo add pledge · libregistry