Struct privdrop::PrivDrop [−][src]
pub struct PrivDrop { /* fields omitted */ }
Expand description
PrivDrop
structure
Example
ⓘ
privdrop::PrivDrop::default()
.chroot("/var/empty")
.user("nobody")
.apply()
.unwrap_or_else(|e| { panic!("Failed to drop privileges: {}", e) });
Implementations
chroot() to a specific directory before switching to a non-root user
Set a group name to switch to, if different from the primary group of the user
Apply the changes
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PrivDrop
impl UnwindSafe for PrivDrop
Blanket Implementations
Mutably borrows from an owned value. Read more