Skip to content

Commit 2922273

Browse files
authored
Merge pull request #4150 from lifubang/fix-int64err
fix a (u|g)IDMappings type value convertion error
2 parents 371ff9c + d08ba9c commit 2922273

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

libcontainer/userns/usernsfd_linux.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ type Mapping struct {
2222
func (m Mapping) toSys() (uids, gids []syscall.SysProcIDMap) {
2323
for _, uid := range m.UIDMappings {
2424
uids = append(uids, syscall.SysProcIDMap{
25-
ContainerID: uid.ContainerID,
26-
HostID: uid.HostID,
27-
Size: uid.Size,
25+
ContainerID: int(uid.ContainerID),
26+
HostID: int(uid.HostID),
27+
Size: int(uid.Size),
2828
})
2929
}
3030
for _, gid := range m.GIDMappings {
3131
gids = append(gids, syscall.SysProcIDMap{
32-
ContainerID: gid.ContainerID,
33-
HostID: gid.HostID,
34-
Size: gid.Size,
32+
ContainerID: int(gid.ContainerID),
33+
HostID: int(gid.HostID),
34+
Size: int(gid.Size),
3535
})
3636
}
3737
return

0 commit comments

Comments
 (0)