Merge "Fix selinux context for unbound.log"

This commit is contained in:
Zuul 2022-05-12 21:56:11 +00:00 committed by Gerrit Code Review
commit 88c4a1ffe9
1 changed files with 3 additions and 2 deletions

View File

@ -98,8 +98,9 @@ chmod 0644 /var/log/unbound.log
# distros, but for consistency it's much easier if we just have one
# log file in the same place across distros. Thus set the context to
# allow it.
if [[ -e /usr/bin/chcon ]]; then
chcon -t named_log_t /var/log/unbound.log
if [[ -e /usr/sbin/semanage ]]; then
semanage fcontext -a -t named_log_t /var/log/unbound.log
restorecon -v /var/log/unbound.log
fi
if [[ "$DISTRO_NAME" =~ (opensuse) ]] ; then