Bug 581416

Summary: [fix available] tmp files written to / (mktemp unsupported --tmpdir)
Product: Red Hat Enterprise Linux 5 Reporter: Tuomo Soini <tis>
Component: openoffice.orgAssignee: Caolan McNamara <caolanm>
Status: CLOSED CURRENTRELEASE QA Contact: desktop-bugs <desktop-bugs>
Severity: high Docs Contact:
Priority: low    
Version: 5.5   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-08 15:36:02 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:
Attachments:
Description Flags
proposed patch none

Description Tuomo Soini 2010-04-12 08:17:27 UTC
Description of problem:

openoffice.org-3.1.1 has program unopkg which is used when 3rd party components like openoffice.org-voikko are installed.

/usr/lib64/openoffice.org3/program/unopkg has wrong arguments to mktemp causing empty variable for temporary directory.

INSTDIR=`/bin/mktemp -d --tmpdir unoinstall.XXXXXX`

--tmpdir is not valid option and this causes variable INSTDIR being empty.

This means that temporary files are written to /.

At the end of the unopkg there is another failure caused by this, only -n check is preventing removing whatever...

if [ -n "$INSTDIR" ]; then
   rm -rf $INSTDIR
fi

Suggested fix:

INSTDIR=`/bin/mktemp -d /tmp/unoinstall.XXXXXX`
[ $? -gt 0 ] && INSTDIR=/tmp/unoinstall.$$

That would make sure that wrong parameters for mktemp cause at least some randomization and make sure there is no possibility for empty install dir.

Comment 1 Caolan McNamara 2010-04-12 08:31:01 UTC
RHEL-5's mktemp doesn't support --tmpdir, should use -t instead on RHEL-5

Comment 2 Tuomo Soini 2010-04-12 09:16:54 UTC
Created attachment 405913 [details]
proposed patch

Comment 3 Tuomo Soini 2010-04-12 09:18:37 UTC
I guess it's best option to refuse to run command if tmpdir creation fail.

Comment 5 RHEL Program Management 2010-08-09 18:30:23 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 6 RHEL Program Management 2011-01-11 20:49:47 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 7 RHEL Program Management 2011-01-11 23:17:08 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 8 RHEL Program Management 2011-05-31 13:31:06 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 10 RHEL Program Management 2011-09-23 00:15:38 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 12 Caolan McNamara 2012-06-08 15:36:02 UTC
This should be fixed as a side effect of rebasing to LibreOffice 3.4.5