public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: test if samba-bgqd can search /etc/cups/ and /run/cups/
@ 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 : af82a85d6d63aa2f8a16719359112d28c8e2f66c
Author : Milos Malik <mmalik@redhat.com>
Date : 2024-12-04T07:11:10+00:00
Stats : +14/-1 in 3 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/af82a85d6d63aa2f8a16719359112d28c8e2f66c?branch=pr775-checkpolicy-revdeps
Log:
test if samba-bgqd can search /etc/cups/ and /run/cups/
Recent selinux-policy + cups + samba-bgqd testing revealed SELinux
denials which are triggered when the samba-bgqd service is started
on a machine where cups* packages are installed. The TC reproduces
the situation.
In order to support the intended samba-bgqd functionality, I believe
that SELinux policy should allow these actions. The TC looks for
appropriate policy rules and file context patterns.
The TC covers RHEL-69512 and RHEL-69517.
---
diff --git a/selinux-policy/samba-bgqd-and-similar/Makefile b/selinux-policy/samba-bgqd-and-similar/Makefile
index 0c99403..614f246 100644
--- a/selinux-policy/samba-bgqd-and-similar/Makefile
+++ b/selinux-policy/samba-bgqd-and-similar/Makefile
@@ -54,7 +54,7 @@ $(METADATA): Makefile
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 15m" >> $(METADATA)
@echo "RunFor: selinux-policy" >> $(METADATA)
- @echo "Requires: audit libselinux libselinux-utils policycoreutils selinux-policy selinux-policy-targeted setools-console samba samba-client samba-common-tools" >> $(METADATA)
+ @echo "Requires: audit libselinux libselinux-utils policycoreutils selinux-policy selinux-policy-targeted setools-console samba samba-client samba-common-tools cups" >> $(METADATA)
@echo "RhtsRequires: library(selinux-policy/common)" >> $(METADATA)
@echo "Environment: AVC_ERROR=+no_avc_check" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@@ -64,6 +64,8 @@ $(METADATA): Makefile
@echo "Releases: -RHEL4 -RHEL5 -RHEL6 -RHEL7 -RHEL8" >> $(METADATA)
@echo "Bug: RHEL-53124" >> $(METADATA) # RHEL-9
@echo "Bug: RHEL-64908" >> $(METADATA) # RHEL-10
+ @echo "Bug: RHEL-69512" >> $(METADATA) # RHEL-10
+ @echo "Bug: RHEL-69517" >> $(METADATA) # RHEL-9
rhts-lint $(METADATA)
diff --git a/selinux-policy/samba-bgqd-and-similar/main.fmf b/selinux-policy/samba-bgqd-and-similar/main.fmf
index 99a0a4d..cb06aa6 100644
--- a/selinux-policy/samba-bgqd-and-similar/main.fmf
+++ b/selinux-policy/samba-bgqd-and-similar/main.fmf
@@ -18,6 +18,7 @@ recommend:
- samba
- samba-client
- samba-common-tools
+ - cups
environment:
AVC_ERROR: +no_avc_check
duration: 15m
@@ -33,6 +34,8 @@ tag:
link:
- verifies: https://issues.redhat.com/browse/RHEL-53124
- verifies: https://issues.redhat.com/browse/RHEL-64908
+ - verifies: https://issues.redhat.com/browse/RHEL-69512
+ - verifies: https://issues.redhat.com/browse/RHEL-69517
adjust:
- enabled: false
when: distro == rhel-4, rhel-5, rhel-6, rhel-7, rhel-8
diff --git a/selinux-policy/samba-bgqd-and-similar/runtest.sh b/selinux-policy/samba-bgqd-and-similar/runtest.sh
index ab78817..ea4b805 100755
--- a/selinux-policy/samba-bgqd-and-similar/runtest.sh
+++ b/selinux-policy/samba-bgqd-and-similar/runtest.sh
@@ -72,6 +72,14 @@ rlJournalStart
rlSESearchRule "allow samba_bgqd_t sssd_var_lib_t : dir { search } [ ]"
rlSESearchRule "allow samba_bgqd_t winbind_rpcd_t : fifo_file { write } [ ]"
rlPhaseEnd
+
+ rlPhaseStartTest "RHEL-69512 + RHEL-69517"
+ rlSEMatchPathCon ${FILE_PATH} ${FILE_CONTEXT}
+ rlSEMatchPathCon "/etc/cups" "cupsd_etc_t"
+ rlSEMatchPathCon "/run/cups" "cupsd_var_run_t"
+ rlSESearchRule "allow samba_bgqd_t cupsd_etc_t : dir { search } [ ]"
+ rlSESearchRule "allow samba_bgqd_t cupsd_var_run_t : dir { search } [ ]"
+ rlPhaseEnd
fi
rlPhaseStartTest "real scenario"
^ 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: test if samba-bgqd can search /etc/cups/ and /run/cups/ Milos Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox