Rename GW_AUTHENTICATOR and GW_BITMASK + cleanup
This commit is contained in:
@ -16,22 +16,11 @@
|
|||||||
* @file authenticator.h
|
* @file authenticator.h
|
||||||
*
|
*
|
||||||
* The authenticator module interface definitions for MaxScale
|
* The authenticator module interface definitions for MaxScale
|
||||||
*
|
|
||||||
* @verbatim
|
|
||||||
* Revision History
|
|
||||||
*
|
|
||||||
* Date Who Description
|
|
||||||
* 17/02/16 Martin Brampton Initial implementation
|
|
||||||
*
|
|
||||||
* @endverbatim
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <maxscale/cdefs.h>
|
#include <maxscale/cdefs.h>
|
||||||
|
|
||||||
#include <maxscale/buffer.h>
|
#include <maxscale/buffer.h>
|
||||||
#include <openssl/crypto.h>
|
|
||||||
#include <openssl/ssl.h>
|
|
||||||
#include <openssl/err.h>
|
|
||||||
#include <openssl/dh.h>
|
|
||||||
|
|
||||||
MXS_BEGIN_DECLS
|
MXS_BEGIN_DECLS
|
||||||
|
|
||||||
@ -77,7 +66,7 @@ struct servlistener;
|
|||||||
*
|
*
|
||||||
* @see load_module
|
* @see load_module
|
||||||
*/
|
*/
|
||||||
typedef struct gw_authenticator
|
typedef struct mxs_authenticator
|
||||||
{
|
{
|
||||||
void* (*initialize)(char **options);
|
void* (*initialize)(char **options);
|
||||||
void* (*create)(void* instance);
|
void* (*create)(void* instance);
|
||||||
@ -87,7 +76,7 @@ typedef struct gw_authenticator
|
|||||||
void (*free)(struct dcb *);
|
void (*free)(struct dcb *);
|
||||||
void (*destroy)(void *);
|
void (*destroy)(void *);
|
||||||
int (*loadusers)(struct servlistener *);
|
int (*loadusers)(struct servlistener *);
|
||||||
} GWAUTHENTICATOR;
|
} MXS_AUTHENTICATOR;
|
||||||
|
|
||||||
/** Return values for extract and authenticate entry points */
|
/** Return values for extract and authenticate entry points */
|
||||||
#define MXS_AUTH_SUCCEEDED 0 /**< Authentication was successful */
|
#define MXS_AUTH_SUCCEEDED 0 /**< Authentication was successful */
|
||||||
@ -127,11 +116,11 @@ typedef enum
|
|||||||
} mxs_auth_state_t;
|
} mxs_auth_state_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The GWAUTHENTICATOR version data. The following should be updated whenever
|
* The MXS_AUTHENTICATOR version data. The following should be updated whenever
|
||||||
* the GWAUTHENTICATOR structure is changed. See the rules defined in modinfo.h
|
* the MXS_AUTHENTICATOR structure is changed. See the rules defined in modinfo.h
|
||||||
* that define how these numbers should change.
|
* that define how these numbers should change.
|
||||||
*/
|
*/
|
||||||
#define GWAUTHENTICATOR_VERSION {1, 1, 0}
|
#define MXS_AUTHENTICATOR_VERSION {1, 1, 0}
|
||||||
|
|
||||||
|
|
||||||
bool authenticator_init(void **instance, const char *authenticator, const char *options);
|
bool authenticator_init(void **instance, const char *authenticator, const char *options);
|
||||||
|
@ -14,20 +14,12 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @file bitmask.h An implementation of an arbitrarily long bitmask
|
* @file bitmask.h An implementation of an arbitrarily long bitmask
|
||||||
*
|
|
||||||
* @verbatim
|
|
||||||
* Revision History
|
|
||||||
*
|
|
||||||
* Date Who Description
|
|
||||||
* 28/06/13 Mark Riddoch Initial implementation
|
|
||||||
* 17/10/15 Martin Brampton Add bitmask_render_readable
|
|
||||||
*
|
|
||||||
* @endverbatim
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <maxscale/cdefs.h>
|
#include <maxscale/cdefs.h>
|
||||||
#include <maxscale/spinlock.h>
|
|
||||||
#include <maxscale/limits.h>
|
#include <maxscale/limits.h>
|
||||||
|
#include <maxscale/spinlock.h>
|
||||||
|
|
||||||
MXS_BEGIN_DECLS
|
MXS_BEGIN_DECLS
|
||||||
|
|
||||||
@ -43,18 +35,18 @@ typedef struct
|
|||||||
{
|
{
|
||||||
SPINLOCK lock; /**< Lock to protect the bitmask */
|
SPINLOCK lock; /**< Lock to protect the bitmask */
|
||||||
unsigned char bits[MXS_BITMASK_SIZE]; /**< The bits themselves */
|
unsigned char bits[MXS_BITMASK_SIZE]; /**< The bits themselves */
|
||||||
} GWBITMASK;
|
} MXS_BITMASK;
|
||||||
|
|
||||||
#define GWBITMASK_INIT {SPINLOCK_INIT}
|
#define MXS_BITMASK_INIT {SPINLOCK_INIT}
|
||||||
|
|
||||||
extern void bitmask_init(GWBITMASK *);
|
void bitmask_init(MXS_BITMASK *);
|
||||||
extern void bitmask_free(GWBITMASK *);
|
void bitmask_free(MXS_BITMASK *);
|
||||||
extern int bitmask_set(GWBITMASK *, int);
|
int bitmask_set(MXS_BITMASK *, int);
|
||||||
extern int bitmask_clear(GWBITMASK *, int);
|
int bitmask_clear(MXS_BITMASK *, int);
|
||||||
extern int bitmask_clear_without_spinlock(GWBITMASK *, int);
|
int bitmask_clear_without_spinlock(MXS_BITMASK *, int);
|
||||||
extern int bitmask_isset(GWBITMASK *, int);
|
int bitmask_isset(MXS_BITMASK *, int);
|
||||||
extern int bitmask_isallclear(GWBITMASK *);
|
int bitmask_isallclear(MXS_BITMASK *);
|
||||||
extern void bitmask_copy(GWBITMASK *, GWBITMASK *);
|
void bitmask_copy(MXS_BITMASK *, MXS_BITMASK *);
|
||||||
extern char *bitmask_render_readable(GWBITMASK *);
|
char *bitmask_render_readable(MXS_BITMASK *);
|
||||||
|
|
||||||
MXS_END_DECLS
|
MXS_END_DECLS
|
||||||
|
@ -130,11 +130,11 @@ typedef struct dcbstats
|
|||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
GWBITMASK bitmask; /*< The bitmask of threads */
|
MXS_BITMASK bitmask; /*< The bitmask of threads */
|
||||||
struct dcb *next; /*< Next pointer for the zombie list */
|
struct dcb *next; /*< Next pointer for the zombie list */
|
||||||
} DCBMM;
|
} DCBMM;
|
||||||
|
|
||||||
#define DCBMM_INIT {GWBITMASK_INIT}
|
#define DCBMM_INIT {MXS_BITMASK_INIT}
|
||||||
|
|
||||||
/* DCB states */
|
/* DCB states */
|
||||||
typedef enum
|
typedef enum
|
||||||
@ -237,7 +237,7 @@ typedef struct dcb
|
|||||||
struct session *session; /**< The owning session */
|
struct session *session; /**< The owning session */
|
||||||
struct servlistener *listener; /**< For a client DCB, the listener data */
|
struct servlistener *listener; /**< For a client DCB, the listener data */
|
||||||
MXS_PROTOCOL func; /**< The protocol functions for this descriptor */
|
MXS_PROTOCOL func; /**< The protocol functions for this descriptor */
|
||||||
GWAUTHENTICATOR authfunc; /**< The authenticator functions for this descriptor */
|
MXS_AUTHENTICATOR authfunc; /**< The authenticator functions for this descriptor */
|
||||||
|
|
||||||
int writeqlen; /**< Current number of byes in the write queue */
|
int writeqlen; /**< Current number of byes in the write queue */
|
||||||
SPINLOCK writeqlock; /**< Write Queue spinlock */
|
SPINLOCK writeqlock; /**< Write Queue spinlock */
|
||||||
|
@ -50,7 +50,7 @@ typedef struct servlistener
|
|||||||
char *address; /**< Address to listen with */
|
char *address; /**< Address to listen with */
|
||||||
char *authenticator; /**< Name of authenticator */
|
char *authenticator; /**< Name of authenticator */
|
||||||
char *auth_options; /**< Authenticator options */
|
char *auth_options; /**< Authenticator options */
|
||||||
void *auth_instance; /**< Authenticator instance created in GWAUTHENTICATOR::initialize() */
|
void *auth_instance; /**< Authenticator instance created in MXS_AUTHENTICATOR::initialize() */
|
||||||
SSL_LISTENER *ssl; /**< Structure of SSL data or NULL */
|
SSL_LISTENER *ssl; /**< Structure of SSL data or NULL */
|
||||||
struct dcb *listener; /**< The DCB for the listener */
|
struct dcb *listener; /**< The DCB for the listener */
|
||||||
struct users *users; /**< The user data for this listener */
|
struct users *users; /**< The user data for this listener */
|
||||||
|
@ -38,7 +38,7 @@ bool authenticator_init(void** dest, const char *authenticator, const char *opti
|
|||||||
{
|
{
|
||||||
bool rval = true;
|
bool rval = true;
|
||||||
void *instance = NULL;
|
void *instance = NULL;
|
||||||
GWAUTHENTICATOR *func = (GWAUTHENTICATOR*)load_module(authenticator, MODULE_AUTHENTICATOR);
|
MXS_AUTHENTICATOR *func = (MXS_AUTHENTICATOR*)load_module(authenticator, MODULE_AUTHENTICATOR);
|
||||||
|
|
||||||
if (func == NULL)
|
if (func == NULL)
|
||||||
{
|
{
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
/**
|
/**
|
||||||
* @file bitmask.c Implementation of bitmask operations for the gateway
|
* @file bitmask.c Implementation of bitmask operations for the gateway
|
||||||
*
|
*
|
||||||
* GWBITMASK is a fixed size bitmask with space for 256 bits.
|
* MXS_BITMASK is a fixed size bitmask with space for 256 bits.
|
||||||
*
|
*
|
||||||
* @verbatim
|
* @verbatim
|
||||||
* Revision History
|
* Revision History
|
||||||
@ -34,8 +34,8 @@
|
|||||||
* @endverbatim
|
* @endverbatim
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int bitmask_isset_without_spinlock(GWBITMASK *bitmask, int bit);
|
static int bitmask_isset_without_spinlock(MXS_BITMASK *bitmask, int bit);
|
||||||
static int bitmask_count_bits_set(GWBITMASK *bitmask);
|
static int bitmask_count_bits_set(MXS_BITMASK *bitmask);
|
||||||
|
|
||||||
static const unsigned char bitmapclear[8] =
|
static const unsigned char bitmapclear[8] =
|
||||||
{
|
{
|
||||||
@ -52,7 +52,7 @@ static const unsigned char bitmapset[8] =
|
|||||||
* @param bitmask Pointer the bitmask
|
* @param bitmask Pointer the bitmask
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
bitmask_init(GWBITMASK *bitmask)
|
bitmask_init(MXS_BITMASK *bitmask)
|
||||||
{
|
{
|
||||||
spinlock_init(&bitmask->lock);
|
spinlock_init(&bitmask->lock);
|
||||||
memset(bitmask->bits, 0, MXS_BITMASK_SIZE);
|
memset(bitmask->bits, 0, MXS_BITMASK_SIZE);
|
||||||
@ -64,7 +64,7 @@ bitmask_init(GWBITMASK *bitmask)
|
|||||||
* @param bitmask
|
* @param bitmask
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
bitmask_free(GWBITMASK *bitmask)
|
bitmask_free(MXS_BITMASK *bitmask)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ bitmask_free(GWBITMASK *bitmask)
|
|||||||
* the maximum length of the bitmask.
|
* the maximum length of the bitmask.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
bitmask_set(GWBITMASK *bitmask, int bit)
|
bitmask_set(MXS_BITMASK *bitmask, int bit)
|
||||||
{
|
{
|
||||||
ss_dassert(bit >= 0);
|
ss_dassert(bit >= 0);
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ bitmask_set(GWBITMASK *bitmask, int bit)
|
|||||||
* @return int 1 if the bitmask is all clear after the operation, else 0.
|
* @return int 1 if the bitmask is all clear after the operation, else 0.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
bitmask_clear_without_spinlock(GWBITMASK *bitmask, int bit)
|
bitmask_clear_without_spinlock(MXS_BITMASK *bitmask, int bit)
|
||||||
{
|
{
|
||||||
ss_dassert(bit >= 0);
|
ss_dassert(bit >= 0);
|
||||||
|
|
||||||
@ -151,7 +151,7 @@ bitmask_clear_without_spinlock(GWBITMASK *bitmask, int bit)
|
|||||||
* @return int 1 if the bitmask is all clear after the operation, else 0
|
* @return int 1 if the bitmask is all clear after the operation, else 0
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
bitmask_clear(GWBITMASK *bitmask, int bit)
|
bitmask_clear(MXS_BITMASK *bitmask, int bit)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ bitmask_clear(GWBITMASK *bitmask, int bit)
|
|||||||
* @param bit Bit to test
|
* @param bit Bit to test
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
bitmask_isset(GWBITMASK *bitmask, int bit)
|
bitmask_isset(MXS_BITMASK *bitmask, int bit)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ bitmask_isset(GWBITMASK *bitmask, int bit)
|
|||||||
* @param bit Bit to test
|
* @param bit Bit to test
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
bitmask_isset_without_spinlock(GWBITMASK *bitmask, int bit)
|
bitmask_isset_without_spinlock(MXS_BITMASK *bitmask, int bit)
|
||||||
{
|
{
|
||||||
ss_dassert(bit >= 0);
|
ss_dassert(bit >= 0);
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ bitmask_isset_without_spinlock(GWBITMASK *bitmask, int bit)
|
|||||||
* @return Non-zero if the bitmask has no bits set
|
* @return Non-zero if the bitmask has no bits set
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
bitmask_isallclear(GWBITMASK *bitmask)
|
bitmask_isallclear(MXS_BITMASK *bitmask)
|
||||||
{
|
{
|
||||||
unsigned char *ptr = bitmask->bits;
|
unsigned char *ptr = bitmask->bits;
|
||||||
int result = 1;
|
int result = 1;
|
||||||
@ -247,7 +247,7 @@ bitmask_isallclear(GWBITMASK *bitmask)
|
|||||||
* @param src Bitmap to copy
|
* @param src Bitmap to copy
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
bitmask_copy(GWBITMASK *dest, GWBITMASK *src)
|
bitmask_copy(MXS_BITMASK *dest, MXS_BITMASK *src)
|
||||||
{
|
{
|
||||||
spinlock_acquire(&src->lock);
|
spinlock_acquire(&src->lock);
|
||||||
spinlock_acquire(&dest->lock);
|
spinlock_acquire(&dest->lock);
|
||||||
@ -266,7 +266,7 @@ bitmask_copy(GWBITMASK *dest, GWBITMASK *src)
|
|||||||
* @return pointer to the newly allocated string, or null if no memory
|
* @return pointer to the newly allocated string, or null if no memory
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
bitmask_render_readable(GWBITMASK *bitmask)
|
bitmask_render_readable(MXS_BITMASK *bitmask)
|
||||||
{
|
{
|
||||||
static const char empty[] = "No bits are set";
|
static const char empty[] = "No bits are set";
|
||||||
char *result;
|
char *result;
|
||||||
@ -311,7 +311,7 @@ bitmask_render_readable(GWBITMASK *bitmask)
|
|||||||
* @return int Number of set bits
|
* @return int Number of set bits
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
bitmask_count_bits_set(GWBITMASK *bitmask)
|
bitmask_count_bits_set(MXS_BITMASK *bitmask)
|
||||||
{
|
{
|
||||||
static const unsigned char oneBits[] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4};
|
static const unsigned char oneBits[] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4};
|
||||||
unsigned char partresults;
|
unsigned char partresults;
|
||||||
|
@ -699,7 +699,7 @@ dcb_connect(SERVER *server, MXS_SESSION *session, const char *protocol)
|
|||||||
server->authenticator : dcb->func.auth_default ?
|
server->authenticator : dcb->func.auth_default ?
|
||||||
dcb->func.auth_default() : "NullAuthDeny";
|
dcb->func.auth_default() : "NullAuthDeny";
|
||||||
|
|
||||||
GWAUTHENTICATOR *authfuncs = (GWAUTHENTICATOR*)load_module(authenticator,
|
MXS_AUTHENTICATOR *authfuncs = (MXS_AUTHENTICATOR*)load_module(authenticator,
|
||||||
MODULE_AUTHENTICATOR);
|
MODULE_AUTHENTICATOR);
|
||||||
if (authfuncs == NULL)
|
if (authfuncs == NULL)
|
||||||
{
|
{
|
||||||
@ -709,7 +709,7 @@ dcb_connect(SERVER *server, MXS_SESSION *session, const char *protocol)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(&dcb->authfunc, authfuncs, sizeof(GWAUTHENTICATOR));
|
memcpy(&dcb->authfunc, authfuncs, sizeof(MXS_AUTHENTICATOR));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Link dcb to session. Unlink is called in dcb_final_free
|
* Link dcb to session. Unlink is called in dcb_final_free
|
||||||
@ -2959,7 +2959,7 @@ dcb_accept(DCB *listener)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
const char *authenticator_name = "NullAuthDeny";
|
const char *authenticator_name = "NullAuthDeny";
|
||||||
GWAUTHENTICATOR *authfuncs;
|
MXS_AUTHENTICATOR *authfuncs;
|
||||||
|
|
||||||
client_dcb->service = listener->session->service;
|
client_dcb->service = listener->session->service;
|
||||||
client_dcb->session = session_set_dummy(client_dcb);
|
client_dcb->session = session_set_dummy(client_dcb);
|
||||||
@ -2999,10 +2999,10 @@ dcb_accept(DCB *listener)
|
|||||||
{
|
{
|
||||||
authenticator_name = client_dcb->func.auth_default();
|
authenticator_name = client_dcb->func.auth_default();
|
||||||
}
|
}
|
||||||
if ((authfuncs = (GWAUTHENTICATOR *)load_module(authenticator_name,
|
if ((authfuncs = (MXS_AUTHENTICATOR *)load_module(authenticator_name,
|
||||||
MODULE_AUTHENTICATOR)) == NULL)
|
MODULE_AUTHENTICATOR)) == NULL)
|
||||||
{
|
{
|
||||||
if ((authfuncs = (GWAUTHENTICATOR *)load_module("NullAuthDeny",
|
if ((authfuncs = (MXS_AUTHENTICATOR *)load_module("NullAuthDeny",
|
||||||
MODULE_AUTHENTICATOR)) == NULL)
|
MODULE_AUTHENTICATOR)) == NULL)
|
||||||
{
|
{
|
||||||
MXS_ERROR("Failed to load authenticator module for %s, free dcb %p\n",
|
MXS_ERROR("Failed to load authenticator module for %s, free dcb %p\n",
|
||||||
@ -3012,7 +3012,7 @@ dcb_accept(DCB *listener)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
memcpy(&(client_dcb->authfunc), authfuncs, sizeof(GWAUTHENTICATOR));
|
memcpy(&(client_dcb->authfunc), authfuncs, sizeof(MXS_AUTHENTICATOR));
|
||||||
|
|
||||||
/** Allocate DCB specific authentication data */
|
/** Allocate DCB specific authentication data */
|
||||||
if (client_dcb->authfunc.create &&
|
if (client_dcb->authfunc.create &&
|
||||||
|
@ -58,7 +58,7 @@ void dShowThreads(DCB *dcb);
|
|||||||
void dShowEventQ(DCB *dcb);
|
void dShowEventQ(DCB *dcb);
|
||||||
void dShowEventStats(DCB *dcb);
|
void dShowEventStats(DCB *dcb);
|
||||||
|
|
||||||
GWBITMASK *poll_bitmask();
|
MXS_BITMASK *poll_bitmask();
|
||||||
int poll_get_stat(POLL_STAT stat);
|
int poll_get_stat(POLL_STAT stat);
|
||||||
RESULTSET *eventTimesGetList();
|
RESULTSET *eventTimesGetList();
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ static int next_epoll_fd = 0; /*< Which thread handles the next DCB */
|
|||||||
static fake_event_t **fake_events; /*< Thread-specific fake event queue */
|
static fake_event_t **fake_events; /*< Thread-specific fake event queue */
|
||||||
static SPINLOCK *fake_event_lock;
|
static SPINLOCK *fake_event_lock;
|
||||||
static int do_shutdown = 0; /*< Flag the shutdown of the poll subsystem */
|
static int do_shutdown = 0; /*< Flag the shutdown of the poll subsystem */
|
||||||
static GWBITMASK poll_mask;
|
static MXS_BITMASK poll_mask;
|
||||||
|
|
||||||
/** Poll cross-thread messaging variables */
|
/** Poll cross-thread messaging variables */
|
||||||
static volatile int *poll_msg;
|
static volatile int *poll_msg;
|
||||||
@ -1195,7 +1195,7 @@ poll_shutdown()
|
|||||||
*
|
*
|
||||||
* @return The bitmask of the running polling threads
|
* @return The bitmask of the running polling threads
|
||||||
*/
|
*/
|
||||||
GWBITMASK *
|
MXS_BITMASK *
|
||||||
poll_bitmask()
|
poll_bitmask()
|
||||||
{
|
{
|
||||||
return &poll_mask;
|
return &poll_mask;
|
||||||
|
@ -287,7 +287,7 @@ serviceStartPort(SERVICE *service, SERV_LISTENER *port)
|
|||||||
authenticator_name = port->listener->func.auth_default();
|
authenticator_name = port->listener->func.auth_default();
|
||||||
}
|
}
|
||||||
|
|
||||||
GWAUTHENTICATOR *authfuncs = (GWAUTHENTICATOR *)load_module(authenticator_name, MODULE_AUTHENTICATOR);
|
MXS_AUTHENTICATOR *authfuncs = (MXS_AUTHENTICATOR *)load_module(authenticator_name, MODULE_AUTHENTICATOR);
|
||||||
|
|
||||||
if (authfuncs == NULL)
|
if (authfuncs == NULL)
|
||||||
{
|
{
|
||||||
@ -297,7 +297,7 @@ serviceStartPort(SERVICE *service, SERV_LISTENER *port)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(&port->listener->authfunc, authfuncs, sizeof(GWAUTHENTICATOR));
|
memcpy(&port->listener->authfunc, authfuncs, sizeof(MXS_AUTHENTICATOR));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Normally, we'd allocate the DCB specific authentication data. As the
|
* Normally, we'd allocate the DCB specific authentication data. As the
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
static int
|
static int
|
||||||
test1()
|
test1()
|
||||||
{
|
{
|
||||||
static GWBITMASK bitmask, another;
|
static MXS_BITMASK bitmask, another;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Hint tests */
|
/* Hint tests */
|
||||||
|
@ -158,7 +158,7 @@ MXS_MODULE* MXS_CREATE_MODULE()
|
|||||||
|
|
||||||
modulecmd_register_command("cdc", "add_user", cdc_add_new_user, 3, args);
|
modulecmd_register_command("cdc", "add_user", cdc_add_new_user, 3, args);
|
||||||
|
|
||||||
static GWAUTHENTICATOR MyObject =
|
static MXS_AUTHENTICATOR MyObject =
|
||||||
{
|
{
|
||||||
NULL, /* No initialize entry point */
|
NULL, /* No initialize entry point */
|
||||||
NULL, /* No create entry point */
|
NULL, /* No create entry point */
|
||||||
@ -174,7 +174,7 @@ MXS_MODULE* MXS_CREATE_MODULE()
|
|||||||
{
|
{
|
||||||
MXS_MODULE_API_AUTHENTICATOR,
|
MXS_MODULE_API_AUTHENTICATOR,
|
||||||
MXS_MODULE_GA,
|
MXS_MODULE_GA,
|
||||||
GWAUTHENTICATOR_VERSION,
|
MXS_AUTHENTICATOR_VERSION,
|
||||||
"The CDC client to MaxScale authenticator implementation",
|
"The CDC client to MaxScale authenticator implementation",
|
||||||
"V1.1.0",
|
"V1.1.0",
|
||||||
&MyObject,
|
&MyObject,
|
||||||
|
@ -602,7 +602,7 @@ int gssapi_auth_load_users(SERV_LISTENER *listener)
|
|||||||
*/
|
*/
|
||||||
MXS_MODULE* MXS_CREATE_MODULE()
|
MXS_MODULE* MXS_CREATE_MODULE()
|
||||||
{
|
{
|
||||||
static GWAUTHENTICATOR MyObject =
|
static MXS_AUTHENTICATOR MyObject =
|
||||||
{
|
{
|
||||||
gssapi_auth_init, /* Initialize authenticator */
|
gssapi_auth_init, /* Initialize authenticator */
|
||||||
gssapi_auth_alloc, /* Allocate authenticator data */
|
gssapi_auth_alloc, /* Allocate authenticator data */
|
||||||
@ -618,7 +618,7 @@ MXS_MODULE* MXS_CREATE_MODULE()
|
|||||||
{
|
{
|
||||||
MXS_MODULE_API_AUTHENTICATOR,
|
MXS_MODULE_API_AUTHENTICATOR,
|
||||||
MXS_MODULE_GA,
|
MXS_MODULE_GA,
|
||||||
GWAUTHENTICATOR_VERSION,
|
MXS_AUTHENTICATOR_VERSION,
|
||||||
"GSSAPI authenticator",
|
"GSSAPI authenticator",
|
||||||
"V1.0.0",
|
"V1.0.0",
|
||||||
&MyObject,
|
&MyObject,
|
||||||
|
@ -267,7 +267,7 @@ static int gssapi_backend_auth_authenticate(DCB *dcb)
|
|||||||
*/
|
*/
|
||||||
MXS_MODULE* MXS_CREATE_MODULE()
|
MXS_MODULE* MXS_CREATE_MODULE()
|
||||||
{
|
{
|
||||||
static GWAUTHENTICATOR MyObject =
|
static MXS_AUTHENTICATOR MyObject =
|
||||||
{
|
{
|
||||||
NULL, /* No initialize entry point */
|
NULL, /* No initialize entry point */
|
||||||
gssapi_backend_auth_alloc, /* Allocate authenticator data */
|
gssapi_backend_auth_alloc, /* Allocate authenticator data */
|
||||||
@ -283,7 +283,7 @@ MXS_MODULE* MXS_CREATE_MODULE()
|
|||||||
{
|
{
|
||||||
MXS_MODULE_API_AUTHENTICATOR,
|
MXS_MODULE_API_AUTHENTICATOR,
|
||||||
MXS_MODULE_GA,
|
MXS_MODULE_GA,
|
||||||
GWAUTHENTICATOR_VERSION,
|
MXS_AUTHENTICATOR_VERSION,
|
||||||
"GSSAPI backend authenticator",
|
"GSSAPI backend authenticator",
|
||||||
"V1.0.0",
|
"V1.0.0",
|
||||||
&MyObject,
|
&MyObject,
|
||||||
|
@ -57,7 +57,7 @@ typedef struct http_auth
|
|||||||
*/
|
*/
|
||||||
MXS_MODULE* MXS_CREATE_MODULE()
|
MXS_MODULE* MXS_CREATE_MODULE()
|
||||||
{
|
{
|
||||||
static GWAUTHENTICATOR MyObject =
|
static MXS_AUTHENTICATOR MyObject =
|
||||||
{
|
{
|
||||||
NULL, /* No initialize entry point */
|
NULL, /* No initialize entry point */
|
||||||
NULL, /* No create entry point */
|
NULL, /* No create entry point */
|
||||||
@ -73,7 +73,7 @@ MXS_MODULE* MXS_CREATE_MODULE()
|
|||||||
{
|
{
|
||||||
MXS_MODULE_API_AUTHENTICATOR,
|
MXS_MODULE_API_AUTHENTICATOR,
|
||||||
MXS_MODULE_GA,
|
MXS_MODULE_GA,
|
||||||
GWAUTHENTICATOR_VERSION,
|
MXS_AUTHENTICATOR_VERSION,
|
||||||
"The MaxScale HTTP BA authenticator",
|
"The MaxScale HTTP BA authenticator",
|
||||||
"V1.1.0",
|
"V1.1.0",
|
||||||
&MyObject,
|
&MyObject,
|
||||||
|
@ -51,7 +51,7 @@ static void max_admin_auth_free_client_data(DCB *dcb);
|
|||||||
*/
|
*/
|
||||||
MXS_MODULE* MXS_CREATE_MODULE()
|
MXS_MODULE* MXS_CREATE_MODULE()
|
||||||
{
|
{
|
||||||
static GWAUTHENTICATOR MyObject =
|
static MXS_AUTHENTICATOR MyObject =
|
||||||
{
|
{
|
||||||
NULL, /* No initialize entry point */
|
NULL, /* No initialize entry point */
|
||||||
NULL, /* No create entry point */
|
NULL, /* No create entry point */
|
||||||
@ -67,7 +67,7 @@ MXS_MODULE* MXS_CREATE_MODULE()
|
|||||||
{
|
{
|
||||||
MXS_MODULE_API_AUTHENTICATOR,
|
MXS_MODULE_API_AUTHENTICATOR,
|
||||||
MXS_MODULE_GA,
|
MXS_MODULE_GA,
|
||||||
GWAUTHENTICATOR_VERSION,
|
MXS_AUTHENTICATOR_VERSION,
|
||||||
"The MaxScale Admin client authenticator implementation",
|
"The MaxScale Admin client authenticator implementation",
|
||||||
"V2.1.0",
|
"V2.1.0",
|
||||||
&MyObject,
|
&MyObject,
|
||||||
|
@ -75,7 +75,7 @@ static int mysql_auth_set_client_data(
|
|||||||
*/
|
*/
|
||||||
MXS_MODULE* MXS_CREATE_MODULE()
|
MXS_MODULE* MXS_CREATE_MODULE()
|
||||||
{
|
{
|
||||||
static GWAUTHENTICATOR MyObject =
|
static MXS_AUTHENTICATOR MyObject =
|
||||||
{
|
{
|
||||||
mysql_auth_init, /* Initialize the authenticator */
|
mysql_auth_init, /* Initialize the authenticator */
|
||||||
NULL, /* No create entry point */
|
NULL, /* No create entry point */
|
||||||
@ -91,7 +91,7 @@ MXS_MODULE* MXS_CREATE_MODULE()
|
|||||||
{
|
{
|
||||||
MXS_MODULE_API_AUTHENTICATOR,
|
MXS_MODULE_API_AUTHENTICATOR,
|
||||||
MXS_MODULE_GA,
|
MXS_MODULE_GA,
|
||||||
GWAUTHENTICATOR_VERSION,
|
MXS_AUTHENTICATOR_VERSION,
|
||||||
"The MySQL client to MaxScale authenticator implementation",
|
"The MySQL client to MaxScale authenticator implementation",
|
||||||
"V1.1.0",
|
"V1.1.0",
|
||||||
&MyObject,
|
&MyObject,
|
||||||
|
@ -160,7 +160,7 @@ static bool auth_backend_ssl(DCB *dcb)
|
|||||||
*/
|
*/
|
||||||
MXS_MODULE* MXS_CREATE_MODULE()
|
MXS_MODULE* MXS_CREATE_MODULE()
|
||||||
{
|
{
|
||||||
static GWAUTHENTICATOR MyObject =
|
static MXS_AUTHENTICATOR MyObject =
|
||||||
{
|
{
|
||||||
NULL, /* No initialize entry point */
|
NULL, /* No initialize entry point */
|
||||||
auth_backend_create, /* Create authenticator */
|
auth_backend_create, /* Create authenticator */
|
||||||
@ -176,7 +176,7 @@ MXS_MODULE* MXS_CREATE_MODULE()
|
|||||||
{
|
{
|
||||||
MXS_MODULE_API_AUTHENTICATOR,
|
MXS_MODULE_API_AUTHENTICATOR,
|
||||||
MXS_MODULE_GA,
|
MXS_MODULE_GA,
|
||||||
GWAUTHENTICATOR_VERSION,
|
MXS_AUTHENTICATOR_VERSION,
|
||||||
"The MySQL MaxScale to backend server authenticator",
|
"The MySQL MaxScale to backend server authenticator",
|
||||||
"V1.0.0",
|
"V1.0.0",
|
||||||
&MyObject,
|
&MyObject,
|
||||||
|
@ -53,7 +53,7 @@ static void null_auth_free_client_data(DCB *dcb);
|
|||||||
*/
|
*/
|
||||||
MXS_MODULE* MXS_CREATE_MODULE()
|
MXS_MODULE* MXS_CREATE_MODULE()
|
||||||
{
|
{
|
||||||
static GWAUTHENTICATOR MyObject =
|
static MXS_AUTHENTICATOR MyObject =
|
||||||
{
|
{
|
||||||
NULL, /* No initialize entry point */
|
NULL, /* No initialize entry point */
|
||||||
NULL, /* No create entry point */
|
NULL, /* No create entry point */
|
||||||
@ -69,7 +69,7 @@ MXS_MODULE* MXS_CREATE_MODULE()
|
|||||||
{
|
{
|
||||||
MXS_MODULE_API_AUTHENTICATOR,
|
MXS_MODULE_API_AUTHENTICATOR,
|
||||||
MXS_MODULE_GA,
|
MXS_MODULE_GA,
|
||||||
GWAUTHENTICATOR_VERSION,
|
MXS_AUTHENTICATOR_VERSION,
|
||||||
"The Null client authenticator implementation",
|
"The Null client authenticator implementation",
|
||||||
"V1.1.0",
|
"V1.1.0",
|
||||||
&MyObject,
|
&MyObject,
|
||||||
|
@ -50,7 +50,7 @@ static void null_auth_free_client_data(DCB *dcb);
|
|||||||
*/
|
*/
|
||||||
MXS_MODULE* MXS_CREATE_MODULE()
|
MXS_MODULE* MXS_CREATE_MODULE()
|
||||||
{
|
{
|
||||||
static GWAUTHENTICATOR MyObject =
|
static MXS_AUTHENTICATOR MyObject =
|
||||||
{
|
{
|
||||||
NULL, /* No initialize entry point */
|
NULL, /* No initialize entry point */
|
||||||
NULL, /* No create entry point */
|
NULL, /* No create entry point */
|
||||||
@ -66,7 +66,7 @@ MXS_MODULE* MXS_CREATE_MODULE()
|
|||||||
{
|
{
|
||||||
MXS_MODULE_API_AUTHENTICATOR,
|
MXS_MODULE_API_AUTHENTICATOR,
|
||||||
MXS_MODULE_GA,
|
MXS_MODULE_GA,
|
||||||
GWAUTHENTICATOR_VERSION,
|
MXS_AUTHENTICATOR_VERSION,
|
||||||
"The Null client authenticator implementation",
|
"The Null client authenticator implementation",
|
||||||
"V1.1.0",
|
"V1.1.0",
|
||||||
&MyObject,
|
&MyObject,
|
||||||
|
Reference in New Issue
Block a user