summaryrefslogtreecommitdiff
path: root/source4/rpc_server/samr
diff options
context:
space:
mode:
Diffstat (limited to 'source4/rpc_server/samr')
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index 13955265b0..76f35ddefb 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -37,6 +37,7 @@
#include "rpc_server/samr/proto.h"
#include "../lib/util/util_ldb.h"
#include "param/param.h"
+#include "lib/util/tsort.h"
/* these query macros make samr_Query[User|Group|Alias]Info a bit easier to read */
@@ -1168,8 +1169,7 @@ static NTSTATUS dcesrv_samr_EnumDomainGroups(struct dcesrv_call_state *dce_call,
}
/* sort the results by rid */
- qsort(entries, count, sizeof(struct samr_SamEntry),
- (comparison_fn_t)compare_SamEntry);
+ TYPESAFE_QSORT(entries, count, compare_SamEntry);
/* find the first entry to return */
for (first=0;
@@ -1529,8 +1529,7 @@ static NTSTATUS dcesrv_samr_EnumDomainUsers(struct dcesrv_call_state *dce_call,
}
/* sort the results by rid */
- qsort(entries, num_filtered_entries, sizeof(struct samr_SamEntry),
- (comparison_fn_t)compare_SamEntry);
+ TYPESAFE_QSORT(entries, num_filtered_entries, compare_SamEntry);
/* find the first entry to return */
for (first=0;
@@ -1739,8 +1738,7 @@ static NTSTATUS dcesrv_samr_EnumDomainAliases(struct dcesrv_call_state *dce_call
}
/* sort the results by rid */
- qsort(entries, count, sizeof(struct samr_SamEntry),
- (comparison_fn_t)compare_SamEntry);
+ TYPESAFE_QSORT(entries, count, compare_SamEntry);
/* find the first entry to return */
for (first=0;