]> 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)
committerKarolin Seeger <kseeger@samba.org>
Tue, 9 Oct 2018 09:29:24 +0000 (11:29 +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>
(cherry picked from commit ea7a4ff7ae5ef2b22fb7ef5640d6b946c064cfc3)

source3/utils/testparm.c
source3/utils/wscript_build

index a53eea5b8cc6668c4f6ddbf4a30360b26e82449d..4145f75b3da3237a5cec7cb52adcfff08696b58c 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 c039231eecc01cdb5ff84f52c744c4c8effda65e..9748ed7f857daf103791d68f0e1a746a676d7dc1 100644 (file)
@@ -162,7 +162,9 @@ bld.SAMBA3_BINARY('testparm',
                  deps='''
                  talloc
                  smbconf
-                 popt_samba3''')
+                 popt_samba3
+                 cmdline_contexts
+                 ''')
 
 bld.SAMBA3_BINARY('net',
                  source='''net.c