[Bug 2123859] Re: sudo-rs does not accept a '=' in command definition
Marc Schoolderman
2123859 at bugs.launchpad.net
Fri Sep 19 13:46:07 UTC 2025
Thanks!
I've added this to our upstream bug tracker:
https://github.com/trifectatechfoundation/sudo-rs/issues/1272
** Bug watch added: github.com/trifectatechfoundation/sudo-rs/issues #1272
https://github.com/trifectatechfoundation/sudo-rs/issues/1272
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to rust-sudo-rs in Ubuntu.
https://bugs.launchpad.net/bugs/2123859
Title:
sudo-rs does not accept a '=' in command definition
Status in rust-sudo-rs package in Ubuntu:
New
Bug description:
sudo-rs does not accept a '=' in command definition or alias, like
`Cmd_Alias FOO_CMD = /bin/foo --bar=1`, but regular sudo accept it.
IMHO sudo-rs should accept '=' characters like sudo.ws does.
Steps to reproduce :
1. Create a sample sudoers file with a command including a '='
character
$ cat /tmp/sudoers << EOF
Cmd_Alias FOO_CMD = /bin/foo --bar=1
%staff ALL = (root) NOPASSWD: FOO_CMD
%users ALL = (root) NOPASSWD: /bin/foo --bar=2
EOF
2. Test the file with regular sudo
$ visudo.ws -c -f /tmp/sudoers
/tmp/sudoers: parsed OK
3. Test the file with sudo-rs
$ visudo-rs -c -f /tmp/sudoers
/tmp/sudoers:1:35: syntax error: garbage at end of line
Cmd_Alias FOO_CMD = /bin/foo --bar=1
^
/tmp/sudoers:3:45: syntax error: garbage at end of line
%users ALL = (root) NOPASSWD: /bin/foo --bar=2
^
visudo: invalid sudoers file
Tested on Ubuntu 25.10 with sudo-rs version 0.2.8-1ubuntu2
lsb_release -rd
Description: Ubuntu Questing Quokka (development branch)
Release: 25.10
$ apt-cache policy sudo sudo-rs
sudo:
Installed: 1.9.16p2-3ubuntu2
Candidate: 1.9.16p2-3ubuntu2
Version table:
*** 1.9.16p2-3ubuntu2 500
500 http://archive.ubuntu.com/ubuntu questing/main amd64 Packages
100 /var/lib/dpkg/status
sudo-rs:
Installed: 0.2.8-1ubuntu2
Candidate: 0.2.8-1ubuntu2
Version table:
*** 0.2.8-1ubuntu2 500
500 http://archive.ubuntu.com/ubuntu questing/main amd64 Packages
100 /var/lib/dpkg/status
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rust-sudo-rs/+bug/2123859/+subscriptions
More information about the foundations-bugs
mailing list