summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-03-16 15:17:30 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-03-16 15:17:33 +0100
commitea0b36bcbb047634944f8fe9693db03bdf7c6a90 (patch)
treee6c5b8efe53db552733fde8ec3c2cda135a394ad
parent7efefde3bcb998f37bd2fcde4f004c5bbee13dd5 (diff)
downloadpodman-ea0b36bcbb047634944f8fe9693db03bdf7c6a90.tar.gz
podman-ea0b36bcbb047634944f8fe9693db03bdf7c6a90.tar.bz2
podman-ea0b36bcbb047634944f8fe9693db03bdf7c6a90.zip
utils: avoid too long tmp directory
or we will easily pass the 108 chars limits for unix paths. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rw-r--r--pkg/util/utils.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/util/utils.go b/pkg/util/utils.go
index 73dddf2ac..8562afab1 100644
--- a/pkg/util/utils.go
+++ b/pkg/util/utils.go
@@ -195,7 +195,7 @@ func GetRootlessRuntimeDir() (string, error) {
}
}
if runtimeDir == "" {
- tmpDir := filepath.Join(os.TempDir(), fmt.Sprintf("libpod-rundir-%s", uid))
+ tmpDir := filepath.Join(os.TempDir(), fmt.Sprintf("run-%s", uid))
os.MkdirAll(tmpDir, 0700)
st, err := os.Stat(tmpDir)
if err == nil && int(st.Sys().(*syscall.Stat_t).Uid) == os.Geteuid() && st.Mode().Perm() == 0700 {