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: make sure that whole /etc is labeled correctly
Date: Fri, 11 Sep 2026 13:22:59 GMT [thread overview]
Message-ID: <178913297904.1.1562462284846473152.tests-selinux-967d55a3a313@fedoraproject.org> (raw)
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)
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=178913297904.1.1562462284846473152.tests-selinux-967d55a3a313@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