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 <nalin@redhat.com>
This commit is contained in:
Nalin Dahyabhai
2023-04-05 13:41:10 -04:00
parent 19463738c2
commit e4aad8f0f4

View File

@ -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,