]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:utils: Use lpcfg_set_cmdline() in sharesec
authorPavel Kalugin <pkalugin@inno.tech>
Mon, 7 Aug 2023 04:20:58 +0000 (07:20 +0300)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 23 Aug 2023 08:27:30 +0000 (08:27 +0000)
Signed-off-by: Pavel Kalugin <pkalugin@inno.tech>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/utils/sharesec.c

index 9b8064de7027aef436825bca66fa0c56e16c2163..6e4a424b1c5305e8a7847973570f048d93a27783 100644 (file)
@@ -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,