-
Notifications
You must be signed in to change notification settings - Fork 814
Support label_users in buildah #6161
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
Conversation
Fixes: containers#6160 label_users tells buildah and podman to maintain the user and role from the SELinux label, the default is to change the user and role to system_u:system_r. With this change we end up with an unconfined_u user running the container as unconfined_u:unconfined_r. I don't believe our CI/CD system can test this, because it runs with system_u:system_r by default. Signed-off-by: Daniel J Walsh <[email protected]>
Code was taken from podman, might want to eventually move to common. |
Ephemeral COPR build failed. @containers/packit-build please check. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, missing release notes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc, giuseppe, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
cd2bb61
into
containers:main
} | ||
con, err := selinux.NewContext(label) | ||
if err != nil { | ||
return nil, err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This really should have been wrapped with more context somewhere in the call stack - the only error this can return just says "invalid label".
Fixes: #6160
label_users tells buildah and podman to maintain the user and role from the SELinux label, the default is to change the user and role to system_u:system_r.
With this change we end up with an unconfined_u user running the container as unconfined_u:unconfined_r.
I don't believe our CI/CD system can test this, because it runs with system_u:system_r by default.
What type of PR is this?
What this PR does / why we need it:
How to verify it
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?