//! Root privilege checking utilities use std::error::Error; /// Check if the current process has root privileges /// /// # Returns /// * `Ok(true)` - Running as root /// * `Ok(false)` - Not running as root /// * `Err` - Failed to check privileges pub fn is_root() -> Result> { // Check if we're running as root by checking the effective user ID let uid = unsafe { libc::geteuid() }; Ok(uid == 0) }