Bug 445947 - sysreport.legacy reports "Cannot make temp dir"
sysreport.legacy reports "Cannot make temp dir"
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sos (Show other bugs)
All Linux
medium Severity medium
: rc
: ---
Assigned To: Adam Stokes
: ZStream
Depends On:
Blocks: 391501
  Show dependency treegraph
Reported: 2008-05-10 02:09 EDT by Bryan Mason
Modified: 2010-10-22 20:54 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:17 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.09 KB, patch)
2008-05-10 02:11 EDT, Bryan Mason
no flags Details | Diff
Updated patch (52 bytes, text/plain)
2008-11-24 15:06 EST, Bryan Mason
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0171 normal SHIPPED_LIVE sosreport bug fix and enhancement update 2009-01-20 11:05:38 EST

  None (edit)
Description Bryan Mason 2008-05-10 02:09:15 EDT
Description of problem:

    Because sysreport.legacy uses $HOME as it's root directory, problems
    can occur if $HOME doesn't exist or isn't writable.

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


How reproducible:

    Every time, if the home directory doesn't exist.

Steps to Reproduce:

    1. Log into a system using an account that has no local home directory.
    2. Run sysreport.legacy as root using sudo.
Actual results:

    $ sudo /usr/sbin/sysreport.legacy
    Cannot make temp dir

Expected results:

    Sysreport generated.

Additional info:

    This is actually the same problem reported in Bug 355071, but that report
    was for sysreport and this is reported against sysreport.legacy.
Comment 1 Bryan Mason 2008-05-10 02:11:48 EDT
Created attachment 305002 [details]
Proposed patch

Create a new variable named TEMP='/tmp' and replace occurrences of $HOME with
$TEMP.	I've tested this by renaming /root to /root.saved and running
sysreport.legacy as root from /.
Comment 2 RHEL Product and Program Management 2008-06-02 16:00:44 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 10 Bryan Mason 2008-10-16 19:14:12 EDT
Some security-related concerns have been raised about the use of /tmp to store the temporary files.  Specifically, see Comment #3 of Bug 320620 (https://bugzilla.redhat.com/show_bug.cgi?id=454690#c3) which is the RHEL 4 version of this Bug.

As soon as we get agreement on the final patch for RHEL 4, I'll post an updated patch here.
Comment 11 Bryan Mason 2008-11-24 15:06:54 EST
Created attachment 324534 [details]
Updated patch

Don't know if we ever got "agreement" per-se, but nobody complained about the attached patch that was proposed for the RHEL 4 version of this bug.
Comment 13 errata-xmlrpc 2009-01-20 16:42:17 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.