Merge branch 'develop' of https://github.com/mariadb-corporation/MaxScale into develop
This commit is contained in:
@ -161,3 +161,16 @@ configure_file(
|
|||||||
|
|
||||||
add_custom_target(uninstall
|
add_custom_target(uninstall
|
||||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
||||||
|
|
||||||
|
find_package(Doxygen)
|
||||||
|
|
||||||
|
if(DOXYGEN_FOUND)
|
||||||
|
configure_file(
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/doxygate.in"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/doxygate"
|
||||||
|
IMMEDIATE @ONLY)
|
||||||
|
|
||||||
|
add_custom_target(documentation
|
||||||
|
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygate)
|
||||||
|
|
||||||
|
endif()
|
||||||
|
1520
doxygate.in
Normal file
1520
doxygate.in
Normal file
File diff suppressed because it is too large
Load Diff
@ -47,6 +47,8 @@
|
|||||||
#include <log_manager.h>
|
#include <log_manager.h>
|
||||||
#include <secrets.h>
|
#include <secrets.h>
|
||||||
#include <mysql_client_server_protocol.h>
|
#include <mysql_client_server_protocol.h>
|
||||||
|
#include <mysqld_error.h>
|
||||||
|
|
||||||
|
|
||||||
#define USERS_QUERY_NO_ROOT " AND user NOT IN ('root')"
|
#define USERS_QUERY_NO_ROOT " AND user NOT IN ('root')"
|
||||||
#define LOAD_MYSQL_USERS_QUERY "SELECT user, host, password, concat(user,host,password,Select_priv) AS userdata, Select_priv AS anydb FROM mysql.user WHERE user IS NOT NULL AND user <> ''"
|
#define LOAD_MYSQL_USERS_QUERY "SELECT user, host, password, concat(user,host,password,Select_priv) AS userdata, Select_priv AS anydb FROM mysql.user WHERE user IS NOT NULL AND user <> ''"
|
||||||
@ -494,7 +496,7 @@ getUsers(SERVICE *service, USERS *users)
|
|||||||
|
|
||||||
/* start with users and db grants for users */
|
/* start with users and db grants for users */
|
||||||
if (mysql_query(con, MYSQL_USERS_WITH_DB_COUNT)) {
|
if (mysql_query(con, MYSQL_USERS_WITH_DB_COUNT)) {
|
||||||
if (1142 != mysql_errno(con)) {
|
if (mysql_errno(con) != ER_TABLEACCESS_DENIED_ERROR) {
|
||||||
/* This is an error we cannot handle, return */
|
/* This is an error we cannot handle, return */
|
||||||
LOGIF(LE, (skygw_log_write_flush(
|
LOGIF(LE, (skygw_log_write_flush(
|
||||||
LOGFILE_ERROR,
|
LOGFILE_ERROR,
|
||||||
|
@ -1221,7 +1221,7 @@ int gw_send_change_user_to_backend(
|
|||||||
* @param scramble_len The scrable size in bytes
|
* @param scramble_len The scrable size in bytes
|
||||||
* @param username The current username in the authentication request
|
* @param username The current username in the authentication request
|
||||||
* @param stage1_hash The SHA1(candidate_password) decoded by this routine
|
* @param stage1_hash The SHA1(candidate_password) decoded by this routine
|
||||||
* @return 0 on succesful check or != 0 on failure
|
* @return 0 on succesful check or 1 on failure
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
int gw_check_mysql_scramble_data(DCB *dcb, uint8_t *token, unsigned int token_len, uint8_t *scramble, unsigned int scramble_len, char *username, uint8_t *stage1_hash) {
|
int gw_check_mysql_scramble_data(DCB *dcb, uint8_t *token, unsigned int token_len, uint8_t *scramble, unsigned int scramble_len, char *username, uint8_t *stage1_hash) {
|
||||||
@ -1321,7 +1321,12 @@ int gw_check_mysql_scramble_data(DCB *dcb, uint8_t *token, unsigned int token_le
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* now compare SHA1(SHA1(gateway_password)) and check_hash: return 0 is MYSQL_AUTH_OK */
|
/* now compare SHA1(SHA1(gateway_password)) and check_hash: return 0 is MYSQL_AUTH_OK */
|
||||||
return memcmp(password, check_hash, SHA_DIGEST_LENGTH);
|
ret_val = memcmp(password, check_hash, SHA_DIGEST_LENGTH);
|
||||||
|
|
||||||
|
if (ret_val != 0)
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user