Re:Don't touch my clipboard
by AdmiralGinge on Tuesday February 18, 2020 @09:11AM
(#22356153)
Isn't that only a GNU and FreeBSD thing? I think other Unixes will still let you rm -rf /.
On FreeBSD you can do
sudo dd if=/dev/random of=/dev/mem
and it will do exactly that, write random crap into your memory without any sort of safeguard, causing a spectacular crash and a console that looks like it's having a seizure. Linux won't let you do that unless it's been compiled with a flag to enable full access to /dev/mem and /dev/kmem.
Re:Don't touch my clipboard
by 0xdeadb00f on Thursday February 20, 2020 @07:49AM
(#22374690)
I want to try that dd command. For fun. Just to see what happens on OpenBSD.
No lasting effects are there? Besides a crash, afterwards I shouldn't have any memory issues, right?
Re:Don't touch my clipboard
by AdmiralGinge on Thursday February 20, 2020 @08:01AM
(#22374749)
I tried this in a FreeBSD VM and it booted fine afterwards. OpenBSD wouldn't let me do it at all for some reason.
Obviously no warranty on bare metal/systems that are actually used for anything.
worth noting that it can be trivially workarounded by adding an asterisk at the end: `rm -rf /*` still works.
Fair enough, but on the other hand there's nothing preventing you from just putting --no-preserve-root in the command either. I see the feature as something to prevent accidents, not as a way to secure the rm command.
Re:Don't touch my clipboard
by tomjakubowski on Wednesday February 19, 2020 @08:50AM
(#22365374)
That version will helpfully leave behind any .files lingering in /
[1]: https://en.wikipedia.org/wiki/Rm_%28Unix%29#Protection_of_th...