summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
AgeCommit message (Collapse)AuthorFilesLines
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
2011-10-04s4-dsdb: implement DSDB_REPL_FLAG_PRIORITISE_INCOMINGAndrew Tridgell1-4/+22
With this set, we accept changes even if they have the same tuple as the local copy. This can be used by a FULL_SYNC replication to recover a replica that is corrupt
2011-10-04s4-dsdb: disallow changes based on instanceTypeAndrew Tridgell1-4/+13
if instanceType does not include INSTANCE_TYPE_WRITE, then disallow changes to any replicated attributes. This ensures partial replicates are not alterered
2011-09-19s4-drs: cope with REPL_OBJ getncchanges call for new objectAndrew Tridgell1-5/+10
when we do a subdomain join we create a new object using a REPL_OBJ getncchanges call for the partitions DN. This has a side effect of creating that object. We need to skip the UDV update in that case Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-18s4-dsdb: added comments and fixed backlink check in repl_meta_dataAndrew Tridgell1-2/+17
added comments explaining the backlink deletion code, plus fix a use of a bitwise operation in a boolean expression, and avoid calling dsdb_functional_level() inside a loop Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-10s4-dsdb: avoid printing a pointless debug lineMatthieu Patou1-1/+1
2011-07-13s4-dsdb: another special case for the "member" attributeAndrew Tridgell1-1/+6
thanks to Matthias for his great test suite work! Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-13s4-dsdb: raise debug level for backlink errorsAndrew Tridgell1-1/+1
when dbcheck is fixing missing backlinks we don't want a DEBUG 0 message Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-13s4-dsdb: moved checking of duplicate member entries to repl_meta_data.cAndrew Tridgell1-3/+17
the samldb checks failed to account for the possibility of a member being removed and added in the same modify operation. This happens (for example) when dbcheck is fixing a SID in a DN. The repl_meta_data.c code already has this check, it just wasn't giving the right specialised error code for the 'member' attribute Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-11s4-dsdb: if the provision control is specified, update replication metadata ↵Matthieu Patou1-1/+7
even if the data hasn't change Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11s4-dsdb: when replacing linked attribute take always the new dn as the old ↵Matthieu Patou1-1/+1
dn might be broken The usual use case is that you have a not complete linked attribute (ie. without the SID) if we keep using the old dn, then the SID will never be added. Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-11s4-dsdb: check for single valued attribute in repl_meta_data moduleMatthieu Patou1-0/+11
This is needed because we can have more than 1 value in a single valued attribute as we store also deleted values. So we do the check in repl_meta_data and then indicate LDB to do the check. Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-05s4-dsdb: allow removal of unknown attributes if RELAX setAndrew Tridgell1-2/+9
this allows attributes not known in the schema to be removed if the caller has set the RELAX control. This will be used by dbcheck to allow cleaning of bad attributes from the database
2011-06-10s4-drs: ensure we add a RMD_ADDTIME when upgrading a linked attributeAndrew Tridgell1-1/+2
if the link was a w2k style, and we are upgrading it, then set the RMD_ADDTIME to the current time