summaryrefslogtreecommitdiff
path: root/source3/tdb/tdbtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/tdb/tdbtool.c')
-rw-r--r--source3/tdb/tdbtool.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/tdb/tdbtool.c b/source3/tdb/tdbtool.c
index 31ecd17a0c..ecde37a5ea 100644
--- a/source3/tdb/tdbtool.c
+++ b/source3/tdb/tdbtool.c
@@ -29,6 +29,7 @@
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
+#include <time.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/time.h>
@@ -174,7 +175,8 @@ static void create_tdb(void)
}
if (tdb) tdb_close(tdb);
tdb = tdb_open(tok, 0, TDB_CLEAR_IF_FIRST,
- O_RDWR | O_CREAT | O_TRUNC, 0600);
+ O_RDWR | O_CREAT | O_TRUNC, 0600,
+ tdb_log_to_stderr);
if (!tdb) {
printf("Could not create %s: %s\n", tok, strerror(errno));
}
@@ -188,7 +190,7 @@ static void open_tdb(void)
return;
}
if (tdb) tdb_close(tdb);
- tdb = tdb_open(tok, 0, 0, O_RDWR, 0600);
+ tdb = tdb_open(tok, 0, 0, O_RDWR, 0600, tdb_log_to_stderr);
if (!tdb) {
printf("Could not open %s: %s\n", tok, strerror(errno));
}
@@ -383,6 +385,7 @@ static void next_record(TDB_CONTEXT *tdb, TDB_DATA *pkey)
print_rec(tdb, *pkey, dbuf, NULL);
}
+
int main(int argc, char *argv[])
{
int bIterate = 0;