From 2f73a9b0f6225819fb8bf53d103438ddf4421441 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 3 Oct 2018 10:41:47 +0200 Subject: rootless: always set XDG_RUNTIME_DIR it is used internally by containers/image to locate the auth file. Closes: https://github.com/containers/libpod/issues/1457 Signed-off-by: Giuseppe Scrivano --- cmd/podman/main.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cmd') diff --git a/cmd/podman/main.go b/cmd/podman/main.go index 840650a3f..d4c8454a8 100644 --- a/cmd/podman/main.go +++ b/cmd/podman/main.go @@ -7,6 +7,7 @@ import ( "runtime/pprof" "syscall" + "github.com/containers/libpod/libpod" "github.com/containers/libpod/pkg/hooks" _ "github.com/containers/libpod/pkg/hooks/0.1.0" "github.com/containers/libpod/pkg/rootless" @@ -109,6 +110,10 @@ func main() { } app.Before = func(c *cli.Context) error { + if err := libpod.SetXdgRuntimeDir(""); err != nil { + logrus.Errorf(err.Error()) + os.Exit(1) + } args := c.Args() if args.Present() { if _, notRequireRootless := cmdsNotRequiringRootless[args.First()]; !notRequireRootless { -- cgit v1.2.3-54-g00ecf