public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: test if systemd-run works inside systemd-run service
@ 2026-09-11 13:22 Milos Malik
0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:22 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : 386ee4ea46cf560f6714c539deccfdb9edf5a43c
Author : Milos Malik <mmalik@redhat.com>
Date : 2024-10-23T08:06:48+00:00
Stats : +11/-0 in 3 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/386ee4ea46cf560f6714c539deccfdb9edf5a43c?branch=pr775-checkpolicy-revdeps
Log:
test if systemd-run works inside systemd-run service
Recently, debugging of unrelated systemd issue revealed that SELinux
prevents a successful execution of systemd-run inside systemd-run
session. The TC reproduces the situation.
In order to support the above-mentioned scenario, I believe that
SELinux policy should allow the dbus-broker to read/write from/to
UNIX stream socket owned by the systemd session. The TC looks for
appropriate policy rules.
The TC covers RHEL-61928 and RHEL-62185.
---
diff --git a/selinux-policy/systemd-run-and-similar/Makefile b/selinux-policy/systemd-run-and-similar/Makefile
index 9211248..9fe1e29 100644
--- a/selinux-policy/systemd-run-and-similar/Makefile
+++ b/selinux-policy/systemd-run-and-similar/Makefile
@@ -64,6 +64,8 @@ $(METADATA): Makefile
@echo "Bug: 1647162" >> $(METADATA) # Fedora 29
@echo "Bug: 1980241" >> $(METADATA) # Fedora 34
@echo "Bug: 2118784" >> $(METADATA) # RHEL-8
+ @echo "Bug: RHEL-61928" >> $(METADATA) # RHEL-9
+ @echo "Bug: RHEL-62185" >> $(METADATA) # RHEL-10
rhts-lint $(METADATA)
diff --git a/selinux-policy/systemd-run-and-similar/main.fmf b/selinux-policy/systemd-run-and-similar/main.fmf
index 0a1334c..6488281 100644
--- a/selinux-policy/systemd-run-and-similar/main.fmf
+++ b/selinux-policy/systemd-run-and-similar/main.fmf
@@ -37,6 +37,8 @@ link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1647162
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1980241
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2118784
+ - verifies: https://issues.redhat.com/browse/RHEL-61928
+ - verifies: https://issues.redhat.com/browse/RHEL-62185
adjust:
- enabled: false
when: distro == rhel-4, rhel-5, rhel-6, rhel-7
diff --git a/selinux-policy/systemd-run-and-similar/runtest.sh b/selinux-policy/systemd-run-and-similar/runtest.sh
index 8aa5fb1..32f5831 100755
--- a/selinux-policy/systemd-run-and-similar/runtest.sh
+++ b/selinux-policy/systemd-run-and-similar/runtest.sh
@@ -74,6 +74,13 @@ rlJournalStart
rlRun "ls -alZ /var/lib/myservice0 /var/lib/private/myservice0"
rlPhaseEnd
+ rlPhaseStartTest "RHEL-61928 + RHEL-62185"
+ rlSESearchRule "allow system_dbusd_t unconfined_service_t : unix_stream_socket { read write } [ ]"
+ rlRun -s "systemd-run --wait -- systemd-run --user --machine=adm@ --wait true"
+ rlRun "grep -i success $rlRun_LOG"
+ rm -f $rlRun_LOG
+ rlPhaseEnd
+
rlPhaseStartCleanup
sleep 2
rlSECheckAVC
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 13:22 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:22 [tests/selinux] pr775-checkpolicy-revdeps: test if systemd-run works inside systemd-run service Milos Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox