dovecot-2.0: lib-master: Prefix log messages with username durin...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Aug 12 17:43:12 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/6f2c1fb1b7f1
changeset: 11983:6f2c1fb1b7f1
user: Timo Sirainen <tss at iki.fi>
date: Thu Aug 12 15:43:08 2010 +0100
description:
lib-master: Prefix log messages with username during auth/post-login lookups.
diffstat:
src/lib-master/master-login.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diffs (23 lines):
diff -r c27bca966b54 -r 6f2c1fb1b7f1 src/lib-master/master-login.c
--- a/src/lib-master/master-login.c Thu Aug 12 15:30:08 2010 +0100
+++ b/src/lib-master/master-login.c Thu Aug 12 15:43:08 2010 +0100
@@ -178,6 +178,10 @@
if (client->fd != -1) {
if (close(client->fd) < 0)
i_error("close(fd_read client) failed: %m");
+ /* this client failed (login callback wasn't called).
+ reset prefix to default. */
+ i_set_failure_prefix(t_strdup_printf("%s: ",
+ client->conn->login->service->name));
}
/* FIXME: currently we create a separate connection for each request,
@@ -363,6 +367,8 @@
master_login_client_free(&client);
return;
}
+ i_set_failure_prefix(t_strdup_printf("%s(%s): ",
+ client->conn->login->service->name, auth_args[0]));
if (conn->login->postlogin_socket_path == NULL)
master_login_auth_finish(client, auth_args);
More information about the dovecot-cvs
mailing list