diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-01-17 13:12:15 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-01-17 05:23:04 +0100 |
commit | 87f31510475c6debd56ff874130f4f5d48bef9a5 (patch) | |
tree | 07c44c78c297b9dbecbf5467736f08383f5cfdfd /source4/dsdb/samdb/ldb_modules/linked_attributes.c | |
parent | 633c3e8da5a3a5ee1b61f9045c7dedb39bbb668a (diff) | |
download | samba-87f31510475c6debd56ff874130f4f5d48bef9a5.tar.gz samba-87f31510475c6debd56ff874130f4f5d48bef9a5.tar.bz2 samba-87f31510475c6debd56ff874130f4f5d48bef9a5.zip |
s4-dsdb: pass parent request to dsdb_module_*() functions
this preserves the request hierarchy for dsdb_module_*() calls inside
dsdb ldb modules
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/linked_attributes.c')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/linked_attributes.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c b/source4/dsdb/samdb/ldb_modules/linked_attributes.c index ebbc7c609c..324faa2c2a 100644 --- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c +++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c @@ -594,7 +594,8 @@ static int linked_attributes_modify(struct ldb_module *module, struct ldb_reques static int linked_attributes_fix_links(struct ldb_module *module, struct ldb_dn *old_dn, struct ldb_dn *new_dn, struct ldb_message_element *el, struct dsdb_schema *schema, - const struct dsdb_attribute *schema_attr) + const struct dsdb_attribute *schema_attr, + struct ldb_request *parent) { unsigned int i, j; TALLOC_CTX *tmp_ctx = talloc_new(module); @@ -629,7 +630,7 @@ static int linked_attributes_fix_links(struct ldb_module *module, DSDB_FLAG_NEXT_MODULE | DSDB_SEARCH_SHOW_RECYCLED | DSDB_SEARCH_SHOW_DN_IN_STORAGE_FORMAT | - DSDB_SEARCH_REVEAL_INTERNALS); + DSDB_SEARCH_REVEAL_INTERNALS, parent); if (ret != LDB_SUCCESS) { ldb_asprintf_errstring(ldb, "Linked attribute %s->%s between %s and %s - remote not found - %s", el->name, target->lDAPDisplayName, @@ -690,7 +691,7 @@ static int linked_attributes_fix_links(struct ldb_module *module, disable checking for this attribute */ el2->flags |= LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECK; - ret = dsdb_module_modify(module, msg, DSDB_FLAG_NEXT_MODULE); + ret = dsdb_module_modify(module, msg, DSDB_FLAG_NEXT_MODULE, parent); if (ret != LDB_SUCCESS) { ldb_asprintf_errstring(ldb, "Linked attribute %s->%s between %s and %s - update failed - %s", el->name, target->lDAPDisplayName, @@ -725,7 +726,7 @@ static int linked_attributes_rename(struct ldb_module *module, struct ldb_reques ret = dsdb_module_search_dn(module, req, &res, req->op.rename.olddn, NULL, DSDB_FLAG_NEXT_MODULE | - DSDB_SEARCH_SHOW_RECYCLED); + DSDB_SEARCH_SHOW_RECYCLED, req); if (ret != LDB_SUCCESS) { return ret; } @@ -745,7 +746,7 @@ static int linked_attributes_rename(struct ldb_module *module, struct ldb_reques continue; } ret = linked_attributes_fix_links(module, msg->dn, req->op.rename.newdn, el, - schema, schema_attr); + schema, schema_attr, req); if (ret != LDB_SUCCESS) { talloc_free(res); return ret; @@ -986,7 +987,7 @@ static int la_do_op_request(struct ldb_module *module, struct la_context *ac, st ldb_ldif_message_string(ldb, op, LDB_CHANGETYPE_MODIFY, new_msg))); } - ret = dsdb_module_modify(module, new_msg, DSDB_FLAG_NEXT_MODULE); + ret = dsdb_module_modify(module, new_msg, DSDB_FLAG_NEXT_MODULE, ac->req); if (ret != LDB_SUCCESS) { ldb_debug(ldb, LDB_DEBUG_WARNING, "Failed to apply linked attribute change '%s'\n%s\n", ldb_errstring(ldb), |