Date: Thu, 23 Oct 1997 02:14:12 +0200 (CEST) From: Mikael Karpberg <karpen@ocean.campus.luth.se> To: bde@zeta.org.au (Bruce Evans) Cc: current@FreeBSD.ORG Subject: Re: -STABLE reboots Message-ID: <199710230014.CAA07555@ocean.campus.luth.se> In-Reply-To: <199710220213.MAA22074@godzilla.zeta.org.au> from Bruce Evans at "Oct 22, 97 12:13:50 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
According to Bruce Evans: > >> 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). > > > >Er... Isn't that easilly solvable by mount checking for the two arguments > >being the same? > > Of course not, or it would have been fixed years ago. `mkdir foo; ln foo Thought that there might be such problems... > bar; mount foo bar' also panics. Checking inodes isn't enough either, Umm, but I thought hardlinking of directories were historic things used nowadays only to scare children with? > since `mkdir foo foo/foo; mount foo/foo foo' also panics. Ack, the last example never occured to me. Wouldn't it help to loop through arg1's part by part, from the root, and check the inodes against arg2's inode, then? cd /a/b/x/ mkdir y mount y x -> inode(a) == inode(x)? inode(b) == inode(x)? inode(x) == inode(x)? Yupp! Abort. Or is there a problem with this too? Except speed maybe? But that shouldn't matter THAT much in mount, should it? /Mikael
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710230014.CAA07555>