dovecot-2.2: login_log_format_elements: Added %{listener} variab...

dovecot at dovecot.org dovecot at dovecot.org
Tue Aug 25 20:13:55 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/a919414e68d2
changeset: 19010:a919414e68d2
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Aug 25 23:12:51 2015 +0300
description:
login_log_format_elements: Added %{listener} variable to expand to the listener socket name.

diffstat:

 src/login-common/client-common.c |  5 ++++-
 src/login-common/client-common.h |  2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diffs (41 lines):

diff -r 5f843b7da393 -r a919414e68d2 src/login-common/client-common.c
--- 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;
 }
 
diff -r 5f843b7da393 -r a919414e68d2 src/login-common/client-common.h
--- 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;


More information about the dovecot-cvs mailing list