Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sudo -l -U someuser fails when given command to check #248

Closed
tik-stbuehler opened this issue Mar 3, 2023 · 1 comment
Closed

sudo -l -U someuser fails when given command to check #248

tik-stbuehler opened this issue Mar 3, 2023 · 1 comment

Comments

@tik-stbuehler
Copy link

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.

millert added a commit that referenced this issue Mar 3, 2023
This change introduced in sudo 1.9.13 is not actually needed.  The
"list" pseudo-command checks are performed via runas_matches_pw()
which does not use runas_pw.  GitHub issue #248
millert added a commit that referenced this issue Mar 6, 2023
This change introduced in sudo 1.9.13 is not actually needed.  The
"list" pseudo-command checks are performed via runas_matches_pw()
which does not use runas_pw.  GitHub issue #248

--HG--
branch : 1.9
@millert
Copy link
Collaborator

millert commented Mar 6, 2023

Fixed in 1.9.13p3

@millert millert closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants