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:
Markus Makela
2016-10-20 21:26:06 +03:00
parent fe689504b0
commit 4e07c3313c
23 changed files with 127 additions and 352 deletions

View File

@ -72,7 +72,7 @@ struct servlistener;
* destroy Destroy the unique DCB data returned by the `create`
* entry point.
*
* loadUsers Load or update authenticator user data
* loadusers Load or update authenticator user data
* @endverbatim
*
* This forms the "module object" for authenticator modules within the gateway.
@ -102,7 +102,8 @@ typedef struct gw_authenticator
/** Return values for the loadusers entry point */
#define MXS_AUTH_LOADUSERS_OK 0 /**< Users loaded successfully */
#define MXS_AUTH_LOADUSERS_ERROR 1 /**< Failed to load users */
#define MXS_AUTH_LOADUSERS_ERROR 1 /**< Temporary error, service is started */
#define MXS_AUTH_LOADUSERS_FATAL 2 /**< Fatal error, service is not started */
/**
* Authentication states
@ -136,7 +137,7 @@ typedef enum
bool authenticator_init(void **instance, const char *authenticator, const char *options);
char* get_default_authenticator(const char *protocol);
const char* get_default_authenticator(const char *protocol);
MXS_END_DECLS