RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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:
Embargoed:


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.