diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/acl.c | 1 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/anr.c | 2 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/descriptor.c | 1 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/extended_dn_in.c | 2 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/extended_dn_out.c | 1 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/lazy_commit.c | 6 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/local_password.c | 2 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/util.c | 15 |
8 files changed, 30 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c index 826884f8118..497e1add5c8 100644 --- a/source4/dsdb/samdb/ldb_modules/acl.c +++ b/source4/dsdb/samdb/ldb_modules/acl.c @@ -1344,6 +1344,7 @@ static int acl_search(struct ldb_module *module, struct ldb_request *req) req->controls, ac, acl_search_callback, req); + LDB_REQ_SET_LOCATION(down_req); if (ret != LDB_SUCCESS) { return ret; } diff --git a/source4/dsdb/samdb/ldb_modules/anr.c b/source4/dsdb/samdb/ldb_modules/anr.c index 15a8a7aa483..ebe9d660970 100644 --- a/source4/dsdb/samdb/ldb_modules/anr.c +++ b/source4/dsdb/samdb/ldb_modules/anr.c @@ -32,6 +32,7 @@ #include "includes.h" #include "ldb_module.h" #include "dsdb/samdb/samdb.h" +#include "dsdb/samdb/ldb_modules/util.h" /** * Make a and 'and' or 'or' tree from the two supplied elements @@ -355,6 +356,7 @@ static int anr_search(struct ldb_module *module, struct ldb_request *req) req->controls, ac, anr_search_callback, req); + LDB_REQ_SET_LOCATION(down_req); if (ret != LDB_SUCCESS) { return ldb_operr(ldb); } diff --git a/source4/dsdb/samdb/ldb_modules/descriptor.c b/source4/dsdb/samdb/ldb_modules/descriptor.c index f32383ed72b..03e445e73ce 100644 --- a/source4/dsdb/samdb/ldb_modules/descriptor.c +++ b/source4/dsdb/samdb/ldb_modules/descriptor.c @@ -857,6 +857,7 @@ static int descriptor_search(struct ldb_module *module, struct ldb_request *req) req->controls, ac, descriptor_search_callback, ac->req); + LDB_REQ_SET_LOCATION(down_req); if (ret != LDB_SUCCESS) { return ret; } diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_in.c b/source4/dsdb/samdb/ldb_modules/extended_dn_in.c index c4d006fc4f1..3dec685678e 100644 --- a/source4/dsdb/samdb/ldb_modules/extended_dn_in.c +++ b/source4/dsdb/samdb/ldb_modules/extended_dn_in.c @@ -173,6 +173,7 @@ static int extended_base_callback(struct ldb_request *req, struct ldb_reply *are ac->req->controls, ac, extended_final_callback, ac->req); + LDB_REQ_SET_LOCATION(down_req); break; case LDB_ADD: { @@ -191,6 +192,7 @@ static int extended_base_callback(struct ldb_request *req, struct ldb_reply *are ac->req->controls, ac, extended_final_callback, ac->req); + LDB_REQ_SET_LOCATION(down_req); break; } case LDB_MODIFY: diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c index fc0401369c0..2daae253ef1 100644 --- a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c +++ b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c @@ -643,6 +643,7 @@ static int extended_dn_out_search(struct ldb_module *module, struct ldb_request req->controls, ac, callback, req); + LDB_REQ_SET_LOCATION(down_req); if (ret != LDB_SUCCESS) { return ret; } diff --git a/source4/dsdb/samdb/ldb_modules/lazy_commit.c b/source4/dsdb/samdb/ldb_modules/lazy_commit.c index 6a59a967aa5..b46f88a5759 100644 --- a/source4/dsdb/samdb/ldb_modules/lazy_commit.c +++ b/source4/dsdb/samdb/ldb_modules/lazy_commit.c @@ -50,6 +50,7 @@ static int unlazy_op(struct ldb_module *module, struct ldb_request *req) req->controls, req, dsdb_next_callback, req); + LDB_REQ_SET_LOCATION(new_req); break; case LDB_ADD: ret = ldb_build_add_req(&new_req, ldb_module_get_ctx(module), req, @@ -57,6 +58,7 @@ static int unlazy_op(struct ldb_module *module, struct ldb_request *req) req->controls, req, dsdb_next_callback, req); + LDB_REQ_SET_LOCATION(new_req); break; case LDB_MODIFY: ret = ldb_build_mod_req(&new_req, ldb_module_get_ctx(module), req, @@ -64,6 +66,7 @@ static int unlazy_op(struct ldb_module *module, struct ldb_request *req) req->controls, req, dsdb_next_callback, req); + LDB_REQ_SET_LOCATION(new_req); break; case LDB_DELETE: ret = ldb_build_del_req(&new_req, ldb_module_get_ctx(module), req, @@ -71,6 +74,7 @@ static int unlazy_op(struct ldb_module *module, struct ldb_request *req) req->controls, req, dsdb_next_callback, req); + LDB_REQ_SET_LOCATION(new_req); break; case LDB_RENAME: ret = ldb_build_rename_req(&new_req, ldb_module_get_ctx(module), req, @@ -79,6 +83,7 @@ static int unlazy_op(struct ldb_module *module, struct ldb_request *req) req->controls, req, dsdb_next_callback, req); + LDB_REQ_SET_LOCATION(new_req); break; case LDB_EXTENDED: ret = ldb_build_extended_req(&new_req, ldb_module_get_ctx(module), @@ -88,6 +93,7 @@ static int unlazy_op(struct ldb_module *module, struct ldb_request *req) req->controls, req, dsdb_next_callback, req); + LDB_REQ_SET_LOCATION(new_req); break; default: ldb_set_errstring(ldb_module_get_ctx(module), diff --git a/source4/dsdb/samdb/ldb_modules/local_password.c b/source4/dsdb/samdb/ldb_modules/local_password.c index 942b5a25435..022a6dc98df 100644 --- a/source4/dsdb/samdb/ldb_modules/local_password.c +++ b/source4/dsdb/samdb/ldb_modules/local_password.c @@ -34,6 +34,7 @@ #include "dsdb/samdb/samdb.h" #include "librpc/ndr/libndr.h" #include "dsdb/samdb/ldb_modules/password_modules.h" +#include "dsdb/samdb/ldb_modules/util.h" #define PASSWORD_GUID_ATTR "masterGUID" @@ -1079,6 +1080,7 @@ static int local_password_search(struct ldb_module *module, struct ldb_request * req->controls, ac, lpdb_remote_search_callback, req); + LDB_REQ_SET_LOCATION(remote_req); if (ret != LDB_SUCCESS) { return ret; } diff --git a/source4/dsdb/samdb/ldb_modules/util.c b/source4/dsdb/samdb/ldb_modules/util.c index a78200133be..03c301898e6 100644 --- a/source4/dsdb/samdb/ldb_modules/util.c +++ b/source4/dsdb/samdb/ldb_modules/util.c @@ -27,6 +27,7 @@ #include "dsdb/samdb/samdb.h" #include "util.h" #include "libcli/security/security.h" +#include "lib/ldb/include/ldb_private.h" /* search for attrs on one DN, in the modules below @@ -1198,3 +1199,17 @@ bool dsdb_block_anonymous_ops(struct ldb_module *module, talloc_free(tmp_ctx); return result; } + +/* + show the chain of requests, useful for debugging async requests + */ +void dsdb_req_chain_debug(struct ldb_request *req, int level) +{ + char *ret; + int i=0; + + while (req && req->handle) { + DEBUG(level,("req[%u] %p : %s\n", i++, req, ldb_req_location(req))); + req = req->handle->parent; + } +} |