summaryrefslogtreecommitdiff
path: root/source3/lib/dbwrap/dbwrap_tdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/dbwrap/dbwrap_tdb.c')
-rw-r--r--source3/lib/dbwrap/dbwrap_tdb.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source3/lib/dbwrap/dbwrap_tdb.c b/source3/lib/dbwrap/dbwrap_tdb.c
index ffad39bed8..2041613be2 100644
--- a/source3/lib/dbwrap/dbwrap_tdb.c
+++ b/source3/lib/dbwrap/dbwrap_tdb.c
@@ -22,7 +22,6 @@
#include "dbwrap/dbwrap_private.h"
#include "dbwrap/dbwrap_tdb.h"
#include "lib/tdb_wrap/tdb_wrap.h"
-#include "lib/param/param.h"
#include "util_tdb.h"
struct db_tdb_ctx {
@@ -363,6 +362,7 @@ static int db_tdb_transaction_cancel(struct db_context *db)
}
struct db_context *db_open_tdb(TALLOC_CTX *mem_ctx,
+ struct loadparm_context *lp_ctx,
const char *name,
int hash_size, int tdb_flags,
int open_flags, mode_t mode,
@@ -370,14 +370,12 @@ struct db_context *db_open_tdb(TALLOC_CTX *mem_ctx,
{
struct db_context *result = NULL;
struct db_tdb_ctx *db_tdb;
- struct loadparm_context *lp_ctx;
result = talloc_zero(mem_ctx, struct db_context);
if (result == NULL) {
DEBUG(0, ("talloc failed\n"));
goto fail;
}
- lp_ctx = loadparm_init_s3(result, loadparm_s3_context());
result->private_data = db_tdb = talloc(result, struct db_tdb_ctx);
if (db_tdb == NULL) {
@@ -388,7 +386,6 @@ struct db_context *db_open_tdb(TALLOC_CTX *mem_ctx,
db_tdb->wtdb = tdb_wrap_open(db_tdb, name, hash_size, tdb_flags,
open_flags, mode, lp_ctx);
- talloc_unlink(result, lp_ctx);
if (db_tdb->wtdb == NULL) {
DEBUG(3, ("Could not open tdb: %s\n", strerror(errno)));
goto fail;