2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-12-03 07:37:05 +00:00

fix(xcat-test): updatenode_syncfile_MERGE locks every login out of an enforcing node

The case saves /etc/passwd, /etc/group and /etc/shadow on the compute
node to /tmp, and puts them back with mv -f. mv keeps the tmp_t label
of the copy in /tmp. On a node that runs SELinux enforcing, sshd then
cannot read /etc/shadow, so every later xdsh to the node fails. On the
el9 and el10 CI cells about sixty later cases failed for this reason.

Put the files back with cp -f, which keeps the label of the file in
/etc.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
This commit is contained in:
Daniel Hilst
2026-11-09 12:22:05 -03:00
parent 460fbcd030
commit 20903fce1c
@@ -287,11 +287,11 @@ cmd:xdsh $$CN "cat /etc/group |grep -i bogusgroup1|grep 19998"
check:output=~1
cmd:xdsh $$CN "cat /etc/group |grep -i bogusgroup|grep 29999"
check:rc==0
cmd:xdsh $$CN "mv -f /tmp/updatenode_syncfile_MERGE/passwd /etc/passwd"
cmd:xdsh $$CN "cp -f /tmp/updatenode_syncfile_MERGE/passwd /etc/passwd"
check:rc==0
cmd:xdsh $$CN "mv -f /tmp/updatenode_syncfile_MERGE/group /etc/group"
cmd:xdsh $$CN "cp -f /tmp/updatenode_syncfile_MERGE/group /etc/group"
check:rc==0
cmd:xdsh $$CN "mv -f /tmp/updatenode_syncfile_MERGE/shadow /etc/shadow"
cmd:xdsh $$CN "cp -f /tmp/updatenode_syncfile_MERGE/shadow /etc/shadow"
check:rc==0
cmd:xdsh $$CN "rm -rf /tmp/updatenode_syncfile_MERGE"
check:rc==0