Mercurial > dovecot > core-2.2
changeset 19010:a919414e68d2
login_log_format_elements: Added %{listener} variable to expand to the listener socket name.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 25 Aug 2015 23:12:51 +0300 |
parents | 5f843b7da393 |
children | 5220d361871e |
files | src/login-common/client-common.c src/login-common/client-common.h |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/login-common/client-common.c Tue Aug 25 22:39:16 2015 +0300 +++ b/src/login-common/client-common.c Tue Aug 25 23:12:51 2015 +0300 @@ -136,7 +136,8 @@ client->real_local_ip = conn->real_local_ip; client->real_local_port = conn->real_local_port; client->real_remote_ip = conn->real_remote_ip; - client->real_remote_port = conn->real_remote_port; + client->real_remote_port = conn->real_remote_port; + client->listener_name = p_strdup(client->pool, conn->name); client->trusted = client_is_trusted(client); client->secured = ssl || client->trusted || @@ -492,6 +493,7 @@ { '\0', NULL, "auth_user" }, { '\0', NULL, "auth_username" }, { '\0', NULL, "auth_domain" }, + { '\0', NULL, "listener" }, { '\0', NULL, NULL } }; @@ -565,6 +567,7 @@ tab[23].value = tab[20].value; tab[24].value = tab[21].value; } + tab[25].value = client->listener_name; return tab; }
--- a/src/login-common/client-common.h Tue Aug 25 22:39:16 2015 +0300 +++ b/src/login-common/client-common.h Tue Aug 25 23:12:51 2015 +0300 @@ -113,7 +113,7 @@ struct ssl_proxy *ssl_proxy; const struct login_settings *set; const struct master_service_ssl_settings *ssl_set; - const char *session_id; + const char *session_id, *listener_name; int fd; struct istream *input;