s4-drs: we are doing the sorting for getncchanges in the app code now
authorAndrew Tridgell <tridge@samba.org>
Mon, 21 Dec 2009 10:06:56 +0000 (21:06 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 1 Jan 2010 21:16:52 +0000 (08:16 +1100)
the sorting is quite delicate, and easier to get right in the
getncchanges code

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/rpc_server/drsuapi/dcesrv_drsuapi.h
source4/rpc_server/drsuapi/drsutil.c

index e42d9569e7db449cae9fc70af6b28968c61f1a38..3a64ef5c9cc95955539a249f31de76c1f8b289c0 100644 (file)
@@ -57,7 +57,6 @@ int drsuapi_search_with_extended_dn(struct ldb_context *ldb,
                                    struct ldb_dn *basedn,
                                    enum ldb_scope scope,
                                    const char * const *attrs,
-                                   const char *sort_attrib,
                                    const char *filter);
 
 WERROR drs_security_level_check(struct dcesrv_call_state *dce_call,
index 43692ac5b4d59a0ad070458c7c0bc0412d73c77b..0a8a576d60f81eb2ae7bf6592bc36c09060c1aa8 100644 (file)
@@ -47,7 +47,6 @@ int drsuapi_search_with_extended_dn(struct ldb_context *ldb,
                                    struct ldb_dn *basedn,
                                    enum ldb_scope scope,
                                    const char * const *attrs,
-                                   const char *sort_attrib,
                                    const char *filter)
 {
        int ret;
@@ -91,26 +90,6 @@ int drsuapi_search_with_extended_dn(struct ldb_context *ldb,
                return ret;
        }
 
-       if (sort_attrib) {
-               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[0] = talloc(req, struct ldb_server_sort_control);
-               sort_control[0]->attributeName = sort_attrib;
-               sort_control[0]->orderingRule = NULL;
-               sort_control[0]->reverse = 0;
-               sort_control[1] = NULL;
-
-               ret = ldb_request_add_control(req, LDB_CONTROL_SERVER_SORT_OID, true, sort_control);
-               if (ret != LDB_SUCCESS) {
-                       return ret;
-               }
-       }
-
-
        ret = ldb_request(ldb, req);
        if (ret == LDB_SUCCESS) {
                ret = ldb_wait(req->handle, LDB_WAIT_ALL);