]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
*-login: Use e_info() instead of client_log()
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 9 Apr 2020 19:43:34 +0000 (22:43 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Fri, 24 Apr 2020 08:02:40 +0000 (08:02 +0000)
src/imap-login/imap-login-cmd-id.c
src/login-common/client-common-auth.c
src/login-common/client-common.c
src/login-common/login-proxy.c
src/login-common/sasl-server.c
src/pop3-login/client-authenticate.c

index cde640efe6b1fc4321ad4a76c76ad46a0c672fee..a1c629465150b88428af5547982e05f30304d533 100644 (file)
@@ -199,8 +199,8 @@ static void cmd_id_finish(struct imap_client *client)
                client->id_logged = TRUE;
 
                if (client->cmd_id->log_reply != NULL) {
-                       client_log(&client->common, t_strdup_printf(
-                               "ID sent: %s", str_c(client->cmd_id->log_reply)));
+                       e_info(client->common.event, "ID sent: %s",
+                              str_c(client->cmd_id->log_reply));
                }
        }
 
index 799d886fd022f66693375adcd5d22af2adae0a8c..89d122e992bb9529165546783f25db92240adf30 100644 (file)
@@ -302,7 +302,7 @@ void client_proxy_log_failure(struct client *client, const char *line)
                str_printfa(str, " (master %s)", client->proxy_master_user);
        str_append(str, ": ");
        str_append(str, line);
-       client_log(client, str_c(str));
+       e_info(client->event, "%s", str_c(str));
 }
 
 void client_proxy_failed(struct client *client, bool send_line)
@@ -779,8 +779,8 @@ client_auth_begin_common(struct client *client, const char *mech_name,
 {
        if (!client->secured && strcmp(client->ssl_set->ssl, "required") == 0) {
                if (client->set->auth_verbose) {
-                       client_log(client, "Login failed: "
-                                  "SSL required for authentication");
+                       e_info(client->event, "Login failed: "
+                              "SSL required for authentication");
                }
                client->auth_attempts++;
                client_auth_result(client, CLIENT_AUTH_RESULT_SSL_REQUIRED, NULL,
@@ -824,8 +824,8 @@ bool client_check_plaintext_auth(struct client *client, bool pass_sent)
                return TRUE;
 
        if (client->set->auth_verbose) {
-               client_log(client, "Login failed: "
-                          "Plaintext authentication disabled");
+               e_info(client->event, "Login failed: "
+                      "Plaintext authentication disabled");
        }
        if (pass_sent) {
                client_notify_status(client, TRUE,
index 518941f59943235e1537db6334aa6d31834f574e..e99d684e52f9c644a53f31165809d18c5b7fb337 100644 (file)
@@ -265,7 +265,7 @@ void client_disconnect(struct client *client, const char *reason)
                        reason = t_strconcat(reason, " ", extra_reason, NULL);
        }
        if (reason != NULL)
-               client_log(client, reason);
+               e_info(client->event, "%s", reason);
 
        if (client->output != NULL)
                o_stream_uncork(client->output);
@@ -498,7 +498,7 @@ int client_init_ssl(struct client *client)
        i_assert(client->fd != -1);
 
        if (strcmp(client->ssl_set->ssl, "no") == 0) {
-               client_log(client, "SSL is disabled (ssl=no)");
+               e_info(client->event, "SSL is disabled (ssl=no)");
                return -1;
        }
 
index a0934b0274a1d406fd29bf13dfaaf828cd615f67..6c694ed192cd7367f0827789f8ff488cef684f94 100644 (file)
@@ -499,12 +499,11 @@ login_proxy_free_full(struct login_proxy **_proxy, const char *reason,
                        delay_ms = login_proxy_delay_disconnect(proxy);
 
                ipstr = net_ip2addr(&proxy->client->ip);
-               client_log(proxy->client, t_strdup_printf(
-                       "proxy(%s): disconnecting %s%s%s",
-                       proxy->client->virtual_user,
-                       ipstr != NULL ? ipstr : "",
-                       reason == NULL ? "" : t_strdup_printf(" (%s)", reason),
-                       delay_ms == 0 ? "" : t_strdup_printf(" - disconnecting client in %ums", delay_ms)));
+               e_info(proxy->client->event, "proxy(%s): disconnecting %s%s%s",
+                      proxy->client->virtual_user,
+                      ipstr != NULL ? ipstr : "",
+                      reason == NULL ? "" : t_strdup_printf(" (%s)", reason),
+                      delay_ms == 0 ? "" : t_strdup_printf(" - disconnecting client in %ums", delay_ms));
 
                i_assert(detached_login_proxies_count > 0);
                detached_login_proxies_count--;
index 137f5c41e49cb6d5d5f689ce290ccadb06aab55c..27b90b148b17e17b126e392f704d780485ab139b 100644 (file)
@@ -518,8 +518,8 @@ sasl_server_auth_cancel(struct client *client, const char *reason,
        if (client->set->auth_verbose && reason != NULL) {
                const char *auth_name =
                        str_sanitize(client->auth_mech_name, MAX_MECH_NAME);
-               client_log(client, t_strdup_printf(
-                       "Authenticate %s failed: %s", auth_name, reason));
+               e_info(client->event, "Authenticate %s failed: %s",
+                      auth_name, reason);
        }
 
        client->authenticating = FALSE;
index b65409bc81093249cd5cc75a17b55a3e248768a1..a42ea23f343700163c4329277e03ff2e88a21dff 100644 (file)
@@ -174,7 +174,7 @@ bool cmd_apop(struct pop3_client *pop3_client, const char *args)
 
        if (pop3_client->apop_challenge == NULL) {
                if (client->set->auth_verbose)
-                       client_log(client, "APOP failed: APOP not enabled");
+                       e_info(client->event, "APOP failed: APOP not enabled");
                client_send_reply(client, POP3_CMD_REPLY_ERROR,
                                  "APOP not enabled.");
                return TRUE;
@@ -184,7 +184,7 @@ bool cmd_apop(struct pop3_client *pop3_client, const char *args)
        p = strchr(args, ' ');
        if (p == NULL || strlen(p+1) != 32) {
                if (client->set->auth_verbose)
-                       client_log(client, "APOP failed: Invalid parameters");
+                       e_info(client->event, "APOP failed: Invalid parameters");
                client_send_reply(client, POP3_CMD_REPLY_ERROR,
                                  "Invalid parameters.");
                return TRUE;
@@ -199,8 +199,8 @@ bool cmd_apop(struct pop3_client *pop3_client, const char *args)
 
        if (hex_to_binary(p+1, apop_data) < 0) {
                if (client->set->auth_verbose) {
-                       client_log(client, "APOP failed: "
-                                  "Invalid characters in MD5 response");
+                       e_info(client->event, "APOP failed: "
+                              "Invalid characters in MD5 response");
                }
                client_send_reply(client, POP3_CMD_REPLY_ERROR,
                                  "Invalid characters in MD5 response.");