]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix many issues related to mount/unmount:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>
Mon, 2 Feb 2004 19:02:05 +0000 (19:02 +0000)
committerPawel Jakub Dawidek <pjd@FreeBSD.org>
Mon, 2 Feb 2004 19:02:05 +0000 (19:02 +0000)
commit3410b193245fd36209dbafac855c77e5ddff7252
treebbfead6c4e14ae5b280b1a39f5235e314618746b
parentdc9c6194b53a99863ce512a5ccf32006d4cf42f6
Fix many issues related to mount/unmount:

1. Root from inside a jail was able to unmount any file system
   (except /).
2. Unprivileged root was able to unmount file systems mounted by
   privileged root (execpt /).
3. User from inside a jail was able to mount file system when
   sysctl vfs.usermount was set to 1.
4. User was able to mount file system when vfs.usermount was set to 1
   (that's ok) and unmount it even if vfs.usermount was equal to 0
   (that's not correct).

Possibility from point 1 was reported by: Dariusz Kowalski <darek@76.pl>

Only a part of this fix will be MFC'ed (if approved).

PR: kern/60149
Reviewed by: rwatson
Approved by: scottl (mentor)
MFC after: 3 days
sys/kern/vfs_mount.c