From b8d39fd72b972b368924d2f15708ddee34d971ad Mon Sep 17 00:00:00 2001 From: danieldg Date: Thu, 18 Feb 2010 22:11:47 +0000 Subject: Compile fix for m_ldapauth git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12495 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_ldapauth.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/extra/m_ldapauth.cpp b/src/modules/extra/m_ldapauth.cpp index 95882df47..85a0181c4 100644 --- a/src/modules/extra/m_ldapauth.cpp +++ b/src/modules/extra/m_ldapauth.cpp @@ -177,14 +177,15 @@ public: { // Do a second search, based on password, if it contains a : // That is, PASS : will work. - if ((size_t pos = user->password.find(":")) != std::string::npos) + size_t pos = user->password.find(":"); + if (pos != std::string::npos) { - res = ldap_search_ext_s(conn, base.c_str(), searchscope, user->password.substr(0, pos), NULL, 0, NULL, NULL, NULL, 0, &msg); + res = ldap_search_ext_s(conn, base.c_str(), searchscope, user->password.substr(0, pos).c_str(), NULL, 0, NULL, NULL, NULL, 0, &msg); if (res) { // Trim the user: prefix, leaving just 'pass' for later password check - user->password = user->password.substr(pos + 1, user->password.length()); + user->password = user->password.substr(pos + 1); } } -- cgit v1.2.3