diff options
author | Kamen Mazdrashki <kamenim@samba.org> | 2010-11-26 02:38:39 +0200 |
---|---|---|
committer | Kamen Mazdrashki <kamenim@samba.org> | 2010-12-01 13:01:16 +0200 |
commit | 4041791d01b10b250dab5b356f0477fb8a40907e (patch) | |
tree | 23352a1fd93e391d72ac3bb5ead4acd0861552dc /source4/dsdb/repl/drepl_out_helpers.c | |
parent | 4cd16dde148662700311501e62ba3ee9bf80765a (diff) | |
download | samba-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/dsdb/repl/drepl_out_helpers.c')
-rw-r--r-- | source4/dsdb/repl/drepl_out_helpers.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/dsdb/repl/drepl_out_helpers.c b/source4/dsdb/repl/drepl_out_helpers.c index 2cbf0088a5..d6d9cafdb4 100644 --- a/source4/dsdb/repl/drepl_out_helpers.c +++ b/source4/dsdb/repl/drepl_out_helpers.c @@ -541,6 +541,7 @@ static void dreplsrv_op_pull_source_apply_changes_trigger(struct tevent_req *req struct dreplsrv_service *service = state->op->service; struct dreplsrv_partition *partition = state->op->source_dsa->partition; struct dreplsrv_drsuapi_connection *drsuapi = state->op->source_dsa->conn->drsuapi; + struct dsdb_schema *schema; const struct drsuapi_DsReplicaOIDMapping_Ctr *mapping_ctr; uint32_t object_count; struct drsuapi_DsReplicaObjectListItemEx *first_object; @@ -579,7 +580,16 @@ static void dreplsrv_op_pull_source_apply_changes_trigger(struct tevent_req *req return; } + schema = dsdb_get_schema(service->samdb, NULL); + if (!schema) { + DEBUG(0,(__location__ ": Schema is not loaded yet!\n")); + tevent_req_nterror(req, NT_STATUS_INTERNAL_ERROR); + return; + } + /* TODO (kim): Create working dsdb_schema in case we replicate Schema NC */ + status = dsdb_replicated_objects_convert(service->samdb, + schema, partition->nc.dn, mapping_ctr, object_count, |