mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
Remove callers of lp_use_ntdb
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
9943691093
commit
b08117976d
@ -204,14 +204,8 @@ char *lpcfg_private_db_path(TALLOC_CTX *mem_ctx,
|
||||
struct loadparm_context *lp_ctx,
|
||||
const char *name)
|
||||
{
|
||||
const char *extension = ".tdb";
|
||||
|
||||
if (lpcfg_use_ntdb(lp_ctx)) {
|
||||
extension = ".ntdb";
|
||||
}
|
||||
|
||||
return talloc_asprintf(mem_ctx, "%s/%s%s",
|
||||
lpcfg_private_dir(lp_ctx), name, extension);
|
||||
return talloc_asprintf(mem_ctx, "%s/%s.tdb",
|
||||
lpcfg_private_dir(lp_ctx), name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3647,7 +3647,7 @@ static PyObject *py_set_secrets_dir(PyObject *self, PyObject *args)
|
||||
}
|
||||
|
||||
/* Initialize secrets database */
|
||||
if (!secrets_init_path(private_dir, lp_use_ntdb())) {
|
||||
if (!secrets_init_path(private_dir, false)) {
|
||||
PyErr_Format(py_pdb_error, "Cannot open secrets file database in '%s'",
|
||||
private_dir);
|
||||
talloc_free(frame);
|
||||
|
@ -105,7 +105,7 @@ bool secrets_init_path(const char *private_dir, bool use_ntdb)
|
||||
/* open up the secrets database */
|
||||
bool secrets_init(void)
|
||||
{
|
||||
return secrets_init_path(lp_private_dir(), lp_use_ntdb());
|
||||
return secrets_init_path(lp_private_dir(), false);
|
||||
}
|
||||
|
||||
struct db_context *secrets_db_ctx(void)
|
||||
|
@ -56,10 +56,7 @@ static struct db_context *local_db_tmp_open(struct cluster_ops *ops,
|
||||
char *path, *dbname;
|
||||
struct db_context *db;
|
||||
|
||||
if (lpcfg_use_ntdb(lp_ctx))
|
||||
dbname = talloc_asprintf(mem_ctx, "%s.ntdb", dbbase);
|
||||
else
|
||||
dbname = talloc_asprintf(mem_ctx, "%s.tdb", dbbase);
|
||||
dbname = talloc_asprintf(mem_ctx, "%s.tdb", dbbase);
|
||||
|
||||
path = smbd_tmp_path(tmp_ctx, lp_ctx, dbname);
|
||||
db = dbwrap_local_open(mem_ctx, lp_ctx, path, 0, flags, O_RDWR|O_CREAT,
|
||||
|
Loading…
x
Reference in New Issue
Block a user