quork 0.9.1

A collection of small things that don't deserve their own crate
Documentation
1
2
3
4
5
6
7
8
//! Checks if process has root privileges

#[allow(clippy::module_name_repetitions)]
#[must_use]
/// Checks if the process is running as root
pub fn is_root() -> bool {
    nix::unistd::Uid::effective().is_root()
}