2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

In list mode, we always want to clear FLAG_NO_USER and FLAG_NO_HOST

regardless of whether or not there was an actual match.  Otherwise,
warning mail may be sent which is not what we want in list mode.
This is consistent with what the sudoers file backend does.
This commit is contained in:
Todd C. Miller
2015-12-02 10:43:41 -07:00
parent 604d350344
commit 9c9b487b0c
2 changed files with 5 additions and 5 deletions

View File

@@ -3227,9 +3227,9 @@ done:
if (pwflag && list_pw == NULL)
SET(ret, FLAG_NO_CHECK);
}
if (lres->user_matches)
if (pwflag || lres->user_matches)
CLR(ret, FLAG_NO_USER);
if (lres->host_matches)
if (pwflag || lres->host_matches)
CLR(ret, FLAG_NO_HOST);
DPRINTF1("sudo_ldap_lookup(%d)=0x%02x", pwflag, ret);