Skip to content

Simple rust library, checks if you are root/admin

License

Notifications You must be signed in to change notification settings

Jackhr-arch/is-root

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About this

This is a fork from gitlab

is-root

Downloads License crates.io docs.rs Gitlab CI

A simple library to detect whether you are root/admin or not

Installation

Add is-root = "0.1.2" to [dependencies] section in your Cargo.toml

Usage

use is_root::is_root;

if is_root() {
    println!("Doing something dangerous")
} else {
    eprintln!("Run me as root")
}

You can find examples in examples directory

About

Simple rust library, checks if you are root/admin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages