mirror of
https://github.com/containers/skopeo.git
synced 2025-09-25 20:29:24 +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:
22
vendor/github.com/containers/storage/pkg/idtools/idtools.go
generated
vendored
22
vendor/github.com/containers/storage/pkg/idtools/idtools.go
generated
vendored
@@ -77,13 +77,23 @@ func MkdirAllAndChownNew(path string, mode os.FileMode, ids IDPair) error {
|
||||
// GetRootUIDGID retrieves the remapped root uid/gid pair from the set of maps.
|
||||
// If the maps are empty, then the root uid/gid will default to "real" 0/0
|
||||
func GetRootUIDGID(uidMap, gidMap []IDMap) (int, int, error) {
|
||||
uid, err := toHost(0, uidMap)
|
||||
if err != nil {
|
||||
return -1, -1, err
|
||||
var uid, gid int
|
||||
var err error
|
||||
if len(uidMap) == 1 && uidMap[0].Size == 1 {
|
||||
uid = uidMap[0].HostID
|
||||
} else {
|
||||
uid, err = toHost(0, uidMap)
|
||||
if err != nil {
|
||||
return -1, -1, err
|
||||
}
|
||||
}
|
||||
gid, err := toHost(0, gidMap)
|
||||
if err != nil {
|
||||
return -1, -1, err
|
||||
if len(gidMap) == 1 && gidMap[0].Size == 1 {
|
||||
gid = gidMap[0].HostID
|
||||
} else {
|
||||
gid, err = toHost(0, gidMap)
|
||||
if err != nil {
|
||||
return -1, -1, err
|
||||
}
|
||||
}
|
||||
return uid, gid, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user