Skip to content

Commit

Permalink
Use /proc/self/gid_map as intended, not uid_map
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Luminger committed Jun 30, 2023
1 parent 5561390 commit 94e59bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/util/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 94e59bd

Please sign in to comment.