Related: #2183234 Call restorecon only on existing directory

Fix https://bugzilla.redhat.com/show_bug.cgi?id=2187894
This commit is contained in:
Eike Rathke 2023-04-21 21:21:58 +02:00
parent dfaf21254c
commit c228b00c32
1 changed files with 2 additions and 2 deletions

View File

@ -195,8 +195,8 @@ fi
# When Firefox is not running, restore SELinux labels for profile files
# (rhbz#1731371)
if [ $MOZILLA_DOWN -ne 0 ]; then
if [ -x $GETENFORCE_FILE ] && [ `$GETENFORCE_FILE` != "Disabled" ]; then
(/usr/sbin/restorecon -vr ~/.mozilla/firefox/* &)
if [ -x $GETENFORCE_FILE ] && [ `$GETENFORCE_FILE` != "Disabled" ] && [ -d ~/.mozilla/firefox ]; then
(/usr/sbin/restorecon -vr ~/.mozilla/firefox &)
fi
fi