From c2a29bea5248554a9112d051a7b5be492aa729b6 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Thu, 29 Oct 2009 12:57:57 +0100 Subject: add sysdb_delete_recursive request to sysdb API --- server/db/sysdb.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'server/db/sysdb.c') diff --git a/server/db/sysdb.c b/server/db/sysdb.c index 5811ddc96..a2ac3b22e 100644 --- a/server/db/sysdb.c +++ b/server/db/sysdb.c @@ -1417,3 +1417,15 @@ int sysdb_get_ctx_from_list(struct sysdb_ctx_list *ctx_list, /* definitely not found */ return ENOENT; } + + +int compare_ldb_dn_comp_num(const void *m1, const void *m2) +{ + struct ldb_message *msg1 = talloc_get_type(*(void **) discard_const(m1), + struct ldb_message); + struct ldb_message *msg2 = talloc_get_type(*(void **) discard_const(m2), + struct ldb_message); + + return ldb_dn_get_comp_num(msg2->dn) - ldb_dn_get_comp_num(msg1->dn); +} + -- cgit