Bug 782326 - move mtab out of etc
Summary: move mtab out of etc
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: filesystem
Version: 6.2
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Ondrej Vasik
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-17 07:14 UTC by Fred van Zwieten
Modified: 2012-01-17 11:49 UTC (History)
0 users

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-17 07:32:35 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Fred van Zwieten 2012-01-17 07:14:10 UTC
Description of problem:
mtab lives in /etc and it shouldn't live there but in /var/run because it holds session specific information and it keeps me from making etc readonly on a secured box. workaround, or probably fix would be to symlink /etc/mtab to /var/run/mtab.


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

How reproducible:
make /etc read-only and make subsequently other mount commands

Steps to Reproduce:
1. mount /etc mountpoint readonly
2. mount some other fs to some mountpoint
3.
  
Actual results:
it will complain

Expected results:
it won't complain

Additional info:
I want to build a system where all is readony exept for the /var et al. This is done for security, backup, provisioning, performance (r/o fs) and knowing exactly what the system looks like.

Comment 2 Ondrej Vasik 2012-01-17 07:32:35 UTC
Thanks for your suggestion, but that's not something what should happen in released RHEL-6 ... in current Fedora /etc/mtab is just symlink to /proc/mounts ... however even this caused (and is still causing) a lot of troubles. Change you have described would probably mean some changes in SELinux policies and maybe more distro changes would be required. If you really think that you need this feature, please contact RHEL product support.

Comment 3 Ondrej Vasik 2012-01-17 11:49:48 UTC
Just a side note from discussion with util-linux maintainer:
"With /etc/mtab being symlink mount(8) will stop to update it properly, as it doesn't handle the symlink destination - with symlink it just doesn't care about that file. So to achieve this, you will need to update mount, umount and likely many other mount* tools. For read-only /etc/ is probably best way to use bind mount, however this is likely unsupported thing in RHEL." - see e.g. http://karelzak.blogspot.com/2011/04/bind-mounts-mtab-and-read-only.html for this topic...


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