From: Pavel Kalugin Date: Mon, 7 Aug 2023 04:52:32 +0000 (+0300) Subject: s3:utils: Use lpcfg_set_cmdline() in testparm X-Git-Tag: tevent-0.16.0~831 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b37269e032c13a545af3c3ca51668ad9ee06d4c8;p=thirdparty%2Fsamba.git s3:utils: Use lpcfg_set_cmdline() in testparm Signed-off-by: Pavel Kalugin Reviewed-by: Andreas Schneider --- diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c index 96e05a57f47..4a19f888632 100644 --- a/source3/utils/testparm.c +++ b/source3/utils/testparm.c @@ -35,6 +35,7 @@ #include "system/filesys.h" #include "lib/cmdline/cmdline.h" #include "lib/param/loadparm.h" +#include "lib/param/param.h" #include "lib/crypto/gnutls_helpers.h" #include "cmdline_contexts.h" @@ -889,6 +890,7 @@ static void do_per_share_checks(int s) }; TALLOC_CTX *frame = talloc_stackframe(); + struct loadparm_context *lp_ctx = NULL; smb_init_locale(); @@ -900,13 +902,14 @@ static void do_per_share_checks(int s) ret = 1; goto done; } + lp_ctx = samba_cmdline_get_lp_ctx(); /* * Set the default debug level to 1. * Allow it to be overridden by the command line, * not by smb.conf. */ - lp_set_cmdline("log level", "1"); + lpcfg_set_cmdline(lp_ctx, "log level", "1"); pc = samba_popt_get_context(getprogname(), argc,