Repository navigation
cmd/create, cmd/run, cmd/utils: Unbreak overriding the HOME variable - #1667
Conversation
The POSIX shell implementation used to read and respect the HOME environment variable. It broke when the Go implementation started using user.Current() [1], because it uses getpwuid_r(3), which only uses the GNU Name Service Switch's (or NSS') password database and ignores HOME. This created a strange situation where the toolbox(1) binary ignored the HOME environment variable, while the profile.d/toolbox.sh shell start-up snippet and Podman read and respected it. Restoring the HOME environment variable will enable users to create Toolbx containers with different home directories from the host for increased isolation, and to isolate the host's HOME from the system tests. Fallout from e8d7f25 [1] https://pkg.go.dev/os/user#Current containers#1044 containers#1564
|
✔️ unit-test SUCCESS in 5m 14s |
The POSIX shell implementation used to read and respect the
HOMEenvironment variable. It broke when the Go implementation started usinguser.Current()[1], because it usesgetpwuid_r(3), which only uses the GNU Name Service Switch's (or NSS') password database and ignores HOME.This created a strange situation where the
toolbox(1)binary ignored theHOMEenvironment variable, while theprofile.d/toolbox.shshell start-up snippet and Podman read and respected it.Restoring the
HOMEenvironment variable will enable users to create Toolbx containers with different home directories from the host for increased isolation, and to isolate the host'sHOMEfrom the system tests.Fallout from e8d7f25
[1] https://pkg.go.dev/os/user#Current
#1044
#1564