libsmbconf: move smbconf_reg_initialize() down to the smbconf operations.
authorMichael Adam <obnox@samba.org>
Thu, 20 Mar 2008 11:25:44 +0000 (12:25 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 21 Mar 2008 01:25:56 +0000 (02:25 +0100)
Michael
(This used to be commit f2d605006cd1187f70a044c3356d436e91093d5f)

source3/lib/smbconf/smbconf.c

index bd3d551d69aded6ffca8f7850487b81baecb9f9d..ba20316b57dd0c405e974a6eab75cdb0188e59fb 100644 (file)
@@ -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.