summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-09-22 20:57:18 -0700
committerAndrew Tridgell <tridge@samba.org>2009-09-23 14:01:29 -0700
commitaf4c1f7fc67173e21b50797fd9de7e68602a97ed (patch)
tree21172b377fa78aa837ff6ce8389c9595d9c88163 /source4/rpc_server
parent9b7de7f491389609b3a07ed625e0d708c5e36a37 (diff)
downloadsamba-af4c1f7fc67173e21b50797fd9de7e68602a97ed.tar.gz
samba-af4c1f7fc67173e21b50797fd9de7e68602a97ed.tar.bz2
samba-af4c1f7fc67173e21b50797fd9de7e68602a97ed.zip
s4-drsserver: fixed addition of sort control
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/drsuapi/drsutil.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source4/rpc_server/drsuapi/drsutil.c b/source4/rpc_server/drsuapi/drsutil.c
index ef48a9f079..e1d6bedd99 100644
--- a/source4/rpc_server/drsuapi/drsutil.c
+++ b/source4/rpc_server/drsuapi/drsutil.c
@@ -95,15 +95,17 @@ int drsuapi_search_with_extended_dn(struct ldb_context *ldb,
}
if (sort_attrib) {
- struct ldb_server_sort_control *sort_control;
- sort_control = talloc(req, struct ldb_server_sort_control);
+ struct ldb_server_sort_control **sort_control;
+ sort_control = talloc_array(req, struct ldb_server_sort_control *, 2);
if (sort_control == NULL) {
talloc_free(tmp_ctx);
return LDB_ERR_OPERATIONS_ERROR;
}
- sort_control->attributeName = sort_attrib;
- sort_control->orderingRule = NULL;
- sort_control->reverse = 1;
+ sort_control[0] = talloc(req, struct ldb_server_sort_control);
+ sort_control[0]->attributeName = sort_attrib;
+ sort_control[0]->orderingRule = NULL;
+ sort_control[0]->reverse = 1;
+ sort_control[1] = NULL;
ret = ldb_request_add_control(req, LDB_CONTROL_SERVER_SORT_OID, true, sort_control);
if (ret != LDB_SUCCESS) {