public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: test if cups-browsed can access /root/.cups/lpoptions
@ 2026-09-11 13:21 Milos Malik
0 siblings, 0 replies; only message in thread
From: Milos Malik @ 2026-09-11 13:21 UTC (permalink / raw)
To: git-commits
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 13:21 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:21 [tests/selinux] pr775-checkpolicy-revdeps: test if cups-browsed can access /root/.cups/lpoptions Milos Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox