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.
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 /.
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.
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.
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.
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