From e4aad8f0f4ce6a408e052e0474932bd6afa2dbbb Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Wed, 5 Apr 2023 13:41:10 -0400 Subject: [PATCH] libpod.storageService.CreateContainerStorage(): retrieve ID maps When creating storage for a container using ID maps, read the ID maps that are assigned to the container from the returned container structure, rather than from the options structure that we passed to the storage library, which it previously modified in error. [NO NEW TESTS NEEDED] Signed-off-by: Nalin Dahyabhai --- libpod/storage.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libpod/storage.go b/libpod/storage.go index dc19a5d4f4..3d5e7ddcc2 100644 --- a/libpod/storage.go +++ b/libpod/storage.go @@ -164,8 +164,8 @@ func (r *storageService) CreateContainerStorage(ctx context.Context, systemConte logrus.Debugf("Container %q has run directory %q", container.ID, containerRunDir) return ContainerInfo{ - UIDMap: options.UIDMap, - GIDMap: options.GIDMap, + UIDMap: container.UIDMap, + GIDMap: container.GIDMap, Dir: containerDir, RunDir: containerRunDir, Config: imageConfig,