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: 4, Informative) by tangomargarine on Monday April 17 2017, @08:44PM (21 children)

    by tangomargarine (667) on Monday April 17 2017, @08:44PM (#495478)

    For something as facepalm-worthy as this, we really need actual source links in the summary.

    In other news, I hear Lennart Poettering eats live chinchillas. It was discussed on the developer mailing list. No, I don't have a link.

    --
    "Is that really true?" "I just spent the last hour telling you to think for yourself! Didn't you hear anything I said?"
    Starting Score:    1  point
    Moderation   +2  
       Insightful=1, Informative=1, Total=2
    Extra 'Informative' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   4  
  • (Score: 1, Funny) by Anonymous Coward on Monday April 17 2017, @08:51PM

    by Anonymous Coward on Monday April 17 2017, @08:51PM (#495484)

    Some things you can take as an article of faith.

    Sorry chinchillas, we can't save you all :(

  • (Score: 2, Informative) by Anonymous Coward on Monday April 17 2017, @09:01PM

    by Anonymous Coward on Monday April 17 2017, @09:01PM (#495493)
  • (Score: 5, Informative) by Marand on Monday April 17 2017, @09:04PM (17 children)

    by Marand (1081) on Monday April 17 2017, @09:04PM (#495494) Journal

    Here's the github issue. [github.com]

    That's the only thing I've seen on the matter so far. Honestly there's not much to it: someone gave a matter-of-fact bug report, Poettering tried to claim it was consistent with "rm", and a few people pointed out that he has no clue how rm works. If Poettering hadn't put his foot in his mouth it wouldn't even be noteworthy.

    Of course, there's the whole "those who don't understand unix are doomed to reimplement it poorly" angle. Why does systemd needs its own not-invented-here version of "rm -rf" at all? I found that fact more interesting than the responses to the report.

    • (Score: 3, Insightful) by tangomargarine on Monday April 17 2017, @09:07PM (10 children)

      by tangomargarine (667) on Monday April 17 2017, @09:07PM (#495500)

      rm -rf is about the last command I would trust anyone to reengineer even if they *did* know what they were doing. It's almost like he's *trying* to piss people off.

      --
      "Is that really true?" "I just spent the last hour telling you to think for yourself! Didn't you hear anything I said?"
      • (Score: 3, Insightful) by Marand on Monday April 17 2017, @09:31PM (2 children)

        by Marand (1081) on Monday April 17 2017, @09:31PM (#495521) Journal

        Well, they already re-overengineered the single most important process on the system (init), so why not rm too?

        • (Score: 1, Funny) by Anonymous Coward on Tuesday April 18 2017, @01:33PM (1 child)

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

          STOP GIVING THEM IDEAS!! :-(

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

            by Marand (1081) on Tuesday April 18 2017, @04:36PM (#495901) Journal

            Based on the summary, I think it's safe to say they already had that idea before I commented. :(

      • (Score: 2) by edIII on Monday April 17 2017, @09:37PM (6 children)

        by edIII (791) on Monday April 17 2017, @09:37PM (#495526)

        LOL. Yeah, rm -rf is very fucking dangerous. Especially messing around as root. With undelete capabilities not really being present Linux/BSD you are left with data recovery tools. The only thing funnier is that the command in question deletes all the tools you need to do anything :)

        rm is a command that requires a tremendous amount of trust in the developers. I still get nervous every time I type it, and I do know what I'm doing too.

        --
        Technically, lunchtime is at any moment. It's just a wave function.
        • (Score: 2) by kaszz on Monday April 17 2017, @10:15PM (3 children)

          by kaszz (4211) on Monday April 17 2017, @10:15PM (#495560) Journal

          Neither NTFS have any undelete capability or does it?

          • (Score: 2) by fnj on Tuesday April 18 2017, @12:02AM (1 child)

            by fnj (1654) on Tuesday April 18 2017, @12:02AM (#495609)

            You can undelete in NTFS with proper tools to a certain extent, and you can more or less in ext2/3/ext4 too. Not my cup of tea, but I know people who profess to have had success in both cases.

            You can leverage snapshots in ZFS as insurance against user boo-boos _if_ you think to make them before you do particularly risky operations.

            • (Score: 2) by edIII on Tuesday April 18 2017, @08:10PM

              by edIII (791) on Tuesday April 18 2017, @08:10PM (#495993)

              I've been involved in far too many data recoveries over the last 30 years. I remember when recovering from FAT meant huge piles of floppies shipped back to you with individual files missing the file names of course. A pretty sharp outfit also analyzed the files too and categorized them into what types of files they were. Technically that was recovery, but it meant it people combing through files for months trying to rename and organize them.

              Recovering from ext2/3/ext4 is much harder than recovering from NTFS. I did get lucky using Stellar Phoenix (I think) on that Linux partition and recovered all of the files. That NTFS recovery was also an enterprise RAID that involved Drive Savers, and they were expensive as fuck. They say they are super heroes, and boy do they want to get paid like them. I never even tried to do it myself since I suspected drive damage occurred, of which it did, of which the Dell L3 tech on the phone didn't believe there was, and to which eventually Drive Savers described it like an action movie with explosives all occurring on the platters. They actually explained it like that with those words :)

              In both of those situations, the people coming to me had no backups whatsoever. It was the only copy in the world. That's what I remember about data recovery. An owner of the data pacing around behind you acting like the world is over. Fun times.

              These days I just make sure I have a snapshot every 24 hours and have forgotten about data recovery. That would mean I failed at distributing the data across more than one machine.....

              --
              Technically, lunchtime is at any moment. It's just a wave function.
          • (Score: 2) by edIII on Tuesday April 18 2017, @07:47PM

            by edIII (791) on Tuesday April 18 2017, @07:47PM (#495984)

            Technically, no. You're correct :)

            However, Windows never actually deletes a file. That's their trick. They just take it and hide it in a bin, and then gave it that goofy name, "Recycle Bin". What were they recycling again?

            Linux and BSD are perfectly capable of doing the same thing, but the philosophy I see in OpenBSD is that the majority of deletes need to be permanent. rm is capable of overwriting files with random data too. Linux has never been big on the quasi-delete either.

            --
            Technically, lunchtime is at any moment. It's just a wave function.
        • (Score: 2) by TheRaven on Tuesday April 18 2017, @09:00AM (1 child)

          by TheRaven (270) on Tuesday April 18 2017, @09:00AM (#495758) Journal
          Not quite undelete, but the FreeBSD installer now defaults to ZFS, which has constant-time snapshotting and the installer sets up boot environments so that it's trivial to snapshot a bootable state. There are a bunch of utilities in the package collection that do automatic snapshotting of user directories too (for example, keep hourly snapshots for a day, daily snapshots for a week, weekly snapshots for a month, or whatever policy the user chooses).
          --
          sudo mod me up
          • (Score: 2) by edIII on Tuesday April 18 2017, @07:43PM

            by edIII (791) on Tuesday April 18 2017, @07:43PM (#495983)

            That's pretty cool. Now if they can just get ZFS into OpenBSD....

            --
            Technically, lunchtime is at any moment. It's just a wave function.
    • (Score: 4, Insightful) by sjames on Monday April 17 2017, @10:37PM (3 children)

      by sjames (2882) on Monday April 17 2017, @10:37PM (#495571) Journal

      What makes it interesting is that Poettering's reaction to the perfectly good and very important bug report is at the root of about half the things wrong with systemd. The other half are design flaws that would take a major re-working to fix the right way.

      Even those might have been avoided if "shut up" wasn't the default reply to anything questioning the one true way.

      • (Score: 4, Informative) by Marand on Monday April 17 2017, @10:58PM (2 children)

        by Marand (1081) on Monday April 17 2017, @10:58PM (#495583) Journal

        Yeah, that's what I meant about his foot-in-mouth moment being the only reason it was noteworthy. Unfortunately, that's his default reaction to everything, so it isn't as interesting as the "we reinvented rm -rf" aspect. :/

        But hey, at least he didn't accuse the submitter of hating handicapped people; that's arguably an improvement over how he's handled criticism in the past.

        • (Score: 4, Insightful) by sjames on Monday April 17 2017, @11:18PM (1 child)

          by sjames (2882) on Monday April 17 2017, @11:18PM (#495594) Journal

          This is true.

          As to why systemd needed it's own version, as near as I can tell they're trying to replace every critical piece of system software with one that is incestuously dependent on the rest of systemd. If people have too many useful standalone utilities it's too easy to give systemd the boot.

          • (Score: 0) by Anonymous Coward on Wednesday April 19 2017, @01:59PM

            by Anonymous Coward on Wednesday April 19 2017, @01:59PM (#496299)

            It is getting that way now. Ubuntu is neutered without systemd. It really does need to be broken up and removed.
            If you can't remove a *nix program and swap in another in its place then something is seriously wrong.

            It is horrifying looking at the dependencies dragged in when installing programs now. Why does an application have the init system as a dependency?

    • (Score: 2) by fido_dogstoyevsky on Monday April 17 2017, @11:05PM

      by fido_dogstoyevsky (131) <axehandleNO@SPAMgmail.com> on Monday April 17 2017, @11:05PM (#495586)

      ...Why does systemd needs its own not-invented-here version of...

      Because it's "not invented here"?

      --
      It's NOT a conspiracy... it's a plot.
    • (Score: 1, Interesting) by Anonymous Coward on Tuesday April 18 2017, @10:25PM

      by Anonymous Coward on Tuesday April 18 2017, @10:25PM (#496049)

      I RTFBR and "tmpfiles: R! /dir/.* destroys root" is accurate. This alone would be soylentnewsworthy - do any of my scripts do this? I don't think so... but what if one of the generated paths does that... this is a bit of a nightmare until I've literally 'search'ed every machine.

  • (Score: 2) by Bot on Monday April 17 2017, @10:06PM

    by Bot (3902) on Monday April 17 2017, @10:06PM (#495556) Journal

    > we really need actual source links in the summary.

    My AI processed the factoid "Poettering reimplemented rm and borked it" as quite predictable. If his new and improved version of rm worked well, then I would have asked for link and formal proof myself, as it would have needed major reordering of knowledge structures.

    citation time, year 2011 link [linuxquestions.org]
    "Let me summarise. systemd is exactly the sort of thing a one-club golfer would come up with if he had extraordinarily deep C skills, no systems administration experience, no historical perspective, and didn't consult anyone who might spoil the illusion."

    --
    Account abandoned.