Bug 1891194 - Executing /bin/firefox results in error message "[Enforcing: command not found"
Summary: Executing /bin/firefox results in error message "[Enforcing: command not found"
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: 32
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Gecko Maintainer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-24 08:04 UTC by BZ
Modified: 2020-10-28 02:30 UTC (History)
13 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-10-28 02:30:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description BZ 2020-10-24 08:04:31 UTC
Description of problem: Executing firefox at the command line yields an error message during the initialization performed by the /bin/firefox script


Version-Release number of selected component (if applicable):
82.0-4

How reproducible:
Error only appears when Firefox is not already running

Steps to Reproduce:
1. Execute /bin/firefox
2.
3.

Actual results:
The message "/bin/firefox: line 186: [Enforcing: command not found" appears, the Firefox appears to start normally

Expected results:
No error message

Additional info:
As seen in the message, the problem is at line 186 which reads:

    if [ -x $GETENFORCE_FILE ] && [`getenforce` != "Disabled" ]; then
        (restorecon -vr ~/.mozilla/firefox/* &)

The problem is a missing space between the left bracket and the backtick expression in the conditional. Note that due to this error, the 'restorecon' operation on the local Firefox directory is skipped, which could lead to additional problems when SELinux is in 'Enforcing' mode.

The problem can be fixed by adding the space:

    if [ -x $GETENFORCE_FILE ] && [ `getenforce` != "Disabled" ]; then

however for consistency it might make more sense to also use the variable tested for in the first part of the conditional:

    if [ -x $GETENFORCE_FILE ] && [ `$GETENFORCE_FILE` != "Disabled" ]; then

Comment 1 Martin Stransky 2020-10-24 08:14:48 UTC
This should be fixed in firefox-82.0-5.fc32.
If you like to have a different check there, do you mind to provide a patch to /usr/bin/firefox?
Thanks.

Comment 2 BZ 2020-10-28 02:30:25 UTC
Thanks for that. After installing the update everything is fine. Given everything going on, the change I mentioned hardly seems worth a patch!


Note You need to log in before you can comment on or make changes to this bug.