summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb/ldb_tdb.c
AgeCommit message (Collapse)AuthorFilesLines
2010-06-07s4:objectclass_attrs LDB module - move the single-valued attribute check ↵Matthias Dieter Wallnöfer1-44/+0
into this module It seems to me more consistent (and also to keep the same behaviour on all backends). Also the DRS hack should therefore not be needed anymore since the "repl_meta_data" module launches requests behind "objectclass_attrs".
2010-06-07s4:rdn_name LDB module - move the "distinguishedName" write prevent check hereMatthias Dieter Wallnöfer1-7/+0
In my eyes it fits better here than in the TDB backend code.
2010-05-30ldb:ldb_tdb/ldb_tdb.c - quiet a warning regarding TDB -> LDB error code ↵Matthias Dieter Wallnöfer1-0/+2
conversions
2010-04-18ldb: mark the tdb backend in ldb as _PRIVATE_Andrew Tridgell1-1/+1
2010-03-08LDB:TDB backend - change counter variables to "unsigned" where appropriateMatthias Dieter Wallnöfer1-2/+3
2010-02-22LDB related spelling fixes.Brad Hards1-1/+1
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-01-31s4:ldb quiet down rootdse control registrationSimo Sorce1-1/+1
2010-01-30s4:ldb Fix check made conditional by mistakeSimo Sorce1-7/+11
2010-01-30s4:ldb add support for permissive modify controlSimo Sorce1-24/+96
2010-01-08s4-ldb: improve error handling in indexing codeAndrew Tridgell1-1/+2
When we get an indexing failure we want a clear error message
2010-01-02s4-ldb: use the RELAX control to disable single value checking on replaceAndrew Tridgell1-3/+14
When using w2k3 linked attributes we are allowed to have multiple values on a single valued attribute. This happens when the other values are deleted. Setting the RELAX control tell the ldb-tdb backend to not check for this on replace, which means the caller has to check for single valued violations.
2009-12-16s4-ldb: show the OID of any unhandled critical controlsAndrew Tridgell1-4/+9
It isn't very useful just saying that a control is not supported, without saying which one is the problem Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-12-09s4-ldb: fixed nested searches inside ldb modulesAndrew Tridgell1-4/+11
We need to keep a search count in ltdb to allow for nesting of searches inside a module Signed-off-by: Andrew Tridgell <tridge@samba.org>
2009-11-20ldb:ldb_tdb backend/indexes - Outside APIMatthias Dieter Wallnöfer1-8/+2
- The outside API contains "DN" string arguments: Bad. Since in this way we fully rely on the outside calls regarding the right DN format. Solution: Use always a "struct ldb_dn" entry. Since this one is interchangeable and we can handle it in our preferred way.
2009-11-20s4-ldb: fixed an issue in rename/modify indexingAndrew Tridgell1-16/+16
When we rename or modify a record, we need to update the indexes at the same time. It is important that we use the DN of the actual message that is stored in the database to do this, not the DN that was passed in by the user. If the two differ in case then the index records needs to use the 'real' record DN, as index handling is currently case sensitive.
2009-10-27ldb:tdb backend - be also here more careful with the result valueMatthias Dieter Wallnöfer1-2/+2
"msg_delete_attribute" doesn't return an LDB result constant.
2009-10-25ldb:backend "connect" functions - convert result values to LDB constantsMatthias Dieter Wallnöfer1-6/+6
I think this is better since "ldb_backend_connect" and "ldb_connect" which propagate those values should return only LDB constants. Therefore a conversion (especially for "-1") would be needed.
2009-10-25s4-ldb: don't allow modifies outside a transaction.Andrew Tridgell1-0/+8
2009-10-22s4-ldb: expose ltdb_err_map and ltdb_delete_noindexAndrew Tridgell1-2/+3
These will be used by ldb_index.c
2009-10-22s4-ldb: ldb indexing rewrite - part1Andrew Tridgell1-61/+69
This gets rid of the @IDXPTR approach to in-transaction indexing, instead using an in-memory tdb to hold index values during a transaction. This also cleans up a lot of the internal indexing logic, hopefully making it easier to understand. One of the big changes is in memory management, with a lot more use made of talloc tricks to avoid copying dn lists, and shortcuts used to avoid high intersection and union calculation costs. The overall result is that a re-provision on my laptop goes from 48s to a bit over 10s.
2009-10-21s4:ldb Put ltdb_private under the 'module'Andrew Bartlett1-0/+1
This helps track the memory better, as we can then place it under the partition hirarchy. Andrew Bartlett
2009-10-12s4:ldb_tdb - Revert some introduced "trivial gotos"Matthias Dieter Wallnöfer1-21/+11
I hope that this makes abartlet & simo happy again (consider mailing list).
2009-10-12Allow (and ignore) distinguishedName on special recordsAndrew Bartlett1-0/+2
They are not stored, so we can ignore them (makes copying records much easier) Andrew Bartlett
2009-10-12s4:ldb Reload the 'ltdb_cache' when @OPTIONS changesAndrew Bartlett1-0/+7
(Otherwise setting the check base on search option is not applied until after a reload). Andrew Bartlett
2009-10-08s4:ldb_tdb - Rework/VariousMatthias Dieter Wallnöfer1-192/+200
- Unify the error handling method with "done" mark in all longer functions - Fix up result codes to match more the real MS AD - Some cosmetic fixups
2009-10-06s4-ldb: fixed error on single value errorAndrew Tridgell1-1/+1
When you try to add a 2nd value to a single valued attribute you get LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS. w2k8-r2 join to s4 relies on this error, doing a replace after it sees the error
2009-10-03s4:ldb_tdb - fix memory leaksMatthias Dieter Wallnöfer1-7/+12
2009-10-02s4:ldb Don't allow modifcation of distinguishedNameAndrew Bartlett1-1/+7
2009-10-02Revert "s4-ldb: merged with master"Andrew Tridgell1-109/+78
This reverts commit 14c9070322d089dd96b389e8087c4f4bf1a6c7cc.
2009-10-02s4-ldb: merged with masterAndrew Bartlett1-78/+109
2009-09-23fixed spellingAndrew Tridgell1-1/+1
2009-09-21s4:ldb Add 'single-value' support to LDB.Andrew Bartlett1-2/+47
This is currently only triggered via Samba4's schema code.
2009-07-14remove all '\n' from ldb_debugSumit Bose1-1/+1
2009-06-04fixed ldb rename now that we have unique indexesAndrew Tridgell1-30/+11
With unique indexes, any rename of a record that has an attribute that is uniquely indexed needs to be done as a delete followed by an add, otherwse you'll get an error that the attribute value already exists.
2009-03-31added support for a prepare_commit() op in ldb modulesAndrew Tridgell1-2/+31
This op will be used by the partition module to give us good transaction semantics across the 4 partitions that sam.ldb uses.
2009-03-10Fix extended operation return path.Simo Sorce1-8/+12
Extended operations return was not going thorugh the same patch as others leaving the ctx around. Plus we were neutralizing the spy too early so that it didn't set the request_terminated flag as it should have. This should hopefully fix the failures in the build farm.
2009-03-09Fix potential segfaults using freed memory.Simo Sorce1-5/+44
In some code paths ltdb_context was still referenced even after we were returned an error by one of the callbacks. Because the interface assumes that once an error is returned the ldb_request may be freed, and because the ltdb_context was allocated as a child of the request, this might cause access to freed memory. Allocate the ltdb_context on ldb, and keep track of what's going on with the request by adding a spy children on it. This way even if the request is freed before the ltdb_callback is called, we will safely free the ctx and just quietly return.
2009-02-23Make all transactions nested in ldb. The current samba4 code expects thisSimo Sorce1-0/+2
behavior anyway, and given we can only have one transaction active per ldb context this is the only sane model we can support. Fix ldb_tdb transactions, we could return back with an error with neither committing nor canceling the actual tdb transaction in some error paths within the ltdb commit and cancel transaction paths. Added also some debugging to trace what was going on.
2009-01-30Fix the mess with ldb includes.Simo Sorce1-57/+72
Separate again the public from the private headers. Add a new header specific for modules. Also add service function for modules as now ldb_context and ldb_module are opaque structures for them.
2009-01-21s4:ldb: remove dependency to samba4's events wrapperStefan Metzmacher1-2/+2
metze
2008-12-29s4:lib/tevent: rename structsStefan Metzmacher1-6/+6
list="" list="$list event_context:tevent_context" list="$list fd_event:tevent_fd" list="$list timed_event:tevent_timer" for s in $list; do o=`echo $s | cut -d ':' -f1` n=`echo $s | cut -d ':' -f2` r=`git grep "struct $o" |cut -d ':' -f1 |sort -u` files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4` for f in $files; do cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp mv $f.tmp $f done done metze
2008-12-17an experimental patch for fixing ldb bloatAndrew Tridgell1-0/+10
ldb indexing can cause huge files, and huge memory usage. This experiment allows us to keep indexes in memory during a transaction, then to write the indexes to disk when the transaction completes. The result is that the db is much smaller (we have seen improvements of about 100x in file size) and memory usage during large transactions is also greatly reduced Note that this patch uses the unusual strategy of putting pointers into a ldb (and thus into a tdb). This works because the pointers are only there during a transaction, so the pointers are not exposed to any other users of the database. The pointers allow us to avoid some really bad allocation problems with tdb record allocation during the re-indexing.
2008-11-17Remove timeout event once we are calling the callback.Andrew Bartlett1-4/+5
(Even if the callback takes some time, this isn't a ldb_tdb timeout any more) Andrew Bartlett
2008-10-20Make sure prototypes are always included, make some functions static andJelmer Vernooij1-2/+2
remove some unused functions.
2008-10-16Transform the sequence_number operation into a normal extended operation as ↵Simo Sorce1-25/+119
it should always have been. Make it also async so that it is not a special case.
2008-09-29LDB ASYNC: ldb_tdb backendSimo Sorce1-181/+172
2008-09-25Revert LDB return code patches from Matthias.Jelmer Vernooij1-10/+10
2008-09-24Cosmetic corrections for the LDB backend modulesMatthias Dieter Wallnöfer1-10/+10
This commit applies some cosmetic corrections for the LDB backend modules.
2008-06-14Cleanup,Simo Sorce1-61/+88
Remove trailing spaces and try to fit 80 columns where possible (This used to be commit edf6b77a1314d8f91839836855ae049393f73aca)
2008-02-20Remove more function-based inits.Jelmer Vernooij1-4/+4
(This used to be commit b1a7810f3e70f9a831d9b8e85d531e448072adaf)