s3:smbget: Use cmdline_messaging_context
authorChristof Schmitt <cs@samba.org>
Tue, 21 Aug 2018 23:11:02 +0000 (16:11 -0700)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 7 Sep 2018 15:26:17 +0000 (17:26 +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>
source3/utils/smbget.c

index 37462fa131f775a642fee25fba91e3641eaea325..4653c6894e0049898c093743263b27176b674294 100644 (file)
@@ -20,6 +20,7 @@
 #include "system/filesys.h"
 #include "popt_common_cmdline.h"
 #include "libsmbclient.h"
+#include "cmdline_contexts.h"
 
 static int columns = 0;
 
@@ -879,6 +880,8 @@ int main(int argc, char **argv)
 
        popt_burn_cmdline_password(argc, argv);
 
+       cmdline_messaging_context(get_dyn_CONFIGFILE());
+
        if (smbc_init(get_auth_data, opt.debuglevel) < 0) {
                fprintf(stderr, "Unable to initialize libsmbclient\n");
                return 1;