diff options
author | Kenny MacDermid <kenny@macdermid.ca> | 2022-09-10 14:30:31 -0300 |
---|---|---|
committer | Kenny MacDermid <kenny@macdermid.ca> | 2022-09-11 11:49:35 -0300 |
commit | 6091ff42dc8d177c49e1b09ecec5ca2bc7ff5513 (patch) | |
tree | 0cc81cda018e64d0b6a18b8c5cebc9e53c2dec59 /libpod | |
parent | eb7894764e0f1a020f03385a8a4423482989c9d3 (diff) | |
download | podman-6091ff42dc8d177c49e1b09ecec5ca2bc7ff5513.tar.gz podman-6091ff42dc8d177c49e1b09ecec5ca2bc7ff5513.tar.bz2 podman-6091ff42dc8d177c49e1b09ecec5ca2bc7ff5513.zip |
Include more environment variables in conmon env.
Include the path and helper binary dir so that the podman
environment more closely matches when conmon calls it as an
exit command.
Also match the CONTAINERS_CONF lookup to the codestyle of other
environment lookups.
[NO NEW TESTS NEEDED]
Resolves #15707
Signed-off-by: Kenny MacDermid <kenny@macdermid.ca>
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/oci_conmon_common.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libpod/oci_conmon_common.go b/libpod/oci_conmon_common.go index c3725cdb4..2c7c39726 100644 --- a/libpod/oci_conmon_common.go +++ b/libpod/oci_conmon_common.go @@ -1221,10 +1221,15 @@ func (r *ConmonOCIRuntime) configureConmonEnv(runtimeDir string) []string { env = append(env, e) } } - conf, ok := os.LookupEnv("CONTAINERS_CONF") - if ok { + if path, ok := os.LookupEnv("PATH"); ok { + env = append(env, fmt.Sprintf("PATH=%s", path)) + } + if conf, ok := os.LookupEnv("CONTAINERS_CONF"); ok { env = append(env, fmt.Sprintf("CONTAINERS_CONF=%s", conf)) } + if conf, ok := os.LookupEnv("CONTAINERS_HELPER_BINARY_DIR"); ok { + env = append(env, fmt.Sprintf("CONTAINERS_HELPER_BINARY_DIR=%s", conf)) + } env = append(env, fmt.Sprintf("XDG_RUNTIME_DIR=%s", runtimeDir)) env = append(env, fmt.Sprintf("_CONTAINERS_USERNS_CONFIGURED=%s", os.Getenv("_CONTAINERS_USERNS_CONFIGURED"))) env = append(env, fmt.Sprintf("_CONTAINERS_ROOTLESS_UID=%s", os.Getenv("_CONTAINERS_ROOTLESS_UID"))) |