Mercurial > dovecot > core-2.2
changeset 11983:6f2c1fb1b7f1
lib-master: Prefix log messages with username during auth/post-login lookups.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 12 Aug 2010 15:43:08 +0100 |
parents | c27bca966b54 |
children | 2aec6c74902c |
files | src/lib-master/master-login.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);