summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/linked_attributes.c
AgeCommit message (Collapse)AuthorFilesLines
2013-07-25dsdb/samdb: use RECYCLED it implies DELETED...Stefan Metzmacher1-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2013-05-28dsdb-linked_attributes: Do not crash if the target GUID can not be foundAndrew Bartlett1-0/+15
Note that we must not give an error when we cannot find the object that should hold the backlink, there really isn't anything we can do in this case. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-04-19s4:dsdb: Fix warnings about not set / set but unused / shadowed variablesMatthieu Patou1-3/+3
Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Apr 19 13:15:40 CEST 2013 on sn-devel-104
2013-01-12dsdb: Make linked_attributes module GUID based for renamesAndrew Bartlett1-13/+64
This ensures that when we have the backlink out of sync with the forward link (perhaps due to another operation that has put the backlink handling in an end-of-transaction TODO list in repl_meta_data) that we do not error out, we just cope as well as we can. The GUID is the unique identifier, not the DN. Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Jan 12 12:52:28 CET 2013 on sn-devel-104
2012-06-22s4-dsdb-linkedattributes: register the VERIFY_NAME control, handle it when ↵Matthieu Patou1-10/+97
we are a GC In theory when presented this control and not a GC we should use the specified name as the DC to contact for cross-domain link verification. But for the moment we don't support this so we just fail when we have this control and are not a GC.
2011-08-18s4-dsdb: fixed deletion of backlinks for fl2000 DCsAndrew Tridgell1-18/+13
when in FL 2000 we were not correctly deleting backlinks as we uses dsdb_find_dn_by_guid() which doesn't find deleted objects. Modules should use dsdb_module_dn_by_guid() which prevents going to the top level, and finds deleted objects Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21update/add my copyrightMatthieu Patou1-0/+1
2011-03-31s4-dsdb: cope with failed searches in the linked attributes callbackAndrew Tridgell1-16/+15
This fixes a bug where we try to add an empty backlink because the search for the forward link failed. Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Mar 31 13:37:36 CEST 2011 on sn-devel-104
2011-03-02s4-dsdb: Ensure we permit multi-valued backlinks on single-valued attributesAndrew Bartlett1-0/+7
This was already done in repl_meta_data, but it needs to be done here as well to cope with Windows 2000 level links. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Mar 2 02:03:58 CET 2011 on sn-devel-104
2011-01-17s4-dsdb: pass parent request to dsdb_module_*() functions Andrew Tridgell1-6/+7
this preserves the request hierarchy for dsdb_module_*() calls inside dsdb ldb modules Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-12-06s4-linked_attributes: Give more info where an error occuredKamen Mazdrashki1-3/+8
We have exact same error messages at different locations and it is little bit hard to tell where the error came from from the log.
2010-11-04s4-dsdb: use LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECK in dsdbAndrew Tridgell1-1/+5
when we are creating linked attributes with multiple values (some deleted), use LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECK to disable that checking.
2010-11-01s4-ldb: enable version checking in dsdb ldb modulesAndrew Tridgell1-0/+1
2010-11-01s4-dsdb: convert the rest of the ldb modules to the new module typeAndrew Tridgell1-1/+6
2010-10-03s4:dsdb - substitute the "show_deleted" with the "show_recycled" controlMatthias Dieter Wallnöfer1-2/+2
We intend to see always all objects with the "show_deleted" control specified. To see also recycled objects (beginning with 2008_R2 function level) we need to use the new "show_recycled" control. As far as I see this is only internal code and therefore we don't run into problems if we do substitute it. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-09-25ldb: mark the location of a lot more ldb requestsAndrew Tridgell1-0/+4
2010-07-08s4-source4/dsdb/samdb/ldb_modules/linked_attributes.c Use ↵Kamen Mazdrashki1-1/+4
DSDB_FLAG_NEXT_MODULE flag
2010-07-07s4-dsdb: use ldb_operr() in the dsdb codeAndrew Tridgell1-21/+13
this replaces "return LDB_ERR_OPERATIONS_ERROR" with "return ldb_operr(ldb)" in places in the dsdb code where we don't already explicitly set an error string. This should make is much easier to track down dsdb module bugs that result in an operations error.
2010-07-02s4-dsdb/samdb/ldb_modules/linked_attributes.c: make use of ↵Kamen Mazdrashki1-2/+2
DSDB_FLAG_NEXT_MODULE flag Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-06-16s4:linked attributes LDB module - strip trailing whitespacesMatthias Dieter Wallnöfer1-35/+35
2010-06-16s4:linked_attributes LDB module - cosmeticsMatthias Dieter Wallnöfer1-12/+10
- unsigned counters for LDB objects - we tend to have the "ret" variable always as the last declaration to see which type of error a function returns
2010-06-16s4:dsdb Allow renames with (now removed) linked attributesAndrew Bartlett1-3/+11
It is important to allow the rename, even if we just have one-way links, as this happens on deleted objects, which have the backlinks alredy removed by repl_meta_data. Andrew Bartlett
2010-06-16s4:dsdb Fix linked_attributes to cope with the Feb 2010 changes to DLISTAndrew Bartlett1-2/+6
The DLIST macros changed in behaviour in Feb 2010, and walking the lists backwards is no longer safe if you don't use the macros. Andrew Bartlett
2010-06-16s4:dsdb Assert that we can't get backlinks as input in linked_attributesAndrew Bartlett1-2/+15
The objectclass_attr module should prevent users creating such links, and the mrepl_meta_data module should only create them in functional level 2003 or above. Andrew Bartlett
2010-06-16s4:dsdb use dsdb_module_modify() rather than ldb_next_request()Andrew Bartlett1-22/+2
This does exactly the same thing, but with less code. Andrew Bartlett
2010-06-16s4:dsdb Handle backlinks for Windows 2000 level linked attributesAndrew Bartlett1-1/+892
This revives the code from 5964acfa741d691c0196f91c0796122ec025f177, before tridge and I simplified this too much, and removed the Windows 2000 functional level linked attribute support. By telling the linked_attributes module that repl_meta_data has handled the links, we avoid a conflict for the new style (functional level 2003 and above) linked attributes. However, we still need backlinks for 2000 style linked attributes, so this allows that code in the linked_attributes module to be revived to handle those. Andrew Bartlett
2010-06-15dsdb: Fix includes when building against system ldb.Jelmer Vernooij1-1/+1
2010-03-16s4:dsdb - fix up warningsMatthias Dieter Wallnöfer1-1/+1
2010-03-16s4:dsdb Change dsdb_get_schema() callers to use new talloc argumentAndrew Bartlett1-1/+8
This choses an appropriate talloc context to attach the schema too, long enough lived to ensure it does not go away before the operation compleates. Andrew Bartlett
2010-03-07s4:linked_attributes LDB module - change counter variables to "unsigned" ↵Matthias Dieter Wallnöfer1-3/+5
where appropriate
2010-01-02s4-dsdb: move checking for single valued links to samba modulesAndrew Tridgell1-1/+7
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: add REVEAL_INTERNALS in the search for linked_attributesAndrew Tridgell1-1/+2
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02s4-dsdb: simplify the linked_attributes moduleAndrew Tridgell1-853/+96
The linked_attributes module only has to deal with renames now, as other linked attribute updates happen in repl_meta_data. This allows it to be much simpler. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02s4-dsdb: remove linked_attributes_addAndrew Tridgell1-86/+0
This is now handled in the repl_meta_data module
2010-01-02s4-dsdb: the linked_attributes module no longer handles deletesAndrew Tridgell1-53/+0
delete handling is now moved into repl_meta_data Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02s4-dsdb: linked_attributes_modify no longer handles modifiesAndrew Tridgell1-183/+0
This functionality has moved into repl_meta_data
2009-12-10s4-dsdb: simplify linked attributes code using GUID functionsAndrew Tridgell1-18/+16
2009-11-27s4:dsdb Don't segfault with ldb_transaction_prepare_commit() without begin()Andrew Bartlett1-0/+4
It is up to other modules to complain if ldb_transaction_prepare_commit() is called before ldb_transaction_begin_transaction() Andrew Bartlett
2009-09-28s4-dsdb: removed extraneous debug messagesAndrew Tridgell1-4/+0
2009-09-28s4-samdb: free the linked_attributes list on prepare commit failureAndrew Tridgell1-0/+6
2009-09-06s4:"linked attributes" modules - correct the commentsMatthias Dieter Wallnöfer1-2/+2
2009-09-03another large change to the linked_attribute moduleAndrew Tridgell1-20/+64
This one copes with deleted objects where linked attributes have been set on the module. We hit this when we do the ldb wipe at the start of a provision, which trigers linked attribute updates, but for objects that have disappeared. We need to ensure that the linked attribute updates only happen on the right object, and if the object gets re-created (as happens with a provision) then it is not the right object. To cope with this we record the GUID of the object when the operation that triggered the linked attribute update comes in, and then find the DN by suing that GUID when we apply the change in the prepare commit hook.
2009-09-03fixed transaction handling in linked_attributes moduleAndrew Tridgell1-76/+4
We need to call down to the next transaction function when we finish in linked_attributes. This also changes linked_attributes to use the common dsdb_find_dn_by_guid() function
2009-09-02traverse the ac list in reverse orderAndrew Tridgell1-1/+6
items are added to the linked attribute list using DLIST_ADD(), which means to commit them to the database in the same order they came from the server we need to walk the list backwards when we traverse it
2009-09-02s4:dsdb rewrite the linked_atrributes code to commit in the end_transaction hookAndrew Tridgell1-107/+281
linked attribute changes can come in any order. This means it is possible for a forward link to come over the wire in DRS before the target even exists. To make this work this patch changed the linked attributes module to gather up all the changes it needs to make in a linked list, then execute the changes in the end_transaction hook for the module. During that commit phase we also fix up all the DNs that we got by searching for their GUID, as the objects may have moved after the linked attribute was sent, but before the end of the transaction
2009-09-02fixed spellingAndrew Tridgell1-1/+1
2009-07-19[SAMBA 4] Some cosmetic changes for the LDB modulesMatthias Dieter Wallnöfer1-6/+5
Some corrections which make the code a bit more readable (no functional changes here)
2009-02-23Fix headers, ldb_includes.h is a private header,Simo Sorce1-0/+1
do not reference it from ldb.h
2009-01-30Fix all other modules to use ldb_module.h instead of ldb_private.hSimo Sorce1-36/+66
The only 2 modules escaping the rule so far are rootdse and partitions
2008-12-17s4:dsdb: Make the linked_attributes module set an extended dnAndrew Bartlett1-192/+325
This means that linked attributes will always have the same case form as the actaul entry, as we search for that entry. We then also use the GUID and SID found on that entry to fill in the extended DN on disk. Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>