2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-22 02:12:16 +00:00

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>
This commit is contained in:
Daniel Hilst
2026-10-15 15:33:40 -03:00
parent dccc5ad202
commit ef70cc4e79
+4 -1
View File
@@ -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)