Conversation
Reads the container user's groups via 'id -nG' inside the running container's mount namespace and runs 'usermod -aG' for any missing required group. Returns the list of added groups for the caller to log. Idempotent — repeated calls are no-ops once groups are present. Used by 'intuneme start' to self-heal containers provisioned before plugdev was in baseGroups. Refs #146 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Calls provision.EnsureUserGroups after the sudoers reinstall and before YubiKey forwarding. Existing containers that pre-date the plugdev addition self-heal on the next start, with no manual user action needed. Failures are warned-and-continued, matching the sudoers and Nvidia self-heal patterns in this file. Also clarifies EnsureUserGroups' partial-success contract in its docstring: on error, callers should still log any groups that were added before the failure — the wiring here does so by ranging over added unconditionally before checking err. Refs #146 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Per CLAUDE.md's yeti/ guidance: future agents reading this codebase need to know why 50-pcscd.rules omits subject.active (forward-defense against a 'tighten this' PR) and that the start flow now includes a group-membership reconciliation step. Refs #146 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Applies plugdev group to the user inside the container, and fixes an issue with the polkit we previously installed that would cause it to never be considered.
Fixes #146