Bug 122958 - fixfiles relabel stomps on log file in /tmp
fixfiles relabel stomps on log file in /tmp
Product: Fedora
Classification: Fedora
Component: policycoreutils (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2004-05-10 14:29 EDT by Tom Mitchell
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-06-10 15:20:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tom Mitchell 2004-05-10 14:29:32 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007

Description of problem:
fixfiles relabel stomps on log file in /tmp

# fixfiles relabel
logging to /tmp/fixfiles.fKyAqa3977
Cleaning out /tmp

In the case of relabel /tmp is cleaned out
after "mktemp /tmp/fixfiles.XXXXXXXXXX"

It is recreated later with " ... |tee $LOGFILE"
with a less correct umask and there is a small window
where the log file could be opened by another user
and the log trashed or strange content included.

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

How reproducible:

Steps to Reproduce:
1. /sbin/fixfiles relabel

2. inspect the output
  # fixfiles relabel
  logging to /tmp/fixfiles.fKyAqa3977
  Cleaning out /tmp

3. note the order of events...
   strace -f will show the unlink and recreation with a new umask.


Additional info:

More bad style than anything at this point since
'tee' exposes the content in real time.
Comment 1 Daniel Walsh 2004-05-10 15:27:07 EDT
Moved log file to /var/tmp/

Fixed in policycoreutils-1.11-4


Note You need to log in before you can comment on or make changes to this bug.