mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
dbwrap: Remove calls to loadparm
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
812312ca17
commit
1aeac2f85d
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user