From 0d0837075c1ccb75d545fbb1ae923e3f29f49dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branislav=20N=C3=A1ter?= Date: Thu, 31 Mar 2022 17:39:05 +0200 Subject: [PATCH] Check selinux for httpd-core --- core/selinux-context/runtest.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/selinux-context/runtest.sh b/core/selinux-context/runtest.sh index b952342..8e1d060 100755 --- a/core/selinux-context/runtest.sh +++ b/core/selinux-context/runtest.sh @@ -40,8 +40,14 @@ rlJournalStart rlPhaseEnd rlPhaseStartTest - rlRun "ls -d -Z \$(rpm -ql $httpHTTPD) > files_context.log"\ - 0 "getting selinux context of rpm's files ($httpHTTPD)" + # https://src.fedoraproject.org/rpms/httpd/pull-request/25 + if rlIsFedora '>=37'; then + rlRun "ls -d -Z \$(rpm -ql httpd-core) > files_context.log"\ + 0 "getting selinux context of rpm's files (httpd-core)" + else + rlRun "ls -d -Z \$(rpm -ql $httpHTTPD) > files_context.log"\ + 0 "getting selinux context of rpm's files ($httpHTTPD)" + fi rlAssertGrep "httpd_exec_t.*/usr/sbin/httpd" files_context.log rlAssertGrep "httpd_config_t.*/etc/httpd" files_context.log rlAssertGrep "httpd_log_t.*/var/log/httpd" files_context.log