Explanation for newbies: setuid is a special permission bit that makes an executable run with the permissions of its owner rather than the user executing it. This is often used to let a user run a specific program as root without having sudo access.

If this sounds like a security nightmare, that’s because it is.

In linux, setuid is slowly being phased out by Capabilities. An example of this is the ping command which used to need setuid in order to create raw sockets, but now just needs the cap_net_raw capability. More info: https://unix.stackexchange.com/questions/382771/why-does-ping-need-setuid-permission. Nevertheless, many linux distros still ship with setuid executables, for example passwd from the shadow-utils package.

  • Billegh@lemmy.world
    link
    fedilink
    arrow-up
    16
    arrow-down
    3
    ·
    edit-2
    5 days ago

    Hard agree. This is why rust is getting so much attention, and the c/c++ crowd are so mad. They’re happy just blaming it on a “skill issue” while losing their shit over [the rust crowd] saying “how about we don’t let you in the first place.”

    • Shanmugha@lemmy.world
      link
      fedilink
      arrow-up
      2
      arrow-down
      2
      ·
      4 days ago

      Or maybe I just think that Rust has crappy design, just like JavaScript. The suid question is of a different kind: capabilities is better because they are an expression of least-required-permission principle, and going this way can’t be argued as a skill issue

            • Shanmugha@lemmy.world
              link
              fedilink
              arrow-up
              2
              ·
              3 days ago

              Complaining? No, I counter your evangelistic attitude that whoever does not like Rust is just self-important elitist. That kind of people does exist, but not liking Rust is not a sign. Cheers

              • Billegh@lemmy.world
                link
                fedilink
                arrow-up
                1
                ·
                3 days ago

                Sure, but that was a strong response for a comment on the situation. Sounds like you care. I do not. 😊

                  • Billegh@lemmy.world
                    link
                    fedilink
                    arrow-up
                    1
                    ·
                    3 days ago

                    Hard agree to setuid being a problem. And that it is a problem because any of these tools written in c can be a security hole, because c is hard to get right. And I find it funny that c devs are butthurt over how rust won’t let them write obviously bad code.

                    But it’s OK, words are difficult. 😊