Registry / utility / privdrop

privdrop

JSON →
library0.5.6rscratesunverified

A simple crate to drop privileges in Unix-like systems.

# Cargo.toml [dependencies] privdrop = "0.5.6"
INSTALL
IMPORT
SIG · PRIVDROP
P
privdrop
utilityrustv0.5.6
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.

PrivDrop
✓ use privdrop::PrivDrop;

Drop privileges to a specific user and group.

use privdrop::PrivDrop; fn main() { let mut dropper = PrivDrop::new().user("nobody").group("nogroup"); dropper.apply().unwrap(); println!("Privileges dropped"); }
Debug
Known issues
gotchaOnly works on Unix-like systems (Linux, macOS).
fix
Use conditional compilation or alternative for Windows.
affects: all
Upgrade
Version history
0.5.6latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
privdrop — cargo add privdrop · libregistry