summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-06-20 18:40:32 +0930
committerRusty Russell <rusty@rustcorp.com.au>2011-06-20 11:18:35 +0200
commitca1936fbb26af0ee8d0421ae6a4e07a0f62311d9 (patch)
treea2173ebf5126bc9d5fbdcfddbf66e76face39482 /source3/libsmb
parent9eaaf1fc67697a640260169ec26510806105e91f (diff)
downloadsamba-ca1936fbb26af0ee8d0421ae6a4e07a0f62311d9.tar.gz
samba-ca1936fbb26af0ee8d0421ae6a4e07a0f62311d9.tar.bz2
samba-ca1936fbb26af0ee8d0421ae6a4e07a0f62311d9.zip
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 <rusty@rustcorp.com.au>
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/smb_share_modes.c10
1 files changed, 6 insertions, 4 deletions
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);