does not fit in an int on 32 bit systems
Currently cri-o will not build on 32 bit systems.
@@ -4,6 +4,7 @@ import (
"encoding/json"
"errors"
"fmt"
+ "math"
"net/http"
cimage "github.com/containers/image/types"
@@ -16,11 +17,16 @@ import (
)
func (s *Server) getIDMappingsInfo() types.IDMappings {
+ max := int64(int(^uint(0) >> 1))
+ if max > math.MaxUint32 {
+ max = math.MaxUint32
+ }
+
if s.defaultIDMappings == nil {
fullMapping := idtools.IDMap{
ContainerID: 0,
HostID: 0,
- Size: 4294967295,
+ Size: int(max),
}
return types.IDMappings{
Uids: []idtools.IDMap{fullMapping},
