diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-10-23 13:37:53 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-10-23 15:42:54 +1100 |
commit | b6200e3047b6ad0cc67922c9b3958af930c7aaeb (patch) | |
tree | 6fab06a4c4944642e60c1826e3e16f1e89848c9e /source4/dsdb/samdb | |
parent | 7d975bb848948d740fc81fb3e8c3cc372c76031c (diff) | |
download | samba-b6200e3047b6ad0cc67922c9b3958af930c7aaeb.tar.gz samba-b6200e3047b6ad0cc67922c9b3958af930c7aaeb.tar.bz2 samba-b6200e3047b6ad0cc67922c9b3958af930c7aaeb.zip |
s4:dsdb Fix samba3sam test again.
We again need to be careful not to call 'ldb_next_request' based functions in the partitions module.
Or, we need to instead go back to having that work, and ditch the
partition_request stuff...
Andrew Bartlett
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/partition_init.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/partition_init.c b/source4/dsdb/samdb/ldb_modules/partition_init.c index 7d5c130778..cc778d6a71 100644 --- a/source4/dsdb/samdb/ldb_modules/partition_init.c +++ b/source4/dsdb/samdb/ldb_modules/partition_init.c @@ -396,6 +396,7 @@ int partition_reload_if_required(struct ldb_module *module, DATA_BLOB dn_blob; struct ldb_dn *dn; struct dsdb_partition *partition; + struct ldb_module tmp_module; struct ldb_result *dn_res; const char *no_attrs[] = { NULL }; @@ -456,8 +457,12 @@ int partition_reload_if_required(struct ldb_module *module, return ret; } + /* Hack to be able to re-use dsdb_module_search_dn, which calls ldb_next_request(), which needs ->next filled out */ + tmp_module = *partition->module; + tmp_module.next = partition->module; + /* Get the 'correct' case of the partition DNs from the database */ - ret = dsdb_module_search_dn(partition->module, data, &dn_res, + ret = dsdb_module_search_dn(&tmp_module, data, &dn_res, dn, no_attrs); if (ret == LDB_SUCCESS) { talloc_free(partition->ctrl->dn); @@ -465,11 +470,9 @@ int partition_reload_if_required(struct ldb_module *module, talloc_free(dn_res); } else if (ret != LDB_ERR_NO_SUCH_OBJECT) { ldb_asprintf_errstring(ldb, - "Failed to search for %s from " DSDB_PARTITION_DN - " replicateEntries for new partition at %s on %s: %s", - ldb_dn_get_linearized(data->replicate[i]), - partition->backend_url, - ldb_dn_get_linearized(partition->ctrl->dn), + "Failed to search for partition base %s in new partition at %s: %s", + ldb_dn_get_linearized(dn), + partition->backend_url, ldb_errstring(ldb)); talloc_free(mem_ctx); return ret; |