Bug 446081 - Do not rely on env to execute python
Do not rely on env to execute python
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: sos (Show other bugs)
4.6
All Linux
medium Severity medium
: rc
: ---
Assigned To: Adam Stokes
:
Depends On:
Blocks: 391511 467444
  Show dependency treegraph
 
Reported: 2008-05-12 12:58 EDT by Bryan Mason
Modified: 2010-10-22 20:55 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
* sysreport executed python indirectly, through env. On systems where an end-user had installed python from a source outside of Red Hat Enterprise Linux, this could lead to unreliable results. Sysreport now executes python directly and therefore is not susceptible to this instability.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-18 16:23:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Proposed patch (1.76 KB, patch)
2008-05-12 13:08 EDT, Bryan Mason
no flags Details | Diff

  None (edit)
Description Bryan Mason 2008-05-12 12:58:51 EDT
+++ This bug was initially created as a clone of Bug #445510 +++

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 1 Bryan Mason 2008-05-12 13:08:18 EDT
Created attachment 305148 [details]
Proposed patch

Replace "#!/usr/bin/env python" with #!/usr/bin/python
Comment 2 RHEL Product and Program Management 2008-09-05 13:12:28 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
release.
Comment 6 Ruediger Landmann 2009-01-29 01:19:51 EST
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
* sysreport executed python indirectly, through env. On systems where an end-user had installed python from a source outside of Red Hat Enterprise Linux, this could lead to unreliable results. Sysreport now executes python directly and therefore is not susceptible to this instability.
Comment 10 errata-xmlrpc 2009-05-18 16:23:54 EDT
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-0994.html

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