Skip to content

Conversation

taylorsilva
Copy link
Member

Changes proposed by this PR

The maxValidFromFile() function was incorrectly using the const uidMap var regardless of the filename parameter passed to it. This caused the MaxValidIds method to always read from /proc/self/uid_map twice instead of reading from both uid_map and gid_map files.

Fixed by modifying maxValidFromFile to properly use the fname parameter both when opening the file and when generating error messages.

Release Note

  • Fix bug in maxValidFromFile. It was always using a hardcoded path

The maxValidFromFile function was incorrectly using the hardcoded uidMap
path regardless of the filename parameter passed to it. This caused the
MaxValidIds method to always read from /proc/self/uid_map twice instead
of reading from both uid_map and gid_map files.

Fixed by modifying maxValidFromFile to properly use the fname parameter
both when opening the file and when generating error messages.

Signed-off-by: Mathias Bogaert <mathias.bogaert@gmail.com>
Co-authored-by: Taylor Silva <dev@taydev.net>
@taylorsilva taylorsilva requested a review from a team as a code owner February 25, 2025 15:32
@taylorsilva taylorsilva merged commit 4b953e1 into master Feb 25, 2025
11 checks passed
@taylorsilva taylorsilva deleted the maxValidFromFile branch February 25, 2025 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants