Bug 131413 - fstab-sync should not create new fstab file in /tmp
fstab-sync should not create new fstab file in /tmp
Status: CLOSED DUPLICATE of bug 131187
Product: Fedora
Classification: Fedora
Component: hal (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Zeuthen
Depends On:
Blocks: FC3Blocker
  Show dependency treegraph
Reported: 2004-08-31 23:49 EDT by Russell Coker
Modified: 2013-03-05 22:41 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 14:05:24 EST
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 Russell Coker 2004-08-31 23:49:02 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.3; Linux) (KHTML, like Gecko)

Description of problem:
fstab-sync creates a new file under /tmp.  This causes at least two problems.

One problem is that if /tmp and /etc are not on the same file system then the process of moving the temporary file to /etc has race conditions that could potentially leave a machine unbootable if a power failure occurs at the wrong time.

Another problem is that in SE Linux a file created in /tmp gets the type tmp_t by default.  If /etc/fstab gets this type then it can't be used by most programs (the system may fail to boot).

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

How reproducible:

Steps to Reproduce:
boot machine

Additional info:

The solution is to use a temporary file name /etc/fstab.new or similar.
Comment 1 David Zeuthen 2004-09-01 06:05:43 EDT
This have been addressed in bug #131187; the fix is in Rawhide
(hal-0.2.97.cvs20040901-1). I have some concerns on how to properly
update files atomically if relabeling is required; expressed here:


comments, suggestions are welcome.


*** This bug has been marked as a duplicate of 131187 ***
Comment 2 Red Hat Bugzilla 2006-02-21 14:05:24 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

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