[dovecot-cvs] dovecot/src/auth passdb-ldap.c, 1.49, 1.50 userdb-ldap.c, 1.41, 1.42
tss at dovecot.org
tss at dovecot.org
Sat Nov 4 20:22:35 UTC 2006
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv31373
Modified Files:
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.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- passdb-ldap.c 4 Nov 2006 15:09:27 -0000 1.49
+++ passdb-ldap.c 4 Nov 2006 20:22:31 -0000 1.50
@@ -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.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- userdb-ldap.c 4 Nov 2006 15:00:32 -0000 1.41
+++ userdb-ldap.c 4 Nov 2006 20:22:31 -0000 1.42
@@ -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