Stories
Slash Boxes
Comments

SoylentNews is people

posted by cmn32480 on Monday April 17 2017, @08:34PM   Printer-friendly
from the people-that-live-in-a-bubble dept.

Edit: The link.

There were lots of good titles for this submission, as in "Breaking news: Poettering clueless?" to finally disprove Betteridge's law, or "systemd surprisingly not as good as advertised" or "Breaking new: systemd broken" or "Poettering censors critics after epic fail".

Systemd implementation of "rm -rf .*" will follow ".." to upper directory and erase /

How to reproduce:
        # mkdir -p /foo/dir{1,2}

        # touch /foo/.bar{1,2}

        # cat /etc/tmpfiles.d/test.conf

        R! /foo/.* - - - - -

        Reboot.

After the issue was fixed, finally Poettering added this gem of wisdom:

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?

The answer to this question, as many clarified for him, obviously is a loud "NO!". After being told a couple of times in no uncertain terms, the thread was closed for non-developers

poettering locked and limited conversation to collaborators 4 hours ago

for which I proposed the "freedom-of-speech" department (although I admit it is a weak proposal).


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 5, Insightful) by maxwell demon on Monday April 17 2017, @09:29PM (17 children)

    by maxwell demon (1608) on Monday April 17 2017, @09:29PM (#495517) Journal

    My first thought when reading the title was: Why on earth does an init system need its own implementation of rm?

    But then, this is systemd, the Borg init system. Probably I should be astonished if something has not yet been affected by it.

    --
    The Tao of math: The numbers you can count are not the real numbers.
    Starting Score:    1  point
    Moderation   +3  
       Insightful=3, Total=3
    Extra 'Insightful' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   5  
  • (Score: 3, Interesting) by Azuma Hazuki on Monday April 17 2017, @09:34PM (5 children)

    by Azuma Hazuki (5086) on Monday April 17 2017, @09:34PM (#495525) Journal

    > My first thought when reading the title was: Why on earth does an init system need its own implementation of rm?

    Mine too. This went from "WTF?" to feeling deeply, deeply unclean and doomed, something like I imagine you'd feel if someone told you that 5 years ago you'd had a blood transplant that turned out to have syphilis in it...

    --
    I am "that girl" your mother warned you about...
    • (Score: 2) by FatPhil on Tuesday April 18 2017, @07:55AM (4 children)

      by FatPhil (863) <reversethis-{if.fdsa} {ta} {tnelyos-cp}> on Tuesday April 18 2017, @07:55AM (#495744) Homepage
      Ewww, horrible analogy, thank you. I'm not feeling so weird for starting to migrate to Devuan a couple of years ago now.
      (Just for reference, it's "blood transfusion" not transplant, transplants are for solid bits.)
      --
      Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves
      • (Score: 0) by Anonymous Coward on Tuesday April 18 2017, @11:54AM

        by Anonymous Coward on Tuesday April 18 2017, @11:54AM (#495796)

        Maybe it was clotted.

      • (Score: 2) by Azuma Hazuki on Tuesday April 18 2017, @01:53PM (2 children)

        by Azuma Hazuki (5086) on Tuesday April 18 2017, @01:53PM (#495844) Journal

        Good point...I meant to type transfusion, but haven't been sleeping properly for months so...yeah. And I would be a little wary of Devuan; at this point you may as well go full-on FreeBSD or Gentoo if you have the hardware for it. I am beginning to wonder if at some point around 2019 or 2020 Gentoo, Slackware, etc will fork off and call themselves something different, maybe even maintaining their own Linux kernel without the creeping systemd hooks...

        --
        I am "that girl" your mother warned you about...
        • (Score: 2) by FatPhil on Tuesday April 18 2017, @02:14PM (1 child)

          by FatPhil (863) <reversethis-{if.fdsa} {ta} {tnelyos-cp}> on Tuesday April 18 2017, @02:14PM (#495851) Homepage
          Something happened (probably hormonal as I age) about 14 months ago, and my sleep cycle's been right royally messed up since then. At the moment I'm getting pretty good results from popping a single milligram of melatonin about an hour or so before I'd like to be asleep. If it's close to what should be bedtime and I think "I'll take a while to get off", then I just pop the pill, there's no point not doing so. The nice thing about it is that as it's a hormone your body is already very familiar with handling you can pop a few if things are bad, and there are no ill effects. It wears off quickly so there are no repurcussions in the morning. 7e/50 is my target price, as all brands are the same shit deep down.
          --
          Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves
          • (Score: 2) by tibman on Tuesday April 18 2017, @05:04PM

            by tibman (134) Subscriber Badge on Tuesday April 18 2017, @05:04PM (#495912)

            I've had good success with melatonin as well. Using some random gummi brand from amazon.

            --
            SN won't survive on lurkers alone. Write comments.
  • (Score: 2, Informative) by Anonymous Coward on Monday April 17 2017, @10:05PM (4 children)

    by Anonymous Coward on Monday April 17 2017, @10:05PM (#495555)

    My first thought when reading the title was: Why on earth does an init system need its own implementation of rm?

    It does not have its own rm. It has an internal command called R! that calls a function called rm_rf().
    It is right there in the summary.

    This whole story is a big bag of nothing hyped by people who don't know what they are talking about.
    The fact that there was no link to the github issue in the submission should have been a clue to the editors that it was low-grade crap.

    • (Score: 3, Touché) by cubancigar11 on Tuesday April 18 2017, @05:45AM (2 children)

      by cubancigar11 (330) on Tuesday April 18 2017, @05:45AM (#495696) Homepage Journal

      And does rm_rf() call rm -rf or does it try to implement it internally?

      • (Score: 0) by Anonymous Coward on Tuesday April 18 2017, @03:14PM (1 child)

        by Anonymous Coward on Tuesday April 18 2017, @03:14PM (#495876)

        What do you think? If it called the system rm would this bug report ever have been opened?

        I don't get it, why are you hung up on the name of the function call?

        Its like people are so amped up to bag on poettering that you all are willing to lose your shit over tiniiest thing.
        Ermagad somebody on the internet made a dumb comment!
        Should you be judged by every dumbass comment you've made?

        • (Score: 2) by cubancigar11 on Wednesday April 19 2017, @03:17AM

          by cubancigar11 (330) on Wednesday April 19 2017, @03:17AM (#496122) Homepage Journal

          I have no interest in the name I am talking about duplicating functionality and breaking it - which is basically the biggest problem everyone has with systemd and poettring.

          Seriously, systemd is GPLv2 and there are enough version of coreutils in GPLv2 to not implement it again.

    • (Score: 2, Touché) by Anonymous Coward on Tuesday April 18 2017, @06:35AM

      by Anonymous Coward on Tuesday April 18 2017, @06:35AM (#495713)

      It does not have its own rm. It has an internal command called R! that calls a function called rm_rf().
      It is right there in the summary.

      This whole story is a big bag of nothing hyped by people who don't know what they are talking about.
      The fact that there was no link to the github issue in the submission should have been a clue to the editors that it was low-grade crap.

      Thank you, Lennart, for joining our discussion and setting us straight. You're right- "rm -rf /" is a great way to clean up tons of crap on a Linux filesystem. Way better than bleachbit.

  • (Score: 2) by NotSanguine on Tuesday April 18 2017, @02:32AM (2 children)

    My first thought when reading the title was: Why on earth does an init system need its own implementation of rm?

    But then, this is systemd, the Borg init system. Probably I should be astonished if something has not yet been affected by it.

    The "functionality" in question is part of systemd-tmpfiles(8) [fordham.edu]:

    systemd-tmpfiles creates, deletes, and cleans up volatile and temporary files and directories, based on the configuration file format and location specified in tmpfiles.d(5).

    --
    No, no, you're not thinking; you're just being logical. --Niels Bohr
    • (Score: 0) by Anonymous Coward on Tuesday April 18 2017, @02:33PM (1 child)

      by Anonymous Coward on Tuesday April 18 2017, @02:33PM (#495862)

      Given that it is meant to handle files and directories inside one or two special directories, it is really surprising that the commands are not only run as root, but allowed to exit those directories.

      One would think that making use of a special config file format rather than shell scripts and core utils for this was to avoid just such events happening...

      • (Score: 2) by NotSanguine on Tuesday April 18 2017, @05:04PM

        Given that it is meant to handle files and directories inside one or two special directories, it is really surprising that the commands are not only run as root, but allowed to exit those directories.

        One would think that making use of a special config file format rather than shell scripts and core utils for this was to avoid just such events happening...

        IIUC, there is functionality which allows the use of functions from systemd-tmpfiles in a systemd pseudo-shell. a command within that pseudo-shell (R!) purported to mimic 'rm -rf' but the function didn't treat '.' and '..' (as /bin/rm does) as special cases, making sure that deletions only occurred downwards in the directory tree.

        I suppose one could make the argument that only careless users would go with 'R! .*'. However, given that /bin/rm had mitigated that issue for a number of years, (not sure when, but as a novice user back in the late 80s/early 90s I made that mistake with rm and it happily deleted half my root filesystem before I realized what was happening) by refusing to delete up the directory tree.

        As such, refusing to delete up the tree is (and has been for some time) the expected behavior, so that argument is pretty weak.

        Poettering, et al showed a glaring lack of common sense in their implementation and didn't consider edge cases.

        --
        No, no, you're not thinking; you're just being logical. --Niels Bohr
  • (Score: 2) by Alphatool on Tuesday April 18 2017, @11:16AM (1 child)

    by Alphatool (1145) on Tuesday April 18 2017, @11:16AM (#495788)

    Well, from a systemd point of view you've got this backwards! Why should the operating system have a duplicated implementation of rm when there can be a perfectly good one built into the init system?? It's even better at deleting things than the legacy implementation was!! Next up, twitter integration!!!

    • (Score: 3, Funny) by maxwell demon on Tuesday April 18 2017, @06:38PM

      by maxwell demon (1608) on Tuesday April 18 2017, @06:38PM (#495952) Journal

      I'm looking forward to the binary twitter messages. ;-)

      --
      The Tao of math: The numbers you can count are not the real numbers.
  • (Score: 2) by digitalaudiorock on Tuesday April 18 2017, @08:11PM

    by digitalaudiorock (688) on Tuesday April 18 2017, @08:11PM (#495994) Journal

    My first thought when reading the title was: Why on earth does an init system need its own implementation of rm?
    But then, this is systemd, the Borg init system. Probably I should be astonished if something has not yet been affected by it.

    Nothing surprises me (or anyone with two brain cells to rub together) at all about any of this, nor do the requisite troll apologists putting their $.02 in the comments here. Anyone defending what we're seeing here is being paid by someone or is simply a fucking idiot.

    It's been clear since day one the the intentional approach of the systemd devs, unlike the entire history of unix and Linux is basically is to NOT reuse anything prior, and to re-invent every possible wheel...because you know..."how difficult could it be?" and "what do a bunch of fucking old grey-beards know?". I guess they're starting to find out right? Arrogant know-it-all jackasses at work. Thank God for my systemd-less Gentoo systems.