summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_tdb
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r14592: Add support for loading shared modules to LDB.Jelmer Vernooij1-1/+1
(This used to be commit f10fae23f0685b2d9c6174596e1c66d799f02c52)
2007-10-10r14431: don't call qsort with a null arrayAndrew Tridgell1-1/+3
(This used to be commit 2c33f577ad5bf8cddec735e75a26c4a4c07d8c51)
2007-10-10r14161: return early if we know the job is already finishedSimo Sorce1-0/+3
(This used to be commit 09f6f552d73f782dc8d62cefad9c5f584b7b07d2)
2007-10-10r13996: simplify ldb_async_wait() some moreSimo Sorce2-5/+5
(This used to be commit ef1b3e6368179fe86ae07b8d00e4668090175551)
2007-10-10r13992: change the way ldb_async_wait() works.Simo Sorce1-1/+3
I think I should change the name of this function to ldb_async_process(), any opinions ? (This used to be commit 3347322d1327cfa975ee9dccd4f2774e6e14fbcb)
2007-10-10r13839: Use registration mechanism for backends as well (in the same senseJelmer Vernooij1-1/+6
my previous patch added it for modules). This is the next step towards LDB backends and modules as run-time loadable .so files. (This used to be commit fb2f70de4f6c4a9b13ad590cb4d3a9c858cede49)
2007-10-10r13827: Minor enhancements or cosmetic changesSimo Sorce3-33/+19
(This used to be commit 7ef63abae12f65835a82f9931ad1f5ea75e5f3f6)
2007-10-10r13823: make async_wait part of the modules opsSimo Sorce2-5/+4
(This used to be commit b4202cf030d5f154f0f94f5f501ecd648ba5c48f)
2007-10-10r13818: Make ldb_tdb 'fake' async.Simo Sorce5-186/+589
Simo. (This used to be commit 0db616ef59ed51cac7e0bfaea8a799d5aa42ef16)
2007-10-10r13786: [merge] Add registration functions for LDB modulesJelmer Vernooij1-7/+1
Applications that use LDB modules will now have to run ldb_global_init() before they can use LDB. The next step will be adding support for loading LDB modules from .so files. This will also allow us to use one LDB without difference between the standalone and the Samba-specific build (This used to be commit 52a235650514039bf8ffee99a784bbc1b6ae6b92)
2007-10-10r13700: added highestCommittedUSN, uSNChanged and uSNCreated support, usingAndrew Tridgell1-0/+26
the @BASEINFO sequenceNumber (simo, I changed the function pointer to a structure element as you preferred) (This used to be commit 68c9ac38c7eed221b44499ee3d74597063dfe7a1)
2007-10-10r13615: Make ldb_set_errstring get ldb instead of module as parameter.Simo Sorce1-6/+6
The module was just used to get to the ldb so it was meningless. Also add LDB_WAIT_ONCE e relative code in ldb_ildap.c (This used to be commit d5b467b7c132b0bd4d23918ba7bf3370b1afcce8)
2007-10-10r13609: Get in the initial work on making ldb asyncSimo Sorce2-0/+2
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-10r13335: Fix the build and add an utf8 safe ldb_hadler_fold functionSimo Sorce1-1/+1
based on ldb_casefold (This used to be commit 6104f900863c688707809d42c5429a42d654d5fb)
2007-10-10r13333: revert previous commit I will use ldb_caseless_cmp in attrib_handlersSimo Sorce1-1/+1
to correctly support utf8 comparisons add an ldb_attr_Casefold function for attribute names and use it instead of casefold in the right places (This used to be commit 3b4eb2413bbce059dde69f35c03cdc3cc2ba85c5)
2007-10-10r13324: From now on check attribute names obey rfc2251Simo Sorce1-1/+1
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-10r13289: Check the tree is not NULLSimo Sorce1-0/+4
Thanks to Aaron J. Seigo <aseigo@kde.org> for spotting this (This used to be commit 4b5c0493e2276a9eba1bada7c4bac99999a465e2)
2007-10-10r13258: Fix the talloc heirachy for ldb_tdb.Andrew Bartlett3-17/+20
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-10r12829: fix ldb headers, to not include '<...>' files in .c filesStefan Metzmacher6-15/+12
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-1/+7
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 Sorce4-0/+9
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-10r12608: Remove some unused #include lines.Jelmer Vernooij1-1/+0
(This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981)
2007-10-10r12540: Provide more information in the ldb error string.Andrew Bartlett1-3/+5
Andrew Bartlett (This used to be commit 31f65e510cdd46b1962cf06b3d51f152b1cecf37)
2007-10-10r12408: as we always add the destinguishedName as autogenerated value,Stefan Metzmacher1-8/+16
don't store it on disk, as this would cause confusing results metze (This used to be commit c3d3309ba1567a4363c7c0235842833b5e2b6771)
2007-10-10r11958: - fixed memory leaks in the ldb_result handling in ldb operationsAndrew Tridgell1-1/+1
- removed an unnecessary level of pointer in ldb_search structure (This used to be commit b8d4afb14a18dfd8bac79882a035e74d3ed312bd)
2007-10-10r11567: Ldb API change patch.Simo Sorce4-28/+72
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-10r11364: added a ldb_attr_dn() function for testing if an attribute name isAndrew Tridgell1-2/+1
"dn" or "distinguishedName". This makes us a bit more consistent (This used to be commit b41b374b55f9a056c47ffa2ff88aa5272dbc42fc)
2007-10-10r11353: a bit of an improvement to the ldb_tdb error handlingAndrew Tridgell2-8/+39
(This used to be commit 896704f5c139c8bce30dfc898bb3a12be10035ed)
2007-10-10r11111: fixed a talloc error in the dn shortcut codeAndrew Tridgell1-5/+18
(This used to be commit e28a334eeb8fa22f686d0c1dc48b2977d85b9e10)
2007-10-10r10913: This patch isn't as big as it looks ...Andrew Tridgell5-37/+36
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-10r10892: - improved the handling of the special distinguishedName attributeAndrew Tridgell1-85/+43
- ensure we don't add attributes twice, should a user ask for the attribute twice. Do this in such a way that we don't become O(n^2) - removed some unused code (This used to be commit 7684cdb47b4ae516f066afb249d5f88032152ec9)
2007-10-10r10889: make searches for dn's less of a special case, and much faster whenAndrew Tridgell2-15/+7
part of more complex expressions (This used to be commit 40d304140b4cf22559d6b55c8cbaf1b984baf62f)
2007-10-10r10753: don't require every ldb module to implement both a search_bytree() andAndrew Tridgell4-40/+15
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-10r10667: cope with a NULL tree for base searches in ldb_search()Andrew Tridgell1-11/+11
(This used to be commit 26ff53857802ae4a63f2b6e46c9caa7ca2fbbe89)
2007-10-10r10477: expose transactions outside ldb and change the API once moreSimo Sorce1-19/+25
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-10r10422: ldb_search() can now use tdb_traverse_read() to ensure it can run inAndrew Tridgell1-1/+1
parallel with any transaction (This used to be commit ddff66298f1a668c5220e24fc47f98d7dfc3068a)
2007-10-10r10408: now that we are using tdb transactions we don't need any additionalAndrew Tridgell3-166/+36
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-10r10406: added --nosync option to all ldb tools, so that you can control ifAndrew Tridgell1-5/+4
transactions are synchronous or not on the command line. add LDB_FLG_NOSYNC flag to ldb_connect() so we can make our temporary ldb databases non-synchronous (This used to be commit dba41164e0c52f1e4351bd9057b16661cee3a822)
2007-10-10r10405: added transactions into tdb, and hook them into ldb. See myAndrew Tridgell1-2/+22
samba-technical posting for more details on the transactions design. This also adds a number of command line arguments to tdbtorture, making it more flexible, and fixes some lock deadlock conditions in the tdbtorture code. (This used to be commit 06bd8abba942ec9f1e23f5c5d546cbb71ca3a701)
2007-10-10r10305: start implementing better error handlingSimo Sorce3-76/+61
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-10r10299: remove the public (un)lock functions and introduce a transaction basedSimo Sorce1-10/+23
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-10r10253: a fairly large tdb cleanup and re-organise. Nearly all of this changeAndrew Tridgell1-1/+1
just involves splitting up the core tdb.c code into separate files on logical boundaries, but there are some minor functional changes as well: - move the 'struct tdb_context' into tdb_private.h, hiding it from users. This was done to allow the structure to change without breaking code that uses tdb. - added accessor functions tdb_fd(), tdb_name(), and tdb_log_fn() to access the elements of struct tdb_context that were used by external code but are no longer visible - simplied tdb_append() to use tdb_fetch()/tdb_store(), which is just as good due to the way tdb locks work - changed some of the types (such as tdb_off to tdb_off_t) to make syntax highlighting work better - removed the old optional spinlock code. It was a bad idea. - fixed a bug in tdb_reopen_all() that caused tdbtorture to sometimes fail or report nasty looking errors. This is the only real bug fixed in this commit. Jeremy/Jerry, you might like to pickup this change for Samba3, as that could definately affect smbd in Samba3. The aim of all of these changes is to make the tdb transactions/journaling code I am working on easier to write. I started to write it on top of the existing tdb.c code and it got very messy. Splitting up the code makes it much easier to follow. There are more cleanups we could do in tdb, such as using uint32_t instead of u32 (suggested by metze). I'll leave those for another day. (This used to be commit 4673cdd0d261614e707b72a7a348bb0e7dbb2482)
2007-10-10r10251: some more work on ldb_sqlite3Simo Sorce1-0/+6
I must say that writing a new module is a very good way to find lot of subtle bugs laying in the code We need more tests! commit oLschema2ldif.c to keep it safe from data losses (rm -fr :-) update test generic to reflect the fix made on comparsion functions (This used to be commit 4357a2db5eadb15519ed93b957b2bad25ebf2a7d)
2007-10-10r9391: Convert all the code to use struct ldb_dn to ohandle ldap like ↵Simo Sorce6-113/+253
distinguished names Provide more functions to handle DNs in this form (This used to be commit 692e35b7797e39533dd2a1c4b63d9da30f1eb5ba)
2007-10-10r8779: Add rdn module to makefile and headersSimo Sorce1-1/+2
Search by distinguishedName as if searching by dn (This used to be commit 1d4046136255aead319ab08da229146dbd285b38)
2007-10-10r8736: this fixes the ldb speed (raises BENCH-WINS from 15 ops/sec to over 4000)Andrew Tridgell1-0/+7
simo, we need to be careful to cope with this sort of direct dn query efficiently (This used to be commit 7b37923b726752101062fa8a92d3f96e41d55602)
2007-10-10r8668: fixed a segv during upgrade of a very old ldb.Andrew Tridgell1-0/+5
Thanks to volker for finding this one too. Keep them coming! (This used to be commit 756796ad2ea86a9471d1b09e66b1a74c4523f6f4)
2007-10-10r8625: move the ldb_wrap logic into the ldb code. This logic is meant toAndrew Tridgell3-22/+127
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-10r8601: fixed null termination in ltdb connect errorAndrew Tridgell1-1/+1
(This used to be commit 64b6586b57de0bf22f8779447d217a918b7024a0)
2007-10-10r8585: add to ldb and ldap comparison functionalitySimo Sorce1-22/+25
better pares filters Approx is currently only a stub need to dig more info to understand what it really means and how it works exactly (This used to be commit a9e8cd0bad27ed2b3c6a12302e787ba3c9a70a3c)