]> granicus.if.org Git - sudo/commitdiff
Same return value as non-existent sudoers if LDAP was unable to connect.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 1 Jan 2008 22:03:54 +0000 (22:03 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 1 Jan 2008 22:03:54 +0000 (22:03 +0000)
ldap.c

diff --git a/ldap.c b/ldap.c
index f36bd7850cb0ee3a05d190f61be0d2e79cd3785e..bf3caa3a6c3344b0b8a9aeed34bd9d30ce2f8cc5 100644 (file)
--- a/ldap.c
+++ b/ldap.c
@@ -1322,7 +1322,7 @@ sudo_ldap_lookup(nss, pwflag)
     struct passwd *pw = list_pw ? list_pw : sudo_user.pw;
 
     if (ld == NULL)
-       return(0);      /* XXX - if only LDAP and we return 0, it will misbehasve */
+       return(VALIDATE_NOT_OK | FLAG_NO_HOST | FLAG_NO_USER);
 
     if (pwflag) {
        int doauth = UNSPEC;