Live data from Hacker News

Systemd: tmpfiles: R /dir/.* destroys root

github.com

11–20 of 21 posts

Re: Systemd: tmpfiles: R /dir/.* destroys root

#12
post #5

This almost seems like a generational clash. Anybody who's been around for a while knows that you never ever type rm -rf .* because it can blow up in your face. Lennart's response is tone-deaf because he can't understand how anybody could make that mistake. He's never noticed that rm has started refusing to let you shoot yourself in the foot because he would never think of typing rm -rf .* in the first place. Newer u…

Nah, it is more a clash in that not only do the systemd devs feel the need to make their own rm equivalent. But they fail to look into the evolution of defaults for said command before going "its unix, deal with it". Yeah it is unix, it is the kind of unix that you only find running on some old DEC somewhere. Not on a modern x86 cluster. This while presenting systemd as being about making Linux something more than a…

FWIW, the bug was fixed before Lennart even started the whole discussion.

> it is more a clash in that not only do the systemd devs feel the need to make their own rm equivalent

I disagree. It's a failure of the C standard library to not provide a recursive unlink(), so every C program that wishes to do one has to reimplement the logic manually. Most standard libraries of other languages have a recursive unlink(), for example: https://golang.org/pkg/os/#RemoveAll

Re: Systemd: tmpfiles: R /dir/.* destroys root

#13
post #7

That bug is like the quintessence of why systemd is bad. Breaking the system when getting user input that previously worked, not even knowing that the existing tools they replaced had safe-guards against this problem, and when confronted with the issue having a first reaction of "that's not a problem". The one good thing about this is that they did not close it as 'won't fix'.

The first reaction was to fix the bug. The discussion started after that.

Re: Systemd: tmpfiles: R /dir/.* destroys root

#16
post #7

That bug is like the quintessence of why systemd is bad. Breaking the system when getting user input that previously worked, not even knowing that the existing tools they replaced had safe-guards against this problem, and when confronted with the issue having a first reaction of "that's not a problem". The one good thing about this is that they did not close it as 'won't fix'.

> The one good thing about this is that they did not close it as 'won't fix'.

My educated guess based on reading several previous bug reports is that Poettering would've drag his feet and maybe first close it as wontfix before fixing the issue some time later. Thankfully Martin Pitt fixed it quickly before Poettering came over to badmouth UNIX and point out how everybody else is wrong.

Re: Systemd: tmpfiles: R /dir/.* destroys root

#17
post #5

This almost seems like a generational clash. Anybody who's been around for a while knows that you never ever type rm -rf .* because it can blow up in your face. Lennart's response is tone-deaf because he can't understand how anybody could make that mistake. He's never noticed that rm has started refusing to let you shoot yourself in the foot because he would never think of typing rm -rf .* in the first place. Newer u…

I don't think Lennart is from a generation that would have experienced this. http://pubs.opengroup.org/onlinepubs/007904975/utilities/rm.... "The rm utility is forbidden to remove the names dot and dot-dot in order to avoid the consequences of inadvertently doing ..."

Please bear in mind that (1) the existence of a standard does not imply immediate global compliance of new software and (2) the existence of compliant software does not imply that people are actually using it. In the 1990s, when Lennart would have been at university, he would have been exposed to Unix servers that had been installed 5-10 years previously, at least. So the timeframe we're looking at isn't 2001, but the late 1980s / early 1990s.

Re: Systemd: tmpfiles: R /dir/.* destroys root

#18

Earlier quoted context omitted.

I don't think Lennart is from a generation that would have experienced this. http://pubs.opengroup.org/onlinepubs/007904975/utilities/rm.... "The rm utility is forbidden to remove the names dot and dot-dot in order to avoid the consequences of inadvertently doing ..."

Please bear in mind that (1) the existence of a standard does not imply immediate global compliance of new software and (2) the existence of compliant software does not imply that people are actually using it. In the 1990s, when Lennart would have been at university, he would have been exposed to Unix servers that had been installed 5-10 years previously, at least. So the timeframe we're looking at isn't 2001, but th…

If he is programming for _nix, but has not kept himself current with developments within the _nix ecosystem, that is even more worrying.

Re: Systemd: tmpfiles: R /dir/.* destroys root

#19

Earlier quoted context omitted.

Please bear in mind that (1) the existence of a standard does not imply immediate global compliance of new software and (2) the existence of compliant software does not imply that people are actually using it. In the 1990s, when Lennart would have been at university, he would have been exposed to Unix servers that had been installed 5-10 years previously, at least. So the timeframe we're looking at isn't 2001, but th…

If he is programming for _nix, but has not kept himself current with developments within the _nix ecosystem, that is even more worrying.

My sympathy is clearly with Lennart here -- we're around the same age, and I like using systemd. I came of age using systems that would absolutely burn you if you tried to remove .* and it's pretty unreasonable to ask me to remember that most users wouldn't have a reason to reflexively avoid it.

You're on much firmer ground arguing that Lennart shouldn't be reimplementing rm. I disagree -- I don't have a problem with him reimplementing rm in systemd -- but there's a legitimate argument to be made there.

Post reply on HN