aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-01-05 12:41:57 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-01-07 13:53:15 +0100
commit4d31065cc50537d4dbc17c57a747204b9343d0e2 (patch)
tree0c4b996a12731ad5ed9cda8db658d55df9810ad9
parent4e0c0ecbc383531cd1b38db9027583974a72070d (diff)
downloadpodman-4d31065cc50537d4dbc17c57a747204b9343d0e2.tar.gz
podman-4d31065cc50537d4dbc17c57a747204b9343d0e2.tar.bz2
podman-4d31065cc50537d4dbc17c57a747204b9343d0e2.zip
podman: set umask to 022
be sure there are no bits in the umask that prevent us for creating directories with mode 0755. Set the umask very early in the program startup. Closes: https://github.com/containers/libpod/issues/2074 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rw-r--r--cmd/podman/main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index 7ef22a93b..43804ee35 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -161,6 +161,9 @@ func main() {
logrus.Info("running as rootless")
}
+ // Be sure we can create directories with 0755 mode.
+ syscall.Umask(0022)
+
if logLevel == "debug" {
debug = true