summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb.c
AgeCommit message (Collapse)AuthorFilesLines
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)
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)