fstab does not honor /proc mount options
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mountall (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Lucid |
Won't Fix
|
Undecided
|
Unassigned | ||
Precise |
Won't Fix
|
Undecided
|
Unassigned | ||
Trusty |
Confirmed
|
Undecided
|
Unassigned | ||
Utopic |
Confirmed
|
Undecided
|
Unassigned | ||
Vivid |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Passing mount options (here: "hidepid=2") for /proc via /etc/fstab does not seem to work:
$ grep /proc /etc/fstab /etc/mtab /proc/mounts
/etc/fstab:proc /proc proc nodev,noexec,
/etc/mtab:proc /proc proc rw,noexec,
/proc/mounts:proc /proc proc rw,nosuid,
Also, /etc/mtab and /proc/mounts are out of sync - are there plans to link /etc/mtab against /proc/mounts? (Note: I'm not particularly in favor of bug 906293, propsing yet another file to the mix).
The system is a fully patched Ubuntu 12.04.1 LTS (i686) in an Amazon EC2 virtual machine.
Workaround: add the following line to /etc/rc.local:
mount -o remount,hidepid=2 /proc
Related branches
- Upstart Reviewers: Pending requested
-
Diff: 50480 lines (+512/-49588)25 files modified.bzrignore (+39/-0)
Makefile.in (+0/-873)
aclocal.m4 (+0/-1175)
apport/Makefile.in (+0/-556)
conf/Makefile.in (+0/-579)
config.guess (+0/-1552)
config.h.in (+0/-401)
config.sub (+0/-1788)
configure (+0/-20995)
configure.ac (+7/-1)
dbus/Makefile.in (+0/-561)
debian/changelog (+15/-0)
debian/control (+1/-1)
debian/initramfs/Makefile.in (+0/-570)
debian/initramfs/upstart-jobs/Makefile.in (+0/-556)
debian/rules (+1/-1)
ltmain.sh (+0/-9661)
m4/libtool.m4 (+0/-7991)
man/Makefile.in (+0/-634)
src/Makefile.am (+25/-0)
src/Makefile.in (+0/-831)
src/fstab (+2/-2)
src/mountall.c (+273/-104)
src/tests/test_mountall.c (+149/-0)
util/Makefile.in (+0/-756)
Changed in mountall (Ubuntu): | |
assignee: | nobody → Dmitrijs Ledkovs (xnox) |
tags: | added: ec2-images i386 precise trusty |
This will be due to the fact that mountall doesn't mount /proc; it's mounted via the initramfs if you have one, or by upstart if you don't. Apparently mountall fails to check afterwards that the configured mount options are used.