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>
This commit is contained in:
Giuseppe Scrivano
2019-01-05 12:41:57 +01:00
parent 4e0c0ecbc3
commit 4d31065cc5

View File

@ -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