]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:param: Make init_globals() public
authorAndreas Schneider <asn@samba.org>
Tue, 24 Oct 2023 09:43:15 +0000 (11:43 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 25 Oct 2023 22:23:37 +0000 (22:23 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/param/loadparm.c
source3/param/loadparm.h

index 0e92cdb2d7b4a16915279121db696d1d114958c7..6b2f23ce633a371295b0b24f47b3afa4799fd4fb 100644 (file)
@@ -504,7 +504,8 @@ static bool apply_lp_set_cmdline(void)
  Initialise the global parameter structure.
 ***************************************************************************/
 
-static void init_globals(struct loadparm_context *lp_ctx, bool reinit_globals)
+void loadparm_s3_init_globals(struct loadparm_context *lp_ctx,
+                             bool reinit_globals)
 {
        static bool done_init = false;
        char *s = NULL;
@@ -3987,7 +3988,7 @@ static bool lp_load_ex(const char *pszFname,
 
        lp_ctx = setup_lp_context(talloc_tos());
 
-       init_globals(lp_ctx, reinit_globals);
+       loadparm_s3_init_globals(lp_ctx, reinit_globals);
 
        free_file_list();
 
@@ -4041,7 +4042,7 @@ static bool lp_load_ex(const char *pszFname,
                        /* start over */
                        DEBUG(1, ("lp_load_ex: changing to config backend "
                                  "registry\n"));
-                       init_globals(lp_ctx, true);
+                       loadparm_s3_init_globals(lp_ctx, true);
 
                        TALLOC_FREE(lp_ctx);
 
index 55e1e36289a5e1a0350032ad4e0169f5f039fca4..78162911953d129054e36a09e9ebb7d3cd9658be 100644 (file)
@@ -30,9 +30,13 @@ typedef struct stat_ex SMB_STRUCT_STAT;
 typedef struct files_struct files_struct;
 struct smbd_server_connection;
 struct security_descriptor;
+struct loadparm_context;
 
 /* The following definitions come from param/loadparm.c  */
 
+void loadparm_s3_init_globals(struct loadparm_context *lp_ctx,
+                             bool reinit_globals);
+
 const struct loadparm_substitution *loadparm_s3_global_substitution(void);
 
 char *lp_parm_substituted_string(TALLOC_CTX *mem_ctx,