sudo-project/sudo

`sudo -l -U someuser` fails when given command to check

Closed this issue · 1 comments

Given this entry:

nobody ALL = (root) NOPASSWD: /usr/bin/ping

As root: sudo -l -U nobody includes the command in the output, but sudo -l -U nobody /usr/bin/ping fails.

This got broken in 9f695f0 (#134).

I think the idea was to check whether the user running this is allowed to run the pseudo command list as the target user, but runas_pw should only be set this way when testing for list, not when searching for the actual command.

Fixed in 1.9.13p3