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 power-profiles-daemon can watch /sys/firmware/acpi/
Date: Fri, 11 Sep 2026 13:23:43 GMT	[thread overview]
Message-ID: <178913302356.1.4555605752906555389.tests-selinux-dd707fd6537f@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : dd707fd6537f795191bc7f0d6d736da0399cd5db
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2026-04-23T12:05:52+00:00
            Stats  : +10/-0 in 3 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/dd707fd6537f795191bc7f0d6d736da0399cd5db?branch=pr775-checkpolicy-revdeps

            Log:
            test if power-profiles-daemon can watch /sys/firmware/acpi/

One of the reported selinux-policy bugs revealed that SELinux
prevents the power-profiles-daemon from watching the /sys/firmware/acpi
directory. The TC only reproduces the situation when the right HW
is available.

In order to support this functionality, I believe that SELinux
policy should allow this access. The TC looks for appropriate
policy rules and file context patterns.

The TC covers RHEL-105423.

---
diff --git a/selinux-policy/power-profiles-daemon-and-similar/Makefile b/selinux-policy/power-profiles-daemon-and-similar/Makefile
index e69ab07..430f31e 100644
--- a/selinux-policy/power-profiles-daemon-and-similar/Makefile
+++ b/selinux-policy/power-profiles-daemon-and-similar/Makefile
@@ -66,6 +66,7 @@ $(METADATA): Makefile
 	@echo "Bug:             RHEL-61117" >> $(METADATA) # RHEL-9
 	@echo "Bug:             RHEL-62356" >> $(METADATA) # RHEL-10
 	@echo "Bug:             RHEL-100718" >> $(METADATA) # RHEL-9
+	@echo "Bug:             RHEL-105423" >> $(METADATA) # RHEL-9
 
 	rhts-lint $(METADATA)
 

diff --git a/selinux-policy/power-profiles-daemon-and-similar/main.fmf b/selinux-policy/power-profiles-daemon-and-similar/main.fmf
index 219e663..1764e87 100644
--- a/selinux-policy/power-profiles-daemon-and-similar/main.fmf
+++ b/selinux-policy/power-profiles-daemon-and-similar/main.fmf
@@ -34,6 +34,7 @@ link:
   - verifies: https://issues.redhat.com/browse/RHEL-61117
   - verifies: https://issues.redhat.com/browse/RHEL-62356
   - verifies: https://issues.redhat.com/browse/RHEL-100718
+  - verifies: https://issues.redhat.com/browse/RHEL-105423
 adjust+:
   - enabled: false
     when: distro == rhel-4, rhel-5, rhel-6, rhel-7, rhel-8, rhel-10, centos-stream-10

diff --git a/selinux-policy/power-profiles-daemon-and-similar/runtest.sh b/selinux-policy/power-profiles-daemon-and-similar/runtest.sh
index 1a7b2b1..692df51 100755
--- a/selinux-policy/power-profiles-daemon-and-similar/runtest.sh
+++ b/selinux-policy/power-profiles-daemon-and-similar/runtest.sh
@@ -86,6 +86,14 @@ rlJournalStart
     rlPhaseEnd
     fi
 
+    rlPhaseStartTest "RHEL-105423"
+        if [ -d /sys/firmware/acpi ] ; then
+            rlRun "ls -dZ /sys/firmware/acpi | grep :sysfs_t"
+            rlRun "ls -lZ /sys/firmware/acpi"
+        fi
+        rlSESearchRule "allow powerprofiles_t sysfs_t : dir { watch } [ ]"
+    rlPhaseEnd
+
     if [ -f /usr/lib/systemd/system/${SERVICE_NAME}.service ] ; then
     rlPhaseStartTest "real scenario -- standalone service"
         rlSEService - ${SERVICE_NAME} ${PROCESS_NAME} ${PROCESS_CONTEXT} "start status" 1

                 reply	other threads:[~2026-09-11 13:23 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=178913302356.1.4555605752906555389.tests-selinux-dd707fd6537f@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