Move module object inside MODULE_INFO
This allows modules to only expose one entry point with a consistent signature. In the future, this could be used to implement declarations of module parameters.
This commit is contained in:
@ -596,34 +596,32 @@ int gssapi_auth_load_users(SERV_LISTENER *listener)
|
||||
return rval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implementation of the authenticator module interface
|
||||
*/
|
||||
static GWAUTHENTICATOR MyObject =
|
||||
{
|
||||
gssapi_auth_init, /* Initialize authenticator */
|
||||
gssapi_auth_alloc, /* Allocate authenticator data */
|
||||
gssapi_auth_extract, /* Extract data into structure */
|
||||
gssapi_auth_connectssl, /* Check if client supports SSL */
|
||||
gssapi_auth_authenticate, /* Authenticate user credentials */
|
||||
gssapi_auth_free_data, /* Free the client data held in DCB */
|
||||
gssapi_auth_free, /* Free authenticator data */
|
||||
gssapi_auth_load_users /* Load database users */
|
||||
};
|
||||
|
||||
MODULE_INFO info =
|
||||
{
|
||||
MODULE_API_AUTHENTICATOR,
|
||||
MODULE_GA,
|
||||
GWAUTHENTICATOR_VERSION,
|
||||
"GSSAPI authenticator",
|
||||
"V1.0.0"
|
||||
};
|
||||
|
||||
/**
|
||||
* Module handle entry point
|
||||
*/
|
||||
GWAUTHENTICATOR* GetModuleObject()
|
||||
MODULE_INFO* GetModuleObject()
|
||||
{
|
||||
return &MyObject;
|
||||
static GWAUTHENTICATOR MyObject =
|
||||
{
|
||||
gssapi_auth_init, /* Initialize authenticator */
|
||||
gssapi_auth_alloc, /* Allocate authenticator data */
|
||||
gssapi_auth_extract, /* Extract data into structure */
|
||||
gssapi_auth_connectssl, /* Check if client supports SSL */
|
||||
gssapi_auth_authenticate, /* Authenticate user credentials */
|
||||
gssapi_auth_free_data, /* Free the client data held in DCB */
|
||||
gssapi_auth_free, /* Free authenticator data */
|
||||
gssapi_auth_load_users /* Load database users */
|
||||
};
|
||||
|
||||
static MODULE_INFO info =
|
||||
{
|
||||
MODULE_API_AUTHENTICATOR,
|
||||
MODULE_GA,
|
||||
GWAUTHENTICATOR_VERSION,
|
||||
"GSSAPI authenticator",
|
||||
"V1.0.0",
|
||||
&MyObject
|
||||
};
|
||||
|
||||
return &info;
|
||||
}
|
||||
|
Reference in New Issue
Block a user