svn commit: samba r16933 - in
branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules: .
abartlet at samba.org
abartlet at samba.org
Tue Jul 11 02:04:44 GMT 2006
Author: abartlet
Date: 2006-07-11 02:04:43 +0000 (Tue, 11 Jul 2006)
New Revision: 16933
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16933
Log:
Sort the partitions in order from most, to least specific.
Remember to perform operations on the base database as well.
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/partition.c
Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/partition.c
===================================================================
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/partition.c 2006-07-11 02:03:44 UTC (rev 16932)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/partition.c 2006-07-11 02:04:43 UTC (rev 16933)
@@ -217,6 +217,11 @@
int i, ret, ret2 = LDB_SUCCESS;
struct partition_private_data *data = talloc_get_type(module->private_data,
struct partition_private_data);
+ ret = ldb_next_del_trans(module);
+ if (ret != LDB_SUCCESS) {
+ ret2 = ret;
+ }
+
/* Look at base DN */
/* Figure out which partition it is under */
/* Skip the lot if 'data' isn't here yet (initialistion) */
@@ -238,6 +243,12 @@
uint64_t seq_number = 0;
struct partition_private_data *data = talloc_get_type(module->private_data,
struct partition_private_data);
+ ret = ldb_next_request(module, req);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
+ seq_number = seq_number + req->op.seq_num.seq_num;
+
/* Look at base DN */
/* Figure out which partition it is under */
/* Skip the lot if 'data' isn't here yet (initialistion) */
@@ -264,7 +275,7 @@
struct partition *partition1 = talloc_get_type(*pp1, struct partition);
struct partition *partition2 = talloc_get_type(*pp2, struct partition);
- return -ldb_dn_compare(ldb, partition1->dn, partition2->dn);
+ return ldb_dn_compare(ldb, partition1->dn, partition2->dn);
}
static int partition_init(struct ldb_module *module)
@@ -359,7 +370,7 @@
}
data->partitions[i] = NULL;
- /* sort these into order */
+ /* sort these into order, most to least specific */
ldb_qsort(data->partitions, partition_attributes->num_values, sizeof(*data->partitions),
module->ldb, sort_compare);
More information about the samba-cvs
mailing list