From 94e59bd2ff92a3314f1133d8204c373770507ea3 Mon Sep 17 00:00:00 2001 From: Simon Brakhane Date: Fri, 30 Jun 2023 12:04:41 +0200 Subject: [PATCH] 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 --- pkg/util/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/util/utils.go b/pkg/util/utils.go index e67f3f9b44..dff8721bdd 100644 --- a/pkg/util/utils.go +++ b/pkg/util/utils.go @@ -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 }