From 3a0807251c47cf5524adbd8c7cd02a7135acaf33 Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Mon, 30 Mar 2015 15:43:51 +0300 Subject: [PATCH] Fix to MXS-54: https://mariadb.atlassian.net/browse/MXS-54 Added log messages for failed authentication attempts. --- server/modules/protocol/mysql_client.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/modules/protocol/mysql_client.c b/server/modules/protocol/mysql_client.c index 5a9591c8c..6325016d6 100644 --- a/server/modules/protocol/mysql_client.c +++ b/server/modules/protocol/mysql_client.c @@ -530,6 +530,12 @@ static int gw_mysql_do_authentication(DCB *dcb, GWBUF *queue) { if (auth_ret == 0) { dcb->user = strdup(client_data->user); } + else + { + skygw_log_write(LOGFILE_ERROR, + "%s: login attempt for user '%s', authentication failed.", + dcb->service->name, username); + } /* let's free the auth_token now */ if (auth_token) {