Bug 445510 - Do not rely on env to execute python
Summary: Do not rely on env to execute python
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sos
Version: 5.3
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Adam Stokes
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 391501
TreeView+ depends on / blocked
 
Reported: 2008-05-07 10:48 UTC by Adam Stokes
Modified: 2018-10-20 02:52 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 21:42:02 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0171 0 normal SHIPPED_LIVE sosreport bug fix and enhancement update 2009-01-20 16:05:38 UTC

Description Adam Stokes 2008-05-07 10:48:29 UTC
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):
1.7.x

How reproducible:
100%

Steps to Reproduce:
1.install a separate python
2.
3.
  
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
/tool/pandora64/bin/python

Expected results:
no import failure

Additional info:

Comment 2 Bryan Mason 2008-05-10 05:59:00 UTC
Created attachment 305001 [details]
Proposed patch

Just replace #!/usr/bin/env python with #!/usr/bin/python.

Comment 5 Bryan Mason 2008-05-12 16:59:27 UTC
Cloned Bugzilla Bug 446081 for RHEL 4.

Comment 6 RHEL Program Management 2008-06-02 20:01:46 UTC
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
release.

Comment 7 Bryan Mason 2008-06-16 22:27:28 UTC
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 21:42:02 UTC
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.

http://rhn.redhat.com/errata/RHBA-2009-0171.html


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