From ef70cc4e790d75180a3d3de1efe39d811f576a33 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Thu, 15 Oct 2026 15:33:40 -0300 Subject: [PATCH] fix(xcat-core): the setfiles transition costs denials and buys nothing seutil_domtrans_setfiles(xcat_image_t) put restorecon in the stock setfiles_t domain during an image build. That domain is enforcing, and it cannot append to the pipe it inherits from its caller: every enforcing run carried 20 denials in setfiles_t, 13 of them `etc_t:file map`, 4 `xcat_t:fifo_file append` and 3 `public_content_t:chr_file write`. The runs passed, because restorecon only loses its output, and the denials were invisible to a count filtered on the xCAT domains. The transition also removed no authority: xcat_image_t already relabels every type, so the relabel is the same work in a different domain. The line is gone and the comment records why. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- xCAT-selinux/xcat.te | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xCAT-selinux/xcat.te b/xCAT-selinux/xcat.te index 235738f79f..d83fdc8dc6 100644 --- a/xCAT-selinux/xcat.te +++ b/xCAT-selinux/xcat.te @@ -300,7 +300,10 @@ corecmd_relabel_all_executables(xcat_image_t) auth_manage_shadow(xcat_image_t) auth_relabel_shadow(xcat_image_t) seutil_manage_file_contexts(xcat_image_t) -seutil_domtrans_setfiles(xcat_image_t) +# No transition to setfiles_t. The image domain already relabels every type, so +# the transition removes no authority, and it put restorecon in an enforcing +# stock domain that cannot append to the pipe it inherits: 20 enforced denials +# per run, 4 of them setfiles_t xcat_t:fifo_file append. # dnf in the chroot, and the rpm scriptlets it runs. corecmd_exec_bin(xcat_image_t)