summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb/ldb_cache.c
AgeCommit message (Collapse)AuthorFilesLines
2011-07-05ldb: make ldb a top level library for Samba 4.0Andrew Bartlett1-490/+0
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-29ldb:tdb backend - cache - remove unused "last_attribute" structure memberMatthias Dieter Wallnöfer1-3/+0
Reviewed-by: abartlet Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Fri Apr 29 20:07:27 CEST 2011 on sn-devel-104
2010-10-21ldb:ldb_tdb/ldb_cache.c - remove a superflous "talloc_free"Matthias Dieter Wallnöfer1-3/+1
Didn't realise that this is already called by "ltdb_attributes_unload".
2010-10-21ldb:ldb_tdb/ldb_cache.c - in this function we don't use LDB return codesMatthias Dieter Wallnöfer1-1/+1
2010-10-20ldb:ldb_cache.c - fix memory contexts and memory leaksMatthias Dieter Wallnöfer1-3/+4
2010-10-20ldb:ldb_tdb submodule - use "ldb_msg_new" where appropriateMatthias Dieter Wallnöfer1-8/+8
It is saver than a manual "talloc".
2010-03-08LDB:TDB backend - change counter variables to "unsigned" where appropriateMatthias Dieter Wallnöfer1-5/+6
2010-01-02s4-ldb: use the RELAX control to disable single value checking on replaceAndrew Tridgell1-1/+1
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-10-22s4-ldb: ldb indexing rewrite - part1Andrew Tridgell1-0/+9
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-07-14remove all '\n' from ldb_debugSumit Bose1-3/+3
2009-04-07don't load @ATTRIBUTES if we have an override handler in placeAndrew Tridgell1-0/+7
2009-01-30Fix the mess with ldb includes.Simo Sorce1-20/+39
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.
2007-12-21r25964: Fix comment and use talloc hirachy in ldb_tdb initialisation.Andrew Bartlett1-4/+2
Andrew Bartlett (This used to be commit 05cc2a7d966a10f1f111d7bae3261e1087fdffe6)
2007-12-21r25959: Add a new special DN to LDB: @OPTIONSAndrew Bartlett1-5/+30
Use the checkBaseOnSearch attribute to control if we should check the base DN on search requests. Also ensure we honour any errors in searching, not just errors in the supplied 'done' callback. Andrew Bartlett (This used to be commit deaac92f439ef001bfe052df170d6e34e8ba5845)
2007-10-10r25218: After discussion with Simo, remove the subclass support from LDB.Andrew Bartlett1-71/+0
Subclass support was designed to avoid needing to spell out the full list of objectClasses that an entry was in. However, Samba4 now enforces this restriction in the objectClass module, and the way subclass matching was handled was complex and counter-intuitive in my opinion (and did not match LDAP). Andrew Bartlett (This used to be commit f5ce04b904e14445a2a7e7f92e7e1f64b645c6f2)
2007-10-10r25000: Fix some more C++ compatibility warnings.Jelmer Vernooij1-8/+8
(This used to be commit 08bb1ef643ab906f1645cf6f32763dc73b1884e4)
2007-10-10r23798: updated old Temple Place FSF addresses to new URLAndrew Tridgell1-2/+1
(This used to be commit 40c0919aaa9c1b14bbaebb95ecce53eb0380fdbb)
2007-10-10r23795: more v2->v3 conversionAndrew Tridgell1-1/+1
(This used to be commit 84b468b2f8f2dffda89593f816e8bc6a8b6d42ac)
2007-10-10r22681: Fix standalone ldb build when parent directory name != ldb.Jelmer Vernooij1-3/+2
(This used to be commit 1093875d59f1ea9b8bd82277d4f9d8366e584952)
2007-10-10r22471: Convert more code to use proper LDB error codes.Simo Sorce1-16/+21
This is a 1 to 1 convertion, next step is to make this code report an error if the basedn is not used, hopefully avoiding an explicit search on the base object in the most common cases. (This used to be commit 50534c84b4577b2d32565a74a4716088f706bfea)
2007-10-10r20969: remove unused function, found my lcovStefan Metzmacher1-49/+0
metze (This used to be commit 0c5eb19ebc12bc954c23e9f561d5f96644a19aca)
2007-10-10r20234: metze pointed out that we are re-loading the cache records on eachAndrew Tridgell1-0/+4
write. We should only be doing this if another process writes and changes the seqnum. This avoids the extra cache loads (This used to be commit 65858ebb68c25a672e9284e8cba9a6675902f1df)
2007-10-10r20191: fix bug found by the IBM checkerStefan Metzmacher1-1/+1
metze (This used to be commit 4c1e4bfeef8d93583b6d4345dbb1b8fa90368308)
2007-10-10r20184: change ldb_attrib_handler into ldb_schema_attribute, which has a pointerStefan Metzmacher1-10/+4
to a ldb_schema_syntax struct. the default attribute handler is now registered dynamicly as "*" attribute, instead of having its own code path. ldb_schema_attribute's can be added to the ldb_schema given a ldb_schema_syntax struct or the syntax name we may also need to introduce a ldb_schema_matching_rule, and add a pointer to a default ldb_schema_matching_rule in the ldb_schema_syntax. metze (This used to be commit b97b8f5dcbce006f005e53ca79df3330e62f117b)
2007-10-10r20168: start separating attributes and syntaxesStefan Metzmacher1-8/+12
metze (This used to be commit 8dda4342f648aa71878ac9eeb7941710e2813aee)
2007-10-10r19831: Big ldb_dn optimization and interfaces enhancement patchSimo Sorce1-6/+6
This patch changes a lot of the code in ldb_dn.c, and also removes and add a number of manipulation functions around. The aim is to avoid validating a dn if not necessary as the validation code is necessarily slow. This is mainly to speed up internal operations where input is not user generated and so we can assume the DNs need no validation. The code is designed to keep the data as a string if possible. The code is not yet 100% perfect, but pass all the tests so far. A memleak is certainly present, I'll work on that next. Simo. (This used to be commit a580c871d3784602a9cce32d33419e63c8236e63)
2007-10-10r19402: - use the new tdb_lockall_read() to make ldb_search() more efficient,Andrew Tridgell1-0/+8
by avoiding chain locks on each tdb_fetch() within the search - use the tdb_get_seqnum() call to avoid re-reading the @BASEINFO record when it hasn't changed. These speed up the LOCAL-DBSPEED test for ldb from 7k ops/sec to a bit over 11k ops/sec (This used to be commit 1347ad254eb8cd12ce22a5a2a37bec0a0ac8dbf1)
2007-10-10r19365: fixed a memory leak in the ldb attribute handlingAndrew Tridgell1-8/+2
(This used to be commit d7e07685164141f8fb2c2a6258e1fcb46ff9d06c)
2007-10-10r19363: - don't need to store the baseinfo message after cache loadAndrew Tridgell1-7/+9
(This used to be commit 8c091bcdece5c17073838ad2367f3f4e22e97c31)
2007-10-10r19322: fix a minor memory leak in the ltdb cache codeAndrew Tridgell1-0/+1
(This used to be commit e03ed5822a690e2d151107f2edb9b4f1d3a1e1b9)
2007-10-10r19069: The sequence number is a 64 bit unsigned integerSimo Sorce1-2/+2
Well spotted Volker (This used to be commit f4239ef5983cfc06fd5cab42448564faed676944)
2007-10-10r18781: Move the usnCreated and usnChanged handling around again.Andrew Bartlett1-9/+29
This moves these attributes from objectguid into an optional backend (objectguid), used by ltdb. For OpenLDAP, the entryUUID module converts entryCSN into usnChanged. This also changes the sequence number API, and uses 'time based' sequence numbers, when an LDAP or similar backend is detected. To assist this, we also store the last modified time in the TDB, whenever we change a value. Andrew Bartlett (This used to be commit 72858f859483c0c532dddb2c146d6bd7b9be5072)
2007-10-10r17516: Change helper function names to make more clear what they are meant ↵Simo Sorce1-1/+1
to do (This used to be commit ad75cf869550af66119d0293503024d41d834e02)
2007-10-10r12829: fix ldb headers, to not include '<...>' files in .c filesStefan Metzmacher1-2/+2
this helps in getting symbol -fvisibility=hidden (GCC 4 feature) working later. metze (This used to be commit 380938e97f31c7860aed1e73cc0110c6e17b472e)
2007-10-10r10913: This patch isn't as big as it looks ...Andrew Tridgell1-6/+7
most of the changes are fixes to make all the ldb code compile without warnings on gcc4. Unfortunately That required a lot of casts :-( I have also added the start of an 'operational' module, which will replace the timestamp module, plus add support for some other operational attributes In ldb_msg_*() I added some new utility functions to make the operational module sane, and remove the 'ldb' argument from the ldb_msg_add_*() functions. That argument was only needed back in the early days of ldb when we didn't use the hierarchical talloc and thus needed a place to get the allocation function from. Now its just a pain to pass around everywhere. Also added a ldb_debug_set() function that calls ldb_debug() plus sets the result using ldb_set_errstring(). That saves on some awkward coding in a few places. (This used to be commit f6818daecca95760c12f79fd307770cbe3346f57)
2007-10-10r9391: Convert all the code to use struct ldb_dn to ohandle ldap like ↵Simo Sorce1-8/+42
distinguished names Provide more functions to handle DNs in this form (This used to be commit 692e35b7797e39533dd2a1c4b63d9da30f1eb5ba)
2007-10-10r8373: New wildcard matching code.Simo Sorce1-8/+2
This code applies correct ldap standard wildcard matching code removes WILDCARD matching from tdb @ATTRIBUTES, that's now handled independently adds some more tests for wildcard matching fixes dn comparison code in ldb_match (This used to be commit 4eb5863042011988d85092d7dde3d809aa15bd59)
2007-10-10r8037: a fairly major update to the internals of ldb. Changes are:Andrew Tridgell1-4/+184
- moved the knowledge of attribute types out of ldb_tdb and into the generic ldb code. This allows the ldb_match() message match logic to be generic, so it can be used by other backend - added the generic ability to load attribute handlers, for canonicalisation, compare, ldif read and ldif write. In the future this will be used by the schema module to allow us to correctly obey the attributetype schema elements - added attribute handlers for some of the core ldap attribute types, Integer, DirectoryString, DN, ObjectClass etc - added automatic registration of attribute handlers for well-known attribute names 'cn', 'dc', 'dn', 'ou' and 'objectClass' - converted the objectSid special handlers for Samba to the new system - added more correct handling of indexing in tdb backend based on the attribute canonicalisation function - added generic support for subclasses, moving it out of the tdb backend. This will be used in future by the schema module - fixed several bugs in the dn_explode code. It still needs more work, but doesn't corrupt ldb dbs any more. (This used to be commit 944c5844ab441b96d8e5d7b2d151982139d1fab9)
2007-10-10r6967: fixed the new multi-value dn=@ATTRIBUTES so it actually works :-)Andrew Tridgell1-4/+6
this demonstrates that we need a improved test suite as well (This used to be commit 959c73e93faa243154288c91a716e5a293d7a51c)
2007-10-10r6867: this code will change the way the @ATTRIBUTES object is handledSimo Sorce1-27/+37
this object properties are now used as multivalue attributes now all values inserted are checked against a "valid values table" eg: this form is now accepted: dn: @ATTRIBUTES uid: CASE_INSENSITIVE uid: WILDCARD this form is now rejected: dn: @ATTRIBUTES uid: CASE_INSENSITIVE WILDCARD please update your .ldb files if you make use of @ATTRIBUTES (sam.ldb heavily uses it) the code passes all make test tests for both tdb and ldap, it also passes the new test to check for wrong @ATTRIBUTES attribute values Simo. (This used to be commit 1295b891a26c2cb2c34540f90ded83390cf87da2)
2007-10-10r6759: let us have a wildcard attribute so that we can set a default for all ↵Simo Sorce1-1/+7
attributes example: *: CASE_INSENSITIVE by placing it in the @ATTRIBUTES object you make all the matching be case insensitive to make an excepion to the general rule now you just need to create an entry like: name: CASE_SENSITIVE the key CASE_SENSITIVE currently does not exist but has the effect of making the code ignore the wildcard default flag and being ldb case sensitive by default it let the "name" attribute be case sensitive again Tridge, can you look at this commit? Should we introduce a CASE_SENSITVE/BINARY flag and handle it in the code ? Simo. (This used to be commit 5f10707e8ac36db03f3aa3e1ee1c40a9d9da2016)
2007-10-10r4714: move the ldb code to the new talloc interface (eg remove _p suffix)Simo Sorce1-10/+10
this helps standalone building of ldb renew the schema module split code into functions to improve readability and code reuse add and modify works correctly but we need a proper testsuite Simo (This used to be commit a681ae365ff1b5a2771b42ebd90336651ce1e513)
2007-10-10r4488: removed an unused variableAndrew Tridgell1-1/+0
(This used to be commit 1dfc41c9a3b6418236a1f04b5cf3f9ef9e8b608e)
2007-10-10r4486: fixed some memory leaks in the new ldb code, by ensuring that memory ↵Andrew Tridgell1-4/+4
is always allocated as a child of the right context (This used to be commit 1071712cf5951fa2e94f314bd7678cfa51b2dbcd)
2007-10-10r4474: - converted ldb to use talloc internallyAndrew Tridgell1-74/+90
- added gcov flags to Makefile.ldb - expanded ldb test suite to get more coverage (This used to be commit 0ab98f50a7e0fe15347a99e5c29a6590a87729a0)
2007-10-10r3783: - don't use make proto for ldb anymoreStefan Metzmacher1-0/+2
- split ldh.h out of samba's includes.h - make ldb_context and ldb_module private to the subsystem - use ltdb_ prefix for all ldb_tdb functions metze (This used to be commit f5ee40d6ce8224e280070975efc9911558fe675c)
2007-10-10r3754: merge in ldb modules support from the tmp branch ldbPluginsSimo Sorce1-26/+31
(This used to be commit 71323f424b4561af1fdddd2358629049be3dad8c)
2007-10-10r2485: - add a test case in ldbtest for a bug pointed out by Jon Haswell.Andrew Tridgell1-2/+6
- fixed the bug shown with the above test, by initialising the sequence number to something different from the value used in ltdb_cache_free() (This used to be commit 856cdf82f24aada074ee5c605cccb2e8ceeea487)
2007-10-10r606: added a HIDDEN attribute on fields in ldb (in @ATTRIBUTES). This ↵Andrew Tridgell1-0/+1
allows you to mark an attribute as only appearing in searches that explicitly name it. It will be used for attributes like nTSecurityDescriptor (This used to be commit f5cd3d733b71368ea652f8a4d653d87f45ff983f)
2007-10-10r509: fixed a memory handling bug that affects ldb with memory pools thatAndrew Tridgell1-1/+6
change with each request (This used to be commit 18695cefa16b867427e3ca2fb0d787d850ea25c3)