]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login-common: Include the proxy's source address in log messages
authorJosef 'Jeff' Sipek <jeff.sipek@open-xchange.com>
Thu, 17 Sep 2020 19:43:02 +0000 (15:43 -0400)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 7 Oct 2020 11:46:54 +0000 (11:46 +0000)
src/login-common/client-common-auth.c

index 3328d0df1ca97657ff141698571f3e286f8d8388..00db836aa7901bc686c10c3117e941ea2b81fb04 100644 (file)
@@ -264,6 +264,11 @@ static void proxy_free_password(struct client *client)
 
 static void client_proxy_append_conn_info(string_t *str, struct client *client)
 {
+       const char *source_host;
+
+       source_host = login_proxy_get_source_host(client->login_proxy);
+       if (source_host[0] != '\0')
+               str_printfa(str, " from %s", source_host);
        if (strcmp(client->virtual_user, client->proxy_user) != 0) {
                /* remote username is different, log it */
                str_printfa(str, " as user %s", client->proxy_user);