From: Christof Schmitt Date: Tue, 21 Aug 2018 19:34:34 +0000 (-0700) Subject: s3:dbwrap_tool: Use cmdline_messaging_context X-Git-Tag: tdb-1.3.17~1695 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7eeff96b826711b5a8d44ab24603dafcc0343d84;p=thirdparty%2Fsamba.git 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 Reviewed-by: Ralph Boehme --- diff --git a/source3/utils/dbwrap_tool.c b/source3/utils/dbwrap_tool.c index 9c27fdc1946..2808a5d68bf 100644 --- a/source3/utils/dbwrap_tool.c +++ b/source3/utils/dbwrap_tool.c @@ -27,6 +27,7 @@ #include "dbwrap/dbwrap_open.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 }; @@ -421,6 +422,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 eabebcf3d52..11bd2015c3a 100644 --- a/source3/utils/wscript_build +++ b/source3/utils/wscript_build @@ -136,7 +136,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',