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

attach: always drop supplementary groups #2266

Merged
merged 2 commits into from
Apr 10, 2018

Conversation

brauner
Copy link
Member

@brauner brauner commented Apr 9, 2018

Closes #1704.

Signed-off-by: Christian Brauner [email protected]

Christian Brauner added 2 commits April 9, 2018 18:01
@stgraber stgraber merged commit 3d43596 into lxc:master Apr 10, 2018
@@ -870,12 +870,12 @@ static int attach_child_main(struct attach_clone_payload *payload)
ret = lxc_switch_uid_gid(new_uid, new_gid);
if (ret < 0)
goto on_error;

ret = lxc_setgroups(0, NULL);
Copy link
Member

Choose a reason for hiding this comment

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

Isn't that going to break users who are stuck in a deny_setgroups environment?

@brauner
Copy link
Member Author

brauner commented Apr 11, 2018

Hm, we can special case this:

		ret = lxc_setgroups(0, NULL);
		if (ret < 0 && (am_root || errno != EPERM))
			/* error out */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants