summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb.c
AgeCommit message (Collapse)AuthorFilesLines
2009-02-23Make all transactions nested in ldb. The current samba4 code expects thisSimo Sorce1-59/+73
behavior anyway, and given we can only have one transaction active per ldb context this is the only sane model we can support. Fix ldb_tdb transactions, we could return back with an error with neither committing nor canceling the actual tdb transaction in some error paths within the ltdb commit and cancel transaction paths. Added also some debugging to trace what was going on.
2009-01-30Fix the mess with ldb includes.Simo Sorce1-1/+16
Separate again the public from the private headers. Add a new header specific for modules. Also add service function for modules as now ldb_context and ldb_module are opaque structures for them.
2009-01-21s4:ldb: remove dependency to samba4's events wrapperStefan Metzmacher1-3/+10
metze
2008-12-29s4:lib/tevent: rename structsStefan Metzmacher1-4/+4
list="" list="$list event_context:tevent_context" list="$list fd_event:tevent_fd" list="$list timed_event:tevent_timer" for s in $list; do o=`echo $s | cut -d ':' -f1` n=`echo $s | cut -d ':' -f2` r=`git grep "struct $o" |cut -d ':' -f1 |sort -u` files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4` for f in $files; do cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp mv $f.tmp $f done done metze
2008-10-16Transform the sequence_number operation into a normal extended operation as ↵Simo Sorce1-21/+29
it should always have been. Make it also async so that it is not a special case.
2008-09-29LDB ASYNC: Core filesSimo Sorce1-95/+209
2008-09-23Merge ldb_search() and ldb_search_exp_fmt() into a simgle function.Simo Sorce1-53/+28
The previous ldb_search() interface made it way too easy to leak results, and being able to use a printf-like expression turns to be really useful.
2008-09-06Always free tmp contexts before returningSimo Sorce1-0/+1
(This used to be commit 40b71bbd718f6dee70c0611e527f55c56623dea6)
2008-06-30ldb: allow ldb modules to specify LDB_MODULE(name) or LDB_BACKEND(name)Stefan Metzmacher1-147/+0
metze (This used to be commit 1d5b714438a955d76f92f4ccd8aa2f7f89ffa5fd)
2008-06-17Change our module code to not use the special symbol name init_module()Andrew Tridgell1-10/+0
Current glibc libraries include a function called init_module(). If we use the same name, then a dlsym() can find the glibc function if the module doesn't have an initialisation function. In ldb, none of our modules have an init_module(), so we end up calling the libc functions with bogus arguments. (This used to be commit 1b0621068998590e7b1e9528b78744dcd2cd5909)
2008-06-15Note that making ldb the event context parent seem to lead to races whenSimo Sorce1-1/+1
freeing up resources. Try to avoid races by making the autofree context be the parent of the event system (This used to be commit 10ffa87b6b7ebfe51e81819feb93a72e9ec10418)
2008-06-15Now that we pass down the event context, start removing calls toSimo Sorce1-0/+2
event_context_init() where possible (This used to be commit 412f7a98dd809306ac9f35003fce554e1e1252e7)
2008-06-14Ups fix typo in error typeSimo Sorce1-2/+2
(This used to be commit eb351e33e58abdacdf44cf700f028cc13f52c4c8)
2008-06-14Cosmetic fixes.Simo Sorce1-88/+141
Remove trailing spaces adn try to fit 80 columns where possible (This used to be commit 5457c667647ec156bb7b4f86ce580def4e9350d5)
2008-06-14Make up the right dependencies now that ldb depends on libeventsSimo Sorce1-7/+27
(This used to be commit 3b8eec7ca334528cad3cdcd5e3fc5ee555d8d0e0)
2008-03-18ldb: fix the standalone buildStefan Metzmacher1-1/+1
metze (This used to be commit 91b49365abed6f67e2b3c18b0090b4e6ff1df935)
2008-02-21Merge branch 'v4-0-test' of git://git.samba.org/samba into 4-0-localAndrew Bartlett1-10/+55
(This used to be commit 5cd3310b78a85243eb436d05db3228c3495f9162)
2008-02-21Until the new ldb changes land, make ldb_wait set the error string.Andrew Bartlett1-1/+7
This makes it easier to track down which module only returned and error code, but not the error string. Andrew Bartlett (This used to be commit c4d502f68fbd5d5bc2ac5bb6369950379c9176fc)
2008-02-20Fix static module list generation for ldb.Jelmer Vernooij1-1/+0
(This used to be commit 92c1c0e9137f0845cac6cc96bf78711b6aaffe21)
2008-02-20Remove more function-based inits.Jelmer Vernooij1-11/+48
(This used to be commit b1a7810f3e70f9a831d9b8e85d531e448072adaf)
2008-02-20Allow ldb backends without init function, use init function-less ldb modules.Jelmer Vernooij1-0/+9
(This used to be commit 141ee91272fb4dafca0149f679e17721b6a3011e)
2007-12-21r26540: Revert my previous commit after concerns raised by Andrew.Jelmer Vernooij1-1/+1
(This used to be commit 6ac86f8be7d9a8c5ab396a93e6d1e6819e11f173)
2007-12-21r26539: Remove unnecessary statics.Jelmer Vernooij1-1/+1
(This used to be commit e53e79eebef3ece6978f0a2b4a1ee0a0814bb5d2)
2007-12-21r26481: Make function for loading symbol from DSO more generic, and allow ↵Jelmer Vernooij1-1/+5
modules to provide an ops table directly rather than an initialization function. (This used to be commit a71419a73a869c24121005ccbbcb4396f888888b)
2007-12-21r25933: LDB: Don't free errstring until after the printf, in case it is one ofAndrew Bartlett1-1/+3
the arguments. Andrew Bartlett (This used to be commit af40b1cd88f0e932665f6fe90daae8e687a3dc0c)
2007-12-21r25843: Finish check-soloading.Jelmer Vernooij1-1/+1
(This used to be commit 4fd3770f0c3f9a3e586f1a03a759dab782e04ba7)
2007-10-10r25081: Add modules_dir member to ldb_context that is used rather than a globalJelmer Vernooij1-0/+1
modulesdir setting. Samba always sets this to lp_modulesdir()/ldb (This used to be commit e672380d2156cf0421108a9c34f04f096c2afeed)
2007-10-10r23798: updated old Temple Place FSF addresses to new URLAndrew Tridgell1-2/+1
(This used to be commit 40c0919aaa9c1b14bbaebb95ecce53eb0380fdbb)
2007-10-10r23795: more v2->v3 conversionAndrew Tridgell1-1/+1
(This used to be commit 84b468b2f8f2dffda89593f816e8bc6a8b6d42ac)
2007-10-10r22681: Fix standalone ldb build when parent directory name != ldb.Jelmer Vernooij1-2/+1
(This used to be commit 1093875d59f1ea9b8bd82277d4f9d8366e584952)
2007-10-10r22557: Simo has long bugged me that the paths in the sam.ldb partitions wereAndrew Bartlett1-1/+11
not relative to the location of the sam.ldb, but instead lp_private_dir(). This fixes that issue. Andrew Bartlett (This used to be commit c0fd6f63399d55a1938e31ae7b10689cc02ff2fa)
2007-10-10r22474: If ldb does not return sucess, then the res variable may not be valid.Andrew Bartlett1-2/+0
It *should* just be NULL from the initialisation above, but I've had this not be the case... Andrew Bartlett (This used to be commit a2848dbf1fa9eafdef93bd914b12ff2f9f223a70)
2007-10-10r21736: Fix the smbclient test to do something more interesting with the lastAndrew Bartlett1-0/+3
few authentication tests. Now that the tests correctly 'fail', I was able to fix the credentials subsystem to honour USER and PASSWD. To get --machine-pass working, I needed ldb to always load it's static modules, so I put this in ldb_connect(). Andrew Bartlett (This used to be commit 3430d8c072407a1c33c32229095fc9db2142b6fa)
2007-10-10r20761: let ldb modules call ldb_set_default_dns()Stefan Metzmacher1-1/+1
metze (This used to be commit 224a31cdbf12a555b8c46786c9f83fec8e839c5a)
2007-10-10r20583: implement the frontend calls for extended operationsStefan Metzmacher1-0/+106
metze (This used to be commit cfcd05adc03effeaf85dc776c2d5bb5244f0d6d4)
2007-10-10r20581: - the ldb modules have explicit hooks for extended operationsStefan Metzmacher1-0/+4
so call them - reorder the request operations first all with explixit hooks metze (This used to be commit aababcbb05ad476507bba35723eaef01d18b4d4e)
2007-10-10r20317: store references to all important naming contexts.Stefan Metzmacher1-13/+45
add ldb_get_config_basedn(), ldb_get_schema_basedn() and ldb_get_root_basedn() metze (This used to be commit e28cb83904299fe01e8c0797f5429387f254ed1e)
2007-10-10r20192: I assume a 'break' is the correct thing to do here,Stefan Metzmacher1-0/+1
simo,tridge: please check this. found by the IBM checker metze (This used to be commit 5ac373c8b853d4527a095111253f3cb10522f5e8)
2007-10-10r20033: Never commit before testingSimo Sorce1-3/+6
Never commit before testing Never commit before testing :-) (This used to be commit fdd6ce6b7e288137aeaf62f9869441c73bedbd45)
2007-10-10r20032: Add ldb_search_exp_fmt()Simo Sorce1-0/+36
This functions adds support of a memory context to hook the results to and a printf style exp_fmt partameter to easily build expressions at once. (This used to be commit 2a2e181e4bc382d69056cebace9a4ae9897bdfbc)
2007-10-10r19831: Big ldb_dn optimization and interfaces enhancement patchSimo Sorce1-13/+13
This patch changes a lot of the code in ldb_dn.c, and also removes and add a number of manipulation functions around. The aim is to avoid validating a dn if not necessary as the validation code is necessarily slow. This is mainly to speed up internal operations where input is not user generated and so we can assume the DNs need no validation. The code is designed to keep the data as a string if possible. The code is not yet 100% perfect, but pass all the tests so far. A memleak is certainly present, I'll work on that next. Simo. (This used to be commit a580c871d3784602a9cce32d33419e63c8236e63)
2007-10-10r19720: - don't pass a pointer reference to ldb_search_default_callback()Stefan Metzmacher1-13/+14
as it's ugly when it free's the callers memory on failure! - only steal the controls on a LDB_REPLY_EXTENDED, LDB_REPLY_DONE and ignore them on LDB_REPLY_ENTRY, LDB_REPLY_REFERRAL as we currently have not way to return them in a ldb_result (we should fix this!) metze (This used to be commit 47da62b15abf48f97ce6fc8dc4627792728349ae)
2007-10-10r19453: Expose helper functionsSimo Sorce1-2/+3
(This used to be commit ee86e88e4f523d67900b52b5a4d4040a76360c61)
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)