1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

94 Commits

Author SHA1 Message Date
Matthias Dieter Wallnöfer
f8dba773a5 s4:ldb_ldap.c - fix indentation 2010-03-08 10:33:24 +01:00
Matthias Dieter Wallnöfer
95d726f301 LDB:LDAP backend - change a counter variable to "unsigned" 2010-03-08 10:29:25 +01:00
Brad Hards
1683d090cc LDB related spelling fixes.
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-02-22 21:45:36 +01:00
Matthias Dieter Wallnöfer
1ea460b0b0 ldb:backend "connect" functions - convert result values to LDB constants
I think this is better since "ldb_backend_connect" and "ldb_connect" which
propagate those values should return only LDB constants. Therefore a conversion
(especially for "-1") would be needed.
2009-10-25 11:24:54 +01:00
Matthias Dieter Wallnöfer
a69f84fd2a s4:ldb_ldap - Fix intendation 2009-10-18 10:45:15 +02:00
Sumit Bose
9d7cb4826a remove all '\n' from ldb_debug 2009-07-14 11:21:11 -04:00
Simo Sorce
1cd7fe7194 Fix headers, ldb_includes.h is a private header,
do not reference it from ldb.h
2009-02-23 17:38:11 -05:00
Simo Sorce
380874ef86 Fix the mess with ldb includes.
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-30 01:02:03 -05:00
Stefan Metzmacher
183c379fe5 s4:lib/tevent: rename structs
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-12-29 20:46:40 +01:00
Andrew Bartlett
596fe759e1 s4:ldb: make it possible to return per entry controls
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-12-17 12:29:27 +11:00
Simo Sorce
9f7c2548d9 LDB ASYNC: other backends 2008-09-29 04:22:19 +02:00
Jelmer Vernooij
b0a95ad2f6 Revert LDB return code patches from Matthias. 2008-09-25 00:01:05 +02:00
Matthias Dieter Wallnöfer
9261fa997c Cosmetic corrections for the LDB backend modules
This commit applies some cosmetic corrections for the LDB backend modules.
2008-09-24 19:40:03 +02:00
Stefan Metzmacher
92f6333535 ldb: fix the standalone build
metze
(This used to be commit 91b49365abed6f67e2b3c18b0090b4e6ff1df935)
2008-03-18 15:59:21 +01:00
Jelmer Vernooij
39a817d310 Fix use of some modules (needed _PUBLIC_).
(This used to be commit ce332130ea77159832da23bab760fa26921719e2)
2008-02-20 04:33:43 +01:00
Andrew Tridgell
6c973f4e8c r23798: updated old Temple Place FSF addresses to new URL
(This used to be commit 40c0919aaa9c1b14bbaebb95ecce53eb0380fdbb)
2007-10-10 14:59:15 -05:00
Andrew Tridgell
b8d69a7ea2 r23795: more v2->v3 conversion
(This used to be commit 84b468b2f8f2dffda89593f816e8bc6a8b6d42ac)
2007-10-10 14:59:14 -05:00
Jelmer Vernooij
52fb06edc2 r22681: Fix standalone ldb build when parent directory name != ldb.
(This used to be commit 1093875d59f1ea9b8bd82277d4f9d8366e584952)
2007-10-10 14:52:00 -05:00
Stefan Metzmacher
f4fa06ca00 r20190: fix the ldb_ldap backend
metze
(This used to be commit 6b7eb5d68e769fd5450c5d92c3ece4c471aaeae9)
2007-10-10 14:29:20 -05:00
Stefan Metzmacher
4e93962ea5 r20130: remove one more talloc_get_type()
metze
(This used to be commit 024dacb3b0a32bcaaef0b7a7598070b9034a7648)
2007-10-10 14:29:12 -05:00
Stefan Metzmacher
ecc8ef51cb r20127: - allocate ldb_handle under ldb_request! fix a mem leak
- pass ldb_request to init_lldb_handle()
- remove some useless talloc_get_type() calls

metze
(This used to be commit a7397c4d2bed181c96863e985727c8dad0894df7)
2007-10-10 14:29:11 -05:00
Stefan Metzmacher
43637dfb9d r20126: fix talloc hierachy and make lldb a child of module
metze
(This used to be commit 1e3bb180261643900c7bdacef818add5349c7a30)
2007-10-10 14:29:11 -05:00
Simo Sorce
a9e31b33b5 r19832: better prototypes for the linearization functions:
- ldb_dn_get_linearized
  returns a const string

- ldb_dn_alloc_linearized
  allocs astring with the linearized dn
(This used to be commit 3929c086d5d0b3f08b1c4f2f3f9602c3f4a9a4bd)
2007-10-10 14:28:22 -05:00
Simo Sorce
4889eb9f7a r19831: Big ldb_dn optimization and interfaces enhancement patch
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-10 14:28:22 -05:00
Simo Sorce
9ec6f0a3a1 r19532: oops forgot this
(This used to be commit 9af225e319838a33141daa450473c157ecd65cd3)
2007-10-10 14:24:45 -05:00
Volker Lendecke
3cee746a3f r19485: Fix Coverity # 319
(This used to be commit d12bdb6133c1612b9d3e1a0c6692cbc4ab17fe32)
2007-10-10 14:24:37 -05:00
Andrew Tridgell
e36ea2e8eb r19362: - don't need to store the baseinfo message after cache load
- set better names on talloc structures in ldb modules, making leaks
  easier to track down
(This used to be commit 3bf76db42dc6dde5d71083216dba819869b31c75)
2007-10-10 14:21:17 -05:00
Andrew Tridgell
2ad8e1443d r19273: - fixed error handling with the ldap backend
- propogate errors to the ldbadd command line tool

- use the rdn_name module when testing the tdb backend to allow the
  same test code to correctly test the ldap and non-ldap backends
(This used to be commit dd82c474a123d90329bda653a4cb73c93e087b15)
2007-10-10 14:21:00 -05:00
Andrew Tridgell
bf86ece6cb r19009: ensure that data values from ldap libs are null terminated, to allow
ldb_msg_find_attr_as_string() to work correctly.

Thanks to Jim Myers for spotting this!
(This used to be commit b2076c1a7e4b70644b59689ce46952ef940be6b0)
2007-10-10 14:20:28 -05:00
Andrew Tridgell
862ba26172 r17678: don't free result message twice
(This used to be commit e3908818198bf0f89c1140e659ab2140bdfbc323)
2007-10-10 14:16:22 -05:00
Simo Sorce
faed817506 r17514: Simplify the way to set ldb errors and add another
helper function to set them.
(This used to be commit 260868bae56194fcb98d55afc22fc66d96a303df)
2007-10-10 14:15:31 -05:00
Simo Sorce
49f68caed2 r17186: "async" word abuse clean-up part 2
(This used to be commit c6aa60c7e69abf1f83efc150b1c3ed02751c45fc)
2007-10-10 14:10:17 -05:00
Simo Sorce
c93817b36d r17185: Oh, I wanted to do this for sooo long time.
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-10 14:10:16 -05:00
Stefan Metzmacher
761450c66e r17112: - fix the build of the ldap ldb backend with newer openldap header files.
- use the correct timeout variable (simo you should do a standalone build before commiting:-)

metze
(This used to be commit ac9d69d2574e8331b3ce9c3b97922ead9165fa79)
2007-10-10 14:10:13 -05:00
Andrew Bartlett
d912d6fcef r16087: Fix silly cut-and-paste typo that cost me much of my afternoon...
This only affects my new partitions module, which I will post soon,
but should be fixed anyway.

Andrew Bartlett
(This used to be commit 8912c4e057eb3962321245cf49b92999afcc64fc)
2007-10-10 14:08:58 -05:00
Andrew Bartlett
247af0d569 r16083: Make it possible to initialise a backend module, without it setting up
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-10 14:08:57 -05:00
Simo Sorce
ca5accf224 r16036: Add a couple of new functions to corretly deal with timeouts.
Check timeouts are correctly verified.
Some minor fixed and removal of unused code.
(This used to be commit b52e5d6a0cb1a32e62759eaa49ce3e4cc804cc92)
2007-10-10 14:08:52 -05:00
Simo Sorce
0c7b82e5f6 r15942: Remove the sync internal ldb calls altogether.
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-10 14:08:43 -05:00
Simo Sorce
3a4d7eb2c0 r15927: Optimize ldb module traverse while keeping the API intact.
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-10 14:08:41 -05:00
Simo Sorce
90a5e19e03 r15913: Error passing in the async code is not in agood shape
Start enhancing it and fix some problems with incorrect evalutaion of the codes

Implement rdn rename (async only)
(This used to be commit 6af1d738b9668d4f0eb6194ac0f84af9e73f8c2e)
2007-10-10 14:08:39 -05:00
Andrew Tridgell
971d30bb20 r15854: more talloc_set_destructor() typesafe fixes
(This used to be commit 61c6100617589ac6df4f527877241464cacbf8b3)
2007-10-10 14:08:32 -05:00
Jelmer Vernooij
bb1909e15e r14592: Add support for loading shared modules to LDB.
(This used to be commit f10fae23f0685b2d9c6174596e1c66d799f02c52)
2007-10-10 13:58:58 -05:00
Simo Sorce
6e74d83565 r14163: Remove LDB_WAIT_ONCE, we can hardly guarante we
get anything if not waiting for all, keeping this
value may just lead to false expectations.

You either make blocking call waiting for ALL results
transforming this in a sync call, or either you loop
expecting from 0 to all results being returned at any
time on any of these loops.

It should be clear also that when you may receive results
at any time as soon as you call ldb_request.
Your callback may have received all results even before
calling ldb_async_wait the first time.

Simo.
(This used to be commit 6f041068b50caf919cd971812bdb8e3e810565fb)
2007-10-10 13:56:56 -05:00
Simo Sorce
3baf060604 r14161: return early if we know the job is already finished
(This used to be commit 09f6f552d73f782dc8d62cefad9c5f584b7b07d2)
2007-10-10 13:56:56 -05:00
Simo Sorce
257598424e r13996: simplify ldb_async_wait() some more
(This used to be commit ef1b3e6368179fe86ae07b8d00e4668090175551)
2007-10-10 13:52:36 -05:00
Simo Sorce
7b82c4beb9 r13992: change the way ldb_async_wait() works.
I think I should change the name of this function
to ldb_async_process(), any opinions ?
(This used to be commit 3347322d1327cfa975ee9dccd4f2774e6e14fbcb)
2007-10-10 13:52:34 -05:00
Simo Sorce
7ffc1b48a4 r13986: minor fixes
(This used to be commit 8375f030197d311515085ac6beeaf63af45d14b0)
2007-10-10 13:52:34 -05:00
Jelmer Vernooij
5d0aa16dfc r13839: Use registration mechanism for backends as well (in the same sense
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-10 13:52:14 -05:00
Simo Sorce
8edf29e8ef r13827: Minor enhancements or cosmetic changes
(This used to be commit 7ef63abae12f65835a82f9931ad1f5ea75e5f3f6)
2007-10-10 13:52:14 -05:00
Simo Sorce
509814bd03 r13823: make async_wait part of the modules ops
(This used to be commit b4202cf030d5f154f0f94f5f501ecd648ba5c48f)
2007-10-10 13:52:13 -05:00