diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2021-02-16 14:15:21 +0100 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2021-02-16 14:21:45 +0100 |
commit | 2ec0e3b650bcce43a8c9d0f47703eceaf947edbe (patch) | |
tree | 9c31a93a782f423fb36bb3e1929ec53e6727c525 /libpod | |
parent | 8c444e6f0b3663a657c946e1c731f390553f065d (diff) | |
download | podman-2ec0e3b650bcce43a8c9d0f47703eceaf947edbe.tar.gz podman-2ec0e3b650bcce43a8c9d0f47703eceaf947edbe.tar.bz2 podman-2ec0e3b650bcce43a8c9d0f47703eceaf947edbe.zip |
do not set empty $HOME
Make sure to not set an empty $HOME for containers and let it default to
"/".
https://github.com/containers/crun/pull/599 is required to fully
address #9378.
Partially-Fixes: #9378
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/container_internal_linux.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index a3476f42e..e49c89566 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -458,7 +458,7 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) { break } } - if !hasHomeSet { + if !hasHomeSet && execUser.Home != "" { c.config.Spec.Process.Env = append(c.config.Spec.Process.Env, fmt.Sprintf("HOME=%s", execUser.Home)) } |