]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:testparm: Use cmdline_messaging_context
authorChristof Schmitt <cs@samba.org>
Mon, 20 Aug 2018 23:11:11 +0000 (16:11 -0700)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 7 Sep 2018 15:26:16 +0000 (17:26 +0200)
Call cmdline_messaging_context to initialize a messaging config before
accessing clustered Samba config.

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>
source3/utils/testparm.c
source3/utils/wscript_build

index 8113eea00208f372a4bc73dc19fd454d637ad3ec..88dfc42d492b728361b55c63b08d4c94d457547d 100644 (file)
@@ -35,6 +35,7 @@
 #include "system/filesys.h"
 #include "popt_common.h"
 #include "lib/param/loadparm.h"
+#include "cmdline_contexts.h"
 
 #include <regex.h>
 
@@ -698,6 +699,8 @@ static void do_per_share_checks(int s)
                goto done;
        }
 
+       cmdline_messaging_context(config_file);
+
        fprintf(stderr,"Load smb config files from %s\n",config_file);
 
        if (!lp_load_with_registry_shares(config_file)) {
index 570c4506beee03f2748fd19fd11fa0cd847a77b7..ffa0762d828ff1b02bb15638a9a4ef024b186d18 100644 (file)
@@ -163,7 +163,9 @@ bld.SAMBA3_BINARY('testparm',
                  deps='''
                  talloc
                  smbconf
-                 popt_samba3''')
+                 popt_samba3
+                 cmdline_contexts
+                 ''')
 
 bld.SAMBA3_BINARY('net',
                  source='''net.c