diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-02-25 01:59:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-25 01:59:01 +0100 |
commit | 8a30759b6b7f73c76c90e0931e6cf1ca3d94ee61 (patch) | |
tree | 4958de4efb580ca84f5904fb9434fdf629cdd7be /pkg | |
parent | 53b67401b99ef55cd9df41e5eb8b2eab31308fb0 (diff) | |
parent | 1e94c2964d517ca4840ff5fa7ae1fd76753642de (diff) | |
download | podman-8a30759b6b7f73c76c90e0931e6cf1ca3d94ee61.tar.gz podman-8a30759b6b7f73c76c90e0931e6cf1ca3d94ee61.tar.bz2 podman-8a30759b6b7f73c76c90e0931e6cf1ca3d94ee61.zip |
Merge pull request #5318 from giuseppe/fix-running-without-env-variables
build: move initialization after SetXdgDirs
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/util/utils_supported.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/util/utils_supported.go b/pkg/util/utils_supported.go index 0b78a8150..c6aed9943 100644 --- a/pkg/util/utils_supported.go +++ b/pkg/util/utils_supported.go @@ -33,7 +33,7 @@ func GetRuntimeDir() (string, error) { logrus.Debugf("unable to make temp dir %s", tmpDir) } st, err := os.Stat(tmpDir) - if err == nil && int(st.Sys().(*syscall.Stat_t).Uid) == os.Geteuid() && st.Mode().Perm() == 0700 { + if err == nil && int(st.Sys().(*syscall.Stat_t).Uid) == os.Geteuid() && (st.Mode().Perm()&0700 == 0700) { runtimeDir = tmpDir } } @@ -43,7 +43,7 @@ func GetRuntimeDir() (string, error) { logrus.Debugf("unable to make temp dir %s", tmpDir) } st, err := os.Stat(tmpDir) - if err == nil && int(st.Sys().(*syscall.Stat_t).Uid) == os.Geteuid() && st.Mode().Perm() == 0700 { + if err == nil && int(st.Sys().(*syscall.Stat_t).Uid) == os.Geteuid() && (st.Mode().Perm()&0700 == 0700) { runtimeDir = tmpDir } } |