int finished_requests;
};
int finished_requests;
};
-struct subtree_rename_search_context {
- struct ldb_module *module;
- struct ldb_request *orig_req;
- struct ldb_handle *handle;
-
- struct ldb_request **down_req;
- int num_requests;
- int finished_requests;
-};
-
static struct subtree_rename_context *subtree_rename_init_handle(struct ldb_request *req,
struct ldb_module *module)
{
static struct subtree_rename_context *subtree_rename_init_handle(struct ldb_request *req,
struct ldb_module *module)
{
talloc_steal(req, newdn);
talloc_steal(req, newdn);
- req->handle = ac->handle;
+ talloc_steal(req, ares->message->dn);
+
+ talloc_free(ares);
ac->down_req = talloc_realloc(ac, ac->down_req,
struct ldb_request *, ac->num_requests + 1);
ac->down_req = talloc_realloc(ac, ac->down_req,
struct ldb_request *, ac->num_requests + 1);
return LDB_ERR_OPERATIONS_ERROR;
}
ac->down_req[ac->num_requests] = req;
return LDB_ERR_OPERATIONS_ERROR;
}
ac->down_req[ac->num_requests] = req;
return ldb_next_request(ac->module, req);
return ldb_next_request(ac->module, req);
ret = ldb_build_search_req(&new_req, module->ldb, req,
req->op.rename.olddn,
LDB_SCOPE_SUBTREE,
ret = ldb_build_search_req(&new_req, module->ldb, req,
req->op.rename.olddn,
LDB_SCOPE_SUBTREE,
attrs,
req->controls,
ac,
attrs,
req->controls,
ac,
- new_req->handle = req->handle;
-
ac->down_req = talloc_realloc(ac, ac->down_req,
struct ldb_request *, ac->num_requests + 1);
if (!ac->down_req) {
ac->down_req = talloc_realloc(ac, ac->down_req,
struct ldb_request *, ac->num_requests + 1);
if (!ac->down_req) {
ldb_oom(ac->module->ldb);
return LDB_ERR_OPERATIONS_ERROR;
}
ldb_oom(ac->module->ldb);
return LDB_ERR_OPERATIONS_ERROR;
}
-
- return ldb_next_request(module, req);
+ ac->num_requests++;
+ return ldb_next_request(module, new_req);
}
static int subtree_rename_wait_none(struct ldb_handle *handle) {
}
static int subtree_rename_wait_none(struct ldb_handle *handle) {
"objectclass",
"rdn_name",
"show_deleted",
"objectclass",
"rdn_name",
"show_deleted",
"partition");
subobj.MODULES_LIST = join(",", modules_list);
subobj.DOMAINDN_LDB = "users.ldb";
"partition");
subobj.MODULES_LIST = join(",", modules_list);
subobj.DOMAINDN_LDB = "users.ldb";