mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-30 22:05:46 +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:
@@ -1202,13 +1202,13 @@ done:
|
||||
SET(ret, FLAG_NO_CHECK);
|
||||
}
|
||||
|
||||
if (state & SUDO_SSS_STATE_USERMATCH)
|
||||
if (pwflag || ISSET(state, SUDO_SSS_STATE_USERMATCH))
|
||||
CLR(ret, FLAG_NO_USER);
|
||||
if (state & SUDO_SSS_STATE_HOSTMATCH)
|
||||
if (pwflag || ISSET(state, SUDO_SSS_STATE_HOSTMATCH))
|
||||
CLR(ret, FLAG_NO_HOST);
|
||||
|
||||
sudo_debug_printf(SUDO_DEBUG_DEBUG, "sudo_sss_lookup(%d)=0x%02x",
|
||||
pwflag, ret);
|
||||
pwflag, ret);
|
||||
|
||||
debug_return_int(ret);
|
||||
}
|
||||
|
Reference in New Issue
Block a user