summaryrefslogtreecommitdiff
path: root/src/libstrongswan/plugins/ldap/ldap_fetcher.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/plugins/ldap/ldap_fetcher.c')
-rw-r--r--src/libstrongswan/plugins/ldap/ldap_fetcher.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/libstrongswan/plugins/ldap/ldap_fetcher.c b/src/libstrongswan/plugins/ldap/ldap_fetcher.c
index ce5b7d56b..59e655cd5 100644
--- a/src/libstrongswan/plugins/ldap/ldap_fetcher.c
+++ b/src/libstrongswan/plugins/ldap/ldap_fetcher.c
@@ -73,27 +73,27 @@ static bool parse(LDAP *ldap, LDAPMessage *result, chunk_t *response)
}
else
{
- DBG1("LDAP response contains no values");
+ DBG1(DBG_LIB, "LDAP response contains no values");
}
ldap_value_free_len(values);
}
else
{
- DBG1("getting LDAP values failed: %s",
+ DBG1(DBG_LIB, "getting LDAP values failed: %s",
ldap_err2string(ldap_result2error(ldap, entry, 0)));
}
ldap_memfree(attr);
}
else
{
- DBG1("finding LDAP attributes failed: %s",
+ DBG1(DBG_LIB, "finding LDAP attributes failed: %s",
ldap_err2string(ldap_result2error(ldap, entry, 0)));
}
ber_free(ber, 0);
}
else
{
- DBG1("finding first LDAP entry failed: %s",
+ DBG1(DBG_LIB, "finding first LDAP entry failed: %s",
ldap_err2string(ldap_result2error(ldap, entry, 0)));
}
return success;
@@ -122,7 +122,7 @@ static status_t fetch(private_ldap_fetcher_t *this, char *url,
ldap = ldap_init(lurl->lud_host, lurl->lud_port);
if (ldap == NULL)
{
- DBG1("LDAP initialization failed: %s", strerror(errno));
+ DBG1(DBG_LIB, "LDAP initialization failed: %s", strerror(errno));
ldap_free_urldesc(lurl);
return FAILED;
}
@@ -133,7 +133,7 @@ static status_t fetch(private_ldap_fetcher_t *this, char *url,
ldap_set_option(ldap, LDAP_OPT_PROTOCOL_VERSION, &ldap_version);
ldap_set_option(ldap, LDAP_OPT_NETWORK_TIMEOUT, &timeout);
- DBG2("sending LDAP request to '%s'...", url);
+ DBG2(DBG_LIB, "sending LDAP request to '%s'...", url);
res = ldap_simple_bind_s(ldap, NULL, NULL);
if (res == LDAP_SUCCESS)
@@ -152,12 +152,13 @@ static status_t fetch(private_ldap_fetcher_t *this, char *url,
}
else
{
- DBG1("LDAP search failed: %s", ldap_err2string(res));
+ DBG1(DBG_LIB, "LDAP search failed: %s", ldap_err2string(res));
}
}
else
{
- DBG1("LDAP bind to '%s' failed: %s", url, ldap_err2string(res));
+ DBG1(DBG_LIB, "LDAP bind to '%s' failed: %s", url,
+ ldap_err2string(res));
}
ldap_unbind_s(ldap);
ldap_free_urldesc(lurl);