Crate drop_root

Source
Expand description

§Drop root

Drop root privileges.

§Examples

use drop_root::set_user_group;

set_user_group("nobody", "nogroup");

§Features

  • logging (default): Enable logging via log crate.

§Testing

It’s tested on Linux and macOS. Tests that require run as root are ignored by default.

Enums§

DropRootError

Functions§

set_group
Set group ID and supplementary group list.
set_user
Set user ID.
set_user_group
Set group ID, supplementary group list, and user ID. In that order.