summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-05-31 15:36:34 +1000
committerStefan Metzmacher <metze@samba.org>2013-06-13 11:15:01 +0200
commit6c8cccc1fbf4966f707286343b19e79513915c01 (patch)
tree192d8b4e10ad947513ee01df90a89b8c0f07d3f2
parent5c488cfb79873287e769622fd5da43b7a735e29c (diff)
downloadsamba-6c8cccc1fbf4966f707286343b19e79513915c01.tar.gz
samba-6c8cccc1fbf4966f707286343b19e79513915c01.tar.bz2
samba-6c8cccc1fbf4966f707286343b19e79513915c01.zip
dsdb repl_meta_data: Use dsdb_request_add_controls()
This makes the code easier to read. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Jun 13 11:15:01 CEST 2013 on sn-devel-104
-rw-r--r--source4/dsdb/samdb/ldb_modules/repl_meta_data.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 0f2aa58635..b6ff7ff794 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -4462,7 +4462,6 @@ static int replmd_replicated_apply_next(struct replmd_replicated_request *ar)
char *tmp_str;
char *filter;
struct ldb_request *search_req;
- struct ldb_search_options_control *options;
if (ar->index_current >= ar->objs->num_objects) {
/* done with it, go to next stage */
@@ -4492,24 +4491,8 @@ static int replmd_replicated_apply_next(struct replmd_replicated_request *ar)
ar->req);
LDB_REQ_SET_LOCATION(search_req);
- ret = ldb_request_add_control(search_req, LDB_CONTROL_SHOW_RECYCLED_OID,
- true, NULL);
- if (ret != LDB_SUCCESS) {
- return ret;
- }
-
- /* we need to cope with cross-partition links, so search for
- the GUID over all partitions */
- options = talloc(search_req, struct ldb_search_options_control);
- if (options == NULL) {
- DEBUG(0, (__location__ ": out of memory\n"));
- return LDB_ERR_OPERATIONS_ERROR;
- }
- options->search_options = LDB_SEARCH_OPTION_PHANTOM_ROOT;
+ ret = dsdb_request_add_controls(search_req, DSDB_SEARCH_SEARCH_ALL_PARTITIONS|DSDB_SEARCH_SHOW_RECYCLED);
- ret = ldb_request_add_control(search_req,
- LDB_CONTROL_SEARCH_OPTIONS_OID,
- true, options);
if (ret != LDB_SUCCESS) {
return ret;
}