1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #5496 from unclejack/check_if_root

check if the daemon is run as root on startup
This commit is contained in:
Guillaume J. Charmes 2014-05-05 10:13:17 -07:00
commit 5f301191cf

View file

@ -98,6 +98,10 @@ func main() {
}
if *flDaemon {
if os.Geteuid() != 0 {
log.Fatalf("The Docker daemon needs to be run as root")
}
if flag.NArg() != 0 {
flag.Usage()
return