Skip to content

Add additional GIDs by default if they exist in /etc/group#2650

Merged
crosbymichael merged 2 commits intocontainerd:masterfrom
estesp:supplemental-gids-by-default
Sep 17, 2018
Merged

Add additional GIDs by default if they exist in /etc/group#2650
crosbymichael merged 2 commits intocontainerd:masterfrom
estesp:supplemental-gids-by-default

Conversation

@estesp
Copy link
Copy Markdown
Member

@estesp estesp commented Sep 14, 2018

If we are using an image config, we should by default add any additional
GIDs that are found from reading /etc/group, even if the default user is
root.

Signed-off-by: Phil Estes estesp@linux.vnet.ibm.com

The more I thought about this I'm not sure there is any downside to just handling additional GIDs by default when an image is involved. Other opinions? API users can still override; the CRI model will still work by collecting it's own GIDs and merging with any found in /etc/group

If we are using an image config, we should by default add any additional
GIDs that are found from reading /etc/group, even if the default user is
root.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
@estesp estesp force-pushed the supplemental-gids-by-default branch from 9e19ffc to 13931e4 Compare September 14, 2018 17:29
@Random-Liu
Copy link
Copy Markdown
Member

@estesp We don't use the WithImageConfigArgs helper. So whatever we do to it, shouldn't affect cri plugin.

These tests would have failed if any image had a USER declaration in it,
but because the test image never has, these were never caught. Adding
supplemental GIDs on any image revealed the issue.

Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
@crosbymichael
Copy link
Copy Markdown
Member

LGTM

@dmcgowan dmcgowan added this to the 1.2 milestone Sep 17, 2018
@dmcgowan
Copy link
Copy Markdown
Member

LGTM

@crosbymichael crosbymichael merged commit 59087b7 into containerd:master Sep 17, 2018
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.

4 participants