Re:Google Chrome Keystone is modifying /var symlink on non S...
by jen20 on Wednesday September 25, 2019 @07:50AM
(#21069801)
Of course, Linux could do what Solaris did decades ago and define the directory order in which `rm -rf /` works to start with `pwd` - and thus fail immediately. That would fix that problem completely.
[ Parent
| on HN ]
Re:Google Chrome Keystone is modifying /var symlink on non S...
by w-m on Wednesday September 25, 2019 @08:19AM
(#21070002)
How did they fix that, in the rm binary?
In the example above, the command would be `rm -rf /` without the variable present, and the shell would expand / to all the folders in /. So it's not a direct call to `rm -rf /`, you would need to handle the shell expansion of /* as well?
Re:Google Chrome Keystone is modifying /var symlink on non S...
by jen20 on Wednesday September 25, 2019 @11:51AM
(#21071929)
I missed the * on the end.
Re:Google Chrome Keystone is modifying /var symlink on non S...
by techslave on Wednesday September 25, 2019 @10:38AM
(#21071193)
you can rmdir $PWD no problem. as long as there are no files in it. i guess it catches almost all cases though.
come to think of it, when would you ever want to rm -rf/? even in a chroot it doesn’t seem like a thing you’d want to do.
Re:Google Chrome Keystone is modifying /var symlink on non S...
by thenewwazoo on Wednesday September 25, 2019 @12:01PM
(#21072021)
When working in chroot jails on embedded distributions, I have needed to run `rm -rf /`. It's admittedly really edge-casey, but it's happened.