From: Pavel Kalugin Date: Mon, 7 Aug 2023 04:20:58 +0000 (+0300) Subject: s3:utils: Use lpcfg_set_cmdline() in sharesec X-Git-Tag: tevent-0.16.0~839 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6c00718f3de8a86ac659e07b98c1c85773e76fd0;p=thirdparty%2Fsamba.git s3:utils: Use lpcfg_set_cmdline() in sharesec Signed-off-by: Pavel Kalugin Reviewed-by: Andreas Schneider --- diff --git a/source3/utils/sharesec.c b/source3/utils/sharesec.c index 9b8064de702..6e4a424b1c5 100644 --- a/source3/utils/sharesec.c +++ b/source3/utils/sharesec.c @@ -30,6 +30,7 @@ struct cli_state; #include "util_sd.h" #include "cmdline_contexts.h" #include "lib/util/string_wrappers.h" +#include "lib/param/param.h" static TALLOC_CTX *ctx; @@ -336,6 +337,7 @@ int main(int argc, const char *argv[]) poptContext pc; bool initialize_sid = False; bool ok; + struct loadparm_context *lp_ctx = NULL; struct poptOption long_options[] = { POPT_AUTOHELP { @@ -450,8 +452,9 @@ int main(int argc, const char *argv[]) TALLOC_FREE(ctx); exit(1); } + lp_ctx = samba_cmdline_get_lp_ctx(); /* set default debug level to 1 regardless of what smb.conf sets */ - lp_set_cmdline("log level", "1"); + lpcfg_set_cmdline(lp_ctx, "log level", "1"); pc = samba_popt_get_context(getprogname(), argc,