diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-06-27 13:52:29 +0200 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-06-27 13:52:36 +0200 |
commit | bfcf0292de21bb75ec0b68a6af1879b29458bad2 (patch) | |
tree | 68c07a7d0a565aafe4e4c0330b766e3884a1afbc /libpod | |
parent | fccf4ad50327d6b74b3d3fa54bce449ea93a85cf (diff) | |
download | podman-bfcf0292de21bb75ec0b68a6af1879b29458bad2.tar.gz podman-bfcf0292de21bb75ec0b68a6af1879b29458bad2.tar.bz2 podman-bfcf0292de21bb75ec0b68a6af1879b29458bad2.zip |
runtime: use GetRootlessUID() to get rootless uid
otherwise it won't work in a user namespace.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/runtime.go | 2 |
1 files changed, 1 insertions, 1 deletions
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") } |