summaryrefslogtreecommitdiff
path: root/source4/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-06-29 09:20:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:49 -0500
commitfe0706d5d5813edc29c909c4f74c593fb5717190 (patch)
tree1870278e4573deced94668afc94ca6adf7968bc9 /source4/auth
parent118f3edd27f5adacc1da636ed05b33f04999584f (diff)
downloadsamba-fe0706d5d5813edc29c909c4f74c593fb5717190.tar.gz
samba-fe0706d5d5813edc29c909c4f74c593fb5717190.tar.bz2
samba-fe0706d5d5813edc29c909c4f74c593fb5717190.zip
r1292: Add const to the subsystem/module registration code.
Add some 'multi init' code, until we get a better set of infrustructure. Andrew Bartlett (This used to be commit 982422b2d286335378531ae9523e74192340af3c)
Diffstat (limited to 'source4/auth')
-rw-r--r--source4/auth/auth.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source4/auth/auth.c b/source4/auth/auth.c
index f33330f5de..703df21d45 100644
--- a/source4/auth/auth.c
+++ b/source4/auth/auth.c
@@ -409,7 +409,7 @@ static int num_backends;
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;
@@ -467,7 +467,6 @@ const struct auth_critical_sizes *auth_interface_version(void)
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),
@@ -482,6 +481,13 @@ const struct auth_critical_sizes *auth_interface_version(void)
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)) {
@@ -491,6 +497,7 @@ BOOL auth_init(void)
/* 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;
}