diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-06-24 13:10:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-24 13:10:53 -0400 |
commit | 4ee66598c1201a7d191c03c2d2f067f847aaddf5 (patch) | |
tree | f22e6a5fa65b5f8acc9f0b9ab48c4f1102b74dba /pkg/util | |
parent | b61e429f199ca0f164054a9d758e60f94aa4d81e (diff) | |
parent | 061261ee058da403291e6cb325813b0cfd955a80 (diff) | |
download | podman-4ee66598c1201a7d191c03c2d2f067f847aaddf5.tar.gz podman-4ee66598c1201a7d191c03c2d2f067f847aaddf5.tar.bz2 podman-4ee66598c1201a7d191c03c2d2f067f847aaddf5.zip |
Merge pull request #6753 from giuseppe/drop-default-mapping-1-1
utils: drop default mapping when running uid!=0
Diffstat (limited to 'pkg/util')
-rw-r--r-- | pkg/util/utils.go | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/pkg/util/utils.go b/pkg/util/utils.go index 917f57742..1d8941b4d 100644 --- a/pkg/util/utils.go +++ b/pkg/util/utils.go @@ -419,12 +419,6 @@ func ParseIDMapping(mode namespaces.UsernsMode, uidMapSlice, gidMapSlice []strin if len(uidMapSlice) == 0 && len(gidMapSlice) != 0 { uidMapSlice = gidMapSlice } - if len(uidMapSlice) == 0 && subUIDMap == "" && os.Getuid() != 0 { - uidMapSlice = []string{fmt.Sprintf("0:%d:1", os.Getuid())} - } - if len(gidMapSlice) == 0 && subGIDMap == "" && os.Getuid() != 0 { - gidMapSlice = []string{fmt.Sprintf("0:%d:1", os.Getgid())} - } if subUIDMap != "" && subGIDMap != "" { mappings, err := idtools.NewIDMappings(subUIDMap, subGIDMap) |