public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: test if power-profiles-daemon can watch /sys/firmware/acpi/
@ 2026-09-11 13:23 Milos Malik
  0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:23 UTC (permalink / raw)
  To: git-commits

            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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-11 13:23 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:23 [tests/selinux] pr775-checkpolicy-revdeps: test if power-profiles-daemon can watch /sys/firmware/acpi/ Milos Malik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox