When determining whether or not "sudo -l" or "sudo -b" should prompt
for a password, take all sudoers sources into account. In other words, if both file and ldap sudoers sources are in use, "sudo -v" will now require that all entries in both sources be have NOPASSWD (file) or !authenticate (ldap) in the entries.
This commit is contained in:
@@ -197,8 +197,8 @@ sudo_file_lookup(struct sudo_nss *nss, int validated, int pwflag)
|
||||
SET(validated, VALIDATE_FAILURE);
|
||||
if (pwcheck == always && def_authenticate)
|
||||
SET(validated, FLAG_CHECK_USER);
|
||||
else if (pwcheck == never || nopass == true)
|
||||
def_authenticate = false;
|
||||
else if (nopass == true)
|
||||
SET(validated, FLAG_NOPASSWD);
|
||||
debug_return_int(validated);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user