From bf5b79125d4334bc2501d0f6855f10099d5079ff Mon Sep 17 00:00:00 2001 From: SATOH Fumiyasu Date: Fri, 13 Jul 2012 13:14:34 +0900 Subject: [PATCH] libsmbclient: SMBC_module_init() does not init global parameters if no $HOME smbc_free_context(smbcctx) frees the global parameter structure if there is no other SMBCCTX. But next smbc_new_context() (SMBC_module_init() called by smbc_new_context()) does not initialize the new global parameter structure if $HOME environment variable is not defined. Thus following libsmbclient APIs call can NOT work correctly. --- source3/libsmb/libsmb_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c index 6c20d65..fa13e41 100644 --- a/source3/libsmb/libsmb_context.c +++ b/source3/libsmb/libsmb_context.c @@ -76,7 +76,7 @@ SMBC_module_init(void * punused) * defaults ... */ - if (!lp_load(get_dyn_CONFIGFILE(), True, False, False, False)) { + if (!lp_load(get_dyn_CONFIGFILE(), True, False, False, True)) { DEBUG(5, ("Could not load config file: %s\n", get_dyn_CONFIGFILE())); } else if (home) { -- 1.7.10.4