Expand description
Detect if you are running as root, restart self with sudo
if needed or setup uid zero when running with the SUID flag set.
§Requirements
- The
sudo
program is required to be installed and setup correctly on the target system. - Linux or Mac OS X tested
- It should work on *BSD. However, you can also create an Escalate builder with
doas
as the wrapper should you prefer that.
- It should work on *BSD. However, you can also create an Escalate builder with
Structs§
Enums§
- Cross platform representation of the state the current program running
Functions§
- Alias for Escalate::builder() to quickly create a new karen Escalate builder
- Check getuid() and geteuid() to learn about the configuration this program is running under
- Similar to escalate_if_needed, but with doas as the wrapper
- Restart your program with sudo if the user is not privileged enough.
- Similar to escalate_if_needed, but with pkexec as the wrapper
- Escalate privileges while maintaining RUST_BACKTRACE and selected environment variables (or none).