summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
AgeCommit message (Collapse)AuthorFilesLines
2010-01-02s4-drs: cope better with NULL GUIDS from DRSAndrew Tridgell1-11/+25
It is valid to get a NULL GUID over DRS for a deleted forward link. We need to match by DN if possible when seeing if we should update an existing link. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02s4-drs: give an error message in repl_meta_data if we don't get a partition ↵Andrew Tridgell1-0/+1
control
2010-01-02s4-drs: treat a zero GUID as not present in replmd_add_fix_laAndrew Tridgell1-3/+6
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02s4-dsdb: use a common method for finding a link pairAndrew Tridgell1-1/+1
Use ^1 everywhere, to ensure it works for both forward and backward links
2010-01-02s4-dsdb: fill in the correct version number of links that come over DRSAndrew Tridgell1-26/+27
2010-01-02s4-dsdb: move checking for single valued links to samba modulesAndrew Tridgell1-2/+8
This uses the RELAX control and checking of single valued attributes in ldb modules to avoid problems with multi-valued links where all values but one are deleted
2010-01-02s4-dsdb: auto-upgrade w2k formatted linked attributes when modifiedAndrew Tridgell1-0/+63
When any value of a w2k formatted linked attribute is modified, upgrade the links.
2010-01-02s4-dsdb: minor cleanup in DRS replicated objects codeAndrew Tridgell1-5/+6
2010-01-02s4-dsdb: store full meta data from DRS for linked attributesAndrew Tridgell1-150/+239
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02s4-dsdb: split RMD_USN into RMD_LOCAL_USN and RMD_ORIGINATING_USNAndrew Tridgell1-8/+14
We need a separate RMD_LOCAL_USN to allow us to tell what attributes need to be sent in a getncchanges request. Thanks to Metze for pointing this out. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02s4-dsdb: handle links with no backlinks in replmd_deleteAndrew Tridgell1-4/+3
2010-01-02s4-dsdb: do the rename after the modify in replmd_deleteAndrew Tridgell1-12/+13
This makes updating the links a bit easier
2010-01-02s4-dsdb: some backlinks can be processed immediatelyAndrew Tridgell1-77/+84
backlinks in add and delete operations can be processed immediately, rather than at the end of a transaction. This can save on backlink list processing time.
2010-01-02s4-dsdb: add linked attributes meta_data handling to replmd_addAndrew Tridgell1-24/+86
This also handles the backlink creation that was previously in the linked_attributes module Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02s4-dsdb: added replmd_delete, based on Eduardos workAndrew Tridgell1-0/+295
This implements repmld_delete(), which handles the meta_data updates for an object when deleting. A delete gets mapped to a combination of a rename followed by a modify request, which has the effect of moving the object into the Deleted Objects container. This is based on the code from Eduardo Lima <eduardoll@gmail.com>. Eduardo's code was modified to take account of the linked attributes changes that Andrew and I have been working on. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02s4-dsdb: add a comment on the use of ldb_rename()Andrew Tridgell1-0/+3
We need to use ldb_rename() and not dsdb_module_rename() here as we need the rename to be processed by the current module
2010-01-02s4-dsdb: added support for backlinks in repl_meta_dataAndrew Tridgell1-20/+224
backlinks need more careful handling now that we store the additional meta data for deleted links. It is easier to handle this in repl_meta_data than in linked_attributes. Eventually linked_attributes will disappear, with the functionality moved into repl_meta_data. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02s4-dsdb: implemeneted replmd_modify_la_replace()Andrew Tridgell1-18/+152
We now have the core code for handling storage of linked attribute meta-data with local modifies Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02s4-dsdb: add support for storing linked attribute meta data in extended DNsAndrew Tridgell1-19/+566
When in functional levels above w2k, we need to store much richer meta data about linkked attributes. We also need to keep deleted linked attributes around to allow the deletion to be propogated to other DCs. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-21s4-drs: another two unsigned comparison bugsAndrew Tridgell1-3/+5
2009-12-16s4-dsdb: also mark the relax control non-critical when doneAndrew Tridgell1-5/+3
2009-12-09s4-dsdb: use dsdb_module_search_dn in repl_meta_dataAndrew Tridgell1-1/+4
This allows us to search below the current module. That will be important when we start using the results of this search to get the linked attributes meta data right
2009-12-03s4-drs: fixed updating of uSNChanged in replmd_modifyAndrew Tridgell1-3/+2
Updating of uSNChanged broke in a recent change
2009-11-30s4-drs: Using dsdb_msg_add_guid() utility functionFernando J V da Silva1-11/+1
Uses the dsdb_msg_add_guid() to add any kind of GUID attribute to a ldb_message in several places of samba4 code. Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-20s4-dsdb: make sure mod_usn list is zeroed on each transactionAndrew Tridgell1-7/+10
2009-11-12s4:repl_meta_data Parse linked attributes with schema syntaxesAndrew Bartlett1-39/+44
The bug here was that by assuming all linked attributes were 'normal DNs', we would miss the binary portion of DN+Binary. This patch then has us reparse the string to determine it's GUID, for the GUID lookup, but maintains the binary porition into the on-disk format. Andrew Bartlett
2009-10-21s4:dsdb Remove potentially confusing 'partition' control from resultAndrew Bartlett1-3/+15
This ensures that the partition control, needed here for repl_meta_data's internal work, is not pushed up to other callers. Andrew Bartlett
2009-10-21s4:dsdb Remove default instanceType from repl_meta_dataAndrew Bartlett1-9/+0
This is no longer required, as the instancetype module is now above repl_meta_data. Andrew Bartlett
2009-10-21s4:dsdb Use 'partition modified' information to update @REPLCHANGEDAndrew Bartlett1-356/+189
This major rework of repl_meta_data changes it from using a static list of partitions to a dynamic list created from the controls placed on returned ldb results. To process these in one place, the similar but distinct callbacks are combined into a single replmd_op_callback(), which handles both the 'normal operation' and 'inbound replication' case. This allows new partitions to be created, and replication events for these new partitions to be scheduled immediately. Also in this commit: We no longer specify the target partition for new or modified objects - instead we allow the partitions module to use the DN as normal. THis avoids the issue where we would create two partition head records. Andrew Bartlett
2009-10-21s4:repl Pass schema as argument to replmd_update_rpmd()Andrew Bartlett1-6/+5
2009-10-21s4:dsdb Set 'notification' after the success of a change.Andrew Bartlett1-18/+14
This allows the partition to be created before we try and set a notification on it. (perhaps extra work required here for partition heads). Andrew Bartlett
2009-10-03s4:dsdb Don't allow creation of systemOnly objectclassesMatthias Dieter Wallnöfer1-4/+4
(except as part of the provision, which specifies the 'relax' control) Andrew Bartlett
2009-10-02s4:repl_meta_data - variousMatthias Dieter Wallnöfer1-9/+38
- Add more "talloc_free"s and right error values where needed - Add a pre-lookup for entries before searching for metadata attribute (also suggested by TODO list) - Now the most part of "ldap.py" works again
2009-10-02s4:dsdb Pass down the exact error code on failure in repl_meta_dataAndrew Bartlett1-5/+5
2009-10-02s4-ldb: Use relax control to check in replace metadata module if we accept ↵Matthieu Patou1-5/+38
request that specify objectGUID attribute.
2009-09-28s4-dsdb: update replPropertyMetaData on linked attribute source attributesAndrew Tridgell1-0/+23
2009-09-28s4-repl: free the la list on prepare commit failureAndrew Tridgell1-0/+3
2009-09-28s4-repl: use GUID to resolve target in linked attributesAndrew Tridgell1-8/+7
When we vampire from w2k8-r2, the DC sends us a linked attribute for our machine account which has a target DN with a GUID of the OU=Domain Controllers objects, but has a DN of CN=Computers. We need to use the GUID to resolve the real DN.
2009-09-28s4-drs: fixed sorting of replPropertyMetaDataAndrew Tridgell1-31/+44
This also ensures we add the SHOW_DELETED control on searches for old replPropertyMetaData attributes
2009-09-24s4-drs: add defines for replication flags on attributesAndrew Tridgell1-5/+2
2009-09-24s4-ldb: sort replPropertyMetaData by attidAndrew Tridgell1-1/+16
We need to sort on both module add and modify
2009-09-24s4-ldb: add instanceType in repl_meta_data moduleAndrew Tridgell1-0/+8
We need to add instanceType on new records if not added by caller. This is needed in repl_meta_data to ensure we fill in the meta data for replication
2009-09-23s4-drs: ignore zero value elements in DRS add operationsAndrew Tridgell1-0/+13
w2k8 sometimes sends us a new object via DRS with an attribute with no values
2009-09-22s4-ldb: added a bunch more debug for DC joinAndrew Tridgell1-0/+3
These additional debug messages were added to help us track down w2k8->s4 domain join
2009-09-19Move replmd_drsuapi_DsReplicaCursor2_compare to a common place.Anatoliy Atanasov1-7/+1
2009-09-18s4-drs: cope with dupliate linked attributesAndrew Tridgell1-1/+41
With a w2k8-R2 DC, we sometimes get linked attribute updates via DRS which are duplicates of entries that we already have. We need to cope with this by using a remove/add pair in the ldb_modify() to avoid a "entry already exists" error
2009-09-15s4-repl: make sure we marshal the replPropertyMetaData after the last changeAndrew Tridgell1-10/+10
we were setting local_usn after the marshall, so it wasn't going into the object
2009-09-14s4-repl: handle rename in repl_meta_dataAndrew Tridgell1-0/+97
On a rename we need to update uSNChanged, and the max uSN for the partition
2009-09-14s4-repl: fixed a memory error handling linked attributesAndrew Tridgell1-10/+10
We could get a double free with multiple linked attributes in a message
2009-09-13s4-repl: use the new dsdb partition uSN helper fnsAndrew Tridgell1-78/+16