Move dbusers.c out of the core
The dbusers.c was a MySQL protocol specific file which was used directly by some of the modules. Added a new return value for the loadusers authenticator entry point which allows fatal failures to occur when users are loaded. Currently this is only taken into notice when the service is first started. If a listener later returns a fatal error, it is only logged but the service stays in operation. Moved the MySQLAuth authenticator sources and the tests that relate to this module into a subdirectory in the authenticator directory. Eventually, all authenticators could have a subdirectory of their own.
This commit is contained in:
@ -89,14 +89,14 @@ bool authenticator_init(void** dest, const char *authenticator, const char *opti
|
||||
* @return The default authenticator for the protocol or NULL if the protocol
|
||||
* does not provide one
|
||||
*/
|
||||
char* get_default_authenticator(const char *protocol)
|
||||
const char* get_default_authenticator(const char *protocol)
|
||||
{
|
||||
char *rval = NULL;
|
||||
GWPROTOCOL *protofuncs = (GWPROTOCOL*)load_module(protocol, MODULE_PROTOCOL);
|
||||
|
||||
if (protofuncs && protofuncs->auth_default)
|
||||
{
|
||||
rval = MXS_STRDUP(protofuncs->auth_default());
|
||||
rval = protofuncs->auth_default();
|
||||
}
|
||||
|
||||
return rval;
|
||||
|
Reference in New Issue
Block a user