[dovecot-cvs] dovecot/src/auth passdb-ldap.c, 1.44.2.5, 1.44.2.6 userdb-ldap.c, 1.40.2.1, 1.40.2.2
tss at dovecot.org
tss at dovecot.org
Sat Nov 4 20:22:32 UTC 2006
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv31379
Modified Files:
Tag: branch_1_0
passdb-ldap.c userdb-ldap.c
Log Message:
Do better logging.
Index: passdb-ldap.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-ldap.c,v
retrieving revision 1.44.2.5
retrieving revision 1.44.2.6
diff -u -d -r1.44.2.5 -r1.44.2.6
--- passdb-ldap.c 4 Nov 2006 15:09:25 -0000 1.44.2.5
+++ passdb-ldap.c 4 Nov 2006 20:22:30 -0000 1.44.2.6
@@ -135,7 +135,7 @@
if (ctx.debug != NULL) {
auth_request_log_debug(auth_request, "ldap",
- "%s", str_c(ctx.debug));
+ "result: %s", str_c(ctx.debug));
}
}
@@ -155,7 +155,8 @@
ret = ldap_result2error(conn->ld, res, 0);
if (ret != LDAP_SUCCESS) {
auth_request_log_error(auth_request, "ldap",
- "ldap_search() failed: %s",
+ "ldap_search(%s) failed: %s",
+ request->request.filter,
ldap_err2string(ret));
} else {
/* get the reply */
@@ -265,6 +266,9 @@
return;
}
+ auth_request_log_debug(auth_request, "ldap", "bind: dn=%s",
+ ldap_request->base);
+
/* Bind started */
auth_request_ref(auth_request);
hash_insert(conn->requests, POINTER_CAST(msgid), ldap_request);
@@ -286,9 +290,11 @@
ret = ldap_result2error(conn->ld, res, 0);
if (ret == LDAP_SUCCESS)
passdb_result = PASSDB_RESULT_OK;
- else if (ret == LDAP_INVALID_CREDENTIALS)
+ else if (ret == LDAP_INVALID_CREDENTIALS) {
+ auth_request_log_info(auth_request, "ldap",
+ "invalid credentials");
passdb_result = PASSDB_RESULT_PASSWORD_MISMATCH;
- else {
+ } else {
auth_request_log_error(auth_request, "ldap",
"ldap_bind() failed: %s",
ldap_err2string(ret));
@@ -358,7 +364,7 @@
ldap_request->context = auth_request;
ldap_request->attributes = conn->pass_attr_names;
- auth_request_log_debug(auth_request, "ldap",
+ auth_request_log_debug(auth_request, "ldap", "pass search: "
"base=%s scope=%s filter=%s fields=%s",
ldap_request->base, conn->set.scope,
ldap_request->filter,
Index: userdb-ldap.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/userdb-ldap.c,v
retrieving revision 1.40.2.1
retrieving revision 1.40.2.2
diff -u -d -r1.40.2.1 -r1.40.2.2
--- userdb-ldap.c 4 Nov 2006 15:00:28 -0000 1.40.2.1
+++ userdb-ldap.c 4 Nov 2006 20:22:30 -0000 1.40.2.2
@@ -197,7 +197,7 @@
request->request.attributes = conn->user_attr_names;
- auth_request_log_debug(auth_request, "ldap",
+ auth_request_log_debug(auth_request, "ldap", "user search: "
"base=%s scope=%s filter=%s fields=%s",
request->request.base, conn->set.scope,
request->request.filter,
More information about the dovecot-cvs
mailing list