2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-27 04:42:17 +00:00

Merge pull request #8022 from VersatusHPC/fix/selinux-cn-diskful-case-out-of-scope

fix(xcat-test): the SELinux suite requires an enforcing compute node
This commit is contained in:
Daniel Hilst
2026-11-09 18:08:43 -03:00
committed by GitHub
2 changed files with 0 additions and 47 deletions
-1
View File
@@ -2,7 +2,6 @@ selinux_xcatd_domain
selinux_client_domain
selinux_mn_labels
selinux_restapi_avc
selinux_cn_diskful_enforcing
selinux_cn_diskless_disabled_by_design
selinux_cn_diskless_site_disabled
selinux_sn_enforcing
@@ -1,49 +1,3 @@
start:selinux_cn_diskful_enforcing
description:on an enforcing management node, a diskful compute node with noderes.selinux=enforcing boots enforcing, with correct labels and no denial. The labels of /xcatpost are reported and not asserted: the kickstart relabel runs in %post, the xCAT post scripts write that tree at the first boot, and the node carries no xCAT-selinux
label:selinux,provision
os:Linux
cmd:getenforce
check:rc==0
check:output=~^Enforcing$
cmd:sh -c '/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/selinux_avc_check.sh --init /tmp/selinux_cn_diskful.avcck'
check:rc==0
check:output=~BASELINE=[1-9]
cmd:chdef -t node -o $$CN selinux=enforcing
check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
check:rc==0
check:output=~Provision node\(s\)\: $$CN
cmd:xdsh $$CN getenforce
check:rc==0
check:output=~Enforcing
cmd:xdsh $$CN cat /proc/cmdline
check:rc==0
check:output!~selinux=0
cmd:xdsh $$CN "ls -dZ /root/.ssh /etc/ssh/sshd_config /opt/xcat /xcatpost"
check:rc==0
check:output=~ssh_home_t
check:output!~default_t
check:output!~unlabeled_t
cmd:xdsh $$CN "restorecon -Rnv /opt/xcat /root /etc/ssh /var/log/xcat"
check:rc==0
check:output!~Would relabel
cmd:xdsh $$CN "restorecon -Rnv /xcatpost; true"
check:rc==0
cmd:xdcp $$CN /opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/selinux_avc_check.sh /tmp/
check:rc==0
cmd:xdsh $$CN "sh /tmp/selinux_avc_check.sh boot"
check:rc==0
check:output=~XCAT_AVC=0
cmd:xdsh $$CN "rm -f /tmp/selinux_avc_check.sh"
check:rc==0
cmd:sh -c '/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/selinux_avc_check.sh --since /tmp/selinux_cn_diskful.avcck'
check:rc==0
check:output=~XCAT_AVC=0
cmd:chdef -t node -o $$CN selinux=
check:rc==0
cmd:rm -f /tmp/selinux_cn_diskful.avcck
end
start:selinux_cn_diskless_disabled_by_design
description:a stateless compute node asked for SELinux enforcing still boots with selinux=0, because a stateless root cannot be labelled, and nodeset says so
label:selinux,provision