From cb59f76eb203e0232d6a847f3cedf605f495846c Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 21 Jul 2021 16:06:15 +0200 Subject: [PATCH] lib:cmdline: Use lp_load_global() for servers As for client we need to enable support for 'config backend = registry'. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14768 Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner (cherry picked from commit 7b796b5bb735295bde252cd52283591b720d8d6e) --- lib/cmdline/cmdline.h | 9 +++++++++ lib/cmdline/cmdline_s3.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) 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; } -- 2.32.0