aboutsummaryrefslogtreecommitdiff
path: root/pkg/util/utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/util/utils.go')
-rw-r--r--pkg/util/utils.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/util/utils.go b/pkg/util/utils.go
index a29a1ee60..56a57c15a 100644
--- a/pkg/util/utils.go
+++ b/pkg/util/utils.go
@@ -136,6 +136,13 @@ func ParseIDMapping(UIDMapSlice, GIDMapSlice []string, subUIDMap, subGIDMap stri
if subUIDMap == "" && subGIDMap != "" {
subUIDMap = subGIDMap
}
+ if len(GIDMapSlice) == 0 && len(UIDMapSlice) != 0 {
+ GIDMapSlice = UIDMapSlice
+ }
+ if len(UIDMapSlice) == 0 && len(GIDMapSlice) != 0 {
+ UIDMapSlice = GIDMapSlice
+ }
+
parseTriple := func(spec []string) (container, host, size int, err error) {
cid, err := strconv.ParseUint(spec[0], 10, 32)
if err != nil {