summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/tools/tdbtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/tdb/tools/tdbtool.c')
-rw-r--r--source4/lib/tdb/tools/tdbtool.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/lib/tdb/tools/tdbtool.c b/source4/lib/tdb/tools/tdbtool.c
index 5aa47bd9f5..7f7dce8c3c 100644
--- a/source4/lib/tdb/tools/tdbtool.c
+++ b/source4/lib/tdb/tools/tdbtool.c
@@ -183,6 +183,9 @@ static char *get_token(int startover)
static void create_tdb(void)
{
+ struct tdb_logging_context log_ctx;
+ log_ctx.log_fn = tdb_log;
+
char *tok = get_token(1);
if (!tok) {
help();
@@ -190,7 +193,7 @@ static void create_tdb(void)
}
if (tdb) tdb_close(tdb);
tdb = tdb_open_ex(tok, 0, TDB_CLEAR_IF_FIRST,
- O_RDWR | O_CREAT | O_TRUNC, 0600, tdb_log, NULL, NULL);
+ O_RDWR | O_CREAT | O_TRUNC, 0600, log_ctx, NULL);
if (!tdb) {
printf("Could not create %s: %s\n", tok, strerror(errno));
}