-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
libpod: Apply SELinux KVM label if process contains "kata" in its name #9584
libpod: Apply SELinux KVM label if process contains "kata" in its name #9584
Conversation
We currently only apply the label when the user calls `podman --runtime kata ...`, which may not happen in several different cases, including testing binaries which are not part of the PATH. In order to avoid forcing the user to pass `--security-opt label=type:...`, let's follow a similar logic than the one implemented on the CRI-O side and apply the KVM label to the processes in case the runtime binary contains "kata" as part of its name. Fixes: containers#9582 Signed-off-by: Fabiano Fidêncio <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fidencio The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
At a minimum, shouldn't this do a bit more checking than a partial string match? |
I'm open to suggestions, @brianredbeard. By the way, here you can find what's done on CRI-O side: |
This seems unnecessary? We added the |
Okay, no biggie. @rhatdan, we discussed this over the IRC, but seems we better not address this case. At least now it's documented (as in, issue and discussions) that this is not something that was missed and it's the intended behaviour. |
Should we go the other way though. Basically look at kata paths, and if we get a match then we do the SELinux labels.
|
We currently only apply the label when the user calls
podman --runtime kata ...
, which may not happen in several different cases, includingtesting binaries which are not part of the PATH.
In order to avoid forcing the user to pass
--security-opt label=type:...
, let's follow a similar logic than the one implementedon the CRI-O side and apply the KVM label to the processes in case the
runtime binary contains "kata" as part of its name.
Fixes: #9582
Signed-off-by: Fabiano Fidêncio [email protected]