summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb/ldb_tdb.h
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r13827: Minor enhancements or cosmetic changesSimo Sorce1-4/+1
(This used to be commit 7ef63abae12f65835a82f9931ad1f5ea75e5f3f6)
2007-10-10r13818: Make ldb_tdb 'fake' async.Simo Sorce1-5/+32
Simo. (This used to be commit 0db616ef59ed51cac7e0bfaea8a799d5aa42ef16)
2007-10-10r13258: Fix the talloc heirachy for ldb_tdb.Andrew Bartlett1-1/+3
In the return value res->msgs, msgs was not a child of res, in the indexed path. Instead, it hung directly off the ldb, which was sometimes a long-term context. Also remove unused parameters. Found by --leak-report-full Andrew Bartlett (This used to be commit 29cb5af827c459758997c80dca034d471bb92449)
2007-10-10r11567: Ldb API change patch.Simo Sorce1-3/+3
This patch changes the way lsb_search is called and the meaning of the returned integer. The last argument of ldb_search is changed from struct ldb_message to struct ldb_result which contains a pointer to a struct ldb_message list and a count of the number of messages. The return is not the count of messages anymore but instead it is an ldb error value. I tryed to keep the patch as tiny as possible bu as you can guess I had to change a good amount of places. I also tried to double check all my changes being sure that the calling functions would still behave as before. But this patch is big enough that I fear some bug may have been introduced anyway even if it passes the test suite. So if you are currently working on any file being touched please give it a deep look and blame me for any error. Simo. (This used to be commit 22c8c97e6fb466b41859e090e959d7f1134be780)
2007-10-10r10753: don't require every ldb module to implement both a search_bytree() andAndrew Tridgell1-3/+0
a search() function, instead each module now only implements the bytree method, and the expression based search is handled generically by the modules code. This makes for more consistency and less code duplication. fixed the tdb backend to handle BASE searches much more efficiently. They now always only lookup one record, regardless of the search expression (This used to be commit 7e44f9153c5578624e2fca04cdc0a00af0fd9eb4)
2007-10-10r10408: now that we are using tdb transactions we don't need any additionalAndrew Tridgell1-2/+0
locking code in the ldb_tdb backend, except for a single read lock during searches to ensure searches don't cross transaction boundaries The tdb transactions code would map these extra locks to noops anyway (as locking makes no sense inside a transaction), but the work in setting up the locking keys still costs something, and it makes the code needlessly complex (This used to be commit 1b8d368a6771360fb0626127c02b3eb95f3eae59)
2007-10-10r10305: start implementing better error handlingSimo Sorce1-3/+0
changed the prioivate modules API error string are now not spread over all modules but are kept in a single place. This allows a better control of memory and error reporting. (This used to be commit 3fc676ac1d6f59d08bedbbd9377986154cf84ce4)
2007-10-10r9391: Convert all the code to use struct ldb_dn to ohandle ldap like ↵Simo Sorce1-6/+6
distinguished names Provide more functions to handle DNs in this form (This used to be commit 692e35b7797e39533dd2a1c4b63d9da30f1eb5ba)
2007-10-10r8625: move the ldb_wrap logic into the ldb code. This logic is meant toAndrew Tridgell1-0/+4
avoid the horrors of posix locking, but it was preventing us having an ldb open twice with different options. Now each ldb open of the same file shares the same underlying tdb, but uses a different ldb structure (This used to be commit 4e090c66dfa1d2764e4693578d3845be3b8893f6)
2007-10-10r8037: a fairly major update to the internals of ldb. Changes are:Andrew Tridgell1-19/+0
- 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-10r7709: - convert ldb to use popt, so that it can interact with the sambaAndrew Tridgell1-2/+0
cmdline credentials code (which will be done soon) - added a ldb_init() call, and changed ldb_connect() to take a ldb context. This allows for much better error handling in ldb_connect(), and also made the popt conversion easier - fixed up all the existing backends with the new syntax - improved error handling in *_connect() - fixed a crash bug in the new case_fold_required() code - ensured that ltdb_rename() and all ltdb_search() paths get the read lock - added a ldb_oom() macro to make it easier to report out of memory situations in ldb code (This used to be commit f648fdf187669d6d87d01dd4e786b03cd420f220)
2007-10-10r7582: Better way to have a fast path searching for a specific DN.Simo Sorce1-1/+1
Old way was ugly and had a bug, you couldn't add an attribute named dn or distinguishedName and search for it, tdb would change that search in a dn search. This makes it also possible to search by dn against an ldap server as the old method was not supported by ldap syntaxes. sss (This used to be commit a614466dec2484a0d39bdfae53da822cfcf80926)
2007-10-10r7527: - added a ldb_search_bytree() interface, which takes a ldb_parse_treeAndrew Tridgell1-0/+4
instead of a search expression. This allows our ldap server to pass its ASN.1 parsed search expressions straight to ldb, instead of going via strings. - updated all the ldb modules code to handle the new interface - got rid of the separate ldb_parse.h now that the ldb_parse structures are exposed externally - moved to C99 structure initialisation in ldb - switched ldap server to using ldb_search_bytree() (This used to be commit 96620ab2ee5d440bbbc51c1bc0cad9977770f897)
2007-10-10r6867: this code will change the way the @ATTRIBUTES object is handledSimo Sorce1-0/+2
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-10r6560: added a tdb_chainlock_read() call in ldb_search(). This guaranteesAndrew Tridgell1-0/+2
that ldb_search() sees a single consistent view of the database (by blocking writes during a ldb_search) (This used to be commit 917f2a8a073fd501f0626bea4f9deb91b95fdc90)
2007-10-10r6470: Remove ldb_search_free() it is not needed anymore.Simo Sorce1-1/+0
Just use talloc_free() to release the memory after an ldb_search(). (This used to be commit 4f0948dab0aa5e8b6a4ce486f3668ca8dfae23db)
2007-10-10r5298: - got rid of pstring.h from includes.h. This at least makes it a bitAndrew Tridgell1-0/+1
less likely that anyone will use pstring for new code - got rid of winbind_client.h from includes.h. This one triggered a huge change, as winbind_client.h was including system/filesys.h and defining the old uint32 and uint16 types, as well as its own pstring and fstring. (This used to be commit 9db6c79e902ec538108d6b7d3324039aabe1704f)
2007-10-10r5296: - only include the tdb headers where they are neededAndrew Tridgell1-1/+3
- removed the u32 hack in events.c as I think this was only needed as tdb.h defines u32. Metze, can you check that this hack is indeed no longer needed on your suse system? (This used to be commit 6f79432fe656164d4770dbce114a30dda5e7bf9a)
2007-10-10r4474: - converted ldb to use talloc internallyAndrew Tridgell1-7/+7
- added gcov flags to Makefile.ldb - expanded ldb test suite to get more coverage (This used to be commit 0ab98f50a7e0fe15347a99e5c29a6590a87729a0)
2007-10-10r4466: rather than defining "STANDALONE" for building tdb, ldb and tallocAndrew Tridgell1-1/+1
outside the tree, instead defined _SAMBA_BUILD_ inside the Samba build. This makes it easier to pull code out of Samba for external use. (This used to be commit 09e98c8745cca7ccb1ad7134c0c09b8e4c0f4f06)
2007-10-10r4281: fixed an ldb indexing bug in ldb found by volker.Andrew Tridgell1-0/+4
index entries were not always being removed on modify (This used to be commit 9c668e7b43dc2d82d3d639b64c53e887723ccba7)
2007-10-10r4022: fix compiler warningsStefan Metzmacher1-1/+1
metze (This used to be commit 79d0eb2f677f9e985ba476a9680f68537d41be6f)
2007-10-10r3783: - don't use make proto for ldb anymoreStefan Metzmacher1-0/+69
- 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-10r714: make sure ldb formats are portable between big/little endian machinesAndrew Tridgell1-8/+0
(This used to be commit 166a664a00d2befe30978072e6f3f266b18ba9f4)
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-10r502: modified ldb to allow the use of an external pool memoryAndrew Tridgell1-0/+3
allocator. The way to use this is to call ldb_set_alloc() with a function pointer to whatever memory allocator you like. It includes a context pointer to allow for pool based allocators. (This used to be commit 3955c482e6c2c9e975a4bb809ec8cb6068e48e34)
2007-10-10r435: a major upgrade for ldbAndrew Tridgell1-0/+36
- added the ability to mark record attributes as being CASE_INSENSITIVE, WILDCARD or INTEGER. - added the ability to support objectclass subclasses, and to search by a parent class - added internal support for case insensitive versus case sensitive indexing (not UTF8 compliant yet) - cleaned up a number of const warnings - added a number of helper functions for fetching integers, strings and doubles - added a in-memory cache for important database properties, supported by a database sequence number - changed some variable names to avoid conflicts with C++ (This used to be commit f2bf06f25c2e6c744817711c7bedbd1d3b52f994)
2007-10-10r152: a quick airport commit ....Andrew Tridgell1-1/+3
added ldbedit, a _really_ useful command added ldbadd, ldbdel, ldbsearch and ldbmodify to build solved lots of timezone issues, we now pass the torture tests with client and server in different zones fixed several build issues I know this breaks the no-LDAP build. Wait till I arrive in San Jose for that fix. (This used to be commit af34710d4da1841653624fe304b1c8d812c0fdd9)
2007-10-10r147: - Remove dublicate ldap tests (richard the current test is in ↵Stefan Metzmacher1-2/+2
libads/config.m4 :-) - Move sendfile check to ntvfs/config.m4 - Move comparison_fn_t check to build/m4/rewrite.m4 Please do not new tests to configure.in directly, please add them to the subsystems config.m4 file where they belong to or to build/m4/rewrite.m4 if you don't know where to put it for now Thanks I know samba4's build system is not completly rewritten. I have a lot of updatest in my local tree, but it's not complete yet when it's complete I'll write documentation for it:-) metze (This used to be commit 31c23f14d60a4aa41e0500e369f25ed6dc7ddae7)
2004-03-31make a more recent snapshot of ldb available to interestedAndrew Tridgell1-0/+11
people. Note that I decided to make it LGPL. ldb is not finished yet, but enough of it is there for people to get an idea of what it does, and quite a few simple tests work (This used to be commit dc6f41f9e777d37f883303ddef0d96840d80f78e)