public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Milos Malik <mmalik@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/selinux] pr775-checkpolicy-revdeps: test if systemd-run works inside systemd-run service
Date: Fri, 11 Sep 2026 13:22:09 GMT [thread overview]
Message-ID: <178913292908.1.4651712252682559868.tests-selinux-386ee4ea46cf@fedoraproject.org> (raw)
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
reply other threads:[~2026-09-11 13:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178913292908.1.4651712252682559868.tests-selinux-386ee4ea46cf@fedoraproject.org \
--to=mmalik@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox