diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-01-04 12:22:52 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-04 12:22:52 -0500 |
commit | 6a1fbe7a560a379650c49618369fb87ca3b90233 (patch) | |
tree | 25e371256b02949bbc31c5eafa59e6ab7f0e1b74 /libpod/oci_conmon_linux.go | |
parent | f261bfc54961c156c3a4acc2cd1c5379a83f1c0b (diff) | |
parent | 8c6bbfbc42b5299e6d4ad5f8f9efa757234162db (diff) | |
download | podman-6a1fbe7a560a379650c49618369fb87ca3b90233.tar.gz podman-6a1fbe7a560a379650c49618369fb87ca3b90233.tar.bz2 podman-6a1fbe7a560a379650c49618369fb87ca3b90233.zip |
Merge pull request #8869 from giuseppe/make-rundir-accessible
systemd: make rundir always accessible
Diffstat (limited to 'libpod/oci_conmon_linux.go')
-rw-r--r-- | libpod/oci_conmon_linux.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go index 199b40097..47fa130f1 100644 --- a/libpod/oci_conmon_linux.go +++ b/libpod/oci_conmon_linux.go @@ -193,6 +193,11 @@ func hasCurrentUserMapped(ctr *Container) bool { // CreateContainer creates a container. func (r *ConmonOCIRuntime) CreateContainer(ctr *Container, restoreOptions *ContainerCheckpointOptions) error { + // always make the run dir accessible to the current user so that the PID files can be read without + // being in the rootless user namespace. + if err := makeAccessible(ctr.state.RunDir, 0, 0); err != nil { + return err + } if !hasCurrentUserMapped(ctr) { for _, i := range []string{ctr.state.RunDir, ctr.runtime.config.Engine.TmpDir, ctr.config.StaticDir, ctr.state.Mountpoint, ctr.runtime.config.Engine.VolumePath} { if err := makeAccessible(i, ctr.RootUID(), ctr.RootGID()); err != nil { |