diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-10-31 07:53:58 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-11-04 14:47:54 -0500 |
commit | 5a032acff6e6906cfb5533ec135f177b696d7154 (patch) | |
tree | aa8348ddefd55ee74d64aeac6b6b1affcaf08211 /libpod/oci_conmon_exec_linux.go | |
parent | ab273a9cbd08e25e3794c606a863644eb3a06e30 (diff) | |
download | podman-5a032acff6e6906cfb5533ec135f177b696d7154.tar.gz podman-5a032acff6e6906cfb5533ec135f177b696d7154.tar.bz2 podman-5a032acff6e6906cfb5533ec135f177b696d7154.zip |
Only use container/storage/pkg/homedir.Get()
We are resolving the homedir of the user in many different
places. This Patch consolodates them to use container/storage
version.
This PR also fixes a failure mode when the homedir does not
exists, and the user sets a root path. In this situation
podman should continue to work. Podman does not require a users
homedir to exist in order to run.
Finally the rootlessConfigHomeDirOnce and rootlessRuntimeDirOnce
were broken, because if an error ever happened, they would not be recorded
the second time, and "" would be returned as the path.
Fixes: https://github.com/containers/podman/issues/8131
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'libpod/oci_conmon_exec_linux.go')
-rw-r--r-- | libpod/oci_conmon_exec_linux.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libpod/oci_conmon_exec_linux.go b/libpod/oci_conmon_exec_linux.go index 8651c1dc5..7068bf87a 100644 --- a/libpod/oci_conmon_exec_linux.go +++ b/libpod/oci_conmon_exec_linux.go @@ -444,10 +444,7 @@ func (r *ConmonOCIRuntime) startExec(c *Container, sessionID string, options *Ex // } // } - conmonEnv, extraFiles, err := r.configureConmonEnv(c, runtimeDir) - if err != nil { - return nil, nil, err - } + conmonEnv, extraFiles := r.configureConmonEnv(c, runtimeDir) var filesToClose []*os.File if options.PreserveFDs > 0 { |