public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: selinux-policy: Adjust fapolicyd test for /etc/resolv.conf symlink
@ 2026-09-11 13:18 Zdenek Pytela
0 siblings, 0 replies; only message in thread
From: Zdenek Pytela @ 2026-09-11 13:18 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : tests/selinux
Branch : pr775-checkpolicy-revdeps
Commit : 9caf81bf10c16872aba54bc72f4c085de56a7174
Author : Zdenek Pytela <zpytela@redhat.com>
Date : 2020-12-09T09:01:28+00:00
Stats : +10/-2 in 1 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/9caf81bf10c16872aba54bc72f4c085de56a7174?branch=pr775-checkpolicy-revdeps
Log:
selinux-policy: Adjust fapolicyd test for /etc/resolv.conf symlink
Adjust the fapolicyd test to branch conditionally if /etc/resolv.conf
is a symlink labeled etc_t or a plain file labeled net_conf_t.
---
diff --git a/selinux-policy/fapolicyd-and-similar/runtest.sh b/selinux-policy/fapolicyd-and-similar/runtest.sh
index 6c48848..720f008 100755
--- a/selinux-policy/fapolicyd-and-similar/runtest.sh
+++ b/selinux-policy/fapolicyd-and-similar/runtest.sh
@@ -59,8 +59,16 @@ rlJournalStart
rlPhaseStartTest "bz#1865818"
rlSEMatchPathCon "/usr/sbin/fapolicyd" ${FILE_CONTEXT}
- rlSEMatchPathCon "/etc/resolv.conf" "net_conf_t"
- rlSESearchRule "allow ${PROCESS_CONTEXT} net_conf_t : lnk_file { getattr read } [ ]"
+ if [ -L "/etc/resolv.conf" ]; then
+ rlSEMatchPathCon "/etc/resolv.conf" "etc_t"
+ LINK_PATH=`readlink -f "/etc/resolv.conf"`
+ rlSEMatchPathCon "$LINK_PATH" "net_conf_t"
+ rlSESearchRule "allow ${PROCESS_CONTEXT} etc_t : lnk_file { getattr read } [ ]"
+ rlSESearchRule "allow ${PROCESS_CONTEXT} net_conf_t : file { getattr read } [ ]"
+ else
+ rlSEMatchPathCon "/etc/resolv.conf" "net_conf_t"
+ rlSESearchRule "allow ${PROCESS_CONTEXT} net_conf_t : file { getattr read } [ ]"
+ fi
rlPhaseEnd
rlPhaseStartTest "bz#1874491"
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-11 13:18 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:18 [tests/selinux] pr775-checkpolicy-revdeps: selinux-policy: Adjust fapolicyd test for /etc/resolv.conf symlink Zdenek Pytela
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox