Merge pull request #3971 from cfelder/fixup-getconfighomedir

Fixup `util.GetRootlessConfigHomeDir` permission requirements
This commit is contained in:
OpenShift Merge Robot 2019-09-09 16:37:13 +02:00 committed by GitHub
commit 16a7049085
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ func GetRootlessConfigHomeDir() (string, error) {
logrus.Errorf("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() == 0755 {
if err == nil && int(st.Sys().(*syscall.Stat_t).Uid) == os.Geteuid() && st.Mode().Perm() >= 0700 {
cfgHomeDir = tmpDir
}
}