-
Notifications
You must be signed in to change notification settings - Fork 212
Description
Describe the bug
rpm-ostree is supposed to post-process /usr/etc/selinux/{name}/contexts/files/file_contexts.subs_dist (https://github.com/coreos/rpm-ostree/blob/main/rust/src/composepost.rs#L397) and crucially, comment out the mapping from /var/home to /home.
This seems to correlate with any time our builds install a version of selinux-policy-devel that mismatches the existing selinux-policy, since it forces the installation of a new selinux-policy version, and this seems to correlate with the mapping above not being commented out. Example: https://github.com/secureblue/secureblue/actions/runs/19967820701/job/57264259119
This is critical because it means that a simple restorecon can change the entire homedir contents for a user to default_t, breaking it.
Reproduction steps
- Run a build of an bootc image based on a Fedora Atomic bootc image
- Install a version of selinux-policy-devel higher than the existing version (forcing selinux-policy to be upgraded)
- Observe that
/usr/etc/selinux/{name}/contexts/files/file_contexts.subs_distdoes not have the/var/hometo/homemapping commented out.
Expected behavior
- Run a build of an bootc image based on a Fedora Atomic bootc image
- Install a version of selinux-policy-devel higher than the existing version (forcing selinux-policy to be upgraded)
- The
/var/hometo/homemapping should be commented out in the resulting image
Actual behavior
- Run a build of an bootc image based on a Fedora Atomic bootc image
- Install a version of selinux-policy-devel higher than the existing version (forcing selinux-policy to be upgraded)
- Observe that
/usr/etc/selinux/{name}/contexts/files/file_contexts.subs_distdoes not have the/var/hometo/homemapping commented out.
System details
https://github.com/secureblue/secureblue/actions/runs/19967820701/job/57264259119
https://github.com/secureblue/secureblue/blob/live/recipes/securecore/recipe-securecore-main.yml#L17
Additional information
No response