• micgerne@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    115
    arrow-down
    3
    ·
    2 days ago

    I just tested this exploit, I was easily able to remove the french language pack by typing “rm -fr /*”

    • a_jeering_serpent@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      35
      arrow-down
      2
      ·
      2 days ago

      Don’t forget the —no-preserve-root flag or you’ll get an index out of bounds when deleting the recipe for five-root-puree

        • a_jeering_serpent@sopuli.xyz
          link
          fedilink
          English
          arrow-up
          2
          ·
          6 hours ago

          Oh i was kind of going for the opposite. 😈

          BTW use caution with your glob there, that only does what you described if the folder has contents, if it doesn’t, rather than getting nothing you’ll get back the parent directory, at least in bash. I’m not one of the cool zsh kids.

          • yetAnotherUser@discuss.tchncs.de
            link
            fedilink
            arrow-up
            1
            ·
            6 hours ago

            Huh, are you sure or am I just stupid?

            [user@device Documents]$ mkdir test
            [user@device Documents]$ cd test
            [user@device test]$ ls ./*
            ls: cannot access './*': No such file or directory
            

            Same behavior with * instead of ./*.

            • a_jeering_serpent@sopuli.xyz
              link
              fedilink
              English
              arrow-up
              2
              ·
              5 hours ago

              I may be the stupid one, i’m sure there’s a related gotcha here under some condition, but objectively not the one i described. Sorry, did not intend to waste anyone’s time and i do appreciate the response back to set me straight.