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

container, exec: honor process user's uid while setting HOME env #925

Merged
merged 1 commit into from
May 23, 2022

Conversation

flouthoc
Copy link
Collaborator

If spec contains process: { user: uid, ... always honor spec while
performing exec and configuring HOME env variable.

So set_home_env must use process->user->uid instead of container_uid.
PR also adds a test to verify if we don't regress this in future.

Closes: #924

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

LGTM

If spec contains `process: { user: uid, ...` always honor spec while
performing `exec` and configuring `HOME` env variable.

So `set_home_env` must use `process->user->uid` instead of `container_uid`.
PR also adds a test to verify if we don't regress this in future.

Closes: containers#924

Signed-off-by: Aditya R <[email protected]>
@flouthoc flouthoc force-pushed the fix-exec-home-env branch from fca939f to ec9ab49 Compare May 23, 2022 05:20
@flouthoc
Copy link
Collaborator Author

Just re-pushing to fix a type in commit message.

@giuseppe giuseppe merged commit 4366828 into containers:main May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Different envvars compared to runc when used in K8S
2 participants