public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: make sure that whole /etc is labeled correctly
@ 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 : 967d55a3a3139037bd36e2f4d6fbb6ac5f66a514
Author : Milos Malik <mmalik@redhat.com>
Date : 2025-06-23T17:43:33+00:00
Stats : +8/-1 in 1 file(s)
URL : https://src.fedoraproject.org/tests/selinux/c/967d55a3a3139037bd36e2f4d6fbb6ac5f66a514?branch=pr775-checkpolicy-revdeps
Log:
make sure that whole /etc is labeled correctly
The rlSELibraryLoaded() now makes sure that the /etc directory and
its subdirectories are labeled correctly. If they are mislabeled,
a lot executed tests can trigger unnecessary SELinux denials.
---
diff --git a/selinux-policy/Library/common/lib.sh b/selinux-policy/Library/common/lib.sh
index 018d821..61c8ca9 100755
--- a/selinux-policy/Library/common/lib.sh
+++ b/selinux-policy/Library/common/lib.sh
@@ -29,7 +29,7 @@
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# library-prefix = rlSE
-# library-version = 43
+# library-version = 44
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: <<'=cut'
@@ -2006,6 +2006,13 @@ rlSELibraryLoaded() {
rlSE_REQUIRES="setools-console expect policycoreutils-python-utils selinux-policy-devel audit-rules"
fi
+ # make sure that these directories exist in home directories of
+ # tested users since the time they were created
+ rlRun "mkdir -p /etc/skel/.{cache,config,local}"
+
+ # make sure the /etc directory is labeled correctly
+ rlRun "restorecon -Rv /etc"
+
__INTERNAL_rlSEenable_full_auditing
local t=$(date +%s)
^ 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: make sure that whole /etc is labeled correctly Milos Malik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox