From cc9b0db5e91bfea105c33433d8bca8435eb37934 Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Tue, 24 Mar 2015 19:32:17 +0200 Subject: [PATCH] Added logging about authentication errors. --- server/modules/protocol/mysql_common.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/server/modules/protocol/mysql_common.c b/server/modules/protocol/mysql_common.c index f3665cd81..3cb350b1b 100644 --- a/server/modules/protocol/mysql_common.c +++ b/server/modules/protocol/mysql_common.c @@ -1530,14 +1530,20 @@ int gw_find_mysql_user_password_sha1(char *username, uint8_t *gateway_password, * user@% not found. */ - LOGIF(LD, - (skygw_log_write_flush( - LOGFILE_DEBUG, - "%lu [MySQL Client Auth], user [%s@%s] not existent", - pthread_self(), - key.user, - dcb->remote))); - break; + LOGIF(LD, + (skygw_log_write_flush( + LOGFILE_DEBUG, + "%lu [MySQL Client Auth], user [%s@%s] not existent", + pthread_self(), + key.user, + dcb->remote))); + + skygw_log_write_flush( + LOGFILE_ERROR, + "Authentication Failed: user [%s@%s] not found.", + key.user, + dcb->remote); + break; } break;