if (!ldb) {
/* Local secrets are stored in secrets.ldb */
- ldb = secrets_db_connect(mem_ctx, lp_ctx);
+ ldb = secrets_db_connect(mem_ctx, lp_ctx, 0);
if (!ldb) {
*error_string = talloc_strdup(cred, "Could not open secrets.ldb");
talloc_free(mem_ctx);
}
/* Open the secrets database */
- ldb = secrets_db_connect(tmp_mem, lp_ctx);
+ ldb = secrets_db_connect(tmp_mem, lp_ctx, 0);
if (!ldb) {
*error_string
= talloc_asprintf(mem_ctx,
connect to the secrets ldb
*/
struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx,
- struct loadparm_context *lp_ctx)
+ struct loadparm_context *lp_ctx,
+ unsigned int flags)
{
return ldb_wrap_connect(mem_ctx, NULL, lp_ctx, "secrets.ldb",
- NULL, NULL, 0);
+ NULL, NULL, flags);
}
/**
bool randseed_init(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx);
-struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx);
+struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx,
+ struct loadparm_context *lp_ctx,
+ unsigned int flags);
struct dom_sid *secrets_get_domain_sid(TALLOC_CTX *mem_ctx,
struct loadparm_context *lp_ctx,
const char *domain,
}
secret_state->sam_ldb = talloc_reference(secret_state,
- secrets_db_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx));
+ secrets_db_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx, 0));
NT_STATUS_HAVE_NO_MEMORY(secret_state->sam_ldb);
/* search for the secret record */
} else {
secret_state->global = false;
secret_state->sam_ldb = talloc_reference(secret_state,
- secrets_db_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx));
+ secrets_db_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx, 0));
name = r->in.name.string;
if (strlen(name) < 1) {