-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tmpfiles: R! /dir/.* destroys root #5644
Comments
I am not sure I'd consider this much of a problem. Yeah, it's a UNIX pitfall, but "rm -rf /foo/.*" will work the exact same way, no? |
No, not on Fedora 24 at least. |
No http://pubs.opengroup.org/onlinepubs/9699919799/utilities/rm.html#tag_20_111_16
|
Here's the regression tests in coreutils https://github.com/coreutils/coreutils/blob/e7a2580b96370da03c4d3553ccdf4ee66a14c6a4/tests/rm/r-4.sh#L39 which includes the |
For some people it's advisable to never miss a chance to stay silent. Debian:
Ubuntu:
Busybox:
It took a whole of 5mins to test all of these. I find it particularly interesting since the comment I am referring to has been made after the issue has been solved already. Way to highlight how little consideration is being given to issues reported by |
shocking to hear
no, and you REALLY should know that as many others do or AT LEAST test it before pretend such nonsense - frankly, that below is not something theoretical, i do that for many years to get /tmp/ really empty [root@testserver:/tmp]$ rm -rf . |
and look how others see it as "much of a problem" when something by accident kills the whole OS - and yes i am terrible angry by that comment which shows something of an bad attitude [root@testserver:~]$ rm -rf / |
Do NOT run the reproducer without a proper backup and/or on a production system!
How to reproduce:
# mkdir -p /foo/dir{1,2}
# touch /foo/.bar{1,2}
# cat /etc/tmpfiles.d/test.conf
R! /foo/.* - - - - -
Note the dot in the glob. When either using r!, or removing the dot and using R!, the bug doesn't reproduce.
The text was updated successfully, but these errors were encountered: