Ubuntu has been at the forefront of replacing the traditional versions of basic tools like sudo with replacements written in Rust, but aside from worries about replacing battle-tested code with brand new, relatively untested code, there’s new things to worry about it. As it turns out, sudo-rs, the Rust replacement for sudo, is intentionally incompatible with the classic version in dangerous ways, as Chris Siebenmann discovered to his dismay.
Basically, the classic sudo supports the use of wildcards defined using square brackets, so that if you allow a user to run, say,
↫ Chris Siebenmann/usr/sbin/exim -bp[acru], without a password, they can runexim -bpa,exim -bpc,exim -bpr, orexim -bpuwithout having to supply a password. This allows for very specific, fine-grained access control, which is quite a nice capability to have if you’re managing many systems and users. Sadly,sudo-rsintentionally does not support this, opting to only allow you to use the generic * wildcard. Worse yet, it doesn’t really make this clear, either.
I do not really have words for this. The Rust sudo has apparently opted to keep the single most dangerous wildcard while disallowing all of the wildcards that allow one to be narrow and specific about what you’re allowing, and it buries this at the end of a section that devotes a bunch of words to describing functionality it doesn’t have and doesn’t support, with absolutely nothing else in that section to say this (either up front or in the descriptions of how all the wildcards would work if sudo-rs supported them, which it doesn’t).
If you’re going to replace such vital, core tools like sudo that god knows how many people rely on every single day, you better be damn sure you’re feature-complete and can act as a drop-in replacement. If someone switches from sudo to doas, nobody expects the experience to be identical. However, if you’re consistently being told that sudo-rs is a drop-in replacement and you shouldn’t expect any disruptions, you better be able to make true on that promise. Ubuntu isn’t some also-ran small hobby distribution, and its developers should act like it.
What a clown show.
