The 'name' can be later used by other backends to find the operations
structure for this backend.
*/
-static NTSTATUS auth_register(void *_ops)
+static NTSTATUS auth_register(const void *_ops)
{
const struct auth_operations *ops = _ops;
struct auth_operations *new_ops;
sizeof(struct auth_operations),
sizeof(struct auth_methods),
sizeof(struct auth_context),
- sizeof(struct auth_ntlmssp_state),
sizeof(struct auth_usersupplied_info),
sizeof(struct auth_serversupplied_info),
sizeof(struct auth_str),
BOOL auth_init(void)
{
NTSTATUS status;
+
+ /* ugly cludge, to go away */
+ static BOOL initialised;
+
+ if (initialised) {
+ return True;
+ }
status = register_subsystem("auth", auth_register);
if (!NT_STATUS_IS_OK(status)) {
/* FIXME: Perhaps panic if a basic backend, such as SAM, fails to initialise? */
static_init_auth;
+ initialised = True;
DEBUG(3,("AUTH subsystem version %d initialised\n", AUTH_INTERFACE_VERSION));
return True;
}
typedef NTSTATUS (*init_module_function) (void);
/* Module that registers a backend for a certain subsystem */
-typedef NTSTATUS (*register_backend_function) (void *data);
+typedef NTSTATUS (*register_backend_function) (const void *data);
#endif /* _MODULE_H */
return NT_STATUS_OK;
}
-NTSTATUS register_backend(const char *subsystem, void *args)
+NTSTATUS register_backend(const char *subsystem, const void *args)
{
/* Find the specified subsystem */
struct subsystem *s = subsystems;
The 'name' can be later used by other backends to find the operations
structure for this backend.
*/
-static NTSTATUS register_process_model(void *_ops)
+static NTSTATUS register_process_model(const void *_ops)
{
const struct model_ops *ops = _ops;