Debugging
This commit is contained in:
parent
796804edab
commit
0136bbfac5
1 changed files with 2 additions and 7 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue