-
Notifications
You must be signed in to change notification settings - Fork 33
Add filetrans rule for ipc_var_run_t directory named ipc #850
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
Reviewer's GuideThis pull request extends the SELinux interface in qm.if by adding a filetrans rule that automatically relabels any directory named "ipc" to the ipc_var_run_t type. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
@dougsland @Yarboa PTAL |
Sure, testing |
@rhatdan @Yarboa from my side, I still get permission denied
|
@dougsland AVC's and did you run restorecon on the qm partition before testing? |
@rhatdan I did a fresh install (as I did with the other patch):
|
ls -lZa /run/ipc |
This looks like your test program is not running as ipc_t, it is running as qm_t? |
|
This means that the process that created the /run/ipc directory and the ipc_server.socket is running as qm_t, it should be running as ipc_t. |
DRAFT, to test changes containers#850 Signed-off-by: Yariv Rachmani <[email protected]>
DRAFT, to test changes containers#850 Signed-off-by: Yariv Rachmani <[email protected]>
DRAFT, to test changes containers#850 Signed-off-by: Yariv Rachmani <[email protected]>
DRAFT, to test changes containers#850 Signed-off-by: Yariv Rachmani <[email protected]>
Signed-off-by: Daniel J Walsh <[email protected]>
Thanks @rhatdan, I couldn't set ipc_t or ipc_var_run_t in the SecurityLabelType, otherwise the ipc_server app don't start. Quadlet:
Now instead of qm_t, I have qm_container_file_t:
In the socket file:
SELinux AVC:
cc @Yarboa |
Do not relabel /run/ipc from the quadlet, this should be labeled by ipc_t not changed for each container that uses it. ipc_t should not be running in a container, or if it is, it should be set to level=s0. |
than I get back the default qm_file_t:
|
@rhatdan sorry, I am blocked here, also see this sample
I do not see where and why ipc_t is labeled If /run/ipc is labeled qm_file_t, the socket will be qm_file_t too, isnt it? so the only option is playing with those ? inside the ipc_server?
this command is passing but labeling is qm_t |
Were these changes finally tested successfully? It would be nice to document the procedure or have a demonstration. |
This PR will assist in HOST-QM IPC, for IPC within QM new ticket opened #852 |
@Yarboa @dougsland are we all set now? |
|
Summary by Sourcery
Enhancements:
ipc_var_run_t
security context.