diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-01-13 17:18:24 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-02-02 15:45:20 +0100 |
commit | bf7a27c3975c3822e0de8ff15730e6d6d1f46457 (patch) | |
tree | 4fc41680c2bb80c1bec3555d093689b2c3795158 /source3/libnet | |
parent | cecf54b32bf15b0e05af899ab12f06f110dd45ec (diff) | |
download | samba-bf7a27c3975c3822e0de8ff15730e6d6d1f46457.tar.gz samba-bf7a27c3975c3822e0de8ff15730e6d6d1f46457.tar.bz2 samba-bf7a27c3975c3822e0de8ff15730e6d6d1f46457.zip |
s3:libnet: add 'process_links' to dssync_ops
This allows the backend to handle linked attributes.
metze
Diffstat (limited to 'source3/libnet')
-rw-r--r-- | source3/libnet/libnet_dssync.c | 22 | ||||
-rw-r--r-- | source3/libnet/libnet_dssync.h | 5 |
2 files changed, 27 insertions, 0 deletions
diff --git a/source3/libnet/libnet_dssync.c b/source3/libnet/libnet_dssync.c index 3aed8b68ed..64a4df0f7f 100644 --- a/source3/libnet/libnet_dssync.c +++ b/source3/libnet/libnet_dssync.c @@ -451,6 +451,8 @@ static NTSTATUS libnet_dssync_getncchanges(TALLOC_CTX *mem_ctx, for (y=0, last_query = false; !last_query; y++) { struct drsuapi_DsReplicaObjectListItemEx *first_object = NULL; struct drsuapi_DsReplicaOIDMapping_Ctr *mapping_ctr = NULL; + uint32_t linked_attributes_count = 0; + struct drsuapi_DsReplicaLinkedAttribute *linked_attributes = NULL; if (level == 8) { DEBUG(1,("start[%d] tmp_higest_usn: %llu , highest_usn: %llu\n",y, @@ -537,6 +539,9 @@ static NTSTATUS libnet_dssync_getncchanges(TALLOC_CTX *mem_ctx, first_object = ctr6->first_object; mapping_ctr = &ctr6->mapping_ctr; + linked_attributes = ctr6->linked_attributes; + linked_attributes_count = ctr6->linked_attributes_count; + if (ctr6->more_data) { req->req8.highwatermark = ctr6->new_highwatermark; } else { @@ -576,6 +581,23 @@ static NTSTATUS libnet_dssync_getncchanges(TALLOC_CTX *mem_ctx, goto out; } } + + if (linked_attributes_count == 0) { + continue; + } + + if (ctx->ops->process_links) { + status = ctx->ops->process_links(ctx, mem_ctx, + linked_attributes_count, + linked_attributes, + mapping_ctr); + if (!NT_STATUS_IS_OK(status)) { + ctx->error_message = talloc_asprintf(ctx, + "Failed to call processing function: %s", + nt_errstr(status)); + goto out; + } + } } *pnew_utdv = new_utdv; diff --git a/source3/libnet/libnet_dssync.h b/source3/libnet/libnet_dssync.h index 91f48f5e85..f47365263f 100644 --- a/source3/libnet/libnet_dssync.h +++ b/source3/libnet/libnet_dssync.h @@ -30,6 +30,11 @@ struct dssync_ops { TALLOC_CTX *mem_ctx, struct drsuapi_DsReplicaObjectListItemEx *objects, struct drsuapi_DsReplicaOIDMapping_Ctr *mappings); + NTSTATUS (*process_links)(struct dssync_context *ctx, + TALLOC_CTX *mem_ctx, + uint32_t count, + struct drsuapi_DsReplicaLinkedAttribute *links, + struct drsuapi_DsReplicaOIDMapping_Ctr *mappings); NTSTATUS (*finish)(struct dssync_context *ctx, TALLOC_CTX *mem_ctx, struct replUpToDateVectorBlob *new_utdv); }; |