Skip to content

Commit

Permalink
Only execute chcon if selinux is enabled and use full context
Browse files Browse the repository at this point in the history
refs #8332
fixes #10773
  • Loading branch information
dgoetz committed Dec 4, 2015
1 parent e6453f4 commit 0c8395f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions etc/initsystem/safe-reload
Expand Up @@ -11,8 +11,10 @@ fi
printf "Validating config files: "

OUTPUTFILE=`mktemp`
if [ $(which chcon) ]; then
chcon -t icinga2_tmp_t $OUTPUTFILE
if type selinuxenabled > /dev/null 2> /dev/null; then
if selinuxenabled; then
chcon -u system_u -r object_r -t icinga2_tmp_t $OUTPUTFILE
fi
fi


Expand Down

0 comments on commit 0c8395f

Please sign in to comment.