From: Andreas Schneider Date: Wed, 21 Jul 2021 14:06:15 +0000 (+0200) Subject: lib:cmdline: Use lp_load_global() for servers X-Git-Tag: ldb-2.5.0~1054 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b796b5bb735295bde252cd52283591b720d8d6e;p=thirdparty%2Fsamba.git lib:cmdline: Use lp_load_global() for servers As for client we need to enable support for 'config backend = registry'. Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Thu Jul 22 14:47:09 UTC 2021 on sn-devel-184 --- diff --git a/lib/cmdline/cmdline.h b/lib/cmdline/cmdline.h index 8c816c5bce3..3c0c9e8c18d 100644 --- a/lib/cmdline/cmdline.h +++ b/lib/cmdline/cmdline.h @@ -59,6 +59,15 @@ enum smb_cmdline_popt_options { * The function will also setup fault handler, set logging to STDERR by * default, setup talloc logging and the panic handler. * + * The function also setups a callback for loading the smb.conf file, the + * config file will be parsed after the commandline options have been parsed + * by popt. This is done by one of the following options parser: + * + * POPT_COMMON_DEBUG_ONLY + * POPT_COMMON_OPTION_ONLY + * POPT_COMMON_CONFIG_ONLY + * POPT_COMMON_SAMBA + * * @param[in] mem_ctx The talloc memory context to use for allocating memory. * This should be a long living context till the client * exits. diff --git a/lib/cmdline/cmdline_s3.c b/lib/cmdline/cmdline_s3.c index 31250b1996e..70fd768a648 100644 --- a/lib/cmdline/cmdline_s3.c +++ b/lib/cmdline/cmdline_s3.c @@ -56,7 +56,7 @@ static bool _samba_cmdline_load_config_s3(void) ok = lp_load_client(config_file); break; case SAMBA_CMDLINE_CONFIG_SERVER: - ok = lp_load_initial_only(config_file); + ok = lp_load_global(config_file); break; }