From: Todd C. Miller Date: Tue, 26 Oct 2004 22:07:03 +0000 (+0000) Subject: sudo should not send mail if someone who runs 'sudo -l' has no entry. X-Git-Tag: SUDO_1_7_0~871 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f7d7a3d5f739ffc6da7ebdcff157320d7af614d6;p=sudo sudo should not send mail if someone who runs 'sudo -l' has no entry. --- diff --git a/ldap.c b/ldap.c index 84401260c..ba52bd6aa 100644 --- a/ldap.c +++ b/ldap.c @@ -956,7 +956,8 @@ int pwflag; } else { /* we do not have a match */ ret=VALIDATE_NOT_OK; - if (!ldap_user_matches) SET(ret,FLAG_NO_USER); + if (pwflag) SET(ret,FLAG_NO_CHECK); + else if (!ldap_user_matches) SET(ret,FLAG_NO_USER); else if (!ldap_host_matches) SET(ret,FLAG_NO_HOST); }