Re: "rm -rf /" fanclub

From: Peter Maloney <peter.maloney_at_brockmann-consult.de>
Date: Fri, 24 Feb 2012 08:21:55 +0100
On 02/24/2012 01:16 AM, deeptech71_at_gmail.com wrote:
> On Thu, Feb 23, 2012 at 11:41 PM, deeptech71_at_gmail.com
> <deeptech71_at_gmail.com> wrote:
>> X11R6 is actually a symlink to /usr/local, and not usr/local or
>> .usr/local! Also, /home is a symlink to /usr/home, and not usr/home or
>> ./usr/home
> I meant to say that X11R6 should be a symlink to local or ./local.
I fully agree (if tested)... it makes no sense to use absolute symlinks
unless you really want them to be absolute. eg. in my home dir I added
dhcpd.leases -> /var/lib/...

Did you test this, by removing the link and creating it relative to see
if there are any stupid side effects?

And I've never really thought symlinks were so dangerous (unless you use
software that auto-dereferences, eg. platform independent stuff), but
with "mount --bind" in linux (same as nullfs in FreeBSD?), you can do
similar things if you don't use "--one-file-system" with your "rm -rf"
calls.

So in addition to the symlink change, why not improve rm also, by adding
the "--one-file-system" option (which actually exists in "grm" from the
sysutils/coreutils port).


> About /home: I've just noticed that /home points to usr/home in the
> newest release. The newest basic installation (base + kernel) doesn't
> even come with an X11R6 symlink, yet I did have it after a full
> install (-CURRENTization + ports), so that symlink must be coming from
> mergemaster or some port.
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"


-- 

--------------------------------------------
Peter Maloney
Brockmann Consult
Max-Planck-Str. 2
21502 Geesthacht
Germany
Tel: +49 4152 889 300
Fax: +49 4152 889 333
E-mail: peter.maloney_at_brockmann-consult.de
Internet: http://www.brockmann-consult.de
--------------------------------------------
Received on Fri Feb 24 2012 - 06:34:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:24 UTC