From 821ef6486a63f7dcf7f120e4010bb4d6f1e65b9d Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Thu, 4 Feb 2021 15:07:44 +0100 Subject: 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 --- libpod/container_internal_linux.go | 1 + 1 file changed, 1 insertion(+) (limited to 'libpod') 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). -- cgit v1.2.3-54-g00ecf