From 134253d9800e6a027c792f35807b959cd306fd0d Mon Sep 17 00:00:00 2001 From: Zdenek Pytela Date: Thu, 1 Jul 2021 17:12:48 +0200 Subject: [PATCH] selinux-policy: do not test watch in systemd-timesyncd on RHEL < 9 The watch permissions are present only in RHEL 9 and Fedora, so the subtests for watch should not be executed in the systemd-timesyncd test on a system with RHEL up to version 8. --- selinux-policy/systemd-timesyncd-and-similar/runtest.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/selinux-policy/systemd-timesyncd-and-similar/runtest.sh b/selinux-policy/systemd-timesyncd-and-similar/runtest.sh index f9b1b7f..66f114f 100755 --- a/selinux-policy/systemd-timesyncd-and-similar/runtest.sh +++ b/selinux-policy/systemd-timesyncd-and-similar/runtest.sh @@ -102,12 +102,14 @@ rlJournalStart rlSESearchRule "allow systemd_timedated_t efivarfs_t : file { getattr open read } [ ]" rlPhaseEnd + if ! rlIsRHEL '<9' ; then rlPhaseStartTest "bz#1949315" rlSEMatchPathCon "/" "root_t" rlSEMatchPathCon "/run" "var_run_t" rlSESearchRule "allow systemd_timedated_t root_t : dir { watch } [ ]" rlSESearchRule "allow systemd_timedated_t var_run_t : dir { watch } [ ]" rlPhaseEnd + fi if systemctl list-units | grep -q ${SERVICE_NAME} ; then rlPhaseStartTest "real scenario -- standalone service"