Create privileged executable for refreshing groups#2532
Open
Databean wants to merge 1 commit intogoogle:mainfrom
Open
Create privileged executable for refreshing groups#2532Databean wants to merge 1 commit intogoogle:mainfrom
Databean wants to merge 1 commit intogoogle:mainfrom
Conversation
b24ff4f to
37aebb8
Compare
37aebb8 to
b2f98cc
Compare
`acloud` relies on [`sg`](https://man7.org/linux/man-pages/man1/sg.1.html) to [refresh group membership](https://cs.android.com/android/platform/superproject/+/android-latest-release:tools/acloud/internal/lib/utils.py;l=1322;drc=02cef780efe034b789d0e3708d4929d2f236327b) if the user has joined the `cvdnetwork` / `kvm` / `render` groups but has not yet restarted or re-logged in. Debian 13 changed providers of `sg` / `newgrp` from `shadow` to `util-linux`. In the `util-linux` implementation, `sg` only updates the primary group but does not update secondary groups. - https://www.github.com/util-linux/util-linux/issues/4098 - https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1130245 Since `sg` no longer works to refresh the apparent secondary group memberships, we'll need an alternative implementation. Mechanism for raising privilege copied from https://www.github.com/google/android-cuttlefish/pull/1706 Sample invocation: ``` cvd_refresh_groups /usr/bin/groups groups ``` Bug: b/510899675
b2f98cc to
0ed406b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
acloudrelies onsgto refresh group membership if the user has joined thecvdnetwork/kvm/rendergroups but has not yet restarted or re-logged in.Debian 13 changed providers of
sg/newgrpfromshadowtoutil-linux. In theutil-linuximplementation,sgonly updates the primary group but does not update secondary groups.Since
sgno longer works to refresh the apparent secondary group memberships, we'll need an alternative implementation.Mechanism for raising privilege copied from https://www.github.com/google/android-cuttlefish/pull/1706
Sample invocation:
Bug: b/510899675