Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user: Always return supplementary groups #1912

Closed
wants to merge 1 commit into from

Conversation

mrunalp
Copy link
Contributor

@mrunalp mrunalp commented Oct 17, 2018

The caller can ignore it if they don't care about using them.

cc: @cyphar @runcom

Signed-off-by: Mrunal Patel [email protected]

@mrunalp
Copy link
Contributor Author

mrunalp commented Oct 17, 2018

This allows one to get all the data in just one call rather than having to call into the function and parse the files twice.

@mrunalp mrunalp force-pushed the user_return_groups branch from 46b41a3 to d200a6e Compare October 17, 2018 20:01
@tianon
Copy link
Member

tianon commented Oct 17, 2018

The caller can ignore it if they don't care about using them.

How would the caller detect the case that the current code handles? By the time it gets back to the caller, isn't that information lost?

The current implementation is such that 1000:1000 doesn't give me any supplementary groups, but 1000, tianon, etc do (which IMO is a pretty explicit difference -- in one, I'm asking for a specific group, in the other I'm assuming there's some default group and thus supplementary groups are desirable).

@mrunalp
Copy link
Contributor Author

mrunalp commented Oct 17, 2018

@tianon We can make this a parameter to the function if required to distinguish between the two cases. wdyt?

@mrunalp mrunalp force-pushed the user_return_groups branch from d200a6e to 3c73e14 Compare October 17, 2018 20:25
@runcom
Copy link
Member

runcom commented Nov 2, 2018

@cyphar could you have a look at this please?

@cyphar
Copy link
Member

cyphar commented Nov 2, 2018

Last time we touched this code (#1450) quite a few issues were caused. What is the primary justification for changing this? Semantically if someone asks to run as 1000:1000 I would find it very strange that they have more supplementary groups -- especially since there are already other library functions to get this information (as well as a separate flag in runc now).

@kolyshkin
Copy link
Contributor

This was moved to github.com/moby/sys/user.

@kolyshkin kolyshkin closed this Jun 15, 2024
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.

5 participants