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] main: test if dhcpcd hooks can run systemctl
Date: Tue, 29 Sep 2026 14:11:00 GMT	[thread overview]
Message-ID: <179069106061.1.5707270066558574212.tests-selinux-2ff24931dfdb@fedoraproject.org> (raw)

            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

                 reply	other threads:[~2026-09-29 14:11 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=179069106061.1.5707270066558574212.tests-selinux-2ff24931dfdb@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