aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/extra/m_ldapauth.cpp
diff options
context:
space:
mode:
authorGravatar brain2008-05-19 00:34:08 +0000
committerGravatar brain2008-05-19 00:34:08 +0000
commit84235673df58bb199622c67bbead02d91f953838 (patch)
tree60af1a14f1e545d477ed81ec881b342468b00634 /src/modules/extra/m_ldapauth.cpp
parentMore done (diff)
downloadinspircd++-84235673df58bb199622c67bbead02d91f953838.tar.gz
inspircd++-84235673df58bb199622c67bbead02d91f953838.tar.bz2
inspircd++-84235673df58bb199622c67bbead02d91f953838.zip
Fix these too
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9760 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra/m_ldapauth.cpp')
-rw-r--r--src/modules/extra/m_ldapauth.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/extra/m_ldapauth.cpp b/src/modules/extra/m_ldapauth.cpp
index 60f1e8978..74e59c62a 100644
--- a/src/modules/extra/m_ldapauth.cpp
+++ b/src/modules/extra/m_ldapauth.cpp
@@ -144,7 +144,7 @@ public:
{
free(authpass);
if (verbose)
- ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (LDAP bind failed: %s)", user->nick, user->ident, user->host, ldap_err2string(res));
+ ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (LDAP bind failed: %s)", user->nick.c_str(), user->ident.c_str(), user->host, ldap_err2string(res));
ldap_unbind_ext(conn, NULL, NULL);
conn = NULL;
return false;
@@ -156,25 +156,25 @@ public:
if ((res = ldap_search_ext_s(conn, base.c_str(), searchscope, what.c_str(), NULL, 0, NULL, NULL, NULL, 0, &msg)) != LDAP_SUCCESS)
{
if (verbose)
- ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (LDAP search failed: %s)", user->nick, user->ident, user->host, ldap_err2string(res));
+ ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (LDAP search failed: %s)", user->nick.c_str(), user->ident.c_str(), user->host, ldap_err2string(res));
return false;
}
if (ldap_count_entries(conn, msg) > 1)
{
if (verbose)
- ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (LDAP search returned more than one result: %s)", user->nick, user->ident, user->host, ldap_err2string(res));
+ ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (LDAP search returned more than one result: %s)", user->nick.c_str(), user->ident.c_str(), user->host, ldap_err2string(res));
ldap_msgfree(msg);
return false;
}
if ((entry = ldap_first_entry(conn, msg)) == NULL)
{
if (verbose)
- ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (LDAP search returned no results: %s)", user->nick, user->ident, user->host, ldap_err2string(res));
+ ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (LDAP search returned no results: %s)", user->nick.c_str(), user->ident.c_str(), user->host, ldap_err2string(res));
ldap_msgfree(msg);
return false;
}
- cred.bv_val = user->password;
- cred.bv_len = strlen(user->password);
+ cred.bv_val = (char*)user->password.data();
+ cred.bv_len = user->password.length();
if ((res = ldap_sasl_bind_s(conn, ldap_get_dn(conn, entry), LDAP_SASL_SIMPLE, &cred, NULL, NULL, NULL)) == LDAP_SUCCESS)
{
ldap_msgfree(msg);
@@ -184,7 +184,7 @@ public:
else
{
if (verbose)
- ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (%s)", user->nick, user->ident, user->host, ldap_err2string(res));
+ ServerInstance->SNO->WriteToSnoMask('A', "Forbidden connection from %s!%s@%s (%s)", user->nick.c_str(), user->ident.c_str(), user->host, ldap_err2string(res));
ldap_msgfree(msg);
user->Extend("ldapauth_failed");
return false;