summaryrefslogtreecommitdiff
path: root/source4
Commit message (Collapse)AuthorAgeFilesLines
...
* samldb: Allow automatic generation of mAPIIDsBob Campbell2017-02-141-1/+118
| | | | | | | | | | This allows us to conform to MS-ADTS 3.1.1.2.3.2, where the OID 1.2.840.113556.1.2.49 can be specified as the mAPIID of a new attribute in the schema in order to automatically assign it an unused mAPIID. Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* torture/drs: Add a test for dn+binary linked attributesBob Campbell2017-02-141-4/+65
| | | | | | | Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=11139
* torture/drs: run repl_schema in vampire_2000_dc environment as wellBob Campbell2017-02-142-12/+19
| | | | | | | | | | | | | This will be necessary as linked attributes are handled differently in Windows 2000. We also only check msDS-IntId if we have a functional level of > Windows 2000, as this attribute is not present on lower domain function levels. Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=11139
* python/tests: add test for generated and duplicate linkIDsBob Campbell2017-02-141-0/+285
| | | | | | | Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=11139
* torture/drs: generate linkID for test rather than specifyingBob Campbell2017-02-142-2/+2
| | | | | | | Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=11139
* samldb: Allow automatic generation of linkIDs and prevent duplicatesBob Campbell2017-02-141-0/+171
| | | | | | | | | | | | | | | | | | As per MS-ADTS 3.1.1.2.3.1, this allows specifying the OID 1.2.840.113556.1.2.50 as the linkID of a new linked attribute in the schema in order to automatically assign it an unused even linkID. Specifying the attributeID or ldapDisplayName of an existing forward link will now also add the new linked attribute as the backlink of that existing link. This also prevents adding duplicate linkIDs. Previously, we could run into issues when trying to delete backlinks with duplicate linkIDs. Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=11139
* dbcheck-links: Test that dbcheck against one-way links does not errorGarming Sam2017-02-131-0/+15
| | | | | | | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12577 Pair-programmed-with: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Feb 13 07:33:08 CET 2017 on sn-devel-144
* getncchanges script: use library code, not copied functions.Douglas Bagnall2017-02-101-75/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These functions were duplicates. To be exact, the diff -ub between what getncchanges had, and what drs_uitls now has is this: |@@ -1,4 +1,5 @@ |-def do_DsBind(drs): |+def drs_DsBind(drs): | '''make a DsBind call, returning the binding handle''' | bind_info = drsuapi.DsBindInfoCtr() | bind_info.length = 28 |@@ -32,7 +33,8 @@ | bind_info.info.supported_extensions |= drsuapi.DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7 | bind_info.info.supported_extensions |= drsuapi.DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT | (info, handle) = drs.DsBind(misc.GUID(drsuapi.DRSUAPI_DS_BIND_GUID), bind_info) |- return handle |+ |+ return (handle, info.info.supported_extensions) | | | def drs_get_rodc_partial_attribute_set(samdb): |@@ -43,7 +45,7 @@ | attids = [] | | # the exact list of attids we send is quite critical. Note that |- # we do ask for the secret attributes, but set set SPECIAL_SECRET_PROCESSING |+ # we do ask for the secret attributes, but set SPECIAL_SECRET_PROCESSING | # to zero them out | schema_dn = samdb.get_schema_basedn() | res = samdb.search(base=schema_dn, scope=ldb.SCOPE_SUBTREE, |@@ -71,3 +73,4 @@ | partial_attribute_set.attids = attids | partial_attribute_set.num_attids = len(attids) | return partial_attribute_set while the drs_utils code has changed in moving drs_get_rodc_partial_attribute_set() out of the class. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* fix blackbox_supported_features: mkdir -p its directoryDouglas Bagnall2017-02-101-0/+2
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* Switch on the sortedLinks Flag on new databasesAndrew Bartlett2017-02-091-0/+1
| | | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Thu Feb 9 07:07:43 CET 2017 on sn-devel-144
* replmd: check for the sortedLinks feature flagAndrew Bartlett2017-02-093-2/+26
| | | | | | | | If it is there, we assume linked attributes are stored in a sorted order. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* dsdb: Honour @SAMBA_FEATURES_SUPPORTED flag in @IDXATTRAndrew Bartlett2017-02-091-19/+57
| | | | | | | | | | | | This allows us to detect modification by a Samba version prior to the introduction of the compatibleFeatures logic as this flag will be stripped by the schema load code of older Samba versions. Therefore if it is not present, then remove all compatibleFeatures. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* schema: Set flag into @INDEXLIST to indicate we support feature flagsAndrew Bartlett2017-02-093-1/+14
| | | | | | | | | Because @INDEXLIST is rewritten by all Samba versions, we can detect that we have opened the database with an older version that does not support the feature flags by the absense of this in @INDEXLIST Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* samba_dsdb: Use and maintain compatibleFeatures and requiredFeatures in ↵Andrew Bartlett2017-02-094-2/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | @SAMBA_DSDB This will allow us to introduce new database features that are backward compatible from the point of view of older versions of Samba, but which will be damaged by modifying the database with such a version. For example, if linked attributes are stored in sorted order in 4.7, and this change, without any values in current_supportedFeatures is itself included in 4.6, then our sortedLinks are backward compatible to that release. That is with 4.6 (including this patch) which doesn't care about ordering -- but a downgraded 4.7 database used by 4.6 will be broken when later used with 4.7. If we add a 'sortedLinks' feature flag in compatibleFeatures, we can detect that. This will allow us to determine if the database still contains unsorted links, as that information allows us to make the code handling links much more efficient. We won't add the actual flag until all the code is in place. Andrew wrote the actual code and Douglas wrote the tests, and they cross-reviewed. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Piar-programmed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> selftest: check for database features flags
* repl_md: get links in sorted order in replmd_add_fix_laDouglas Bagnall2017-02-091-39/+38
| | | | | | | | | This is where forward links get added when they get added with an object. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* replmd: treat a zero GUID as not present in get_parsed_dnsDouglas Bagnall2017-02-091-1/+2
| | | | | | | | | | | | | | | | This roughly follows the pattern in the 2009 commit 0d5d7f58473c989bff4 by the Andrews Tridgell and Bartlett, which dealt with zero GUIDs in replmd_add_fix_la(). That function is about to use get_parsed_dns() [see next commit], and the other users of get_parsed_dns don't really want to see zero guids, so it is simpler to test here. This makes hitting the GUID_all_zero branch of parsed_dn_find() even more unlikely. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* replmd: keep links sorted in replmd_process_linked_attributeDouglas Bagnall2017-02-091-2/+31
| | | | | | | | This is where linked attributes get added during a replication. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* replmd linked_attributes: maintain sorted links in replaceDouglas Bagnall2017-02-091-102/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use a merge-like algorithm, which gives us a slight algorithmic improvement (O(m + n) vs O(m log(n) + n log(m))) and keeps the results sorted. Here's an example. There are existing links to {A C D* F*} where D* and F* represent deleted links, and we want to replace them with {B C E F}. existing: A C D* E F* | | | replacements: B C E F result: A* B C D* E F This is what happens to each link: A gets deleted to A*. B gets added. C is retained, with possible extended DN changes. D* stays in the list as a deleted link E is retained like C F is undeleted. Backlinks are created in the case of B and F The backlink for A is deleted The backlinks are not changed for C and E or D* (D* has none) Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* replmd linked attributes: use really_parse_trusted_dn everywhereDouglas Bagnall2017-02-091-22/+8
| | | | | | | | | | | This function fills out the DN and GUID fields of an unparsed parsed_dn struct, which was happening in a few other places already. In some places the GUID was not being filled out, which would probably cause problems if the sorted_links switch was turned on. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* replmd: simplify and optimise replmd_modify_la_deleteDouglas Bagnall2017-02-091-124/+129
| | | | | | | | | | | | | With the old binary search, we didn't get a pointer to the found value, just a yes or no answer as to its existence. That meant we ended up searching in both directions to find the links to be deleted. As a consequence we needed to parse out the GUID of every existing link, even if it wasn't being deleted. Here we do it in one pass. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* replmd: rearrange nothing-to-delete logicDouglas Bagnall2017-02-091-7/+6
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* repl_meta_data: linked attributes use DRS sort orderAndrew Bartlett2017-02-091-2/+26
| | | | | | | | | | | | | | Links come over the wire as if sorted by memcmp() on the binary blobs, not as sorted by GUID_compare(). Until a few patches ago, a newly joined DC would have its linked attributes in the memcmp order. This restores that behaviour. This comparison could be made more efficient by storing the GUID in the original state, but it does not seem to be a bottleneck. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* replmd: rework replmd_modify_la_add to merge efficientlyDouglas Bagnall2017-02-091-43/+114
| | | | | | | | | | | | | | | | | Because both the list of added links and the list of existing links are sorted, it is possible to interlace the two and obtain a merged sorted list. We avoid a great amount of talloc_realloc()ing by observing that the merged list can't be longer than the sum of the two lists. In the (common) case where there are many existing links but few being added, we avoid parsing most of the existing link DNs and GUIDs if the sorted_links feature flag is set. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* replmd linked attrs: fully parse dn for upgrade checkAndrew Bartlett2017-02-091-3/+22
| | | | | | | | Elsewhere we use the dsdb_dn pointer as a flag indicating parsed-ness, so we have to be consistent. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* replmd linked attributes: lazy parsing for trusted DNsAndrew Bartlett2017-02-091-2/+75
| | | | | | | | | | | | | If we know that links from the database are in sorted order (via the replmd_private->sorted_links flag), we can avoid actually parsing them until it is absolutely necessary. In many cases we are adding a single link to a long list. The location of the single link is found via a binary search, so we end up parsing log(N) DNs instead of N. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* replmd: Add placeholder sorted_links to struct replmd_privateAndrew Bartlett2017-02-091-0/+1
| | | | | | | | This will be initialised to false (zero) by default and will later come from the compatibleFeatures in @SAMBA_DSDB Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* replmd: replmd_check_upgrade_links() needs to first parses DNsDouglas Bagnall2017-02-091-6/+23
| | | | | | | | Because we now load the dns with get_parsed_dns_trusted we have to manually explode them in the upgrade tests. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* replmd: parsed_dn_find() finds insertion point as well as exact hitDouglas Bagnall2017-02-091-31/+201
| | | | | | | This will allow us to maintain the list of links in sorted order. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* binsearch: make BINARY_ARRAY_SEARCH_GTE compare against a pointerDouglas Bagnall2017-02-091-3/+3
| | | | | | | | | This is in preparation for improvements in our handling of linked attributes where we make changes to the pointer in the process of comparing it (for caching purposes). Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* replmd: fix variable names in replmd_check_upgrade_linksDouglas Bagnall2017-02-091-6/+4
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* replmd: replmd_check_upgrade_links() only checks the first DNDouglas Bagnall2017-02-091-4/+21
| | | | | | | | This assumes the links (on an object in the database) are either all in the old format or all in the new. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* replmd: pass replmd_private down to replmd_add_backlink()Andrew Bartlett2017-02-091-24/+73
| | | | | | | | | This is not much saving, but we are soon going to need replmd_private in the intermediate layers (e.g. replmd_modify_la_add). Pair-programmed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* replmd: Fix some whitespace in repl_meta_data.cDouglas Bagnall2017-02-091-5/+5
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* replmd: check whether list is already sorted in get_parsed_dns()Douglas Bagnall2017-02-091-4/+10
| | | | | | | If they are we can avoid the sort. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: Do not test for link ordering in tombstones_expunge testAndrew Bartlett2017-02-091-15/+0
| | | | | | | | | | | | | | By testing only for the DNs that are returned we do not change the strictness of the test, because it is a test of the match rule which applies to the whole object, not the returned values. However, when this code asserted the returned order of the links, it prevents us from changing this order. This order was not deterministic across DCs but as this test ran against an offline DB, it was able to assume a particular order. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* s4/linked_attribute tests: remove helper function unused parameterDouglas Bagnall2017-02-091-3/+2
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/linked_attribute tests: try adding linked attributes directlyDouglas Bagnall2017-02-091-13/+51
| | | | | | | | Previously we have only added linked attributes using a modify. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/linked_attribute tests: test with the relax controlDouglas Bagnall2017-02-091-6/+75
| | | | | | | | We had a theory this caused problems. It didn't, but the tests are still worthwhile. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/linked_attribute tests: compare link lists in sorted orderDouglas Bagnall2017-02-091-5/+3
| | | | | | | | | | | This isn't functionally different[1] from the previous use of set(), but it makes the error output easier to read. [1] OK, it will also show duplicates, which we really don't expect and would definitely want to see. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/linked_attribute tests: remove unused codeDouglas Bagnall2017-02-091-22/+0
| | | | | | | | We don't test for sort order because we don't depend on it. So this test was never used. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/linked_attribute tests: add multiple links and replace testsDouglas Bagnall2017-02-091-0/+132
| | | | | | | Also a "delete all" test. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4/linked_attributes test: pep8 tidy-up, remove unused importsDouglas Bagnall2017-02-091-10/+7
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* torture/drs: expand test for DRSUAPI_DRS_GET_ANCBob Campbell2017-02-091-22/+301
| | | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Feb 9 03:16:09 CET 2017 on sn-devel-144
* getncchanges: implement DRSUAPI_DRS_GET_ANC more correctlyStefan Metzmacher2017-02-081-36/+265
| | | | | | | | | | | | | | | | | | | | | The most important case is the combination of DRSUAPI_DRS_CRITICAL_ONLY and DRSUAPI_DRS_GET_ANC. With DRSUAPI_DRS_GET_ANC we need to make sure all ancestors included even if they're not marked with isCriticalSystemObject=TRUE. I guess we still don't behave exactly as Windows, but it's much better than before and fixes the initial replication if someone moved the administrator account to an OU. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398 Pair-Programmed-With: Bob Campbell <bobcampbell@catalyst.net.nz> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* getncchanges: calculate getnc_state->min_usn calculation based on the ↵Stefan Metzmacher2017-02-081-0/+23
| | | | | | | | | | | | uptodateness vector This should improve initial replication of a fresh destination dsa with a zero highwatermark. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* getncchanges: improve get_nc_changes_add_links() by checking uSNChangedStefan Metzmacher2017-02-081-1/+5
| | | | | | | | | This will make a difference once we handle DRSUAPI_DRS_GET_ANC correctly. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* getncchanges: improve get_nc_changes_build_object() by checking uSNChangedStefan Metzmacher2017-02-081-0/+7
| | | | | | | | | This will make a difference once we handle DRSUAPI_DRS_GET_ANC correctly. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* getncchanges: fix highest_usn off by one calculation in ↵Stefan Metzmacher2017-02-081-1/+1
| | | | | | | | | | | get_nc_changes_add_links() highest_usn is the the highest usn the destination dsa already knows about. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* getncchanges: remove unused c++ comments/code in getncchanges_collect_objects()Stefan Metzmacher2017-02-081-5/+0
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* getncchanges: do not replicate links for non critical objects if ↵Garming Sam2017-02-081-1/+13
| | | | | | | | | | | | | DRSUAPI_DRS_CRITICAL_ONLY is set BUG: https://bugzilla.samba.org/show_bug.cgi?id=12398 Pair-programmed-with: Bob Campbell <bobcampbell@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Bob Campbell <bobcampbell@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>