]> granicus.if.org Git - sudo/commitdiff
sudo should not send mail if someone who runs 'sudo -l' has no entry.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 26 Oct 2004 22:07:03 +0000 (22:07 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 26 Oct 2004 22:07:03 +0000 (22:07 +0000)
ldap.c

diff --git a/ldap.c b/ldap.c
index 84401260c7553b059370d78ae215763c6c7826a5..ba52bd6aa78cf3dbfbfe09b07a6fe30040c221ad 100644 (file)
--- 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);
   }