summaryrefslogtreecommitdiff
path: root/source4/rpc_server/drsuapi
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-19 20:59:04 +1100
committerAndrew Tridgell <tridge@samba.org>2010-01-02 08:16:51 +1100
commit225bcfa4e6ad7efa7596e0324fd3faf1c195f820 (patch)
tree393c5138d5e68d946ba5da568bebcdd11fc3b284 /source4/rpc_server/drsuapi
parent64802c5e2711eec1a0046098955354e5cd978636 (diff)
downloadsamba-225bcfa4e6ad7efa7596e0324fd3faf1c195f820.tar.gz
samba-225bcfa4e6ad7efa7596e0324fd3faf1c195f820.tar.bz2
samba-225bcfa4e6ad7efa7596e0324fd3faf1c195f820.zip
s4-drs: handle mixtures of old and new style links in getncchanges
We need to send non-upgraded links using the old format
Diffstat (limited to 'source4/rpc_server/drsuapi')
-rw-r--r--source4/rpc_server/drsuapi/getncchanges.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c
index e07aca6e65..b3808206cb 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -136,6 +136,7 @@ static WERROR get_nc_changes_build_object(struct drsuapi_DsReplicaObjectListItem
obj->meta_data_ctr->meta_data = talloc_array(obj, struct drsuapi_DsReplicaMetaData, md.ctr.ctr1.count);
for (n=i=0; i<md.ctr.ctr1.count; i++) {
+ const struct dsdb_attribute *sa;
/* if the attribute has not changed, and it is not the
instanceType then don't include it */
if (md.ctr.ctr1.array[i].local_usn < highest_usn &&
@@ -144,6 +145,16 @@ static WERROR get_nc_changes_build_object(struct drsuapi_DsReplicaObjectListItem
/* don't include the rDN */
if (md.ctr.ctr1.array[i].attid == rdn_sa->attributeID_id) continue;
+ sa = dsdb_attribute_by_attributeID_id(schema, md.ctr.ctr1.array[i].attid);
+ if (sa->linkID) {
+ struct ldb_message_element *el;
+ el = ldb_msg_find_element(msg, sa->lDAPDisplayName);
+ if (el && el->num_values && dsdb_dn_is_upgraded_link_val(&el->values[0])) {
+ /* don't send upgraded links inline */
+ continue;
+ }
+ }
+
obj->meta_data_ctr->meta_data[n].originating_change_time = md.ctr.ctr1.array[i].originating_change_time;
obj->meta_data_ctr->meta_data[n].version = md.ctr.ctr1.array[i].version;
obj->meta_data_ctr->meta_data[n].originating_invocation_id = md.ctr.ctr1.array[i].originating_invocation_id;
@@ -326,6 +337,12 @@ static WERROR get_nc_changes_add_links(struct ldb_context *sam_ctx,
continue;
}
+ if (el->num_values && !dsdb_dn_is_upgraded_link_val(&el->values[0])) {
+ /* its an old style link, it will have been
+ * sent in the main replication data */
+ continue;
+ }
+
for (j=0; j<el->num_values; j++) {
struct dsdb_dn *dsdb_dn;
uint64_t local_usn;