[Bug 2123859] Re: sudo-rs does not accept a '=' in command definition
Launchpad Bug Tracker
2123859 at bugs.launchpad.net
Thu Sep 25 17:27:40 UTC 2025
This bug was fixed in the package rust-sudo-rs - 0.2.8-1ubuntu4
---------------
rust-sudo-rs (0.2.8-1ubuntu4) questing; urgency=medium
* Pick post 0.2.8 bug fixes from upstream:
- d/p/post_028/allow_equals_incommands.patch (LP: #2123859)
- d/p/post_028/fix_race_between_parent_and_monitor_in_use_pty.patch (LP: #2121743)
- d/p/post_028/forbid_comma_in_envvar.patch
* fix man sudoers alternatives target (LP: #2125483)
-- Ravi Kant Sharma <ravi.kant.sharma at canonical.com> Wed, 24 Sep 2025
11:26:29 +0200
** Changed in: rust-sudo-rs (Ubuntu)
Status: New => Fix Released
--
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:
Fix Released
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