From: Günther Deschner Date: Wed, 5 Mar 2008 23:51:20 +0000 (+0100) Subject: Fix lp_load with an empty registry and "config backend = registry". Michael, please... X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=eb0e549b670b22a524ab0dbcbc2b41450cedd520;p=metze%2Fsamba%2Fwip.git Fix lp_load with an empty registry and "config backend = registry". Michael, please check. Guenther (cherry picked from commit d9f4060c660da0ad671e061b123df71d109d51b9) (This used to be commit 11b151f3552cbcddcfe671dcda4fe0110c4f2b48) --- diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 5651a435de1a..25aa48b61b05 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -3404,6 +3404,13 @@ static bool process_registry_globals(bool (*pfunc)(const char *, const char *)) } } + if (!libnet_conf_share_exists(conf_ctx, GLOBAL_NAME)) { + /* nothing to read from the registry yet but make sure lp_load + * doesn't return false */ + ret = true; + goto done; + } + werr = libnet_conf_get_share(mem_ctx, conf_ctx, GLOBAL_NAME, &num_params, ¶m_names, ¶m_values); if (!W_ERROR_IS_OK(werr)) {