Return correct value for failed db authentication

The unknown database error was never triggered as all authentication
errors returned MXS_AUTH_FAILED.
This commit is contained in:
Markus Mäkelä
2017-01-30 17:01:16 +02:00
parent b2c018a986
commit a3a2a24c97
3 changed files with 30 additions and 19 deletions

View File

@ -29,6 +29,7 @@
#include <stdint.h>
#include <arpa/inet.h>
#include <maxscale/authenticator.h>
#include <maxscale/dcb.h>
#include <maxscale/buffer.h>
#include <maxscale/service.h>
@ -185,9 +186,9 @@ int replace_mysql_users(SERV_LISTENER *listener);
* @param scramble The scramble sent to the client in the initial handshake
* @param scramble_len Length of @c scramble
*
* @return True if the user has access to the database
* @return MXS_AUTH_SUCCEEDED if the user has access to the database
*/
bool validate_mysql_user(sqlite3 *handle, DCB *dcb, MYSQL_session *session,
int validate_mysql_user(sqlite3 *handle, DCB *dcb, MYSQL_session *session,
uint8_t *scramble, size_t scramble_len);
MXS_END_DECLS