diff options
author | Garming Sam <garming@catalyst.net.nz> | 2016-12-14 16:05:05 +1300 |
---|---|---|
committer | Garming Sam <garming@samba.org> | 2016-12-21 04:37:54 +0100 |
commit | c94f82417035c8fdae9bb2631162798ba167e6b6 (patch) | |
tree | fd979bebfa1bb84898c8c0394a3bf224fbbd0aea | |
parent | 56314211439b281647a2f11e7a94bd874a5df337 (diff) | |
download | samba-c94f82417035c8fdae9bb2631162798ba167e6b6.tar.gz |
getncchanges: use the uptodateness_vector to filter links to replicate
This is to mirror the check in get_nc_changes_build_object.
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Wed Dec 21 04:37:54 CET 2016 on sn-devel-144
-rw-r--r-- | selftest/knownfail | 2 | ||||
-rw-r--r-- | source4/rpc_server/drsuapi/getncchanges.c | 19 |
2 files changed, 18 insertions, 3 deletions
diff --git a/selftest/knownfail b/selftest/knownfail index b9b0b9a455c..d96e238796c 100644 --- a/selftest/knownfail +++ b/selftest/knownfail @@ -312,5 +312,3 @@ ^samba.tests.dcerpc.dnsserver.samba.tests.dcerpc.dnsserver.DnsserverTests.test_add_duplicate_different_type.* ^samba.tests.dcerpc.dnsserver.samba.tests.dcerpc.dnsserver.DnsserverTests.test_rank_none.* ^samba.tests.dcerpc.dnsserver.samba.tests.dcerpc.dnsserver.DnsserverTests.test_security_descriptor.* -# uptodateness_vector isn't check when determining which linked attributes to replicate -^samba4.drs.getnc_exop.python.*getnc_exop.DrsReplicaSyncTestCase.test_link_utdv_hwm.* diff --git a/source4/rpc_server/drsuapi/getncchanges.c b/source4/rpc_server/drsuapi/getncchanges.c index 70ec04c2317..705c8cfd89f 100644 --- a/source4/rpc_server/drsuapi/getncchanges.c +++ b/source4/rpc_server/drsuapi/getncchanges.c @@ -605,8 +605,10 @@ static WERROR get_nc_changes_add_links(struct ldb_context *sam_ctx, for (j=0; j<el->num_values; j++) { struct dsdb_dn *dsdb_dn; uint64_t local_usn; - NTSTATUS status; + uint64_t originating_usn; + NTSTATUS status, status2; WERROR werr; + struct GUID originating_invocation_id; dsdb_dn = dsdb_dn_parse(tmp_ctx, sam_ctx, &el->values[j], sa->syntax->ldap_oid); if (dsdb_dn == NULL) { @@ -635,6 +637,21 @@ static WERROR get_nc_changes_add_links(struct ldb_context *sam_ctx, continue; } + status = dsdb_get_extended_dn_guid(dsdb_dn->dn, + &originating_invocation_id, + "RMD_INVOCID"); + status2 = dsdb_get_extended_dn_uint64(dsdb_dn->dn, + &originating_usn, + "RMD_ORIGINATING_USN"); + + if (NT_STATUS_IS_OK(status) && NT_STATUS_IS_OK(status2)) { + if (udv_filter(uptodateness_vector, + &originating_invocation_id, + originating_usn)) { + continue; + } + } + werr = get_nc_changes_add_la(mem_ctx, sam_ctx, schema, sa, msg, dsdb_dn, la_list, la_count, is_schema_nc); |