summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_tdb.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
index a498d541d3..0e91b5bba6 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -283,15 +283,6 @@ static int ltdb_add_internal(struct ldb_module *module,
int ret = LDB_SUCCESS;
unsigned int i;
- ret = ltdb_check_special_dn(module, msg);
- if (ret != LDB_SUCCESS) {
- return ret;
- }
-
- if (ltdb_cache_load(module) != 0) {
- return LDB_ERR_OPERATIONS_ERROR;
- }
-
for (i=0;i<msg->num_elements;i++) {
struct ldb_message_element *el = &msg->elements[i];
const struct ldb_schema_attribute *a = ldb_schema_attribute_by_name(ldb, el->name);
@@ -340,6 +331,11 @@ static int ltdb_add(struct ltdb_context *ctx)
struct ldb_request *req = ctx->req;
int ret = LDB_SUCCESS;
+ ret = ltdb_check_special_dn(module, req->op.add.message);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+
ldb_request_set_state(req, LDB_ASYNC_PENDING);
if (ltdb_cache_load(module) != 0) {