summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/extended_dn.c4
-rw-r--r--source4/dsdb/samdb/ldb_modules/kludge_acl.c7
-rw-r--r--source4/dsdb/samdb/ldb_modules/objectguid.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/password_hash.c11
-rw-r--r--source4/dsdb/samdb/ldb_modules/rootdse.c4
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c4
6 files changed, 19 insertions, 13 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn.c b/source4/dsdb/samdb/ldb_modules/extended_dn.c
index 1f2d406a28..71f7a2dc7e 100644
--- a/source4/dsdb/samdb/ldb_modules/extended_dn.c
+++ b/source4/dsdb/samdb/ldb_modules/extended_dn.c
@@ -172,7 +172,6 @@ struct extended_async_context {
struct ldb_module *module;
void *up_context;
int (*up_callback)(struct ldb_context *, void *, struct ldb_async_result *);
- int timeout;
const char * const *attrs;
BOOL remove_guid;
@@ -236,7 +235,6 @@ static int extended_search_async(struct ldb_module *module, struct ldb_request *
ac->module = module;
ac->up_context = req->async.context;
ac->up_callback = req->async.callback;
- ac->timeout = req->async.timeout;
ac->attrs = req->op.search.attrs;
ac->remove_guid = False;
ac->remove_sid = False;
@@ -289,7 +287,7 @@ static int extended_search_async(struct ldb_module *module, struct ldb_request *
down_req->async.context = ac;
down_req->async.callback = extended_async_callback;
- down_req->async.timeout = req->async.timeout;
+ ldb_set_timeout_from_prev_req(module->ldb, req, down_req);
/* perform the search */
ret = ldb_next_request(module, down_req);
diff --git a/source4/dsdb/samdb/ldb_modules/kludge_acl.c b/source4/dsdb/samdb/ldb_modules/kludge_acl.c
index 4e09faf269..1b5b896b3f 100644
--- a/source4/dsdb/samdb/ldb_modules/kludge_acl.c
+++ b/source4/dsdb/samdb/ldb_modules/kludge_acl.c
@@ -103,7 +103,6 @@ struct kludge_acl_async_context {
struct ldb_module *module;
void *up_context;
int (*up_callback)(struct ldb_context *, void *, struct ldb_async_result *);
- int timeout;
enum user_is user_type;
};
@@ -160,7 +159,6 @@ static int kludge_acl_search_async(struct ldb_module *module, struct ldb_request
ac->module = module;
ac->up_context = req->async.context;
ac->up_callback = req->async.callback;
- ac->timeout = req->async.timeout;
ac->user_type = what_is_user(module);
down_req = talloc_zero(req, struct ldb_request);
@@ -178,7 +176,7 @@ static int kludge_acl_search_async(struct ldb_module *module, struct ldb_request
down_req->async.context = ac;
down_req->async.callback = kludge_acl_async_callback;
- down_req->async.timeout = req->async.timeout;
+ ldb_set_timeout_from_prev_req(module->ldb, req, down_req);
/* perform the search */
ret = ldb_next_request(module, down_req);
@@ -193,7 +191,8 @@ static int kludge_acl_search_async(struct ldb_module *module, struct ldb_request
}
/* ANY change type */
-static int kludge_acl_change(struct ldb_module *module, struct ldb_request *req){
+static int kludge_acl_change(struct ldb_module *module, struct ldb_request *req)
+{
enum user_is user_type = what_is_user(module);
switch (user_type) {
case SYSTEM:
diff --git a/source4/dsdb/samdb/ldb_modules/objectguid.c b/source4/dsdb/samdb/ldb_modules/objectguid.c
index 643f8c17fd..3f6a951997 100644
--- a/source4/dsdb/samdb/ldb_modules/objectguid.c
+++ b/source4/dsdb/samdb/ldb_modules/objectguid.c
@@ -99,6 +99,8 @@ static int objectguid_add(struct ldb_module *module, struct ldb_request *req)
return ret;
}
+ ldb_set_timeout_from_prev_req(module->ldb, req, down_req);
+
/* go on with the call chain */
ret = ldb_next_request(module, down_req);
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
index a04fb52cd2..8a400fbc63 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -510,6 +510,7 @@ static int build_domain_data_request(struct ph_async_context *ac,
ac->dom_req->async.context = ac;
ac->dom_req->async.callback = get_domain_data_callback;
ac->dom_req->async.timeout = ac->orig_req->async.timeout;
+ ldb_set_timeout_from_prev_req(ac->module->ldb, ac->orig_req, ac->dom_req);
return LDB_SUCCESS;
}
@@ -634,7 +635,7 @@ static int password_hash_add_do_add(struct ldb_async_handle *h) {
if (ac->down_req->op.add.message == NULL) {
return LDB_ERR_OPERATIONS_ERROR;
}
-
+
/* Some operations below require kerberos contexts */
if (smb_krb5_init_context(ac->down_req, &smb_krb5_context) != 0) {
return LDB_ERR_OPERATIONS_ERROR;
@@ -685,6 +686,8 @@ static int password_hash_add_do_add(struct ldb_async_handle *h) {
ac->step = PH_ADD_DO_ADD;
+ ldb_set_timeout_from_prev_req(ac->module->ldb, ac->orig_req, ac->down_req);
+
/* perform the operation */
return ldb_next_request(ac->module, ac->down_req);
}
@@ -777,6 +780,8 @@ static int password_hash_modify(struct ldb_module *module, struct ldb_request *r
ac->step = PH_MOD_DO_REQ;
+ ldb_set_timeout_from_prev_req(module->ldb, req, ac->down_req);
+
return ldb_next_request(module, ac->down_req);
}
@@ -848,7 +853,7 @@ static int password_hash_mod_search_self(struct ldb_async_handle *h) {
ac->search_req->controls = NULL;
ac->search_req->async.context = ac;
ac->search_req->async.callback = get_self_callback;
- ac->search_req->async.timeout = ac->orig_req->async.timeout;
+ ldb_set_timeout_from_prev_req(ac->module->ldb, ac->orig_req, ac->search_req);
ac->step = PH_MOD_SEARCH_SELF;
@@ -1001,6 +1006,8 @@ static int password_hash_mod_do_mod(struct ldb_async_handle *h) {
ac->step = PH_MOD_DO_MOD;
+ ldb_set_timeout_from_prev_req(ac->module->ldb, ac->orig_req, ac->mod_req);
+
/* perform the search */
return ldb_next_request(ac->module, ac->mod_req);
}
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c
index 46b34a469b..e96da829eb 100644
--- a/source4/dsdb/samdb/ldb_modules/rootdse.c
+++ b/source4/dsdb/samdb/ldb_modules/rootdse.c
@@ -125,7 +125,6 @@ struct rootdse_async_context {
struct ldb_module *module;
void *up_context;
int (*up_callback)(struct ldb_context *, void *, struct ldb_async_result *);
- int timeout;
const char * const * attrs;
};
@@ -176,7 +175,6 @@ static int rootdse_search(struct ldb_module *module, struct ldb_request *req)
ac->module = module;
ac->up_context = req->async.context;
ac->up_callback = req->async.callback;
- ac->timeout = req->async.timeout;
ac->attrs = req->op.search.attrs;
down_req = talloc_zero(req, struct ldb_request);
@@ -199,7 +197,7 @@ static int rootdse_search(struct ldb_module *module, struct ldb_request *req)
down_req->async.context = ac;
down_req->async.callback = rootdse_async_callback;
- down_req->async.timeout = req->async.timeout;
+ ldb_set_timeout_from_prev_req(module->ldb, req, down_req);
/* perform the search */
ret = ldb_next_request(module, down_req);
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index 01972016ae..eaa7aa034a 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -845,7 +845,9 @@ static int samldb_add(struct ldb_module *module, struct ldb_request *req)
*down_req = *req;
down_req->op.add.message = talloc_steal(down_req, msg2);
-
+
+ ldb_set_timeout_from_prev_req(module->ldb, req, down_req);
+
/* go on with the call chain */
ret = ldb_next_request(module, down_req);