public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] main: test if dhcpcd hooks can run systemctl
@ 2026-09-29 14:11 Milos Malik
0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-29 14:11 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : tests/selinux
Branch : main
Commit : 2ff24931dfdb5438a1bd81d7db643bd5d6ba95af
Author : Milos Malik <mmalik@redhat.com>
Date : 2026-09-29T14:10:15+00:00
Stats : +8/-0 in 3 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/2ff24931dfdb5438a1bd81d7db643bd5d6ba95af?branch=main
Log:
test if dhcpcd hooks can run systemctl
Recent dhcpcd + selinux-policy testing on s390x machines revealed
SELinux denials which indicate that one of the dhcpcd hooks ran
the "systemctl status" command. The TC reproduces the situation
when executed on a s390x machine with RHEL 9 or 10 installed.
In order to support this scenario, I believe that SELinux policy
should allow the status permission (and maybe other permissions
too). The TC looks for appropriate policy rules and file context
patterns.
The TC covers RHEL-255621 and RHEL-255624.
---
diff --git a/selinux-policy/dhcpcd-and-similar/Makefile b/selinux-policy/dhcpcd-and-similar/Makefile
index 5ed2841..1f43953 100644
--- a/selinux-policy/dhcpcd-and-similar/Makefile
+++ b/selinux-policy/dhcpcd-and-similar/Makefile
@@ -73,6 +73,8 @@ $(METADATA): Makefile
@echo "Bug: RHEL-113941" >> $(METADATA) # RHEL-9
@echo "Bug: RHEL-147153" >> $(METADATA) # RHEL-10
@echo "Bug: RHEL-147155" >> $(METADATA) # RHEL-9
+ @echo "Bug: RHEL-255621" >> $(METADATA) # RHEL-9
+ @echo "Bug: RHEL-255624" >> $(METADATA) # RHEL-10
rhts-lint $(METADATA)
diff --git a/selinux-policy/dhcpcd-and-similar/main.fmf b/selinux-policy/dhcpcd-and-similar/main.fmf
index 1f828c1..3be18b0 100644
--- a/selinux-policy/dhcpcd-and-similar/main.fmf
+++ b/selinux-policy/dhcpcd-and-similar/main.fmf
@@ -45,6 +45,8 @@ link:
- verifies: https://issues.redhat.com/browse/RHEL-113941
- verifies: https://issues.redhat.com/browse/RHEL-147153
- verifies: https://issues.redhat.com/browse/RHEL-147155
+ - verifies: https://redhat.atlassian.net/browse/RHEL-255621
+ - verifies: https://redhat.atlassian.net/browse/RHEL-255624
adjust+:
- enabled: false
when: distro == rhel-4, rhel-5, rhel-6, rhel-7, rhel-alt-7
diff --git a/selinux-policy/dhcpcd-and-similar/runtest.sh b/selinux-policy/dhcpcd-and-similar/runtest.sh
index 37583a1..8298516 100755
--- a/selinux-policy/dhcpcd-and-similar/runtest.sh
+++ b/selinux-policy/dhcpcd-and-similar/runtest.sh
@@ -124,6 +124,10 @@ rlJournalStart
rlSESearchRule "allow dhcpc_hook_t dhcpc_hook_t : unix_dgram_socket { create ioctl } [ ]"
rlSESearchRule "allow dhcpc_hook_t init_t : unix_stream_socket { getattr } [ ]"
rlPhaseEnd
+
+ rlPhaseStartTest "RHEL-255621 + RHEL-255624"
+ rlSESearchRule "allow dhcpc_hook_t init_t : system { status } [ ]"
+ rlPhaseEnd
fi
if [ -f /usr/lib/systemd/system/${SERVICE_NAME}.service ] ; then
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-29 14:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-29 14:11 [tests/selinux] main: test if dhcpcd hooks can run systemctl Milos Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox