From ca1936fbb26af0ee8d0421ae6a4e07a0f62311d9 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 20 Jun 2011 18:40:32 +0930 Subject: tdb_compat: use tdb_open_compat. This is a helper for the common case of opening a tdb with a logging function, but it doesn't do all the work, since TDB1 and TDB2's log functions are different types. Signed-off-by: Rusty Russell --- source3/libsmb/smb_share_modes.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source3/libsmb/smb_share_modes.c') diff --git a/source3/libsmb/smb_share_modes.c b/source3/libsmb/smb_share_modes.c index a4a54972c9..7c0a6d2a4e 100644 --- a/source3/libsmb/smb_share_modes.c +++ b/source3/libsmb/smb_share_modes.c @@ -69,10 +69,12 @@ struct smbdb_ctx *smb_share_mode_db_open(const char *db_path) memset(smb_db, '\0', sizeof(struct smbdb_ctx)); - smb_db->smb_tdb = tdb_open(db_path, - 0, TDB_DEFAULT|TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH, - O_RDWR|O_CREAT, - 0644); + /* FIXME: We should *never* open a tdb without logging! */ + smb_db->smb_tdb = tdb_open_compat(db_path, + 0, TDB_DEFAULT|TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH, + O_RDWR|O_CREAT, + 0644, + NULL, NULL); if (!smb_db->smb_tdb) { free(smb_db); -- cgit