mirror of https://github.com/containers/podman.git
Merge pull request #9399 from vrothberg/home-sweet-home
do not set empty $HOME
This commit is contained in:
commit
7fb347a3d4
|
|
@ -466,7 +466,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))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -662,4 +662,10 @@ json-file | f
|
|||
run_podman rm $cname
|
||||
}
|
||||
|
||||
@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
|
||||
|
|
|
|||
Loading…
Reference in New Issue