monero.town
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Dessalines@lemmy.ml to Rust@programming.dev · 25 days ago

Ubuntu 25.10 Switches to Rust-based Sudo

www.omgubuntu.co.uk

external-link
message-square
15
link
fedilink
68
external-link

Ubuntu 25.10 Switches to Rust-based Sudo

www.omgubuntu.co.uk

Dessalines@lemmy.ml to Rust@programming.dev · 25 days ago
message-square
15
link
fedilink
Ubuntu 25.10 will replace the sudo command with sudo-rs, a new Rust rewrite designed to improve memory safety and security. What does this mean for users?
alert-triangle
You must log in or register to comment.
  • InternetCitizen2@lemmy.world
    link
    fedilink
    English
    arrow-up
    32
    ·
    25 days ago

    One thing to note is that sudo-rs is not aiming to be a 1:1 reimplementation.

    Foreshadowing some tension…

    • BlazeDaley@lemmy.world
      link
      fedilink
      arrow-up
      23
      ·
      25 days ago

      Relevant XKCD

      https://xkcd.com/1172/

      • pebbles@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        8
        ·
        25 days ago

        Thats a good one

  • trevor (he/they)@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    17
    ·
    24 days ago

    Rare Canonical W. The only thing I miss from the original sudo is sudoedit, but I’m pretty sure that’s on the Rust implementation’s TODO list.

    • sugar_in_your_tea@sh.itjust.works
      link
      fedilink
      arrow-up
      10
      ·
      24 days ago

      They’ve got a few months to get it done, and it shouldn’t be that hard, no? Just exec EDITOR as a child process, no?

      • ethancedwards8@programming.dev
        link
        fedilink
        English
        arrow-up
        9
        ·
        24 days ago

        It also does input validation to ensure one doesn’t break the sudo file.

        • sugar_in_your_tea@sh.itjust.works
          link
          fedilink
          arrow-up
          5
          ·
          24 days ago

          Sure. I guess it would depend on how complex that is, but surely the sudo command already does validations, so it would just need to have the editor write to a temporary file (which is a copy of the official one) and write once it’s validated, right?

          It sounds doable in a few months.

      • trevor (he/they)@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        24 days ago

        I don’t think it’s that simple. The challenge is that you need to still behave as if it’s invoked as the user so that the editor uses their configurations instead of simply execing it as root.

        I could be wrong though ¯\_(ツ)_/¯

        • sugar_in_your_tea@sh.itjust.works
          link
          fedilink
          arrow-up
          2
          ·
          24 days ago

          Sudo uses the setuid bit or whatever, so it still has access to the user’s environment variables and whatnot. So figuring out which editor to run shouldn’t be an issue.

          • trevor (he/they)@lemmy.blahaj.zone
            link
            fedilink
            English
            arrow-up
            5
            ·
            24 days ago

            That’s not what I mean. Yeah, getting the environment variables are simple enough, but if you simply exec something as the root user, whatever you exec will naturally be looking for configs in /root/.config and not your ~/.config dir, so any configurations to things like your text editor won’t be read.

            • sugar_in_your_tea@sh.itjust.works
              link
              fedilink
              arrow-up
              2
              ·
              24 days ago

              Ah, makes sense. It’s easy enough to duplicate the outer ENV for the sub-process, but I don’t know what that means for security and whatnot.

    • Dessalines@lemmy.mlOP
      link
      fedilink
      arrow-up
      3
      ·
      24 days ago

      Yep. They make some strange decisions sometimes but this isn’t one of them.

    • thingsiplay@beehaw.org
      link
      fedilink
      arrow-up
      3
      ·
      24 days ago

      I looked at it, its on the todo list. I also use sudoedit (or sudo -e). I can’t find the todo list, but here is the issue for: https://github.com/trifectatechfoundation/sudo-rs/issues/762

  • dinckel@lemmy.world
    link
    fedilink
    arrow-up
    12
    ·
    25 days ago

    I’ve switched my Nix setup to this sudo implementation a while ago, and have noticed no downsides thus far. I’ll take the memory safety, with a fresh codebase

  • rtxn@lemmy.world
    link
    fedilink
    arrow-up
    9
    arrow-down
    2
    ·
    25 days ago

    Surely this won’t upset people.

Rust@programming.dev

rust@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits
  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 3 users / day
  • 54 users / week
  • 363 users / month
  • 2.88K users / 6 months
  • 6 local subscribers
  • 7.14K subscribers
  • 958 Posts
  • 4.62K Comments
  • Modlog
  • mods:
  • snowe@programming.dev
  • Ategon@programming.dev
  • EdTheLegendary@programming.dev
  • kahnclusions@programming.dev
  • torcherist@programming.dev
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org