Check selinux for httpd-core

This commit is contained in:
Branislav Náter 2022-03-31 17:39:05 +02:00
commit 0d0837075c

View file

@ -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