Bug 454690
Summary: | sysreport.legacy reports "Cannot make temp dir" | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 4 | Reporter: | Bryan Mason <nobody+bjmason> | ||||||||
Component: | sos | Assignee: | Adam Stokes <astokes> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | |||||||||
Severity: | medium | Docs Contact: | |||||||||
Priority: | medium | ||||||||||
Version: | 4.6 | CC: | agk, azelinka, bmason, bmr, bressers, duck, rbiba, rlerch, tao | ||||||||
Target Milestone: | rc | ||||||||||
Target Release: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | Linux | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: |
* sysreport.legacy used $HOME as its root directory. In case this environment variable did not exist or the directory it referred to was not writable, sysreport.legacy could not generate its report and would exit with the message "Cannot make temp dir". Sysreport.legacy now uses a randomly created directory as its root directory and therefore can generate a report even on a system without a usable $HOME.
|
Story Points: | --- | ||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2009-05-18 20:24:13 UTC | Type: | --- | ||||||||
Regression: | --- | Mount Type: | --- | ||||||||
Documentation: | --- | CRM: | |||||||||
Verified Versions: | Category: | --- | |||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||
Embargoed: | |||||||||||
Bug Depends On: | |||||||||||
Bug Blocks: | 391511, 458752, 467444 | ||||||||||
Attachments: |
|
Description
Bryan Mason
2008-07-09 19:03:55 UTC
Created attachment 311404 [details]
Proposed patch
Create a new variable named TEMP='/tmp' and replace occurrences of $HOME with
$TEMP.
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. That patch looks dangerous. I'd suggest you simply something like TEMP=`mktemp -d` Then just remove $TEMP at the end of the run. As it stands, the patch will likely introduce a security flaw. (In reply to comment #3) > That patch looks dangerous. I'd suggest you simply something like > TEMP=`mktemp -d` > > Then just remove $TEMP at the end of the run. But we can't remove $TEMP at the end of the run because the output file is located in $TEMP/${NAME}.${SUFFIX} (used to be $HOME/${NAME}.${SUFFIX} before we started using a temp dir instead of /root to hold the sysreport files). Created attachment 320620 [details]
Updated patch
Uses `mktemp -d` to create the $TEMP directory.
Created attachment 320623 [details]
Corrected updated patch
You'd think after all these years, I'd know the difference between '\' and '/'. :^)
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.legacy used $HOME as its root directory. On systems that did not have a local home directory, sysreport.legacy could not generate its report and would exit with the message "Cannot make temp dir". Sysreport.legacy now uses /bin as its root directory and therefore can generate a report even on a system without a local home directory. Release note updated. 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. Diffed Contents: @@ -1 +1 @@ -* sysreport.legacy used $HOME as its root directory. On systems that did not have a local home directory, sysreport.legacy could not generate its report and would exit with the message "Cannot make temp dir". Sysreport.legacy now uses /bin as its root directory and therefore can generate a report even on a system without a local home directory.+* sysreport.legacy used $HOME as its root directory. In case this environment variable did not exist or the directory it referred to was not writable, sysreport.legacy could not generate its report and would exit with the message "Cannot make temp dir". Sysreport.legacy now uses a randomly created directory as its root directory and therefore can generate a report even on a system without a usable $HOME. 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 |