manifest: label {,u}mount as install_exec_t
to avoid selinux denials
#1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I explored the ideas around how to make
osbuild-deploy-container
selinux denial free a bit Friday/Monday and here is one way of doing it that avoids us having to implement a native ctypes based mount/unmount. Please double check my reasoning below @ondrejbudai and @achilleas-kWhen running osbuild inside a container created via the new
osbuild-deploy-container
the selinux setup is interesting (and different from a normal host).Because the
/
inside the contains is mountednosuid
the main osbuild binary is labeled withinstall_exec_t
because withnosuid
the transition fromosbuild_t
toinstall_t
is not allowed. This works around the limitations of the container.However when in
install_t
the transition tomount_t
is not allowed which leads to an selinux denial in the logs. Theinstall_t
has all the privs needed so even with this transition failing mount still works.This commit labels
{,u}mount
withinstall_exec_t
in the buildroot now as well to avoid this error in the logs.Open questions:
install_t
->mount_t
not fatal?Missing: