WHATSNEW: add SmartCard/PKINIT improvements
[vlendec/samba-autobuild/.git] / lib / dbwrap / dbwrap_local_open.c
index 6509ff97871ed0c3071d42388265d66cca6771f6..c350fd3ea420dc2168d63e77e30ab4ba39e39228 100644 (file)
@@ -34,8 +34,13 @@ struct db_context *dbwrap_local_open(TALLOC_CTX *mem_ctx,
 {
        struct db_context *db = NULL;
 
-       db = db_open_tdb(mem_ctx, lp_ctx, name, hash_size,
-                        tdb_flags, open_flags, mode,
+       if (hash_size == 0) {
+               hash_size = lpcfg_tdb_hash_size(lp_ctx, name);
+       }
+
+       db = db_open_tdb(mem_ctx, name, hash_size,
+                        lpcfg_tdb_flags(lp_ctx, tdb_flags),
+                        open_flags, mode,
                         lock_order, dbwrap_flags);
 
        return db;