Skip to content

Commit

Permalink
Remove callers of lp_use_ntdb
Browse files Browse the repository at this point in the history
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Michael Adam <[email protected]>
  • Loading branch information
vlendec authored and obnoxxx committed Mar 17, 2015
1 parent 9943691 commit b081179
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
10 changes: 2 additions & 8 deletions lib/param/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion source3/passdb/py_passdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion source3/passdb/secrets.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 1 addition & 4 deletions source4/cluster/local.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b081179

Please sign in to comment.