From: Timo Sirainen Date: Fri, 19 Dec 2008 04:23:31 +0000 (+0200) Subject: LDAP: Allow empty/missing password field if nopassword field is given. X-Git-Tag: 1.2.beta1~175 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e6f42782ac2822bde447cf3d2553beefc85636bc;p=thirdparty%2Fdovecot%2Fcore.git LDAP: Allow empty/missing password field if nopassword field is given. --HG-- branch : HEAD --- diff --git a/src/auth/passdb-ldap.c b/src/auth/passdb-ldap.c index 7c59add163..92109c4649 100644 --- a/src/auth/passdb-ldap.c +++ b/src/auth/passdb-ldap.c @@ -109,16 +109,13 @@ ldap_lookup_pass_callback(struct ldap_connection *conn, password = NULL; ldap_query_save_result(conn, entry, auth_request); - if (auth_request->passdb_password == NULL) { - auth_request_log_error(auth_request, "ldap", - "No password in reply"); - } else if (ldap_next_entry(conn->ld, entry) != NULL) { + if (ldap_next_entry(conn->ld, entry) != NULL) { auth_request_log_error(auth_request, "ldap", "pass_filter matched multiple objects, aborting"); } else if (auth_request->passdb_password == NULL && !auth_request->no_password) { auth_request_log_info(auth_request, "ldap", - "Empty password returned without nopassword"); + "No password returned (and no nopassword)"); passdb_result = PASSDB_RESULT_PASSWORD_MISMATCH; } else { /* passdb_password may change on the way,