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

index 96b94bdf71db6b1376b14ff23ad8497491afcb64..554eaf0ed67a33550f01ecc319067935bd758e81 100644 (file)
@@ -28,6 +28,7 @@
 #include "cmdline_contexts.h"
 #include "passwd_proto.h"
 #include "lib/util/smb_strtox.h"
+#include "lib/param/param.h"
 
 #define BIT_BACKEND    0x00000004
 #define BIT_VERBOSE    0x00000008
@@ -1067,6 +1068,7 @@ int main(int argc, const char **argv)
        static char *kickoff_time = NULL;
        static char *str_hex_pwd = NULL;
        TALLOC_CTX *frame = talloc_stackframe();
+       struct loadparm_context *lp_ctx = NULL;
        NTSTATUS status;
        poptContext pc;
        bool ok;
@@ -1122,6 +1124,7 @@ int main(int argc, const char **argv)
                TALLOC_FREE(frame);
                exit(1);
        }
+       lp_ctx = samba_cmdline_get_lp_ctx();
 
        pc = samba_popt_get_context(getprogname(),
                                    argc,
@@ -1194,7 +1197,7 @@ int main(int argc, const char **argv)
                /* HACK: set the global passdb backend by overwriting globals.
                 * This way we can use regular pdb functions for default
                 * operations that do not involve passdb migrations */
-               lp_set_cmdline("passdb backend", backend);
+               lpcfg_set_cmdline(lp_ctx, "passdb backend", backend);
        } else {
                backend = lp_passdb_backend();
        }