Added more debug output to user authentication.
This commit is contained in:
@ -183,7 +183,7 @@ if(PACKAGE)
|
||||
set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_SOURCE_DIR}/etc/DESCRIPTION)
|
||||
set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_BINARY_DIR}/postinst;{CMAKE_BINARY_DIR}/postrm")
|
||||
set(CPACK_RPM_PACKAGE_RELEASE 2)
|
||||
set(CPACK_RPM_PACKAGE_RELEASE 3)
|
||||
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE ${CMAKE_BINARY_DIR}/postinst)
|
||||
set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_BINARY_DIR}/postrm)
|
||||
set(CPACK_RPM_PACKAGE_NAME "maxscale")
|
||||
|
@ -427,6 +427,7 @@ getDatabases(SERVICE *service, MYSQL *con)
|
||||
|
||||
/* insert key and value "" */
|
||||
while ((row = mysql_fetch_row(result))) {
|
||||
skygw_log_write(LOGFILE_DEBUG,"%s: Adding database %s to the resouce hash.",service->name,row[0]);
|
||||
resource_add(service->resources, row[0], "");
|
||||
}
|
||||
|
||||
@ -708,7 +709,7 @@ getUsers(SERVICE *service, USERS *users)
|
||||
/*
|
||||
* users successfully loaded with db grants.
|
||||
*/
|
||||
|
||||
skygw_log_write(LOGFILE_DEBUG,"[%s] Loading users with db grants.",service->name);
|
||||
db_grants = 1;
|
||||
}
|
||||
|
||||
@ -796,6 +797,7 @@ getUsers(SERVICE *service, USERS *users)
|
||||
if (db_grants) {
|
||||
/* we have dbgrants, store them */
|
||||
rc = add_mysql_users_with_host_ipv4(users, row[0], row[1], password, row[4], row[5]);
|
||||
skygw_log_write(LOGFILE_DEBUG,"%s: Adding user:%s host:%s anydb:%s db:%s.",service->name,row[0],row[1],row[4],row[5]);
|
||||
} else {
|
||||
/* we don't have dbgrants, simply set ANY DB for the user */
|
||||
rc = add_mysql_users_with_host_ipv4(users, row[0], row[1], password, "Y", NULL);
|
||||
|
@ -488,7 +488,7 @@ static int gw_mysql_do_authentication(DCB *dcb, GWBUF *queue) {
|
||||
* Decode the token and check the password
|
||||
* Note: if auth_token_len == 0 && auth_token == NULL, user is without password
|
||||
*/
|
||||
|
||||
skygw_log_write(LOGFILE_DEBUG,"Receiving connection from '%s' to database '%s'.",username,database);
|
||||
auth_ret = gw_check_mysql_scramble_data(dcb,
|
||||
auth_token,
|
||||
auth_token_len,
|
||||
|
@ -1434,10 +1434,12 @@ int gw_find_mysql_user_password_sha1(char *username, uint8_t *gateway_password,
|
||||
LOGIF(LD,
|
||||
(skygw_log_write_flush(
|
||||
LOGFILE_DEBUG,
|
||||
"%lu [MySQL Client Auth], checking user [%s@%s]",
|
||||
"%lu [MySQL Client Auth], checking user [%s@%s]%s%s",
|
||||
pthread_self(),
|
||||
key.user,
|
||||
dcb->remote)));
|
||||
dcb->remote,
|
||||
key.resource != NULL ?" db: " :"",
|
||||
key.resource != NULL ?key.resource :"")));
|
||||
|
||||
/* look for user@current_ipv4 now */
|
||||
user_password = mysql_users_fetch(service->users, &key);
|
||||
|
Reference in New Issue
Block a user