use correct mappings when they exist
a rebase failure between infra container and userns caused the wrong mappings to be used
This could cause a segfault, and causes wrong behavior. Fix it
@@ -763,7 +763,7 @@ func (s *Server) runPodSandbox(ctx context.Context, req *pb.RunPodSandboxRequest
}
g.AddMount(proc)
}
- rootPair := s.defaultIDMappings.RootPair()
+ rootPair := sandboxIDMappings.RootPair()
for _, path := range pathsToChown {
if err := os.Chown(path, rootPair.UID, rootPair.GID); err != nil {
return nil, errors.Wrapf(err, "cannot chown %s to %d:%d", path, rootPair.UID, rootPair.GID)
