summaryrefslogtreecommitdiff
path: root/source3/smbd
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/smbd
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/smbd')
-rw-r--r--source3/smbd/mangle_hash.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/mangle_hash.c b/source3/smbd/mangle_hash.c
index 988251e878..c196a13ed0 100644
--- a/source3/smbd/mangle_hash.c
+++ b/source3/smbd/mangle_hash.c
@@ -773,8 +773,13 @@ const struct mangle_fns *mangle_hash_init(void)
mangle_reset();
/* Create the in-memory tdb using our custom hash function. */
+#ifndef BUILD_TDB2
tdb_mangled_cache = tdb_open_ex("mangled_cache", 1031, TDB_INTERNAL,
(O_RDWR|O_CREAT), 0644, NULL, fast_string_hash);
+#else
+ /* FIXME: We should *never* open a tdb without logging! */
+ tdb_mangled_cache = tdb_open("mangled_cache", TDB_INTERNAL, 0, 0, NULL);
+#endif
return &mangle_hash_fns;
}