docker/daemon: set umask to the default on startup

This sets up the umask so that it's the same on all systems.

Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: 6578ad90c307c5500a7998819743be88f63ef2b3
Component: engine
This commit is contained in:
unclejack
2015-06-15 16:36:19 +03:00
parent 98d6dbe3a1
commit 73b0733f08
3 changed files with 23 additions and 0 deletions

View File

@ -91,6 +91,10 @@ func mainDaemon() {
logrus.SetFormatter(&logrus.TextFormatter{TimestampFormat: timeutils.RFC3339NanoFixed})
if err := setDefaultUmask(); err != nil {
logrus.Fatalf("Failed to set umask: %v", err)
}
var pfile *pidfile.PidFile
if daemonCfg.Pidfile != "" {
pf, err := pidfile.New(daemonCfg.Pidfile)