Use /proc/self/gid_map as intended, not uid_map

GetKeepIDMapping never read the gid (as it intended) but reused the uid.
Most likely a typo that never bothered anybody as uid and gid usually
match.

Signed-off-by: Simon Brakhane <simon@brakhane.net>
This commit is contained in:
Simon Brakhane
2023-06-30 12:04:41 +02:00
parent 5561390a00
commit 94e59bd2ff

View File

@ -195,7 +195,7 @@ func GetKeepIDMapping(opts *namespaces.KeepIDUserNsOptions) (*stypes.IDMappingOp
if err != nil {
return nil, 0, 0, err
}
gids, err := rootless.ReadMappingsProc("/proc/self/uid_map")
gids, err := rootless.ReadMappingsProc("/proc/self/gid_map")
if err != nil {
return nil, 0, 0, err
}