summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-17 23:50:05 +1100
committerAndrew Tridgell <tridge@samba.org>2009-12-18 21:03:39 +1100
commitdb76e6531825e66d4859106b583d9f7be8ae0a3a (patch)
treea96ef74ceeae0cf8b9903eb22a933d437943696e /source4
parentf392ae5169150dc939e0cea9732a6d0ef0ab860a (diff)
downloadsamba-db76e6531825e66d4859106b583d9f7be8ae0a3a.tar.gz
samba-db76e6531825e66d4859106b583d9f7be8ae0a3a.tar.bz2
samba-db76e6531825e66d4859106b583d9f7be8ae0a3a.zip
s4-dsdb: fixed the sort in dsdb_find_nc_root()
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/common/util.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 8ba734c159..61d065b85c 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -2781,6 +2781,11 @@ int dsdb_wellknown_dn(struct ldb_context *samdb, TALLOC_CTX *mem_ctx,
}
+static int dsdb_dn_compare_ptrs(struct ldb_dn **dn1, struct ldb_dn **dn2)
+{
+ return ldb_dn_compare(*dn1, *dn2);
+}
+
/*
find a NC root given a DN within the NC
*/
@@ -2830,7 +2835,7 @@ int dsdb_find_nc_root(struct ldb_context *samdb, TALLOC_CTX *mem_ctx, struct ldb
}
}
- qsort(nc_dns, el->num_values, sizeof(nc_dns[0]), (comparison_fn_t)ldb_dn_compare);
+ qsort(nc_dns, el->num_values, sizeof(nc_dns[0]), (comparison_fn_t)dsdb_dn_compare_ptrs);
for (i=0; i<el->num_values; i++) {
if (ldb_dn_compare_base(nc_dns[i], dn) == 0) {