Bug 220322 - autorelabel misses mount points.
autorelabel misses mount points.
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
: 217286 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-20 08:45 EST by Tobias Oed
Modified: 2014-03-16 23:04 EDT (History)
1 user (show)

See Also:
Fixed In Version: 8.52-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-16 19:16:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Tobias Oed 2006-12-20 08:45:12 EST
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 15:35:26 EST
Makes sense.
Comment 2 Daniel Walsh 2007-02-14 13:36:24 EST
*** Bug 217286 has been marked as a duplicate of this bug. ***
Comment 3 Bill Nottingham 2007-04-16 19:15:58 EDT
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.