]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:utils: Use lpcfg_set_cmdline() in testparm
authorPavel Kalugin <pkalugin@inno.tech>
Mon, 7 Aug 2023 04:52:32 +0000 (07:52 +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/testparm.c

index 96e05a57f47a06e3974ab26d63ec07601e14b0c1..4a19f888632c1aa91669d0120eba56dfe503405c 100644 (file)
@@ -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,