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 systemd generators can send data to /run/systemd/journal/socket
Date: Fri, 11 Sep 2026 13:22:29 GMT	[thread overview]
Message-ID: <178913294936.1.10520864285225927237.tests-selinux-1663f9c1b178@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : 1663f9c1b178ed2c7b29b11aefaa707a7c2227d2
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2025-03-26T12:39:46+00:00
            Stats  : +7/-0 in 3 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/1663f9c1b178ed2c7b29b11aefaa707a7c2227d2?branch=pr775-checkpolicy-revdeps

            Log:
            test if systemd generators can send data to /run/systemd/journal/socket

Recent system roles testing revealed that SELinux prevents various
systemd generators from sending any data into /run/systemd/journal/socket.
The TC does not reproduce the situation.

In order to enable the use case in which systemd-journald is replaced
by rsyslog, I believe that SELinux policy should allow these actions.
The TC looks for appropriate policy rules and file context patterns.

The TC covers RHEL-75879.

---
diff --git a/selinux-policy/systemd-generators/Makefile b/selinux-policy/systemd-generators/Makefile
index 041e2b8..9dbed8f 100644
--- a/selinux-policy/systemd-generators/Makefile
+++ b/selinux-policy/systemd-generators/Makefile
@@ -74,6 +74,7 @@ $(METADATA): Makefile
 	@echo "Releases:        -RHEL7" >> $(METADATA)
 	@echo "Bug:             2230226" >> $(METADATA) # Fedora 39
 	@echo "Bug:             RHEL-72549" >> $(METADATA) # RHEL-10
+	@echo "Bug:             RHEL-75879" >> $(METADATA) # RHEL-10
 
 	rhts-lint $(METADATA)
 

diff --git a/selinux-policy/systemd-generators/main.fmf b/selinux-policy/systemd-generators/main.fmf
index 4e67f10..93b9231 100644
--- a/selinux-policy/systemd-generators/main.fmf
+++ b/selinux-policy/systemd-generators/main.fmf
@@ -34,6 +34,7 @@ tag:
 link:
   - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2230226
   - verifies: https://issues.redhat.com/browse/RHEL-72549
+  - verifies: https://issues.redhat.com/browse/RHEL-75879
 adjust:
   - enabled: false
     when: distro == rhel-4, rhel-5, rhel-6, rhel-7

diff --git a/selinux-policy/systemd-generators/runtest.sh b/selinux-policy/systemd-generators/runtest.sh
index f92caea..bc8be92 100755
--- a/selinux-policy/systemd-generators/runtest.sh
+++ b/selinux-policy/systemd-generators/runtest.sh
@@ -205,6 +205,11 @@ EOF
         rlSESearchRule "allow systemd_ssh_generator_t vsock_device_t : chr_file { getattr ioctl open read } [ ]"
         rlSESearchRule "allow systemd_ssh_generator_t systemd_unit_file_t : file { create getattr write open } [ ]"
     rlPhaseEnd
+
+    rlPhaseStartTest "RHEL-75879"
+        rlRun "seinfo -a systemd_generator -x"
+        rlSESearchRule "allow systemd_fstab_generator_t syslogd_t : unix_dgram_socket { sendto } [ ]"
+    rlPhaseEnd
     fi
 
     ### generators from other packages: install them all?

                 reply	other threads:[~2026-09-11 13:22 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=178913294936.1.10520864285225927237.tests-selinux-1663f9c1b178@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