Bug 445947 - sysreport.legacy reports "Cannot make temp dir"
Summary: sysreport.legacy reports "Cannot make temp dir"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sos
Version: 5.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Adam Stokes
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 391501
TreeView+ depends on / blocked
 
Reported: 2008-05-10 06:09 UTC by Bryan Mason
Modified: 2022-07-18 07:14 UTC (History)
4 users (show)

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


Attachments (Terms of Use)
Proposed patch (1.09 KB, patch)
2008-05-10 06:11 UTC, Bryan Mason
no flags Details | Diff
Updated patch (52 bytes, text/plain)
2008-11-24 20:06 UTC, Bryan Mason
no flags Details


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 Bryan Mason 2008-05-10 06:09:15 UTC
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):

    sos-1.7-9.2.el5.noarch

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
    Password:
    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 06:11:48 UTC
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 Program Management 2008-06-02 20:00:44 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 10 Bryan Mason 2008-10-16 23:14:12 UTC
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 20:06:54 UTC
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 21:42:17 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.