2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-20 09:22:17 +00:00

fix(xcat-core): the policy package does not repair a stale label

%posttrans relabelled /install only. A path under /opt/xcat whose context
was wrong before the package arrived kept it, because rpm does not relabel a
directory that already exists and nothing else ran restorecon there.

%posttrans now relabels /opt/xcat too, so installing or updating the policy
brings the product tree to the contexts the module declares.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
Daniel Hilst
2026-10-15 15:15:39 -03:00
parent 4b891e59d3
commit 4e35eebfbd
+5
View File
@@ -65,3 +65,8 @@ fi
if selinuxenabled && [ -d /install ]; then
restorecon -R /install || :
fi
# An upgrade does not relabel a directory that already exists, so a path whose
# label predates its packaging keeps it. Relabel the product tree as well.
if selinuxenabled && [ -d /opt/xcat ]; then
restorecon -R /opt/xcat || :
fi