From bfcf0292de21bb75ec0b68a6af1879b29458bad2 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 27 Jun 2019 13:52:29 +0200 Subject: runtime: use GetRootlessUID() to get rootless uid otherwise it won't work in a user namespace. Signed-off-by: Giuseppe Scrivano --- libpod/runtime.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpod') diff --git a/libpod/runtime.go b/libpod/runtime.go index 97eb565cc..884bb6213 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -373,7 +373,7 @@ func NewRuntimeFromConfig(ctx context.Context, userConfigPath string, options .. func homeDir() (string, error) { home := os.Getenv("HOME") if home == "" { - usr, err := user.Current() + usr, err := user.LookupId(fmt.Sprintf("%d", rootless.GetRootlessUID())) if err != nil { return "", errors.Wrapf(err, "unable to resolve HOME directory") } -- cgit v1.2.3-54-g00ecf