mirror of
https://github.com/containers/skopeo.git
synced 2025-09-26 12:44:55 +00:00
Update vendor of containers/common and containers/storage
We are preparing for RHEL 8.4 release and want to make sure all container tools have the same containers suppackages. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
28
vendor/github.com/containers/storage/drivers/overlay/overlay.go
generated
vendored
28
vendor/github.com/containers/storage/drivers/overlay/overlay.go
generated
vendored
@@ -761,19 +761,29 @@ func (d *Driver) optsAppendMappings(opts string, uidMaps, gidMaps []idtools.IDMa
|
||||
}
|
||||
if uidMaps != nil {
|
||||
var uids, gids bytes.Buffer
|
||||
for _, i := range uidMaps {
|
||||
if uids.Len() > 0 {
|
||||
uids.WriteString(":")
|
||||
if len(uidMaps) == 1 && uidMaps[0].Size == 1 {
|
||||
uids.WriteString(fmt.Sprintf("squash_to_uid=%d", uidMaps[0].HostID))
|
||||
} else {
|
||||
uids.WriteString("uidmapping=")
|
||||
for _, i := range uidMaps {
|
||||
if uids.Len() > 0 {
|
||||
uids.WriteString(":")
|
||||
}
|
||||
uids.WriteString(fmt.Sprintf("%d:%d:%d", i.ContainerID, i.HostID, i.Size))
|
||||
}
|
||||
uids.WriteString(fmt.Sprintf("%d:%d:%d", i.ContainerID, i.HostID, i.Size))
|
||||
}
|
||||
for _, i := range gidMaps {
|
||||
if gids.Len() > 0 {
|
||||
gids.WriteString(":")
|
||||
if len(gidMaps) == 1 && gidMaps[0].Size == 1 {
|
||||
gids.WriteString(fmt.Sprintf("squash_to_gid=%d", gidMaps[0].HostID))
|
||||
} else {
|
||||
gids.WriteString("gidmapping=")
|
||||
for _, i := range gidMaps {
|
||||
if gids.Len() > 0 {
|
||||
gids.WriteString(":")
|
||||
}
|
||||
gids.WriteString(fmt.Sprintf("%d:%d:%d", i.ContainerID, i.HostID, i.Size))
|
||||
}
|
||||
gids.WriteString(fmt.Sprintf("%d:%d:%d", i.ContainerID, i.HostID, i.Size))
|
||||
}
|
||||
return fmt.Sprintf("%s,uidmapping=%s,gidmapping=%s", opts, uids.String(), gids.String())
|
||||
return fmt.Sprintf("%s,%s,%s", opts, uids.String(), gids.String())
|
||||
}
|
||||
return opts
|
||||
}
|
||||
|
Reference in New Issue
Block a user