summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/kludge_acl.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-06-04 05:28:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:52 -0500
commitca5accf224dc3ef998235603797b519866b57b1c (patch)
tree3d2790afbc47076c2b12611d5c1e5b20683b36c5 /source4/dsdb/samdb/ldb_modules/kludge_acl.c
parentb31c685ec293ef65bc33a474fc5a1d83545d4749 (diff)
downloadsamba-ca5accf224dc3ef998235603797b519866b57b1c.tar.gz
samba-ca5accf224dc3ef998235603797b519866b57b1c.tar.bz2
samba-ca5accf224dc3ef998235603797b519866b57b1c.zip
r16036: Add a couple of new functions to corretly deal with timeouts.
Check timeouts are correctly verified. Some minor fixed and removal of unused code. (This used to be commit b52e5d6a0cb1a32e62759eaa49ce3e4cc804cc92)
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/kludge_acl.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/kludge_acl.c7
1 files changed, 3 insertions, 4 deletions
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: