diff options
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_ldapauth.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/extra/m_ldapauth.cpp b/src/modules/extra/m_ldapauth.cpp index 1b6a3a0d9..5d71e7389 100644 --- a/src/modules/extra/m_ldapauth.cpp +++ b/src/modules/extra/m_ldapauth.cpp @@ -211,7 +211,7 @@ public: std::string cutpassword = user->password.substr(0, pos); res = ldap_search_ext_s(conn, base.c_str(), searchscope, cutpassword.c_str(), NULL, 0, NULL, NULL, NULL, 0, &msg); - if (res) + if (res == LDAP_SUCCESS) { // Trim the user: prefix, leaving just 'pass' for later password check user->password = user->password.substr(pos + 1); @@ -219,7 +219,7 @@ public: } // It may have found based on user:pass check above. - if (!res) + if (res != LDAP_SUCCESS) { if (verbose) ServerInstance->SNO->WriteToSnoMask('c', "Forbidden connection from %s!%s@%s (LDAP search failed: %s)", user->nick.c_str(), user->ident.c_str(), user->host.c_str(), ldap_err2string(res)); |