summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r19264: Clarify behaviour in ldb_search_callback() and provide moreAndrew Bartlett1-7/+11
information when modules fail to load. Andrew Bartlett (This used to be commit 512ef62f4a63fd90b67757b2c7b2e8ec83969204)
2007-10-10r19188: merge from samba3:Stefan Metzmacher1-2/+2
fix compiler warnings metze (This used to be commit dc139d8715f58b27363266f1426da451907845eb)
2007-10-10r18942: add a ldb_set_create_perms() function in ldb. I didn't call itAndrew Tridgell1-0/+11
ldb_set_umask() (which is what we had discussed) as it doesn't actually set the umask (in effect it sets the inverse of the umask - the perms to be used for the file) (This used to be commit 7e2ec875908c112d5c3b0f6d18f9a8bbacf33539)
2007-10-10r18894: Merge const fixes from 3_0Volker Lendecke1-5/+5
(This used to be commit 4ce447223cc71b8b2a31c2da3b0afd8e3fcf0c01)
2007-10-10r18882: make style consistentSimo Sorce1-1/+3
(This used to be commit a141ee9473ae46c63dea247456f156b40f766d42)
2007-10-10r18830: ensure backends aren't added twice (needed for samba3)Andrew Tridgell1-13/+19
(This used to be commit 54b864b491d8a10c28833d28b764262503a72e91)
2007-10-10r18781: Move the usnCreated and usnChanged handling around again.Andrew Bartlett1-1/+2
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-10r18777: add helper functions to create an ldb_request structureSimo Sorce1-68/+203
(This used to be commit bcbe82873f2f0a4e2552ed27eb171028de4560a7)
2007-10-10r18439: 2nd try at a talloc_move() api. This type with the ** ptr interfaceAndrew Tridgell1-2/+2
exposed. Unfortunately this generates a large number of type punning warnings. We'll have to find some magic to hide those. (This used to be commit 254cbf09dee5a1e20c47e47a298f1a8d172b41b9)
2007-10-10r18438: I should have examined these uses of talloc_move() moreAndrew Tridgell1-4/+1
carefully. Most of them are OK, but a couple were not. (This used to be commit b0de2838829d9750817c31f28c11c6b2be6e7b64)
2007-10-10r18436: converted ldb to use talloc_move() instead of talloc_steal() whenAndrew Tridgell1-10/+3
appropriate. Note that I also removed the error checks that were being done on the result of talloc_steal(). They are pointless as talloc_steal() doesn't have any failure modes that wouldn't cause a segv anyway, and they tend to clutter the code (This used to be commit c0d9e7d473b8e3eb2524a9fc29cf88680f994b36)
2007-10-10r18272: Couldn't resist to change this.Simo Sorce1-1/+1
What we want to do here is to just make sure res is freed. Well let's just do so explicitly, the steal cofused me initially while reading the code. This way it is clear what we want to do. Simo. (This used to be commit 30a26a501fef939991a2e998003c5a43fd5cb67e)
2007-10-10r18245: Ensure we don't keep the rootdse record around (steal it onto theAndrew Bartlett1-4/+6
correct memory context). Andrew Bartlett (This used to be commit b4f234e507fa94e9600c362fb6edb704d299cfce)
2007-10-10r17830: Set the default_basedn (hey, it comes from the "default" naming ↵Simo Sorce1-32/+39
contex :-) once at connection time, after modules have been loaded. Introduce a function to retrieve the value where needed. (This used to be commit 0caf6a44e03393c645030a9288e7dfd31e97c98b)
2007-10-10r17828: set the auto_baseDN opaque even on failure to fetch rootDSE. ThatAndrew Tridgell1-3/+1
ensures we never try twice (This used to be commit 946901e5dde9d31727448070a06e56da38d4a59e)
2007-10-10r17821: changed ldb_search() and the ldbsearch command line utility toAndrew Tridgell1-0/+41
automatically work out the basedn when basedn==NULL. The basedn is fetched from the rootDSE defaultNamingContext value (if there is one) This means we don't have to have the defaultNamingContext logic in lots of places. It makes a lot of sense to me to have basedn==NULL mean "use the default, as given by the database" Note that explicitly specifing a basedn of '' is not the same thing, and will not trigger this code The baseDN is cached in a ldb opaque, so we only have to fetch it once (This used to be commit 5d1b66b68fc517ce684f75e466ed5f25e46857d5)
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)