]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:pdbedit: Use cmdline_messaging_context
authorChristof Schmitt <cs@samba.org>
Mon, 20 Aug 2018 23:08:21 +0000 (16:08 -0700)
committerKarolin Seeger <kseeger@samba.org>
Tue, 9 Oct 2018 09:29:23 +0000 (11:29 +0200)
Initialize the messaging context through cmdline_messaging_context to
allow access to config in clustered Samba.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13465

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 4661537c201acebee991d219d151cb481f56265c)

source3/utils/pdbedit.c
source3/utils/wscript_build

index a353bae7c4eb31b108a323b07fed2e6e57dd63d4..09f0320ed63b3f542fb95c84e7ce7a87fc95f759 100644 (file)
@@ -25,6 +25,7 @@
 #include "../librpc/gen_ndr/samr.h"
 #include "../libcli/security/security.h"
 #include "passdb.h"
+#include "cmdline_contexts.h"
 
 #define BIT_BACKEND    0x00000004
 #define BIT_VERBOSE    0x00000008
@@ -1117,6 +1118,8 @@ int main(int argc, const char **argv)
        if (user_name == NULL)
                user_name = poptGetArg(pc);
 
+       cmdline_messaging_context(get_dyn_CONFIGFILE());
+
        if (!lp_load_global(get_dyn_CONFIGFILE())) {
                fprintf(stderr, "Can't load %s - run testparm to debug it\n", get_dyn_CONFIGFILE());
                exit(1);
index 06e6edaf26af63881e64149b0d3c71e61e477617..c039231eecc01cdb5ff84f52c744c4c8effda65e 100644 (file)
@@ -47,6 +47,7 @@ bld.SAMBA3_BINARY('pdbedit',
                  talloc
                  smbconf
                  popt_samba3
+                 cmdline_contexts
                  pdb
                  PASSWD_UTIL''')