summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-02-16 14:15:21 +0100
committerMatthew Heon <mheon@redhat.com>2021-02-18 10:29:31 -0500
commit32350c758ddfef52a53e7d74d4a68785bc54aaef (patch)
treec99d24ba13d7b8add08b58071cae9dcfe7601656 /test
parentbddbe989e3cd19158c1dbc86a92629b70fa4c9e9 (diff)
downloadpodman-32350c758ddfef52a53e7d74d4a68785bc54aaef.tar.gz
podman-32350c758ddfef52a53e7d74d4a68785bc54aaef.tar.bz2
podman-32350c758ddfef52a53e7d74d4a68785bc54aaef.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> <MH: Fixed cherry-pick conflicts> Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/system/030-run.bats6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/system/030-run.bats b/test/system/030-run.bats
index 98e34238e..49fa92f57 100644
--- a/test/system/030-run.bats
+++ b/test/system/030-run.bats
@@ -623,4 +623,10 @@ json-file | f
fi
}
+@test "podman run - do not set empty HOME" {
+ # Regression test for #9378.
+ run_podman run --rm --user 100 $IMAGE printenv
+ is "$output" ".*HOME=/.*"
+}
+
# vim: filetype=sh