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 exim can find /proc/sys/net/ipv6/conf/all/disable_ipv6
Date: Fri, 11 Sep 2026 13:22:55 GMT	[thread overview]
Message-ID: <178913297513.1.17106308305553589415.tests-selinux-faa792f255ec@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : faa792f255ec59b57cd34b7ff8f1193efde6b2d3
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2025-06-10T11:15:49+00:00
            Stats  : +10/-0 in 3 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/faa792f255ec59b57cd34b7ff8f1193efde6b2d3?branch=pr775-checkpolicy-revdeps

            Log:
            test if exim can find /proc/sys/net/ipv6/conf/all/disable_ipv6

A regular exim + selinux-policy testing performed on Testing Farm
machines revealed that SELinux prevents the exim processes from
searching the /proc/sys/net/ipv6/conf/all/disable_ipv6 file. The
TC reproduces the situation on TF machines.

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

The TC covers RHEL-94268.

---
diff --git a/selinux-policy/exim-and-similar/Makefile b/selinux-policy/exim-and-similar/Makefile
index 3c8dc5d..4982ecb 100644
--- a/selinux-policy/exim-and-similar/Makefile
+++ b/selinux-policy/exim-and-similar/Makefile
@@ -68,6 +68,7 @@ $(METADATA): Makefile
 	@echo "Bug:             RHEL-14186" >> $(METADATA) # RHEL-8
 	@echo "Bug:             RHEL-21902" >> $(METADATA) # RHEL-9
 	@echo "Bug:             RHEL-21903" >> $(METADATA) # RHEL-8
+	@echo "Bug:             RHEL-94268" >> $(METADATA) # RHEL-9
 
 	rhts-lint $(METADATA)
 

diff --git a/selinux-policy/exim-and-similar/main.fmf b/selinux-policy/exim-and-similar/main.fmf
index e2ed297..a16d8f5 100644
--- a/selinux-policy/exim-and-similar/main.fmf
+++ b/selinux-policy/exim-and-similar/main.fmf
@@ -44,6 +44,7 @@ link:
   - verifies: https://issues.redhat.com/browse/RHEL-14186
   - verifies: https://issues.redhat.com/browse/RHEL-21902
   - verifies: https://issues.redhat.com/browse/RHEL-21903
+  - verifies: https://issues.redhat.com/browse/RHEL-94268
 adjust:
   - enabled: false
     when: distro == rhel-4, rhel-alt-7

diff --git a/selinux-policy/exim-and-similar/runtest.sh b/selinux-policy/exim-and-similar/runtest.sh
index f496967..01b5036 100755
--- a/selinux-policy/exim-and-similar/runtest.sh
+++ b/selinux-policy/exim-and-similar/runtest.sh
@@ -96,6 +96,14 @@ rlJournalStart
     rlPhaseEnd
     fi
 
+    if rlIsRHEL '>9.6' || rlIsRHEL '>10.0' || rlIsFedora ; then
+    rlPhaseStartTest "RHEL-94268"
+        rlRun "ls -dZ /proc/sys/net/ | grep :sysctl_net_t"
+        rlRun "ls -Z /proc/sys/net/ipv6/conf/all/disable_ipv6 | grep :sysctl_net_t"
+        rlSESearchRule "allow exim_t sysctl_net_t : dir { search } [ ]"
+    rlPhaseEnd
+    fi
+
     if [ -f /usr/lib/systemd/system/${SERVICE_NAME}.service ] ; then
     rlPhaseStartTest "real scenario -- standalone service"
         rlRun "echo ${ROOT_PASSWORD} | passwd --stdin root"

                 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=178913297513.1.17106308305553589415.tests-selinux-faa792f255ec@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