Support dynamic guest identity (UID/GID) configuration via environment variables#109
Open
doanbaotrung wants to merge 1 commit into
Open
Support dynamic guest identity (UID/GID) configuration via environment variables#109doanbaotrung wants to merge 1 commit into
doanbaotrung wants to merge 1 commit into
Conversation
af6f40e to
8a7c0d3
Compare
There was a problem hiding this comment.
3 issues found and verified against the latest diff
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
environment variables Allow users to dynamically configure the simulated guest UID and GID at runtime via environment variables, for example: ELFUSE_GUEST_UID and ELFUSE_GUEST_GID. If these variables are present in the host process environment, elfuse should parse them and override the default guest UID/GID.
8a7c0d3 to
a9f59ab
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.
Allow users to dynamically configure the simulated guest
UID and GID at runtime via environment variables, for
example: ELFUSE_GUEST_UID and ELFUSE_GUEST_GID.
If these variables are present in the host process
environment, elfuse should parse them and override
the default guest UID/GID.
Fixes #103
Summary by cubic
Add runtime overrides for the simulated guest UID/GID via
ELFUSE_GUEST_UIDandELFUSE_GUEST_GID. The values propagate to auxv and procfs so programs see the correct identity.proc_identity_init(); ignore invalid/out-of-range inputs; fall back toGUEST_UID/GUEST_GIDwhen unset.AT_UID/AT_EUID/AT_GID/AT_EGIDand/proc/self/{status,task/*/status}now useproc_get_*(real/effective/saved-set plus the fourth field) so all four IDs reflect overrides.test-identity-override-host; built and executed as part ofmake check.Written for commit a9f59ab. Summary will update on new commits.