Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Oct 1997 10:08:11 +0100
From:      David Malone <dwmalone@maths.tcd.ie>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        current@freebsd.org, freebsd-stable@freebsd.org
Subject:   Recursive mount [ was Re: -STABLE reboots ]
Message-ID:   <9710221008.aa03556@salmon.maths.tcd.ie>
In-Reply-To: Your message of "Wed, 22 Oct 1997 10:37:46 %2B1000." <199710220037.KAA17789@godzilla.zeta.org.au> 

next in thread | previous in thread | raw e-mail | index | archive | help
> This is an old problem.  `mount -t any /foo /foo' always panics.  Fix:
> don't do that.  However, since mount_msdos is setuid root, anyone can
> do that using any = msdos.  Fix in 2.2: mount_msdos should not be
> setuid root.

I thought about tring to rewrite the mount code for the various
filesystems to ask for a recursive lock, and then compare the
mount point and "device", but that would require me to learn
quite a bit about VFS.

> The problem is more serious in -current, since mount(2) is unprivileged,
> so even `mount /foo /foo' panics (if the mounter is root or owns /foo).

Could someone add a sysctl to current that makes
mount a privilaged syscall?

	David.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi? <9710221008.aa03556>