Bug 445510 - Do not rely on env to execute python
Do not rely on env to execute python
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sos (Show other bugs)
All Linux
high Severity high
: rc
: ---
Assigned To: Adam Stokes
Depends On:
Blocks: 391501
  Show dependency treegraph
Reported: 2008-05-07 06:48 EDT by Adam Stokes
Modified: 2010-10-22 20:47 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-20 16:42:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Proposed patch (1.02 KB, patch)
2008-05-10 01:59 EDT, Bryan Mason
no flags Details | Diff

  None (edit)
Description Adam Stokes 2008-05-07 06:48:29 EDT
Description of problem:
Relying on env to execute python can cause unreliable results if the user were
to install python from another source (upstream perhaps).

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

How reproducible:

Steps to Reproduce:
1.install a separate python
Actual results:
[user@host ~]$ sudo sysreport
Traceback (most recent call last):
 File "/usr/sbin/sysreport", line 31, in ?
   import sos.policyredhat
ImportError: No module named sos.policyredhat
[user@host ~]$ which python

Expected results:
no import failure

Additional info:
Comment 2 Bryan Mason 2008-05-10 01:59:00 EDT
Created attachment 305001 [details]
Proposed patch

Just replace #!/usr/bin/env python with #!/usr/bin/python.
Comment 5 Bryan Mason 2008-05-12 12:59:27 EDT
Cloned Bugzilla Bug 446081 for RHEL 4.
Comment 6 RHEL Product and Program Management 2008-06-02 16:01:46 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 7 Bryan Mason 2008-06-16 18:27:28 EDT
Customer has verified that packages built with the patch in Comment #2 work on
their system with a second Python interpreter.
Comment 14 errata-xmlrpc 2009-01-20 16:42:02 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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