Bug 122958 - fixfiles relabel stomps on log file in /tmp
Summary: fixfiles relabel stomps on log file in /tmp
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-05-10 18:29 UTC by Tom Mitchell
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-06-10 19:20:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tom Mitchell 2004-05-10 18:29:32 UTC
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):
policycoreutils-1.11-2

How reproducible:
Always

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 19:27:07 UTC
Moved log file to /var/tmp/

Fixed in policycoreutils-1.11-4

Dan



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