public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: correct policy rule checks related to /sys/power/state
@ 2026-09-11 13:19 Milos Malik
  0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:19 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : 44e725eeffa29925180025ce1dbb3c9342cfc29d
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2021-07-01T11:08:57+02:00
            Stats  : +3/-2 in 2 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/44e725eeffa29925180025ce1dbb3c9342cfc29d?branch=pr775-checkpolicy-revdeps

            Log:
            correct policy rule checks related to /sys/power/state

One policy rule check related to BZ#1968610 was incorrect,
because it assumed that the /sys/power/state is a directory,
but it is a file.
Now, it is correct.

---
diff --git a/selinux-policy/swap-file-and-systemd-access/PURPOSE b/selinux-policy/swap-file-and-systemd-access/PURPOSE
index e92b3f3..83177ef 100644
--- a/selinux-policy/swap-file-and-systemd-access/PURPOSE
+++ b/selinux-policy/swap-file-and-systemd-access/PURPOSE
@@ -1,5 +1,5 @@
 PURPOSE of /CoreOS/selinux-policy/Regression/swap-file-and-systemd-access
 Author: Milos Malik <mmalik@redhat.com>
 
-SELinux interferes with systemd when accessing a swap file.
+SELinux interferes with systemd when accessing swap files or swap partitions.
 

diff --git a/selinux-policy/swap-file-and-systemd-access/runtest.sh b/selinux-policy/swap-file-and-systemd-access/runtest.sh
index 1bcb508..430defb 100755
--- a/selinux-policy/swap-file-and-systemd-access/runtest.sh
+++ b/selinux-policy/swap-file-and-systemd-access/runtest.sh
@@ -86,7 +86,8 @@ rlJournalStart
     rlPhaseStartTest "bz#1968610"
         rlSEMatchPathCon "/sys/power" "sysfs_t"
         rlSEMatchPathCon "/sys/power/state" "sysfs_t"
-        rlSESearchRule "allow systemd_sleep_t sysfs_t : dir { add_name create } [ ]"
+        rlSESearchRule "allow systemd_sleep_t sysfs_t : dir { add_name write } [ ]"
+        rlSESearchRule "allow systemd_sleep_t sysfs_t : file { create } [ ]"
     rlPhaseEnd
 
     if ${REAL_SCENARIOS} ; then

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

only message in thread, other threads:[~2026-09-11 13:19 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:19 [tests/selinux] pr775-checkpolicy-revdeps: correct policy rule checks related to /sys/power/state Milos Malik

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