summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r13609: Get in the initial work on making ldb asyncSimo Sorce1-1/+20
Currently only ldb_ildap is async, the plan is to first make all backend support the async calls, and then remove the sync functions from backends and keep the only in the API. Modules will need to be transformed along the way. Simo (This used to be commit 1e2c13b2d52de7c534493dd79a2c0596a3e8c1f5)
2007-10-10r13324: From now on check attribute names obey rfc2251Simo Sorce1-0/+2
Also add a way to provide utf8 compliant functions by registering them with ldb_set_utf8_fns() Next comes code to register samba internal utf8 functions. Simo. (This used to be commit ac9b8a41ffca8e06c5e849d544d3203a665b8e0d)
2007-10-10r12829: fix ldb headers, to not include '<...>' files in .c filesStefan Metzmacher1-3/+1
this helps in getting symbol -fvisibility=hidden (GCC 4 feature) working later. metze (This used to be commit 380938e97f31c7860aed1e73cc0110c6e17b472e)
2007-10-10r12743: Remove the ugly way we had to make a second stage init and introduceSimo Sorce1-0/+13
a second_stage_init private function for modules that need a second stage init. Simo. (This used to be commit 5e8b365fa2d93801a5de1d9ea76ce9d5546bd248)
2007-10-10r12733: Merge ldap/ldb controls into main treeSimo Sorce1-0/+5
There's still lot of work to do but the patch is stable enough to be pushed into the main samba4 tree. Simo. (This used to be commit 77125feaff252cab44d26593093a9c211c846ce8)
2007-10-10r12534: Make the transaction code fill the error string on failure.Andrew Bartlett1-3/+30
Andrew Bartlett (This used to be commit 2f54d7f774434f2a8b89ae01e993c4a1d16ce861)
2007-10-10r11958: - fixed memory leaks in the ldb_result handling in ldb operationsAndrew Tridgell1-63/+66
- removed an unnecessary level of pointer in ldb_search structure (This used to be commit b8d4afb14a18dfd8bac79882a035e74d3ed312bd)
2007-10-10r11594: ensure ldb_search() sets *res to NULL on failure (some of the updatedAndrew Tridgell1-0/+2
ldb_result code coud rely on that) (This used to be commit cd567bcb24125827c746c1c0902631b0e7c2cea5)
2007-10-10r11567: Ldb API change patch.Simo Sorce1-92/+100
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-10r11353: a bit of an improvement to the ldb_tdb error handlingAndrew Tridgell1-20/+22
(This used to be commit 896704f5c139c8bce30dfc898bb3a12be10035ed)
2007-10-10r11109: fixed the error code return from most ldb functions (the change to useAndrew Tridgell1-6/+16
ldb_transaction_cancel() broke it) (This used to be commit dc41994ea72c7c7f571efa009930cf36d7a9897a)
2007-10-10r10790: allow updating of existing ldb opaque values (thanks to abartlet forAndrew Tridgell1-1/+11
spotting this) (This used to be commit ef13569ca94da00cc410318e61505e70f3606674)
2007-10-10r10759: make modules easier to write by allowing modules to only implement theAndrew Tridgell1-12/+42
functions they care about, instead of all functions. This also makes it more likely that future changes to ldb will not break existing modules (This used to be commit 45f0c967b58e7c1b2e900a4d74cfde2a2c527dfa)
2007-10-10r10753: don't require every ldb module to implement both a search_bytree() andAndrew Tridgell1-3/+13
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-10r10477: expose transactions outside ldb and change the API once moreSimo Sorce1-27/+77
do not autostart transactions on ldb operations if a transaction is already in place test transactions on winsdb all my tests passes so far tridge please confirm this is ok for you (This used to be commit c2bb2a36bdbe0ec7519697a9a9ba7526a0defac2)
2007-10-10r10305: start implementing better error handlingSimo Sorce1-5/+29
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-10r10304: check for basic ldb_message sanity and return appropriateSimo Sorce1-13/+25
LDB_ERR_ value (This used to be commit 610f5646f0816820ac9342e81d46d139e26cc918)
2007-10-10r10299: remove the public (un)lock functions and introduce a transaction basedSimo Sorce1-19/+35
private ldb API ldb_sqlite3 is already working with this model and ldb_tdb will do as soon as tridge finishes the tdb transaction code. currently the transactions are always implicit and wrap any single ldb API call except searching, the transaction functions are currently not made public on purpose. Simo. (This used to be commit 1da4ac2cdcb7e54076f85242a93784260dced918)
2007-10-10r9391: Convert all the code to use struct ldb_dn to ohandle ldap like ↵Simo Sorce1-4/+4
distinguished names Provide more functions to handle DNs in this form (This used to be commit 692e35b7797e39533dd2a1c4b63d9da30f1eb5ba)
2007-10-10r8600: fixed null termination on some error messages in ldbAndrew Tridgell1-3/+3
(This used to be commit 326f0ad6fba8d78f104b93b49995e6c24f9493ef)
2007-10-10r8037: a fairly major update to the internals of ldb. Changes are:Andrew Tridgell1-0/+8
- 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-10r7828: Although there is still plenty to do, ldb_sqlite3 now passes the set ↵Derrell Lipman1-1/+17
of tests in tests/test-sqlite3.sh (tests/test-generic.sh). There are lots of optimizations still TBD, and some things are REALLY slow right now (e.g. each add() operation takes 1/3 - 1/2 second) but it's ready for interested parties to poke it and prod it and see how (un)reasonable it is. Play away. Still to be implemented or improved: - tdb specials (@MODULES, @SUBCLASSES, etc.) - all DNs are case-folded in their entirty right now (since doing otherwise would require @ATTRIBUTES to be implemented) - speed improvements and optimizations. I am quite confident that the excessively slow add() operation can be much improved, and other areas can be somewhat improved. (This used to be commit 1dd865005594671e7effe06fb088fa97fa08de0b)
2007-10-10r7776: add a method for getting arbitrary opaque data into a ldb context, ↵Andrew Tridgell1-0/+31
for use by backends. Currently only EventContext is used in this way. (This used to be commit 9fa21b245843371f7777682ee4e5b98e2925b4d0)
2007-10-10r7759: allow ldb_errstring() to be used when not connectedAndrew Tridgell1-0/+3
(This used to be commit 818ae965afad37216d804aa630359d875794612e)
2007-10-10r7709: - convert ldb to use popt, so that it can interact with the sambaAndrew Tridgell1-19/+29
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-10r7667: added a ldb ildap backend, using our internal ldap client library. ↵Andrew Tridgell1-1/+5
Next step is to remove the check for the ldap libraries in configure (This used to be commit 74841dbb2a86bb1c584b5c26c4cd24a818a65a34)
2007-10-10r7527: - added a ldb_search_bytree() interface, which takes a ldb_parse_treeAndrew Tridgell1-0/+17
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-10r7276: - moved static tdb function ltdb_dn_fold() into common/ so that it can beDerrell Lipman1-0/+6
called from multiple backends. (ldb_sqlite3 needs it too.) Added parameter for a callback function that determines whether an attribute needs case folding. - begin to prepare for sqlite3 in build process - work-in-progress updates, on ldb_sqlite3 (This used to be commit a80bced0b96ffb655559a43cf7f4d7a34deb5a7d)
2007-10-10r6470: Remove ldb_search_free() it is not needed anymore.Simo Sorce1-9/+3
Just use talloc_free() to release the memory after an ldb_search(). (This used to be commit 4f0948dab0aa5e8b6a4ce486f3668ca8dfae23db)
2007-10-10r5585: LDB interfaces change:Simo Sorce1-10/+1
changes: - ldb_wrap disappears from code and become a private structure of db_wrap.c thanks to our move to talloc in ldb code, we do not need to expose it anymore - removal of ldb_close() function form the code thanks to our move to talloc in ldb code, we do not need it anymore use talloc_free() to close and free an ldb database - some minor updates to ldb modules code to cope with the change and fix some bugs I found out during the process (This used to be commit d58be9e74b786a11a57e89df36081d55730dfe0a)
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-31/+25
(This used to be commit 71323f424b4561af1fdddd2358629049be3dad8c)
2007-10-10r3093: - implment ldb_rename() and ldbrenameStefan Metzmacher1-0/+11
- add tests for ldbrename - disable all tests which regenerate the index (this is broken for me...the process hangs, tridge we need to discuss that) - link only the needed stuff to the ldb tools - build ldbtest inside samba metze (This used to be commit 18552f4786c24e0019cc87726ef4c05365fe586e)
2007-10-10r574: - another attempt at const cleanliness in ldbAndrew Tridgell1-1/+1
- fixed a problem with searching for values containing an '=' sign - fixed the semantics of attempting an attribute deletion on an attribute that doesn't exist. - added some more ldb_msg_*() utilities (This used to be commit 62b4ec367d170330d837b0f1fe5cd13205a53b59)
2007-10-10r513: added a generic ldb debug system to allow the Samba debug functions toAndrew Tridgell1-4/+20
be cleanly interfaced to ldb (This used to be commit 74b89d5f960d6b936751e3f057b4540eb80b79cd)
2007-10-10r490: - expanded the test suite to test modify and delete operationsAndrew Tridgell1-1/+1
- made yet another attempt to make ldb const clean. - "make test" now runs both the tdb and ldap backend tests, and run the ldbtest utility with and without indexing - added prototypes in ldb.h for ldb_msg_*() public functions (This used to be commit 01e87406768cb5a98ac8530a2f361a4987a36cd3)
2007-10-10r456: - added -i option to ldbsearchAndrew Tridgell1-1/+1
- fixed sorting bug in ldb index handing (This used to be commit cdd48e2b9b3ca6be5503eec401e09db162408ac8)
2007-10-10r454: allow a non-URL form of a filename to be used in ldb_connect(). ThisAndrew Tridgell1-1/+2
makes it a little easier to work with the ldb tools (This used to be commit 03df31cef025b2087531579437d6bae1ec36e82f)
2007-10-10r387: more C++ friendly changesAndrew Tridgell1-2/+2
(This used to be commit ac0c525a8b8a05cc275fb9f4c1dcfd749604c85f)
2007-10-10r381: make the code more C++ friendlyAndrew Tridgell1-1/+1
(This used to be commit 8acecc7f27e25ab876fffffe43ae75b5f77aff77)
2007-10-10r158: cope with or without LDAP in samba build of ldbAndrew Tridgell1-2/+2
(This used to be commit e776ce4f9e6fead235b3cec86d85eb95704f10ef)
2007-10-10r152: a quick airport commit ....Andrew Tridgell1-1/+1
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-10r141: A number of changes to get things working on FreeBSD and reduce the ↵Richard Sharpe1-0/+2
breakage caused by someone recently ... 1. Add configure check HAVE_COMPARISON_FN_T to see if this is defined. I have not checked this on Linux yet, but will do so soon. 2. Add the definitions of malloc_p, realloc_p etc. 3. Check for LDAP and don't build stuff that depends on LDAP if we don't\ have it. It currently builds on FreeBSD but there is one warning printed out at the end. (This used to be commit 7b34fbe0f2ef175e5504e34e4f3cdf9a0563970f)
2004-03-31make a more recent snapshot of ldb available to interestedAndrew Tridgell1-0/+129
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)