Expand description
§Drop root
Drop root privileges easily.
§Example
use drop_root::set_user_group;
// ...
set_user_group("nobody", "nogroup");
// ...
§Features
logging
(default): Enable logging via thelog
crate- To use without logging:
drop-root = { version = "1.0", default-features = false }
§Testing
It’s tested on Linux. Tests that require run as root are ignored by default, and executed one by one.
Enums§
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.