Debugging

This commit is contained in:
Fedor Korotkiy 2020-02-13 02:56:04 +03:00
parent 796804edab
commit 0136bbfac5

View file

@ -1,7 +1,7 @@
package commands package commands
import ( import (
"log" "os"
"os/exec" "os/exec"
"os/user" "os/user"
"strconv" "strconv"
@ -9,12 +9,7 @@ import (
) )
func currentUserIsRoot() bool { func currentUserIsRoot() bool {
me, err := user.Current() return os.Getuid() == 0
if err != nil {
log.Fatal(err)
}
return me.Uid == "0"
} }
func sandbox(cmd *exec.Cmd) error { func sandbox(cmd *exec.Cmd) error {