[dovecot-cvs] dovecot/src/auth auth-master-connection.c, 1.19,
1.20 passdb-ldap.c, 1.15, 1.16 passdb-sql.c, 1.8,
1.9 passdb-vpopmail.c, 1.12, 1.13 userdb-ldap.c, 1.18,
1.19 userdb-sql.c, 1.3, 1.4
cras at dovecot.org
cras at dovecot.org
Thu Jan 6 17:41:57 EET 2005
Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv28439
Modified Files:
auth-master-connection.c passdb-ldap.c passdb-sql.c
passdb-vpopmail.c userdb-ldap.c userdb-sql.c
Log Message:
Added authentication debugging logging.
Index: auth-master-connection.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-master-connection.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- auth-master-connection.c 8 Dec 2004 22:35:50 -0000 1.19
+++ auth-master-connection.c 6 Jan 2005 15:41:53 -0000 1.20
@@ -84,6 +84,14 @@
struct master_userdb_request *master_request = context;
string_t *str;
+ if (verbose_debug && user != NULL) {
+ i_info("userdb(%s): uid=%s gid=%s home=%s mail=%s",
+ get_log_prefix(master_request->auth_request),
+ dec2str(user->uid), dec2str(user->gid),
+ user->home != NULL ? user->home : "",
+ user->mail != NULL ? user->mail : "");
+ }
+
if (auth_master_connection_unref(master_request->conn)) {
if (user == NULL) {
master_send(master_request->conn, "NOTFOUND\t%u",
Index: passdb-ldap.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-ldap.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- passdb-ldap.c 19 Dec 2004 05:30:20 -0000 1.15
+++ passdb-ldap.c 6 Jan 2005 15:41:53 -0000 1.16
@@ -170,6 +170,14 @@
ldap_request->callback = handle_request;
ldap_request->context = auth_request;
+ if (verbose_debug) {
+ i_info("ldap(%s): base=%s scope=%s filter=%s fields=%s",
+ get_log_prefix(auth_request), conn->set.base,
+ conn->set.scope, filter,
+ strarray_join((const char **)
+ passdb_ldap_conn->attr_names, ","));
+ }
+
db_ldap_search(conn, conn->set.base, conn->set.ldap_scope,
filter, passdb_ldap_conn->attr_names,
ldap_request);
Index: passdb-sql.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-sql.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- passdb-sql.c 6 Dec 2004 16:39:02 -0000 1.8
+++ passdb-sql.c 6 Jan 2005 15:41:53 -0000 1.9
@@ -143,6 +143,11 @@
auth_request_get_var_expand_table(sql_request->auth_request,
str_escape));
+ if (verbose_debug) {
+ i_info("sql(%s): query: %s",
+ get_log_prefix(sql_request->auth_request), str_c(query));
+ }
+
sql_query(passdb_sql_conn->db, str_c(query),
sql_query_callback, sql_request);
}
Index: passdb-vpopmail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-vpopmail.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- passdb-vpopmail.c 6 Dec 2004 16:39:02 -0000 1.12
+++ passdb-vpopmail.c 6 Jan 2005 15:41:53 -0000 1.13
@@ -45,10 +45,15 @@
return;
}
+ if (verbose_debug) {
+ i_info("vpopmail(%s): crypted password=%s",
+ get_log_prefix(request), vpw->pw_passwd);
+ }
+
crypted_pass = vpw->pw_passwd;
scheme = password_get_scheme(&crypted_pass);
if (scheme == NULL) scheme = "CRYPT";
-
+
ret = password_verify(password, crypted_pass, scheme, request->user);
safe_memset(vpw->pw_passwd, 0, strlen(vpw->pw_passwd));
Index: userdb-ldap.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/userdb-ldap.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- userdb-ldap.c 19 Dec 2004 05:30:20 -0000 1.18
+++ userdb-ldap.c 6 Jan 2005 15:41:53 -0000 1.19
@@ -174,6 +174,14 @@
request->request.context = context;
request->userdb_callback = callback;
+ if (verbose_debug) {
+ i_info("ldap(%s): base=%s scope=%s filter=%s fields=%s",
+ get_log_prefix(auth_request), conn->set.base,
+ conn->set.scope, filter,
+ strarray_join((const char **)
+ userdb_ldap_conn->attr_names, ","));
+ }
+
db_ldap_search(conn, conn->set.base, conn->set.ldap_scope,
filter, userdb_ldap_conn->attr_names,
&request->request);
Index: userdb-sql.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/userdb-sql.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- userdb-sql.c 6 Dec 2004 16:39:02 -0000 1.3
+++ userdb-sql.c 6 Jan 2005 15:41:53 -0000 1.4
@@ -87,6 +87,11 @@
sql_request->context = context;
sql_request->auth_request = auth_request;
+ if (verbose_debug) {
+ i_info("sql(%s): query: %s",
+ get_log_prefix(auth_request), str_c(query));
+ }
+
sql_query(userdb_sql_conn->db, str_c(query),
sql_query_callback, sql_request);
}
More information about the dovecot-cvs
mailing list