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 cups-browsed can access /root/.cups/lpoptions
Date: Fri, 11 Sep 2026 13:21:53 GMT	[thread overview]
Message-ID: <178913291342.1.15613334467344451602.tests-selinux-705e5154fa7f@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : 705e5154fa7f769202721e15b2526c53c07e7c28
            Author : Milos Malik <mmalik@redhat.com>
            Date   : 2024-08-03T06:20:00+00:00
            Stats  : +4/-0 in 3 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/705e5154fa7f769202721e15b2526c53c07e7c28?branch=pr775-checkpolicy-revdeps

            Log:
            test if cups-browsed can access /root/.cups/lpoptions

A recent cups + selinux-policy testing revealed that SELinux prevents
the cups-browsed processes from accessing the /root/.cups/lpoptions
file. The TC reproduces the situation.

In order to support the cups-browsed ability to access the lpoptions
file, I believe that SELinux policy should allow the access. Either
file context patterns need to change or an appropriate policy rule
need to be added. The TC looks for these changes.

The TC covers RHEL-47401.

---
diff --git a/selinux-policy/cups-browsed-and-similar/Makefile b/selinux-policy/cups-browsed-and-similar/Makefile
index aee1194..a6ec20e 100644
--- a/selinux-policy/cups-browsed-and-similar/Makefile
+++ b/selinux-policy/cups-browsed-and-similar/Makefile
@@ -66,6 +66,7 @@ $(METADATA): Makefile
 	@echo "Bug:             1395801" >> $(METADATA) # Fedora 26
 	@echo "Bug:             1401634" >> $(METADATA) # Fedora 26
 	@echo "Bug:             1719754" >> $(METADATA) # RHEL-7
+	@echo "Bug:             RHEL-47401" >> $(METADATA) # RHEL-9
 
 	rhts-lint $(METADATA)
 

diff --git a/selinux-policy/cups-browsed-and-similar/main.fmf b/selinux-policy/cups-browsed-and-similar/main.fmf
index a868a95..c75ebba 100644
--- a/selinux-policy/cups-browsed-and-similar/main.fmf
+++ b/selinux-policy/cups-browsed-and-similar/main.fmf
@@ -40,6 +40,7 @@ link:
   - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1401634
   - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1719754
   - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1929329
+  - verifies: https://issues.redhat.com/browse/RHEL-47401
 adjust:
   - enabled: false
     when: distro == rhel-4, rhel-5, rhel-6

diff --git a/selinux-policy/cups-browsed-and-similar/runtest.sh b/selinux-policy/cups-browsed-and-similar/runtest.sh
index 71eeb50..6aa8b88 100755
--- a/selinux-policy/cups-browsed-and-similar/runtest.sh
+++ b/selinux-policy/cups-browsed-and-similar/runtest.sh
@@ -83,6 +83,8 @@ rlJournalStart
         fi
         rlSEService ${ROOT_PASSWORD} ${SERVICE_NAME} ${PROCESS_NAME} ${PROCESS_CONTEXT} "start status" 1
         rlRun "restorecon -Rv /run /var -e /var/ARTIFACTS" 0-255
+        rlRun "mkdir -p /root/.cups"
+        rlRun "touch /root/.cups/lpoptions"
         rlSEService ${ROOT_PASSWORD} ${SERVICE_NAME} ${PROCESS_NAME} ${PROCESS_CONTEXT} "restart status stop status" 1
     rlPhaseEnd
 

                 reply	other threads:[~2026-09-11 13:21 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=178913291342.1.15613334467344451602.tests-selinux-705e5154fa7f@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