From f12b10566df44df3c86b59c0cff80b52534558b3 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 20 Mar 2008 12:25:44 +0100 Subject: libsmbconf: move smbconf_reg_initialize() down to the smbconf operations. Michael (This used to be commit f2d605006cd1187f70a044c3356d436e91093d5f) --- source3/lib/smbconf/smbconf.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/smbconf/smbconf.c b/source3/lib/smbconf/smbconf.c index bd3d551d69..ba20316b57 100644 --- a/source3/lib/smbconf/smbconf.c +++ b/source3/lib/smbconf/smbconf.c @@ -57,26 +57,6 @@ static WERROR smbconf_add_string_to_array(TALLOC_CTX *mem_ctx, return WERR_OK; } -static WERROR smbconf_reg_initialize(struct smbconf_ctx *ctx) -{ - WERROR werr = WERR_OK; - - if (!registry_init_smbconf()) { - werr = WERR_REG_IO_FAILURE; - goto done; - } - - werr = ntstatus_to_werror(registry_create_admin_token(ctx, - &(ctx->token))); - if (!W_ERROR_IS_OK(werr)) { - DEBUG(1, ("Error creating admin token\n")); - goto done; - } - -done: - return werr; -} - /** * Open a registry key specified by "path" */ @@ -433,6 +413,26 @@ static WERROR smbconf_global_check(struct smbconf_ctx *ctx) * **********************************************************************/ +static WERROR smbconf_reg_initialize(struct smbconf_ctx *ctx) +{ + WERROR werr = WERR_OK; + + if (!registry_init_smbconf()) { + werr = WERR_REG_IO_FAILURE; + goto done; + } + + werr = ntstatus_to_werror(registry_create_admin_token(ctx, + &(ctx->token))); + if (!W_ERROR_IS_OK(werr)) { + DEBUG(1, ("Error creating admin token\n")); + goto done; + } + +done: + return werr; +} + /** * Get the change sequence number of the given service/parameter. * service and parameter strings may be NULL. -- cgit