Bug 220322 - autorelabel misses mount points.
Summary: autorelabel misses mount points.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
: 217286 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-12-20 13:45 UTC by Tobias Oed
Modified: 2014-03-17 03:04 UTC (History)
1 user (show)

Fixed In Version: 8.52-1
Clone Of:
Environment:
Last Closed: 2007-04-16 23:16:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch for this (1008 bytes, patch)
2007-04-16 23:15 UTC, Bill Nottingham
no flags Details | Diff

Description Tobias Oed 2006-12-20 13:45:12 UTC
Description of problem:
The underlying directories where file systems are mounted do not get relabeled
when an automatic fs relabeling is forced. This is because the relabeling
happens when file systems are already mounted. Mislabeled mount points can
happen after / is restored from backup.

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

How reproducible:
100%

Steps to Reproduce:
1. Misslabel a mount point for instance /var
2. touch autorelabel, reboot

Actual results:
The mount point doesn't get relabeled. In case of /var this leads to errors in
the logs at every reboot after the relabeling:
tobsbox kernel: audit(1166612710.404:49): avc:  denied  { search } for  pid=1196
comm="rhgb" name="var" dev=md0 ino=863265 scontext=system_u:system_r:rhgb_t:s0
tcontext=system_u:object_r:file_t:s0 tclass=dir

Expected results:
The underlying mount points get relabeled. Maybe before mounting all file
systems in rc.sysinit, all mount points in /etc/fstab should be relabeled.

Unmounting the fs and running restorecon manually on the mount points gets rid
of the errors at boot.

Additional info:
Bug 217286 is a special case of this, regarding the /etc/rhgb/temp mount point.
That case is more complicated than /var, /tmp etc given how early rhgb mounts
stuff there.

Tobias

Comment 1 Bill Nottingham 2006-12-20 20:35:26 UTC
Makes sense.

Comment 2 Daniel Walsh 2007-02-14 18:36:24 UTC
*** Bug 217286 has been marked as a duplicate of this bug. ***

Comment 3 Bill Nottingham 2007-04-16 23:15:58 UTC
Created attachment 152724 [details]
patch for this

Here's what will be in 8.52-1.


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