/etc/mtab and namespaces
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=190962
I have filed a bugzilla entry requesting that /etc/mtab be made a sym-link to /proc/mounts to allow df(1) to work correctly when multiple name spaces are being used.
Signature · 9 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 4 lines · Russell Coker
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=190962
I have filed a bugzilla entry requesting that/etc/mtabbe made a sym-link to/proc/mountsto allow df(1) to work correctly when multiple name spaces are being used.
Not that simple - first all the code that uses /etc/mtab has to be fixed to deal with the slight differences between mtab and /proc/mounts.
On my system at the moment:
/etc/mtab has:
none /proc proc rw 0 0/dev/hda1 /boot ext3 ro,noexec,nosuid,nodev,noatime,nodiratime 0 0
none /tmp tmpfs rw,noexec,nosuid,nodev,noatime,nodiratime,size=1532M,mode=1777 0 0 /dev/mapper/rootvg-var /var ext3 rw,noexec,nodev,noatime,nodiratime,usrquota,grpquota 0 0
and /proc/mounts says:
/proc /proc proc rw 0 0/dev/hda1 /boot ext3 ro,nosuid,nodev,noexec,noatime,nodiratime,data=ordered 0 0 none /tmp tmpfs rw,nosuid,nodev,noexec,noatime,nodiratime 0 0/dev/rootvg/var /var ext3 rw,nodev,noexec,noatime,nodiratime,data=ordered,usrquota,grpquota 0 0
If you're *positive* that nothing in userspace cares about the differences noted, it might be doable... Big "if" though...
Quoted 8 lines · On Monday 08 May 2006 11:01, [email protected] wrote:
Quoted 4 lines · Russell Coker
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=190962
I have filed a bugzilla entry requesting that/etc/mtabbe made a sym-link to/proc/mountsto allow df(1) to work correctly when multiple name spaces are being used.Not that simple - first all the code that uses
/etc/mtabhas to be fixed to deal with the slight differences between mtab and/proc/mounts.
It's been done before. The Familiar distribution had /etc/mtab as a sym-link the last time I used it (which was a couple of years ago). It's not a new idea.
Quoted 11 lines
On my system at the moment:
/etc/mtabhas:none /proc proc rw 0 0
/dev/hda1/boot ext3 ro,noexec,nosuid,nodev,noatime,nodiratime 0 0 none /tmp tmpfs rw,noexec,nosuid,nodev,noatime,nodiratime,size=1532M,mode=1777 0 0/dev/mapper/rootvg-var/var ext3 rw,noexec,nodev,noatime,nodiratime,usrquota,grpquota 0 0
Quoted 7 lines
and
/proc/mountssays:/proc /proc proc rw 0 0
/dev/hda1/boot ext3 ro,nosuid,nodev,noexec,noatime,nodiratime,data=ordered 0 0 none /tmp tmpfs rw,nosuid,nodev,noexec,noatime,nodiratime 0 0/dev/rootvg/var/var ext3 rw,nodev,noexec,noatime,nodiratime,data=ordered,usrquota,grpquota 0 0
The difference seems to be some mount options related to journaling, size, and permission mode. I think that this should be regarded as a kernel bug in that the kernel does not export such data. There is no reason why the kernel code could not export such data.
Quoted 2 lines
If you're *positive* that nothing in userspace cares about the differences noted, it might be doable... Big "if" though...
What do you believe will care about those differences? df, mount, and the quota utilities don't care, and I can't think of any other program that uses /etc/mtab (apart from other programs that do df type operations).
Signature · 9 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.