2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-15 21:38:10 +00:00

docs(selinux): the page says a path left out of the relabel is unlabeled

A file context of <<none>> stops restorecon changing the label. It does
not clear it. A tree that genimage creates under an image root that is
already public_content_t inherits that type, measured on an enforcing
el10 host: mkdir -p rootimg/common/sub under a public_content_t parent
gives every new component public_content_t, and the same tree under a
default_t parent gives default_t.

Say what the label is, and name the case that costs something: a tree
older than the package keeps default_t, and restorecon -RF over the
image root sets it.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
Daniel Hilst
2026-10-21 19:53:51 -03:00
parent cb4e7bc09b
commit 45ebeacab8
+9 -3
View File
@@ -78,9 +78,15 @@ labels there, so an osimage whose ``rootimgdir`` has a directory called
and ``httpd`` cannot serve them. Give such an osimage a ``rootimgdir`` with no
``rootimg`` component, or run ``restorecon`` over the image root after the
package is installed. A published ``common`` or ``overlay`` directory of an
image root called ``rootimg`` is unlabeled for the same reason: its path is
also the path of a ``common`` or ``overlay`` directory at the root of a guest
tree.
image root called ``rootimg`` is left out for the same reason: its path is also
the path of a ``common`` or ``overlay`` directory at the root of a guest tree.
A path the file contexts leave out keeps the label it has. ``restorecon`` does
not change it and does not clear it. A tree that ``genimage`` creates under an
image root that is already ``public_content_t`` inherits that type, so the two
directories above cost nothing in that case. A tree that is older than the
package keeps ``default_t``, and ``restorecon -RF`` over the image root sets
it.
The unit holds ``/opt/xcat`` as the default prefix, and ``%post`` writes
``/etc/xcat/xcatroot.env`` with the prefix of the installation, which the unit