This is only ever called in client context, and only called once.
So there is no point at all in requesting reinit_globals.
Set it to false.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
bool lp_load_no_reinit(const char *file_name);
bool lp_load_client_no_reinit(const char *file_name);
bool lp_load_with_registry_shares(const char *pszFname,
- bool save_defaults,
- bool initialize_globals);
+ bool save_defaults);
int lp_numservices(void);
void lp_dump(FILE *f, bool show_defaults, int maxtoprint);
void lp_dump_one(FILE * f, bool show_defaults, int snum);
}
bool lp_load_with_registry_shares(const char *pszFname,
- bool save_defaults,
- bool initialize_globals)
+ bool save_defaults)
{
return lp_load_ex(pszFname,
false, /* global_only */
save_defaults,
false, /* add_ipc */
- initialize_globals,
+ false, /* reinit_globals */
true, /* allow_include_registry */
true); /* load_all_shares*/
}
for (i=0; i < count; i++) {
printf("call lp_load() #%d: ", i+1);
if (!lp_load_with_registry_shares(config_file,
- True, /* save defaults */
- True)) /*init globals */
+ True)) /* save defaults */
{
printf("ERROR.\n");
ret = 1;
setlinebuf(stdout);
- lp_load_with_registry_shares(get_dyn_CONFIGFILE(), False, True);
+ lp_load_with_registry_shares(get_dyn_CONFIGFILE(), False);
/* check for initializing secrets.tdb first */
fprintf(stderr,"Load smb config files from %s\n",config_file);
- if (!lp_load_with_registry_shares(config_file, True, True)) {
+ if (!lp_load_with_registry_shares(config_file, True)) {
fprintf(stderr,"Error loading services.\n");
ret = 1;
goto done;