Removed redundant log messages
Moved logging from functions that perform user authentication to the code that uses these functions. This way the messages are only logged once.
This commit is contained in:
@ -609,9 +609,16 @@ static int gw_mysql_do_authentication(DCB *dcb, GWBUF **buf) {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
skygw_log_write(LOGFILE_ERROR,
|
skygw_log_write(LM, "%s: login attempt for user '%s', authentication failed.",
|
||||||
"%s: login attempt for user '%s', authentication failed.",
|
|
||||||
dcb->service->name, username);
|
dcb->service->name, username);
|
||||||
|
if (dcb->ipv4.sin_addr.s_addr == 0x0100007F &&
|
||||||
|
!dcb->service->localhost_match_wildcard_host)
|
||||||
|
{
|
||||||
|
skygw_log_write_flush(LM, "If you have a wildcard grant that covers"
|
||||||
|
" this address, try adding "
|
||||||
|
"'localhost_match_wildcard_host=true' for "
|
||||||
|
"service '%s'. ", dcb->service->name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* let's free the auth_token now */
|
/* let's free the auth_token now */
|
||||||
|
@ -1489,16 +1489,6 @@ int gw_find_mysql_user_password_sha1(char *username, uint8_t *gateway_password,
|
|||||||
!dcb->service->localhost_match_wildcard_host)
|
!dcb->service->localhost_match_wildcard_host)
|
||||||
{
|
{
|
||||||
/* Skip the wildcard check and return 1 */
|
/* Skip the wildcard check and return 1 */
|
||||||
LOGIF(LE,
|
|
||||||
(skygw_log_write_flush(
|
|
||||||
LOGFILE_ERROR,
|
|
||||||
"Error : user %s@%s not found, try set "
|
|
||||||
"'localhost_match_wildcard_host=1' in "
|
|
||||||
"service definition of the configuration "
|
|
||||||
"file.",
|
|
||||||
key.user,
|
|
||||||
dcb->remote)));
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user