summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-18 22:11:47 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-18 22:11:47 +0000
commitb8d39fd72b972b368924d2f15708ddee34d971ad (patch)
treeaadb06897e5a1f9fe95c281a589f5bb633b9a824
parent8cb1935360087b4e38802b837981e5f41e9b87d7 (diff)
Compile fix for m_ldapauth
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12495 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/extra/m_ldapauth.cpp7
1 files 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 <user>:<password> 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);
}
}