Ubuntu 25.10 Switches to Rust-based Sudo

https://www.omgubuntu.co.uk/2025/05/ubuntu-25-10-rust-sudo-rs-change

70 points · 16 comments · view on lemmy.world

16 Comments

InternetCitizen2@lemmy.world · 35 pts · 1y (2 replies)

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

Foreshadowing some tension...

BlazeDaley@lemmy.world · 28 pts · 1y (1 reply)

Relevant XKCD

https://xkcd.com/1172/

pebbles@sh.itjust.works · 8 pts · 1y

Thats a good one

trevor@lemmy.blahaj.zone · 18 pts · 1y (8 replies)

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 · 10 pts · 1y (6 replies)

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 · 11 pts · 1y (1 reply)

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

sugar_in_your_tea@sh.itjust.works · 5 pts · 1y

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@lemmy.blahaj.zone · 7 pts · 1y (3 replies)

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 · 2 pts · 1y (2 replies)

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@lemmy.blahaj.zone · 6 pts · 1y (1 reply)

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 · 2 pts · 1y

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.ml · 3 pts · 1y

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

savvywolf@pawb.social · 16 pts · 1y (2 replies)

Time for people to be mad that sudo-rs isn't GPL even though the original sudo wasn't GPL either.

embed_me@programming.dev · 5 pts · 1y (1 reply)

It isn't? What is it's license then

LeFrog@discuss.tchncs.de · 5 pts · 1y

Wikipedia says ISC

dinckelman@lemmy.world · 13 pts · 1y
[ removed ]
rtxn@lemmy.world · 8 pts · 1y

Surely this won't upset people.