Bug 2174241 - Firefox assumes getenforce is in PATH, generates error if not
Summary: Firefox assumes getenforce is in PATH, generates error if not
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: firefox
Version: 7.9
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Jan Horak
QA Contact: Jiri Prajzner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-28 23:04 UTC by Jim Prescott
Modified: 2023-03-20 09:33 UTC (History)
2 users (show)

Fixed In Version: firefox-102.9.0-1.el7_9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-03-20 09:33:47 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-150230 0 None None None 2023-02-28 23:06:59 UTC

Description Jim Prescott 2023-02-28 23:04:16 UTC
Description of problem:
Firefox assumes that /usr/sbin/getenforce and restorecon are on the user's PATH. If it isn't you get errors, but firefox still runs.

The problem is /usr/bin/firefox lines 198-199. It verifies that /usr/sbin/getenforce exists, but then tries to run it without specifying the path. It then tries to run restorecon without a specifying the path.

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

Changing lines as follows is one possible fix.

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

Version-Release number of selected component (if applicable):
firefox-102.7.0-1.el7_9.x86_64


How reproducible:
Always


Steps to Reproduce:
1. env  PATH=/usr/bin  firefox
2.
3.

Actual results:
/usr/bin/firefox: line 198: getenforce: command not found
/usr/bin/firefox: line 198: [: !=: unary operator expected

Expected results:
Not those errors

Additional info:

Comment 3 Tomas Popela 2023-03-01 09:59:33 UTC
Thank you for the bug report. It will be fixed as part of the Firefox 102.9 update in few weeks.


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