public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: delete all users at the end
@ 2026-09-11 13:19 Milos Malik
0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:19 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : 6f3d0475b223fc0f903803edcad04efe03fd7c5e
Author : Milos Malik <mmalik@redhat.com>
Date : 2022-01-26T20:09:36+01:00
Stats : +4/-1 in 1 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/6f3d0475b223fc0f903803edcad04efe03fd7c5e?branch=pr775-checkpolicy-revdeps
Log:
delete all users at the end
When the first user is deleted before the second user is created,
they will have the same UID and the systemd processes will be
confused. The confusion leads to incorrect SELinux labels on
subdirectories of /run/user/<UID>/.
By deleting all users at the end, we ensure that each of
them will have a different UID and their directories will be
labeled correctly.
---
diff --git a/selinux-policy/bz481628-send-msg-to-dbus/runtest.sh b/selinux-policy/bz481628-send-msg-to-dbus/runtest.sh
index 1ad9cb7..19e95d7 100755
--- a/selinux-policy/bz481628-send-msg-to-dbus/runtest.sh
+++ b/selinux-policy/bz481628-send-msg-to-dbus/runtest.sh
@@ -134,6 +134,7 @@ rlJournalStart
rlRun "setsebool ssh_sysadm_login on"
rlRun "setsebool selinuxuser_tcp_server on"
+ CREATED_USERS=""
# TODO: guest_u, xguest_u cannot successfully run systemctl
for SELINUX_USER in user_u staff_u sysadm_u unconfined_u ; do
USER_NAME="user${RANDOM}"
@@ -151,8 +152,10 @@ rlJournalStart
rlRun "grep \"${SELINUX_USER}:object_r:session_dbusd_tmp_t:.* services\" files.txt"
fi
rlRun "./ssh.exp ${USER_NAME} ${USER_SECRET} localhost /usr/bin/busctl --user --no-pager"
+ CREATED_USERS="${USER_NAME} ${CREATED_USERS}"
+ done
+ for USER_NAME in ${CREATED_USERS} ; do
rlRun "userdel -rfZ ${USER_NAME}"
- sleep 10
done
rlRun "setsebool selinuxuser_tcp_server off"
rlRun "setsebool ssh_sysadm_login off"
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 13:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 13:19 [tests/selinux] pr775-checkpolicy-revdeps: delete all users at the end Milos Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox