summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb/ldb_tdb.c
AgeCommit message (Collapse)AuthorFilesLines
2011-07-05ldb: make ldb a top level library for Samba 4.0Andrew Bartlett1-1519/+0
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-06-20tdb2: #ifdef out TDB_ERR_NOLOCK and TDB_ERR_LOCK_TIMEOUT.Rusty Russell1-0/+4
These don't exist in tdb2. The former is used in one weird place in tdb1, and the latter not at all. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20ldb: replace 'struct TDB_DATA' with 'TDB_DATA'Rusty Russell1-1/+1
The typedef is TDB2 compatible, the struct isn't. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_unlockall/tdb_unlockall_read: ignore return value.Rusty Russell1-1/+2
TDB2 returns void here. tdb_unlockall will *always* return with the database unlocked, but it will complain via the log function if it wasn't locked. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_transaction_cancel: ignore return value.Rusty Russell1-4/+1
TDB2 returns void here. tdb_transaction_cancel will *always* return with the transaction cancelled, but it will complain via the log function if a transaction wasn't in progress. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_store: check returns for 0, not -1.Rusty Russell1-1/+1
TDB2 returns a negative error number on failure. This is compatible if we always check for != 0 instead of == -1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20tdb_fetch_compat: use instead of tdb_fetch.Rusty Russell1-1/+2
This is a noop for tdb1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-02-14s4-ldb: fixed a uninitialised el->flags in ldb_tdbAndrew Tridgell1-2/+1
this caused an intermittent failure in some tests Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-14s4-ldb: added LDB_FLAG_INTERNAL_FORCE_SINGLE_VALUE_CHECKAndrew Tridgell1-0/+8
this allows a ldb module to force an element as single valued
2011-02-14s4-ldb: use a helper function for single valued checkingAndrew Tridgell1-25/+35
this gives us a single piece of logic for single value checking in the tdb backend Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-01-12ldb:ltdb_sequence_number - initialise "tmp_ctx" to prevent uninitialisation ↵Matthias Dieter Wallnöfer1-1/+2
warning
2011-01-12ldb:ltdb_sequence_number - check for an OOM exceptionMatthias Dieter Wallnöfer1-0/+4
2010-11-23s4-ldb: added an environment varibale LDB_WARN_UNINDEXEDAndrew Tridgell1-0/+4
when LDB_WARN_UNINDEXED is set, we produce warnings about unindexed searches. This makes it easier to find performance problems caused by unindexed searches.
2010-11-06ldb:ldb_tdb.c - ltdb_check_special_dn - fix indentationMatthias Dieter Wallnöfer1-1/+1
2010-11-06ldb:ldb_tdb.c - make "ltdb_add" more similar to "ltdb_modify"Matthias Dieter Wallnöfer1-9/+5
And remove in "ltdb_add_internal" a cache loading call which has been present twice.
2010-11-04s4-ldb: implement LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECKAndrew Tridgell1-13/+9
this disables the single value checking for one attribute. It is much more specific than a general RELAX control, and also more efficient. I think we should try to have more precise overrides like this, rather than using RELAX as a general purpose override
2010-11-04Move the checking of single valued attributes back into the tdb backend.Andrew Tridgell1-0/+44
The backend is the only place that can do this properly. It makes no sense to do it anywhere else. As a result of it moving out of the backend we ended up with some bugs causing multiple values in single valued attributes (eg. isDeleted), which can really damage the inregrity of the database. For the override of single valued values needed for deleted linked attributes we should use attribute flags. This reverts commit 1949864417f3d10fb8996df7db259649eb777271.
2010-11-01s4-ldb: enable ldb module version checkingAndrew Tridgell1-0/+1
2010-11-01s4-ldb: added an override flag to ldb_register_backend()Andrew Tridgell1-1/+1
this will be used to allow a system ldb build with an ldb backend to have its ldap handler overridden by the s4 one
2010-11-01s4-ldb: convert the rest of the ldb modules to the new styleAndrew Tridgell1-4/+4
2010-10-20ldb:ldb_tdb submodule - use "ldb_msg_new" where appropriateMatthias Dieter Wallnöfer1-4/+4
It is saver than a manual "talloc".
2010-10-18ldb: always return PROTOCOL_ERROR if an operation is unsupportedMatthias Dieter Wallnöfer1-1/+1
That's exactly the behaviour of various LDAP servers.
2010-10-18ldb:ldb_tdb.c - fix up counter variablesMatthias Dieter Wallnöfer1-5/+8
"find_element" returns an "int" since there is also the possibility that a certain element doesn't exist - then "-1" is returned. But beside this exception treat all other return values as unsigned.
2010-10-18ldb:ldb_tdb.c - improve the error outputsMatthias Dieter Wallnöfer1-13/+25
- Fix indentation - Include always the failing DN - Reorder the outputs to make them consistent
2010-10-13s4-ldb: added an optional operator_fn in the schema syntaxAndrew Tridgell1-2/+10
this function takes the operator being invoked, which will allow schema functions to provide more fine grained control over comparisons. The key bug this was introduced to fix is the incorrect handling of the LDB_OP_PRESENT test for deleted linked attributes. The backends are unaware of the deleted state of these links, so they cannot do a LDB_OP_PRESENT test on their own. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-28ldb-tdb: ignore failure to register control on rootdseAndrew Tridgell1-4/+1
this is expected for non-sam LDBs
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