summaryrefslogtreecommitdiff
path: root/lib/dbwrap
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2018-04-17 16:45:45 +0200
committerJeremy Allison <jra@samba.org>2018-04-24 01:53:19 +0200
commit1aeac2f85db045d565e30d8b94334366e39222e9 (patch)
treeed0609532215a289a84c3a09cf74ccf776a7013d /lib/dbwrap
parent812312ca170e9da876044846a35b28ea3ce30de6 (diff)
downloadsamba-1aeac2f85db045d565e30d8b94334366e39222e9.tar.gz
dbwrap: Remove calls to loadparm
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/dbwrap')
-rw-r--r--lib/dbwrap/dbwrap.h2
-rw-r--r--lib/dbwrap/dbwrap_local_open.c19
2 files changed, 9 insertions, 12 deletions
diff --git a/lib/dbwrap/dbwrap.h b/lib/dbwrap/dbwrap.h
index 1161bf0a493..6a0f7b1ee2e 100644
--- a/lib/dbwrap/dbwrap.h
+++ b/lib/dbwrap/dbwrap.h
@@ -25,7 +25,6 @@
#include <tevent.h>
#include "libcli/util/ntstatus.h"
#include "tdb.h"
-#include "lib/param/loadparm.h"
struct db_record;
struct db_context;
@@ -231,7 +230,6 @@ TDB_DATA dbwrap_merge_dbufs(TALLOC_CTX *mem_ctx,
* This opens a tdb file
*/
struct db_context *dbwrap_local_open(TALLOC_CTX *mem_ctx,
- struct loadparm_context *lp_ctx,
const char *name,
int hash_size, int tdb_flags,
int open_flags, mode_t mode,
diff --git a/lib/dbwrap/dbwrap_local_open.c b/lib/dbwrap/dbwrap_local_open.c
index c350fd3ea42..20c5fa0e1d2 100644
--- a/lib/dbwrap/dbwrap_local_open.c
+++ b/lib/dbwrap/dbwrap_local_open.c
@@ -22,10 +22,8 @@
#include "dbwrap/dbwrap.h"
#include "dbwrap/dbwrap_tdb.h"
#include "tdb.h"
-#include "lib/param/param.h"
struct db_context *dbwrap_local_open(TALLOC_CTX *mem_ctx,
- struct loadparm_context *lp_ctx,
const char *name,
int hash_size, int tdb_flags,
int open_flags, mode_t mode,
@@ -34,14 +32,15 @@ struct db_context *dbwrap_local_open(TALLOC_CTX *mem_ctx,
{
struct db_context *db = NULL;
- 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);
+ db = db_open_tdb(
+ mem_ctx,
+ name,
+ hash_size,
+ tdb_flags,
+ open_flags,
+ mode,
+ lock_order,
+ dbwrap_flags);
return db;
}