Fix "sudo -l command" output when the matching command is negated.

Bug #636
This commit is contained in:
Todd C. Miller
2014-03-13 08:21:04 -06:00
parent 967fda0fbc
commit 35c41deb41

View File

@@ -697,7 +697,8 @@ sudo_file_display_cmnd(struct sudo_nss *nss, struct passwd *pw)
if (runas_match == ALLOW) {
cmnd_match = cmnd_matches(cs->cmnd);
if (cmnd_match != UNSPEC) {
match = host_match && runas_match ? cs->cmnd : NULL;
if (cmnd_match == ALLOW)
match = cs->cmnd;
goto matched;
}
}