Rust bindings for OpenBSD's pledge(2) and unveil(2).
```rust use openbsd::pledge;
pledge!("stdio rpath exec")?; // only make promises pledge!(_, "stdio rpath")?; // only make execpromises pledge!("stdio", "stdio")?; // make both
assert!(pledge!("wpath").is_err()); // cannot increase permissions ```
```rust use openbsd::pledge::{pledge, pledgepromises, pledgeexecpromises};
pledgepromises("stdio rpath exec")?; // only make promises pledgeexecpromises("stdio rpath")?; // only make execpromises pledge("stdio", "stdio")?; // make both
assert!(pledgepromises("wpath").iserr()); // cannot increase permissions ```
```rust use openbsd::unveil;
unveil!("/path/to/file", "rw")?; unveil!("/path/to/another/file", "r")?;
unveil!(); // disable further calls to unveil assert!(unveil!("/", "rwxc").is_err()); ```
```rust use openbsd::unveil;
unveil("/path/to/file", "rw")?; unveil("/path/to/another/file", "r")?;
unveil::disable(); // disable further calls to unveil assert!(unveil("/", "rwxc").is_err()); ```