summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorChristof Schmitt <cs@samba.org>2018-08-21 12:34:34 -0700
committerKarolin Seeger <kseeger@samba.org>2018-10-09 11:29:24 +0200
commit6a0ae3b5f95b3072c6fa9e53f67d3493b5e98031 (patch)
tree1e34c224a73d50297d802ee2a05b643844c43a15 /source3
parenteea0c0d2821bce91036125c8ba7bd841f816c265 (diff)
downloadsamba-6a0ae3b5f95b3072c6fa9e53f67d3493b5e98031.tar.gz
s3:dbwrap_tool: Use cmdline_messaging_context
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 7eeff96b826711b5a8d44ab24603dafcc0343d84)
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/dbwrap_tool.c3
-rw-r--r--source3/utils/wscript_build4
2 files changed, 6 insertions, 1 deletions
diff --git a/source3/utils/dbwrap_tool.c b/source3/utils/dbwrap_tool.c
index 94aacd8ba26..b182e9cbfab 100644
--- a/source3/utils/dbwrap_tool.c
+++ b/source3/utils/dbwrap_tool.c
@@ -28,6 +28,7 @@
#include "dbwrap/dbwrap_watch.h"
#include "messages.h"
#include "util_tdb.h"
+#include "cmdline_contexts.h"
enum dbwrap_op { OP_FETCH, OP_STORE, OP_DELETE, OP_ERASE, OP_LISTKEYS,
OP_EXISTS };
@@ -428,6 +429,8 @@ int main(int argc, const char **argv)
while (extra_argv[extra_argc]) extra_argc++;
}
+ cmdline_messaging_context(get_dyn_CONFIGFILE());
+
lp_load_global(get_dyn_CONFIGFILE());
if ((extra_argc < 2) || (extra_argc > 5)) {
diff --git a/source3/utils/wscript_build b/source3/utils/wscript_build
index 6ff34ef482c..42aaf683695 100644
--- a/source3/utils/wscript_build
+++ b/source3/utils/wscript_build
@@ -135,7 +135,9 @@ bld.SAMBA3_BINARY('dbwrap_tool',
source='dbwrap_tool.c',
deps='''
talloc
- popt_samba3''')
+ popt_samba3
+ cmdline_contexts
+ ''')
bld.SAMBA3_BINARY('dbwrap_torture',
source='dbwrap_torture.c',