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

check if the daemon is run as root on startup

This commit makes Docker throw an error if the daemon isn't started as
root.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
This commit is contained in:
unclejack 2014-04-30 14:13:39 +03:00
parent 0c5375146a
commit 4fac4d2149

View file

@ -97,6 +97,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