public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: test if colord can use NoNewPrivileges
@ 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 : c7297bd7a3d512bb861d16685c1c95019520acc6
Author : Milos Malik <mmalik@redhat.com>
Date : 2024-02-06T15:49:35+00:00
Stats : +13/-3 in 3 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/c7297bd7a3d512bb861d16685c1c95019520acc6?branch=pr775-checkpolicy-revdeps
Log:
test if colord can use NoNewPrivileges
Recently, openQA testing of new colord version (1.4.7-1) revealed
that SELinux prevents the colord process transition from init_t
to colord_t domain. The TC reproduces the situation.
In order to support the existing colord functionality together with
the newly added systemd unit option (NoNewPrivileges=true), I believe
that SELinux policy should allow the action. The TC looks for
appropriate policy rules and file context patterns.
The TC covers BZ#2259679.
---
diff --git a/selinux-policy/colord-and-similar/Makefile b/selinux-policy/colord-and-similar/Makefile
index 4a609b8..32ada87 100644
--- a/selinux-policy/colord-and-similar/Makefile
+++ b/selinux-policy/colord-and-similar/Makefile
@@ -55,7 +55,7 @@ $(METADATA): Makefile
@echo "TestTime: 10m" >> $(METADATA)
@echo "RunFor: selinux-policy" >> $(METADATA)
@echo "RunFor: colord" >> $(METADATA)
- @echo "Requires: audit libselinux libselinux-utils policycoreutils selinux-policy selinux-policy-targeted glib2 setools-console colord initscripts expect" >> $(METADATA)
+ @echo "Requires: audit libselinux libselinux-utils policycoreutils selinux-policy selinux-policy-targeted glib2 setools-console colord /usr/sbin/service expect" >> $(METADATA)
@echo "RhtsRequires: library(selinux-policy/common)" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@@ -69,6 +69,7 @@ $(METADATA): Makefile
@echo "Bug: 1421247" >> $(METADATA) # RHEL-7
@echo "Bug: 1460480" >> $(METADATA) # RHEL-7
@echo "Bug: 1772669" >> $(METADATA) # RHEL-8
+ @echo "Bug: 2259679" >> $(METADATA) # Fedora 40
rhts-lint $(METADATA)
diff --git a/selinux-policy/colord-and-similar/main.fmf b/selinux-policy/colord-and-similar/main.fmf
index 559be9e..7e4ba6a 100644
--- a/selinux-policy/colord-and-similar/main.fmf
+++ b/selinux-policy/colord-and-similar/main.fmf
@@ -17,7 +17,7 @@ recommend:
- glib2
- setools-console
- colord
- - initscripts
+ - /usr/sbin/service
- expect
environment:
AVC_ERROR: +no_avc_check
@@ -29,7 +29,6 @@ tag:
- NoRHEL4
- NoRHEL5
- NoRHEL6
- - RHEL8
- TIPpass
- TIPpass_FIPS
- TIPpass_Security
@@ -48,6 +47,7 @@ link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1772669
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1951114
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1878094
+ - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2259679
adjust:
- enabled: false
when: distro == rhel-4, rhel-5, rhel-6
diff --git a/selinux-policy/colord-and-similar/runtest.sh b/selinux-policy/colord-and-similar/runtest.sh
index 4d7aece..9cd88f0 100755
--- a/selinux-policy/colord-and-similar/runtest.sh
+++ b/selinux-policy/colord-and-similar/runtest.sh
@@ -142,6 +142,15 @@ rlJournalStart
rlSEService ${ROOT_PASSWORD} ${SERVICE_NAME} ${PROCESS_NAME} ${PROCESS_CONTEXT} "restart status stop status" 1
rlPhaseEnd
+ if rlIsFedora ; then
+ rlPhaseStartTest "bz#2259679"
+ rlSEMatchPathCon "/usr/libexec/colord" "colord_exec_t"
+ rlSEMatchPathCon "/var/lib/colord/mapping.db" "colord_var_lib_t"
+ rlSESearchRule "allow init_t colord_t : process2 { nnp_transition } [ ]"
+ rlSESearchRule "allow colord_t colord_var_lib_t : file { read write } [ ]"
+ rlPhaseEnd
+ fi
+
rlPhaseStartCleanup
sleep 2
rlSECheckAVC
^ 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 colord can use NoNewPrivileges Milos Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox