Skip to content

executor: make sure supplementary groups are set for unset user#2428

Merged
tonistiigi merged 3 commits intomoby:masterfrom
tonistiigi:default-user-groups
Dec 15, 2021
Merged

executor: make sure supplementary groups are set for unset user#2428
tonistiigi merged 3 commits intomoby:masterfrom
tonistiigi:default-user-groups

Conversation

@tonistiigi
Copy link
Copy Markdown
Member

fixes #2341

Ensure that unset user has same supplementary groups as root.

Signed-off-by: Tonis Tiigi [email protected]

@sipsma
Copy link
Copy Markdown
Collaborator

sipsma commented Dec 14, 2021

Code LGTM in terms of fixing the linked issue, my only question is if there's any backwards compatibility concerns. It seems like users running buildkit with an unset user will now have potentially more supplemental groups than before. It's probably very rare that anyone would actually care, but is this the type of thing we want to add a capability for so users can check the behavior?

@tonistiigi
Copy link
Copy Markdown
Member Author

It is pretty clearly in the bug territory though as this is what happens if you do set root user and this is also what old docker build did. Additionally, even if a cap would be checked there isn't really any alternative path to take for the old behavior.

Copy link
Copy Markdown
Collaborator

@sipsma sipsma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good about the cap question, just wanted to double check

@tonistiigi tonistiigi merged commit 539be17 into moby:master Dec 15, 2021
@rubensayshi
Copy link
Copy Markdown

<3 thanks for fixing this @tonistiigi , I'm sorry it was out of my league to fix this myself

@crazy-max crazy-max added this to the v0.10.0 milestone Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

additional groups for root do not show up unless user is defined

4 participants