sudo-project / sudo

Utility to execute a command as another user
https://www.sudo.ws
Other
1.16k stars 208 forks source link

visudo: error if a user is called "list" #246

Closed frukto closed 1 year ago

frukto commented 1 year ago

In 1.9.13p1 visudo reports an error if "as_whom"(_RunasMember) is literally list:

alice ALL=(list) NOPASSWD: /usr/bin/cmd
           ^~~~
What now?

Apparently this is handled as a syntax error now. This behavior was not present in 1.9.12p2-1 and may be related to the new list pseudo command introduced in 1.9.13?

Edit: As a workaround the _RunasMember can be quoted, this works in 1.9.13p1 and previous versions:

alice ALL=("list") NOPASSWD: /usr/bin/cmd

1.9.13p1 just landed in Debian 12 (bookworm)

millert commented 1 year ago

Thanks for reporting this, that was an unintended side-effect when the "list" command was added. I just committed a fix associated tests for the issue.

frukto commented 1 year ago

:partying_face: That was quick, awesome! Thank you for fixing this, @millert. From my side, you may close the issue.

millert commented 1 year ago

Fixed in 1.9.13p3