summaryrefslogtreecommitdiff
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
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>
-rw-r--r--auth/credentials/credentials_secrets.c1
-rw-r--r--lib/dbwrap/dbwrap.h2
-rw-r--r--lib/dbwrap/dbwrap_local_open.c19
-rw-r--r--libcli/auth/netlogon_creds_cli.c1
-rw-r--r--libcli/auth/schannel_state_tdb.c1
-rw-r--r--source3/lib/dbwrap/dbwrap_open.c12
-rw-r--r--source4/cluster/local.c1
7 files changed, 18 insertions, 19 deletions
diff --git a/auth/credentials/credentials_secrets.c b/auth/credentials/credentials_secrets.c
index 23d28f1917d..54f3ce2d078 100644
--- a/auth/credentials/credentials_secrets.c
+++ b/auth/credentials/credentials_secrets.c
@@ -250,7 +250,6 @@ _PUBLIC_ NTSTATUS cli_credentials_set_machine_account(struct cli_credentials *cr
db_ctx = dbwrap_local_open(
cred,
- lp_ctx,
secrets_tdb_path,
hash_size,
tdb_flags,
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;
}
diff --git a/libcli/auth/netlogon_creds_cli.c b/libcli/auth/netlogon_creds_cli.c
index 9b7e4e2517c..817d2cd041a 100644
--- a/libcli/auth/netlogon_creds_cli.c
+++ b/libcli/auth/netlogon_creds_cli.c
@@ -233,7 +233,6 @@ NTSTATUS netlogon_creds_cli_open_global_db(struct loadparm_context *lp_ctx)
global_db = dbwrap_local_open(
NULL,
- lp_ctx,
fname,
hash_size,
tdb_flags,
diff --git a/libcli/auth/schannel_state_tdb.c b/libcli/auth/schannel_state_tdb.c
index 15554b2ed48..ce20012ac22 100644
--- a/libcli/auth/schannel_state_tdb.c
+++ b/libcli/auth/schannel_state_tdb.c
@@ -53,7 +53,6 @@ struct db_context *open_schannel_session_store(TALLOC_CTX *mem_ctx,
db_sc = dbwrap_local_open(
mem_ctx,
- lp_ctx,
fname,
hash_size,
tdb_flags,
diff --git a/source3/lib/dbwrap/dbwrap_open.c b/source3/lib/dbwrap/dbwrap_open.c
index e05e011d0d4..a4d5184396d 100644
--- a/source3/lib/dbwrap/dbwrap_open.c
+++ b/source3/lib/dbwrap/dbwrap_open.c
@@ -188,9 +188,15 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx,
}
tdb_flags = lpcfg_tdb_flags(lp_ctx, tdb_flags);
- result = dbwrap_local_open(mem_ctx, lp_ctx, name, hash_size,
- tdb_flags, open_flags, mode,
- lock_order, dbwrap_flags);
+ result = dbwrap_local_open(
+ mem_ctx,
+ name,
+ hash_size,
+ tdb_flags,
+ open_flags,
+ mode,
+ lock_order,
+ dbwrap_flags);
talloc_unlink(mem_ctx, lp_ctx);
}
return result;
diff --git a/source4/cluster/local.c b/source4/cluster/local.c
index d871dcbd3f9..ea3666322a5 100644
--- a/source4/cluster/local.c
+++ b/source4/cluster/local.c
@@ -66,7 +66,6 @@ static struct db_context *local_db_tmp_open(struct cluster_ops *ops,
db = dbwrap_local_open(
mem_ctx,
- lp_ctx,
path,
hash_size,
tdb_flags,