public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: fix the systemd-journal-upload test for RHEL-9.x
@ 2026-09-11 13:22 Milos Malik
  0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:22 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : e07c1a96fb64c9379e9a66d2e9151f25187c8467
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2025-04-15T16:58:53+00:00
            Stats  : +8/-3 in 1 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/e07c1a96fb64c9379e9a66d2e9151f25187c8467?branch=pr775-checkpolicy-revdeps

            Log:
            fix the systemd-journal-upload test for RHEL-9.x

One of the test phases failed on RHEL-9.6 because the systemd_conf_t
type is not defined there. The issue should be fixed now.

---
diff --git a/selinux-policy/systemd-journal-upload/runtest.sh b/selinux-policy/systemd-journal-upload/runtest.sh
index 09a627e..fe8367e 100755
--- a/selinux-policy/systemd-journal-upload/runtest.sh
+++ b/selinux-policy/systemd-journal-upload/runtest.sh
@@ -23,11 +23,16 @@ rlJournalStart
         sleep 2
     rlPhaseEnd
 
-    if seinfo -t | grep -q ${PROCESS_CONTEXT} ; then
+    if rlSEDefined ${PROCESS_CONTEXT} ; then
     rlPhaseStartTest "RHEL-57774 + RHEL-62196"
         rlSEMatchPathCon "/usr/lib/systemd/systemd-journal-upload" "systemd_journal_upload_exec_t"
-        rlSEMatchPathCon "/run/systemd/journal-upload.conf.d" "systemd_conf_t"
-        rlSESearchRule "allow systemd_journal_upload_t systemd_conf_t : dir { read } [ ]"
+        if rlSEDefined "systemd_conf_t" ; then
+            rlSEMatchPathCon "/run/systemd/journal-upload.conf.d" "systemd_conf_t"
+            rlSESearchRule "allow systemd_journal_upload_t systemd_conf_t : dir { read } [ ]"
+        else
+            rlSEMatchPathCon "/run/systemd/journal-upload.conf.d" "init_var_run_t"
+            rlSESearchRule "allow systemd_journal_upload_t init_var_run_t : dir { read } [ ]"
+        fi
     rlPhaseEnd
     fi
 

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

only message in thread, other threads:[~2026-09-11 13:22 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:22 [tests/selinux] pr775-checkpolicy-revdeps: fix the systemd-journal-upload test for RHEL-9.x Milos Malik

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