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
8a7c0d3 to
a9f59ab
Compare
jserv
reviewed
Jun 23, 2026
a9f59ab to
14d00bf
Compare
14d00bf to
d8fb6c2
Compare
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.
d8fb6c2 to
da2339d
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Contributor
|
I am not sure whether I defer to @Max042004 for confirmation. |
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()with strict uint32 parsing; ignore invalid/empty/out‑of‑range; fall back toGUEST_UID/GUEST_GIDwhen unset.AT_UID/AT_EUID/AT_GID/AT_EGIDand/proc/self/{status,task/*/status}now useproc_get_*so real/effective/saved‑set and fs IDs reflect overrides.test-identity-override-host; built and run bymake check.Written for commit da2339d. Summary will update on new commits.