"rm -rf /" fanclub

Peter Maloney peter.maloney at brockmann-consult.de
Fri Feb 24 07:34:41 UTC 2012


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
--------------------------------------------



More information about the freebsd-current mailing list