summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r17514: Simplify the way to set ldb errors and add anotherSimo Sorce1-27/+37
helper function to set them. (This used to be commit 260868bae56194fcb98d55afc22fc66d96a303df)
2007-10-10r17186: "async" word abuse clean-up part 2Simo Sorce1-20/+20
(This used to be commit c6aa60c7e69abf1f83efc150b1c3ed02751c45fc)
2007-10-10r17185: Oh, I wanted to do this for sooo long time.Simo Sorce1-5/+5
Finally acknowledge that ldb is inherently async and does not have a dual personality anymore Rename all ldb_async_XXX functions to ldb_XXX except for ldb_async_result, it is now ldb_reply to reflect the real function of this structure. Simo. (This used to be commit 25fc7354049d62efeba17681ef1cdd326bc3f2ef)
2007-10-10r16972: Replace the sequence_number function pointer in ldb with the ldb flags.Andrew Bartlett1-4/+6
The function pointer was meant to be unused, this patch fixes partition.c to use ldb_sequence_number(). (No backend provided the pointer any more). Set the flags onto the ldb structure, so that all backends opened by the partitions module inherit the flags. Set the read-ony flag when accessed as the global catalog Modify the LDAP server to track that this query is for the global catalog (by incoming port), and set a opqaue pointer. Next step is to read that opaque pointer in the partitions module. Andrew Bartlett (This used to be commit a1161cb30e4ffa09657a89e03ca85dd6efd4feba)
2007-10-10r16825: Make ldb_sainity_check() set an error string. This makes it muchAndrew Bartlett1-9/+14
easier to chase down what modules or application code gets wrong. Ensure not to leave memory allocated on failure in ldb_search() Andrew Bartlett (This used to be commit 0828739951ed879640f8ed6e4700d8ca6b8221b8)
2007-10-10r16784: - make some function in ldb static, they not need to be exported ↵Simo Sorce1-3/+3
anywhere - fix a bad segfault Andrew please make test before committing. Simo. (This used to be commit b9b6bb3e89d3b0e04ccce15156c1a128b6f20d88)
2007-10-10r16172: Translate the ldb error codes into appropriate messages for theAndrew Bartlett1-3/+9
transaction cases. Andrew Bartlett (This used to be commit 28883f719304ee438c54a4d33e6bf1239f8c4094)
2007-10-10r16085: Set the error string if we fail to find a valid op to execute. HelpsAndrew Bartlett1-2/+6
in chasing down bugs :-) Andrew Bartlett (This used to be commit 9ede8edbaf1731f32814917439326f49b5f9f3ef)
2007-10-10r16083: Make it possible to initialise a backend module, without it setting upAndrew Bartlett1-4/+66
the whole ldb structure. Because the sequence number was a fn pointer on the main ldb context, turn it into a full request (currently sync). Andrew Bartlett (This used to be commit fbe7d0ca9031e292b2d2fae263233c973982980a)
2007-10-10r16071: tdb has nested transactionsSimo Sorce1-53/+86
change the code to exploit that in ldb I still have to reintroduce transactions when you call ldb_request directly, I have some plans I hop to be able to develop in the next weekend (This used to be commit 35111206021d667dfd217b5fd8d82f5c2714cc9e)
2007-10-10r16036: Add a couple of new functions to corretly deal with timeouts.Simo Sorce1-21/+44
Check timeouts are correctly verified. Some minor fixed and removal of unused code. (This used to be commit b52e5d6a0cb1a32e62759eaa49ce3e4cc804cc92)
2007-10-10r16007: If no error string was setup by the backend, ensure that we always getAndrew Bartlett1-1/+9
at least a generic error, even when inside a transaction. This helps debugging ldb/js interactions a lot... Andrew Bartlett (This used to be commit b607acf6f0b3567a40a3e35911c690feda243f50)
2007-10-10r15944: rename LDB_ASYNC_ADD -> LDB_ADD, LDB_ASYNC_MODIFY -> LDB_MODIFY, etc...Simo Sorce1-10/+10
(This used to be commit 55d97ef88f377ef1dbf7b1774a15cf9035e2f320)
2007-10-10r15942: Remove the sync internal ldb calls altogether.Simo Sorce1-24/+2
This means that some modules have been disabled as well as they have not been ported to the async interface One of them is the ugly objectclass module. I hope that the change in samldb module will make the MMC happy without the need of this crappy module, we need proper handling in a decent schema module. proxy and ldb_map have also been disabled ldb_sqlite3 need to be ported as well (currenlty just broken). (This used to be commit 51083de795bdcbf649de926e86969adc20239b6d)
2007-10-10r15932: Remove per request credsSimo Sorce1-5/+0
They have never benn used and make little sense too imo (This used to be commit f0c1d08d50f8a3e25650ac85b178ec7a43e433d9)
2007-10-10r15927: Optimize ldb module traverse while keeping the API intact.Simo Sorce1-10/+34
I was sick of jumping inot each module for each request, even the ones not handle by that module. (This used to be commit 7d65105e885a28584e8555453b90232c43a92bf7)
2007-10-10r15795: Try to use the async code by defaultSimo Sorce1-12/+140
It passess all my tests, but I still need to work on a lot of stuff. Shouldn't impact anybody else work, so I want to commit now and see what happens Will work to remove the old code from modules and backends soon, and make some more restyling in ldb internals. So, if there is something you don't like in this desgin please speak now. Simo. (This used to be commit 8b2a563e716a789ea77cbfbf2f372724de5361ce)
2007-10-10r15388: Fix cut&paste typo.Tim Potter1-1/+1
(This used to be commit 88e854929f10947aa1a7f57bbfef436bc8832529)
2007-10-10r15176: Ensure we don't segfault when we try and delete @FOO records.Andrew Bartlett1-5/+10
Don't try and steal the result of a search on failure, it has already been talloc_free()'ed by the ildb code. Andrew Bartlett (This used to be commit a99bd2e033501954aca8f35afe8a7f2bbfadf6b7)
2007-10-10r15113: Add a ldb_strerror() function.Tim Potter1-0/+95
(This used to be commit 456a1de2b9cd54337066c9ba24ad1c46aafcd072)
2007-10-10r14599: Pass ACLs down the registry layer.Jelmer Vernooij1-1/+1
(This used to be commit 6cdefd8945eee5513a6993350ea71f12d4dbd6fa)
2007-10-10r14594: Fix some dependencies (required for shared library build)Jelmer Vernooij1-1/+1
(This used to be commit 06f7a8c692a645830eb3dd9abad8556c66bba747)
2007-10-10r14592: Add support for loading shared modules to LDB.Jelmer Vernooij1-2/+13
(This used to be commit f10fae23f0685b2d9c6174596e1c66d799f02c52)
2007-10-10r13998: From now on ldb_request() will require an alloced requestSimo Sorce1-74/+95
By freeing the request you will be sure everything down the path get freed. this also means you have to steal the results if you want to keep them :) simo. (This used to be commit e8075e6a062ce5edb84485e45d0b841c2ee2af7d)
2007-10-10r13996: simplify ldb_async_wait() some moreSimo Sorce1-1/+1
(This used to be commit ef1b3e6368179fe86ae07b8d00e4668090175551)
2007-10-10r13992: change the way ldb_async_wait() works.Simo Sorce1-5/+1
I think I should change the name of this function to ldb_async_process(), any opinions ? (This used to be commit 3347322d1327cfa975ee9dccd4f2774e6e14fbcb)
2007-10-10r13900: don't segfault on errorSimo Sorce1-2/+2
(This used to be commit cf7ad707578ee4dbd5dbf3c83f1f4ede42de3835)
2007-10-10r13839: Use registration mechanism for backends as well (in the same senseJelmer Vernooij1-18/+43
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-10r13823: make async_wait part of the modules opsSimo Sorce1-4/+5
(This used to be commit b4202cf030d5f154f0f94f5f501ecd648ba5c48f)
2007-10-10r13786: [merge] Add registration functions for LDB modulesJelmer Vernooij1-13/+0
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-10r13615: Make ldb_set_errstring get ldb instead of module as parameter.Simo Sorce1-9/+9
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 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)