Date: Thu, 15 Aug 1996 09:14:22 -0500 (CDT) From: Joe Greco <jgreco@brasil.moneng.mei.com> To: bde@zeta.org.au (Bruce Evans) Cc: jgreco@brasil.moneng.mei.com, ulf@lamb.net, hackers@FreeBSD.ORG, jkh@time.cdrom.com Subject: Re: Nightmare. Message-ID: <199608151414.JAA13565@brasil.moneng.mei.com> In-Reply-To: <199608142129.HAA04653@godzilla.zeta.org.au> from "Bruce Evans" at Aug 15, 96 07:29:21 am
next in thread | previous in thread | raw e-mail | index | archive | help
> >> I would go more into the direction of checking if the dump device is a > >> mounted file system. Easy check. > > >I tend to agree, but wonder if it would not make more sense to tackle this > >from a different angle. > > >Consider all the programs that could clobber a mounted file system. Would > >it make more sense if we somehow protected a mounted disk device from > >being clobbered? > > It is already protected. Even root can't even open a mounted disk device. Root can open (and write to) a raw disk device that has its counterpart mounted, however. I think the "and write to" part is much more of a liability than simply being able to open and read the device. As we saw from the message that started this thread. ;-) > However, mounted disk devices can easiliy be clobbered using an alias. > There are about 2^(1+5+3) = 512 possible aliases (raw/buffered, 2^5 > slices, 2^3 partitions). This is useful for things like installing > new bootblocks on the root partition without having to reboot with a > different root partition. Don't fix it. Root knows all about this > problem, and never makes mistakes :-). As we saw from the message that started this thread. ;-) In general I don't think it's a solvable problem. I'm willing to live with that personally, I think that the current state of affairs is a good compromise, but I think it's really a good idea to toss around ideas anyways to see if there isn't a better general solution of some sort waiting out there to be found. ... JG
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608151414.JAA13565>