There is no support for the doas command, which is a secure alternative to sudo.
opendoas sets the DOAS_USER environment variables (e.g. DOAS_USER="humaid").
An alternate check should be added somewhere here, but the UID has to be fetched.
|
if os.Getenv("SUDO_UID") == "" { // not running under sudo |