summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-11-26 02:38:39 +0200
committerKamen Mazdrashki <kamenim@samba.org>2010-12-01 13:01:16 +0200
commit4041791d01b10b250dab5b356f0477fb8a40907e (patch)
tree23352a1fd93e391d72ac3bb5ead4acd0861552dc /source4/libnet
parent4cd16dde148662700311501e62ba3ee9bf80765a (diff)
downloadsamba-4041791d01b10b250dab5b356f0477fb8a40907e.tar.gz
samba-4041791d01b10b250dab5b356f0477fb8a40907e.tar.bz2
samba-4041791d01b10b250dab5b356f0477fb8a40907e.zip
s4-repl: Let dsdb_replicated_objects_convert() to accept schema from caller
This allows us to use schema that is different than the one set to 'ldb' to decode objects.
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_vampire.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/libnet/libnet_vampire.c b/source4/libnet/libnet_vampire.c
index 164dcdec76..1d7d7268ae 100644
--- a/source4/libnet/libnet_vampire.c
+++ b/source4/libnet/libnet_vampire.c
@@ -419,6 +419,7 @@ static NTSTATUS libnet_vampire_cb_apply_schema(struct libnet_vampire_cb_state *s
/* Now convert the schema elements again, using the schema we finalised, ready to actually import */
status = dsdb_replicated_objects_convert(s->ldb,
+ s->schema,
c->partition->nc.dn,
mapping_ctr,
object_count,
@@ -606,6 +607,7 @@ NTSTATUS libnet_vampire_cb_store_chunk(void *private_data,
{
struct libnet_vampire_cb_state *s = talloc_get_type(private_data, struct libnet_vampire_cb_state);
WERROR status;
+ struct dsdb_schema *schema;
const struct drsuapi_DsReplicaOIDMapping_Ctr *mapping_ctr;
uint32_t nc_object_count;
uint32_t object_count;
@@ -685,7 +687,14 @@ NTSTATUS libnet_vampire_cb_store_chunk(void *private_data,
}
+ schema = dsdb_get_schema(s->ldb, NULL);
+ if (!schema) {
+ DEBUG(0,(__location__ ": Schema is not loaded yet!\n"));
+ return NT_STATUS_INTERNAL_ERROR;
+ }
+
status = dsdb_replicated_objects_convert(s->ldb,
+ schema,
c->partition->nc.dn,
mapping_ctr,
object_count,