Repository navigation
llb: support uint32 numeric user and group IDs in parseUID - #7319
AdamMagued wants to merge 1 commit into
Conversation
Linux user and group IDs are 32-bit unsigned integers. When parsing numeric IDs in the range [2147483648, 4294967295], strconv.ParseInt with bitSize 32 returned an ErrRange error. As a result, WithUser treated the numeric string as a username rather than a numeric ID, falling back to UID 0 (root) when unresolved. Switch parseUID to strconv.ParseUint(str, 10, 32), matching the parsing logic in executor/oci/user.go. Fixes moby#7292 Signed-off-by: AdamMagued <adamismailmageud@gmail.com>
|
I'm closing this PR because the activity from this account raises concerns about automated PR farming. As of October 27, GitHub shows 1,114 authored PRs, including 22 opened on October 24 and 25. October 25 alone accounts for 14 PRs across 11 repositories, including react/react#37992, nodejs/node#66995, and opentofu/opentofu#4764. The production change here is reasonable, but the new TestParseUID cases assign 2147483648 and math.MaxUint32 to an int field, which prevents the tests from compiling on 32-bit platforms. This also only addresses the numeric-ID portion of #7292; unresolved user and group names still retain default ownership, so the issue isn't fully fixed. The activity pattern and validation gap leave me uncomfortable accepting further contributions from this account. That is a moderation judgment, not proof of automation. If I've misread the situation, please contact us through the community Slack and explain how you're personally reviewing and validating these contributions. I'm open to correcting my judgment. |
Support uint32 numeric user and group IDs in parseUID.
Linux user and group IDs are 32-bit unsigned integers. When parsing numeric IDs in the range [2147483648, 4294967295], strconv.ParseInt with bitSize 32 returned an ErrRange error. As a result, WithUser treated the numeric string as a username rather than a numeric ID, falling back to UID 0 (root) when the name was not found in /etc/passwd.
Switch parseUID to strconv.ParseUint(str, 10, 32), aligning with executor/oci/user.go.
Fixes #7292