/*
open the permanent tdb
*/
-static NTSTATUS idmap_tdb2_open_db(void)
+static NTSTATUS idmap_tdb2_open_db(struct idmap_domain *dom)
{
char *db_path;
NTSTATUS status;
struct idmap_tdb2_allocate_id_context state;
- status = idmap_tdb2_open_db();
+ status = idmap_tdb2_open_db(dom);
NT_STATUS_NOT_OK_RETURN(status);
/* Get current high water mark */
talloc_free(config_option);
}
- ret = idmap_tdb2_open_db();
+ dom->private_data = ctx;
+
+ ret = idmap_tdb2_open_db(dom);
if (!NT_STATUS_IS_OK(ret)) {
goto failed;
}
- dom->private_data = ctx;
-
return NT_STATUS_OK;
failed:
struct idmap_tdb2_context *ctx;
- status = idmap_tdb2_open_db();
- NT_STATUS_NOT_OK_RETURN(status);
-
if (!dom || !map) {
return NT_STATUS_INVALID_PARAMETER;
}
+ status = idmap_tdb2_open_db(dom);
+ NT_STATUS_NOT_OK_RETURN(status);
+
ctx = talloc_get_type(dom->private_data, struct idmap_tdb2_context);
/* apply filters before checking */
struct idmap_tdb2_context *ctx;
TALLOC_CTX *tmp_ctx = talloc_stackframe();
- ret = idmap_tdb2_open_db();
+ ret = idmap_tdb2_open_db(dom);
NT_STATUS_NOT_OK_RETURN(ret);
ctx = talloc_get_type(dom->private_data, struct idmap_tdb2_context);