-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add initial policy type for wayland #381
Conversation
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
@dougsland @alexlarsson PTAL |
lgtm |
CI/CD timeout, re-triggering the jobs. |
I'll let @martinezjavier comment here, I haven't had time to look at the issues. |
Note this will not fix the problem, it only sets up a type which we can gather AVCs off of and then update the policy for the access required to leak wayland through the QM. SecurityLabelFileType=qm_container_wayland_t And then run the tests in permissive mode. Gather up the AVC's and then I will help you add allow rules to the qm.if file to support wayland. |
I believe this is a typo and you meant And
|
Sorry it should be
We need to set the process label. |
Looks everything is correct now. @martinezjavier ack as well? Fixes #391 |
cc @sandrobonazzola I believe this is interesting for Sandro's team if I am not wrong. |
maybe interesting to you as well @aesteve-rh |
yes, interesting. @telemaco would be interested as well |
As @rhatdan mentioned, this PR is only the starting point to allow labeling a container with a wayland workload. I'm getting the list of rules that are needed and will share here once I managed to get the |
I've pushed https://github.com/martinezjavier/qm/tree/wayland-rules that contains the rules I added on top of @rhatdan's patch. There are a lot of rules so I don't know if I'm doing something wrong but with that the only missing AVC that is reported is the following:
AFAIU this is due the simple-shell container running as an unconfined user (digital-cockpit). So I tried to map the user to a different role as explained in https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/using_selinux/managing-confined-and-unconfined-users_using-selinux but that didn't help and I sill see the mentioned AVC denial.
|
allow qm_t unconfined_t:process transition; |
Only AVC messages about qm_*_t should be added, but please pass them by me. |
Going to merge the initial patch from @rhatdan as we all acked. Let's merge the next improvement in second patch so we can have the initial support in tree already. Thanks! |
Yes, you mentioned that already and the reason why I attempted to solve that by changing the digital-cockpit user to not be an unconfined user instead of adding an allow rule for that AVC. |
Don't worry that we will always pass by you before attempting to add any rule. The qm_wayland_t rules that I identified are the following:
But as said, that is not enough due the fact that the DBus user session is started in the QM container right now. We are exploring with @telemaco if either that setup can happen in the wayland container as well or if the wayland compositor could be run as root. Either of those options would avoid the need to add additional qm_t rules. |
No description provided.