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 samba-bgqd can search /etc/cups/ and /run/cups/
Date: Fri, 11 Sep 2026 13:22:12 GMT [thread overview]
Message-ID: <178913293239.1.2777251317659603085.tests-selinux-af82a85d6d63@fedoraproject.org> (raw)
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"
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=178913293239.1.2777251317659603085.tests-selinux-af82a85d6d63@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