summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
AgeCommit message (Collapse)AuthorFilesLines
2013-09-19dsdb-repl_meta_data: Make handling of Deleted Objects DN clearer in deleteAndrew Bartlett1-5/+10
This code no longer needs to handle not renaming Deleted Objects during a re-delete, because it is no longer called in that case. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-19dsdb-repl_meta_data: Do not re-delete the Deleted Objects DN during replicationAndrew Bartlett1-3/+5
We need to ensure we do not re-delete the Deleted Objects DN during replication. It itself not entirely a deleted object, but has isDeleted set. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-19dsdb-repl_meta_data: Check for a NULL invocationID and do not proceedAndrew Bartlett1-0/+4
This can happen if we do not find the invocationID, with later patches. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-07-30dsdb: Include MS-ADTS doc references on deleted object contstraintsAndrew Bartlett1-0/+16
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-07-30dsdb: Improve DRS deleted link source/target handing in repl_meta_dataAndrew Bartlett1-8/+97
We now correctly ignore the link updates if the source or target is deleted locally. This fixes the long-standing failure in the vampire_dc dbcheck test. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2013-07-30dsdb: Ensure we always force deleted objects back under the deleted objects DNAndrew Bartlett1-26/+65
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-07-30dsdb/repl_meta_data: split out replmd_deletion_state()Stefan Metzmacher1-31/+71
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-07-30dsdb: Prune deleted objects of links and extra attributes of replicated deletesAndrew Bartlett1-71/+199
When an object is deleted, the links to be removed are not propogated, you have to watch out for them manually! We do this by calling back into the originating update delete code (ie what is called if you ldb_delete() locally) so that any extra attribute found locally and not on the remote server becomes removed remotely too. We currently do the same with links, but that isn't strictly correct, but for now our getNCChanges server code filters these out, so only the usn is bumped. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-06-13dsdb repl_meta_data: Use dsdb_request_add_controls()Andrew Bartlett1-18/+1
This makes the code easier to read. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Jun 13 11:15:01 CEST 2013 on sn-devel-104
2013-06-12dsdb: Fix behaviour for when to update the USN when there is no changeAndrew Bartlett1-6/+28
This handles deletions and replacements with no value, or with an exactly specified value, as well as modifies. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
2013-06-11Revert "s4-dsdb: Remove strcasecmp() fallback in ↵Andrew Bartlett1-0/+7
replmd_ldb_message_element_attid_sort" This reverts commit d799b25dd3ed0f72ee03949225ba241c5538d7d6. Sometimes the schema just isn't right. A segfault is not the correct answer in those cases. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-05-28dsdb-repl_meta_data: Move TODO comment about conflicts and missing parentsAndrew Bartlett1-9/+4
Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue May 28 18:11:00 CEST 2013 on sn-devel-104
2013-05-28dsdb-repl_meta_data: Handle renames better, considering only the RDN as ↵Andrew Bartlett1-76/+141
given, and then the parent as given This ignores the full DN as given, because the parent compents might be out of date. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-08replmetadata: raise msg level for conflict resolution so that we don't ↵Matthieu Patou1-2/+2
polute logs Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-01s4:dsdb/repl_meta_data: don't merge highwatermark and uptodatevector (bug #9508)Stefan Metzmacher1-38/+1
We should not do any magic regarding the highwatermark we got from the source dsa. We need to treat it as opaque and not try to be smart and merge it into the uptodatevector. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-01s4:dsdb/repl_meta_data: also update the last_sync_success in replUpToDateVectorStefan Metzmacher1-5/+1
This matches Windows 2008R2 and Windows 2012. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-01s4:dsdb/repl_meta_data: store the last results and timestamps in the repsFromStefan Metzmacher1-0/+3
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-01s4:dsdb/repl_meta_data: always treat the highwatermark as opaque (bug #9508)Stefan Metzmacher1-1/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2012-11-30s4:dsdb/repl_meta_data: call dsdb_module_schedule_sd_propagation() for ↵Stefan Metzmacher1-2/+70
replicated changes We only do so if the replicated object is not deleted. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2012-11-30s4:dsdb/repl_meta_data: allow DSDB_CONTROL_SEC_DESC_PROPAGATION_OID on modifyStefan Metzmacher1-0/+16
The propagation of nTSecurityDescriptor doesn't change the replProperyMetaData. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2012-08-09s4-dsdb: Remove strcasecmp() fallback in replmd_ldb_message_element_attid_sortAndrew Bartlett1-7/+0
In all callers, we must already have a attributeID for each of the values or else we would have already given an error, or could not have obtained the message over DRS. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Aug 9 11:39:54 CEST 2012 on sn-devel-104
2012-07-31s4-dsdb: Replace any existing lastKnownParent attribute during deleteAndrew Bartlett1-1/+1
This allows a lastKnownParent from LostAndFound to be replaced. Andrew Bartlett
2012-07-31s4-dsdb: Improve tracing in repl_meta_dataAndrew Bartlett1-7/+8
When we call ldb_module_done() rather than just calling the callback, we make log entries that are critical in debugging. Andrew Bartlett
2012-07-31s4-dsdb: Handle rename conflicts in both directionsAndrew Bartlett1-49/+87
Previously we would only consider renaming the local object, now we can cope with renaming the remote object as well. This should avoid most of the cases where Samba AD replication can just stop. Andrew Bartlett
2012-07-31s4-dsdb: Request extended DN and show deleted when searching for a possible ↵Andrew Bartlett1-2/+4
parent This fixes up the lastKnownParent attribute on lostAndFound objects to have a GUID (found by dbcheck). Andrew Bartlett
2012-07-29s4-dsdb: Fill in lastKnownParent when moving to lostAndFoundAndrew Bartlett1-0/+43
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Sun Jul 29 16:51:34 CEST 2012 on sn-devel-104
2012-07-29s4-dsdb: Do not strip base components off DN before searching for NC rootAndrew Bartlett1-7/+10
2012-07-29s4-dsdb: Change move to lostAndFound to use container in this partiion and ↵Andrew Bartlett1-2/+31
add debugging The logic looking for LostAndFound failed for a user, so add extensive debugging to make this eaiser to trace down in future. Andrew Bartlett
2012-07-29s4-dsdb: Provide a way to force incoming renames to take priorityAndrew Bartlett1-2/+4
This should mean that a samba-tool drs replicate --full-sync forces a replication of all objects, regardless of if we think the local name is newer and regards any local name as being in conflict. Andrew Bartlett
2012-07-29s4-dsdb: Provide a way to handle conflicts due to renameAndrew Bartlett1-25/+102
This allows us to proceed with replication when the source DC is sending us an object which has a matching object in this NC (by name) but not by GUID. Andrew Bartlett
2012-07-18dsdb: Allocate new OID to allow updates of a read-only replicaAndrew Bartlett1-1/+2
Normally this would be a very bad idea, but the specific case of fixing the instanceType is the only case where this makes sense. Andrew Bartlett
2012-07-06s4-dsdb: Use parent_object_guid to find the correct parent for new objectsAndrew Bartlett1-1/+117
This allows the parent to be renmaed while a new object is added on another replica. This rename may also be a delete, in which case we must move it to lostandfound. Andrew Bartlett
2012-06-22s4-dsdb: Try to avoid much of the time a db search for msDS-IntIDMatthieu Patou1-0/+17
We search in the schema if we have already this intid (using dsdb_attribute_by_attributeID_id because in the range 0x80000000 0xBFFFFFFFF, attributeID is a DSDB_ATTID_TYPE_INTID). If so generate another random value. If not check if the highest USN in the database for the schema partition is the one that we know. If so it means that's only this ldb context that is touching the schema in the database. If not it means that's someone else has modified the database while we are doing our changes too (this case should be very bery rare) in order to be sure do the search in the database.
2012-06-22s4-dsdb: fix a warning about unused variableMatthieu Patou1-3/+0
2012-01-05s4:repl_meta_data LDB module - set "isRecycled" time correctlyMatthias Dieter Wallnöfer1-9/+8
"unix_to_nt_time()" which is based on "time_t" behaves differently for literals > 32 bit on 32 and 64 bit platforms. Reviewed-by: ekacnet Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Thu Jan 5 11:59:20 CET 2012 on sn-devel-104
2011-12-23s4-ldb: Add isRecycled when is defined in the schemaMatthieu Patou1-3/+9
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-11-19s4-dsdb: Modify the repl_meta_data behavior to allow Metadata change on ↵Matthieu Patou1-2/+8
attribute interSiteTopologyGenerator even if the value didn't change Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Sat Nov 19 16:47:53 CET 2011 on sn-devel-104
2011-11-13s4-dsdb: initialize correctly the value of originating_change_time for the ↵Matthieu Patou1-2/+52
Deleted Object Container
2011-10-27s4:repl_meta_data LDB module - don't intercept the partition LDB module ↵Matthias Dieter Wallnöfer1-17/+18
referrals Reviewed-by: abartlet
2011-10-27s4:repl_meta_data LDB module - rename operation - do not overwrite error ↵Matthias Dieter Wallnöfer1-3/+1
messages "ldb_error" could overwrite possibly useful error messages. Reviewed-by: abartlet
2011-10-27s4:repl_meta_data LDB module - remove pointless debug messagesMatthias Dieter Wallnöfer1-4/+0
These are displayed when an object just doesn't exist! Reviewed-by: abartlet
2011-10-27s4:repl_meta_data LDB module - always return the original LDB result codes ↵Matthias Dieter Wallnöfer1-5/+12
on failure And add "ldb_operr()" before the "return ret" to point out the position where it failed (for "add_time_element" and "add_uint64_element") Reworked after a suggestion by abartlet.
2011-10-27s4:repl_meta_data LDB module - "dsdb_search_module_dn" already checks if ↵Matthias Dieter Wallnöfer1-4/+4
len(res) == 1 No need to perform an additional check here. As a return value we should always give back the original error code and not generate a new one (to let the caller know what is going on). Reviewed-by: abartlet
2011-10-20dsdb: improve debug messageAndrew Tridgell1-1/+1
show the reply type in "Invalid reply type" messages Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Oct 20 00:57:05 CEST 2011 on sn-devel-104
2011-10-06s4-dsdb: allow deletion of backlinks if DSDB_CONTROL_DBCHECK givenAndrew Tridgell1-0/+3
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-10-06s4-dsdb: Do not assume that all deleted objects have an objectCategory and ↵Andrew Bartlett1-2/+2
sAMAccountType Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Thu Oct 6 03:43:13 CEST 2011 on sn-devel-104
2011-10-06dsdb: Do not attempt to resolve conflicts on an RODCAndrew Bartlett1-2/+26
2011-10-06dsdb: fix double-free in replication failure case on RODCAndrew Bartlett1-1/+1
2011-10-04s4-dsdb: add the DSDB_CONTROL_PARTIAL_REPLICA when neededAndrew Tridgell1-0/+9
when we are adding an object via DRS, we need to add the DSDB_CONTROL_PARTIAL_REPLICA control if we are replicating a partial replica, so ensure the partition module creates new NCs as partial replicas
2011-10-04s4-dsdb: fixed formatting of a debug messageAndrew Tridgell1-1/+1
another missing newline