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.
This commit is contained in:
parent
b96679e022
commit
134253d980
1 changed files with 2 additions and 0 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue