summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r--source4/dsdb/samdb/ldb_modules/linked_attributes.c30
-rw-r--r--source4/dsdb/samdb/ldb_modules/subtree_rename.c16
2 files changed, 44 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
index 8685c722aa..04b9987071 100644
--- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c
+++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
@@ -520,6 +520,12 @@ static int linked_attributes_modify(struct ldb_module *module, struct ldb_reques
talloc_steal(new_req, attrs);
+ ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
+
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+
/* Create a spot in the list for the requests */
ac->down_req = talloc_realloc(ac, ac->down_req,
struct ldb_request *, ac->num_requests + 1);
@@ -568,6 +574,12 @@ static int linked_attributes_modify(struct ldb_module *module, struct ldb_reques
talloc_steal(new_req, attrs);
+ ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
+
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+
/* Create a spot in the list for the requests */
ac->down_req = talloc_realloc(ac, ac->down_req,
struct ldb_request *, ac->num_requests + 1);
@@ -629,7 +641,11 @@ static int linked_attributes_modify(struct ldb_module *module, struct ldb_reques
talloc_steal(new_req, new_msg);
- ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
+ ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
+
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
/* Now add it to the list */
ac->down_req = talloc_realloc(ac, ac->down_req,
@@ -752,6 +768,12 @@ static int linked_attributes_rename(struct ldb_module *module, struct ldb_reques
talloc_steal(new_req, attrs);
+ ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
+
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+
ac->search_req = new_req;
ac->step = LA_SEARCH;
return ldb_next_request(module, new_req);
@@ -805,6 +827,12 @@ static int linked_attributes_delete(struct ldb_module *module, struct ldb_reques
talloc_steal(new_req, attrs);
+ ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
+
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+
ac->search_req = new_req;
ac->step = LA_SEARCH;
return ldb_next_request(module, new_req);
diff --git a/source4/dsdb/samdb/ldb_modules/subtree_rename.c b/source4/dsdb/samdb/ldb_modules/subtree_rename.c
index bf8124e253..fd1388d416 100644
--- a/source4/dsdb/samdb/ldb_modules/subtree_rename.c
+++ b/source4/dsdb/samdb/ldb_modules/subtree_rename.c
@@ -117,7 +117,15 @@ static int subtree_rename_search_callback(struct ldb_context *ldb, void *context
NULL,
NULL);
- if (ret != LDB_SUCCESS) return ret;
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+
+ ret = ldb_set_timeout_from_prev_req(ldb, ac->orig_req, req);
+
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
talloc_steal(req, newdn);
@@ -186,6 +194,12 @@ static int subtree_rename(struct ldb_module *module, struct ldb_request *req)
return ret;
}
+ ret = ldb_set_timeout_from_prev_req(module->ldb, req, new_req);
+
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+
ac->down_req = talloc_realloc(ac, ac->down_req,
struct ldb_request *, ac->num_requests + 1);
if (!ac->down_req) {