Skip to main content

is_root

Function is_root 

Source
pub fn is_root() -> bool
Expand description

Return true when the process is running as root (effective UID 0).

This is the single source of truth for privilege detection across the app. It is a cheap syscall and safe to call anywhere.

On non-Unix targets there is no effective-UID concept; toride’s privilege-escalation paths never apply there, so this returns false.