summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-02-04 15:07:44 +0100
committerMatthew Heon <matthew.heon@pm.me>2021-02-05 13:55:15 -0500
commit353c3b04d15dc4fb3e07f06d8227eed35f350ef1 (patch)
treedaa148b96bb2653e159d42e28aea9378943ae6c6 /libpod
parent9cf6b7f8dcfb1c6984ebf9cc49635ff97f29c4d7 (diff)
downloadpodman-353c3b04d15dc4fb3e07f06d8227eed35f350ef1.tar.gz
podman-353c3b04d15dc4fb3e07f06d8227eed35f350ef1.tar.bz2
podman-353c3b04d15dc4fb3e07f06d8227eed35f350ef1.zip
fix logic when not creating a workdir
When resolving the workdir of a container, we may need to create unless the user set it explicitly on the command line. Otherwise, we just do a presence check. Unfortunately, there was a missing return that lead us to fall through into attempting to create and chown the workdir. That caused a regression when running on a read-only root fs. Fixes: #9230 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_internal_linux.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go
index 6c9489a08..ba85a1f47 100644
--- a/libpod/container_internal_linux.go
+++ b/libpod/container_internal_linux.go
@@ -213,6 +213,7 @@ func (c *Container) resolveWorkDir() error {
// we need to return the full error.
return errors.Wrapf(err, "error detecting workdir %q on container %s", workdir, c.ID())
}
+ return nil
}
// Ensure container entrypoint is created (if required).