From 5c8f7e438e0e85554152e91211ad0737cbff8da3 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Fri, 21 Apr 2023 21:21:58 +0200 Subject: [PATCH] Related: #2183234 Call restorecon only on existing directory Fix https://bugzilla.redhat.com/show_bug.cgi?id=2187894 --- firefox.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firefox.sh.in b/firefox.sh.in index dee5394..6a3f6e4 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -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