1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-07 17:18:11 +03:00
Commit Graph

53 Commits

Author SHA1 Message Date
Andrew Bartlett
2d65c9ada5 r17300: Try to fix some segfaults in ldb_ildap module, when the remote server
drops the connection.  The reconnect code needs to be hooked in here.

Andrew Bartlett
(This used to be commit 778debedea)
2007-10-10 14:15:08 -05:00
Simo Sorce
49f68caed2 r17186: "async" word abuse clean-up part 2
(This used to be commit c6aa60c7e6)
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 25fc735404)
2007-10-10 14:10:16 -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 8912c4e057)
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 fbe7d0ca90)
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 b52e5d6a0c)
2007-10-10 14:08:52 -05:00
Stefan Metzmacher
5cc28a0365 r15964: fix error handling in ldb_ildap backend
metze
(This used to be commit 54e5aeff87)
2007-10-10 14:08:45 -05:00
Stefan Metzmacher
a6c4541fdf r15963: fix warnings
metze
(This used to be commit 11b49a4405)
2007-10-10 14:08:45 -05:00
Simo Sorce
2d19dca9c8 r15944: rename LDB_ASYNC_ADD -> LDB_ADD, LDB_ASYNC_MODIFY -> LDB_MODIFY, etc...
(This used to be commit 55d97ef88f)
2007-10-10 14:08:43 -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 51083de795)
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 7d65105e88)
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 6af1d738b9)
2007-10-10 14:08:39 -05:00
Jelmer Vernooij
ddb43d8eea r15592: Remove unused header
(This used to be commit 7d3cbfb157)
2007-10-10 14:06:01 -05:00
Simo Sorce
f7312bf373 r15242: allow to use LDB_FLG_RECONNECT
(This used to be commit cdd14c2a27)
2007-10-10 14:04:23 -05:00
Jelmer Vernooij
bb1909e15e r14592: Add support for loading shared modules to LDB.
(This used to be commit f10fae23f0)
2007-10-10 13:58:58 -05:00
Simo Sorce
99dfc7e4d4 r14227: We are passing the wrong pointer here
(This used to be commit 22c1b36355)
2007-10-10 13:57:05 -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 6f041068b5)
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 09f6f552d7)
2007-10-10 13:56:56 -05:00
Simo Sorce
257598424e r13996: simplify ldb_async_wait() some more
(This used to be commit ef1b3e6368)
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 3347322d13)
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 fb2f70de4f)
2007-10-10 13:52:14 -05:00
Simo Sorce
8edf29e8ef r13827: Minor enhancements or cosmetic changes
(This used to be commit 7ef63abae1)
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 b4202cf030)
2007-10-10 13:52:13 -05:00
Simo Sorce
6ef6182554 r13818: Make ldb_tdb 'fake' async.
Simo.
(This used to be commit 0db616ef59)
2007-10-10 13:52:13 -05:00
Jelmer Vernooij
26af14c39b r13786: [merge] Add registration functions for LDB modules
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 52a2356505)
2007-10-10 13:52:11 -05:00
Simo Sorce
af99fe6b01 r13743: Generic fixes and improvements
(This used to be commit c5eb27e5f7)
2007-10-10 13:52:08 -05:00
Simo Sorce
d590dea10b r13615: Make ldb_set_errstring get ldb instead of module as parameter.
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 d5b467b7c1)
2007-10-10 13:51:59 -05:00
Simo Sorce
00fe70e5b9 r13609: Get in the initial work on making ldb async
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 1e2c13b2d5)
2007-10-10 13:51:59 -05:00
Stefan Metzmacher
4d1c5a023c r12829: fix ldb headers, to not include '<...>' files in .c files
this helps in getting symbol -fvisibility=hidden (GCC 4 feature) working later.

metze
(This used to be commit 380938e97f)
2007-10-10 13:50:03 -05:00
Simo Sorce
dbef4d76de r12743: Remove the ugly way we had to make a second stage init and introduce
a second_stage_init private function for modules that need a second stage init.

Simo.
(This used to be commit 5e8b365fa2)
2007-10-10 13:49:48 -05:00
Simo Sorce
c908d0b2aa r12733: Merge ldap/ldb controls into main tree
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 77125feaff)
2007-10-10 13:49:47 -05:00
Andrew Bartlett
97b54b007e r12310: Link simple bind support in our internal LDAP libs to LDB and the
command line processing system.

This is a little ugly at the moment, but works.  What I cannot manage
to get to work is the extraction and propogation of command line
credentials into the js interface to ldb.

Andrew Bartlett
(This used to be commit f34ede763e)
2007-10-10 13:47:28 -05:00
Andrew Bartlett
a1827a1deb r12227: I realised that I wasn't yet seeing authenticated LDAP for the ldb
backend.

The idea is that every time we open an LDB, we can provide a
session_info and/or credentials.  This would allow any ldb to be remote
to LDAP.  We should also support provisioning to a authenticated ldap
server.

(They are separate so we can say authenticate as foo for remote, but
here we just want a token of SYSTEM).

Andrew Bartlett
(This used to be commit ae2f3a64ee)
2007-10-10 13:47:22 -05:00
Andrew Tridgell
6eabad9c9d r11958: - fixed memory leaks in the ldb_result handling in ldb operations
- removed an unnecessary level of pointer in ldb_search structure
(This used to be commit b8d4afb14a)
2007-10-10 13:46:51 -05:00
Simo Sorce
5c95905871 r11567: Ldb API change patch.
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 22c8c97e6f)
2007-10-10 13:45:53 -05:00
Andrew Bartlett
df9af34876 r11522: Add support for delegated credentials and machine account credentials
to ldb, based on the sessionInfo we now pass around.

Andrew Bartlett
(This used to be commit 84e16e4ea7)
2007-10-10 13:45:48 -05:00
Andrew Tridgell
375fe21ad6 r11403: improved the error handling in the ildap ldb backend. Now passes
through all ldap errors except on search. Search errors are only
available via ldb_errstring() until we decide how to fix ldb_search().
(This used to be commit c192bcb79d)
2007-10-10 13:45:31 -05:00
Andrew Tridgell
5fd031c97d r10753: don't require every ldb module to implement both a search_bytree() and
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 7e44f9153c)
2007-10-10 13:39:26 -05:00
Andrew Tridgell
63d4cb4802 r10708: a bit more error checking in the idap ldb backend
(This used to be commit 63ebaad393)
2007-10-10 13:39:22 -05:00
Andrew Tridgell
a788d01b87 r10666: - reverse the ildap ldb backend so tree based searches go through
directly, and expression based searches are converted to trees. This
makes for less conversions.

- allow the caller to supply a set of credentials via the ldb opaque
name 'credentials'. I will be using this in my ldb proxy module.
(This used to be commit af24f3d7fa)
2007-10-10 13:39:16 -05:00
Andrew Tridgell
588abdba90 r10641: fixed the error handling on search errors in the ildap backend
(This used to be commit e80d42933f)
2007-10-10 13:39:14 -05:00
Simo Sorce
63b43dd12f r10477: expose transactions outside ldb and change the API once more
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 c2bb2a36bd)
2007-10-10 13:38:52 -05:00
Simo Sorce
16aff2a184 r10305: start implementing better error handling
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 3fc676ac1d)
2007-10-10 13:38:16 -05:00
Simo Sorce
8919d6bf9a r10299: remove the public (un)lock functions and introduce a transaction based
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 1da4ac2cdc)
2007-10-10 13:38:14 -05:00
Andrew Bartlett
24186a80eb r9728: A *major* update to the credentials system, to incorporate the
Kerberos CCACHE into the system.

This again allows the use of the system ccache when no username is
specified, and brings more code in common between gensec_krb5 and
gensec_gssapi.

It also has a side-effect that may (or may not) be expected: If there
is a ccache, even if it is not used (perhaps the remote server didn't
want kerberos), it will change the default username.

Andrew Bartlett
(This used to be commit 6202267f6e)
2007-10-10 13:34:54 -05:00
Simo Sorce
3e4c4cff21 r9391: Convert all the code to use struct ldb_dn to ohandle ldap like distinguished names
Provide more functions to handle DNs in this form
(This used to be commit 692e35b779)
2007-10-10 13:33:32 -05:00
Andrew Tridgell
bd7a474b19 r7776: add a method for getting arbitrary opaque data into a ldb context, for use by backends.
Currently only EventContext is used in this way.
(This used to be commit 9fa21b2458)
2007-10-10 13:18:35 -05:00
Andrew Tridgell
7267cb3312 r7749: some bug fixes from testing with socket:testnonblock
- fixed some infinite loops in asn1.c

- ensure asn1 callers know if an error is end of buffer or bad data

- handle npending 0 in ldap server
(This used to be commit f22c3b84c8)
2007-10-10 13:18:30 -05:00
Andrew Tridgell
bf75ae4155 r7726: - removed some unused variables
- handle ldb_errstring() calls on failed connect
(This used to be commit 8698a20fcc)
2007-10-10 13:18:27 -05:00
Andrew Tridgell
97318cdb45 r7719: make the ildap ldb backend use the defaultNamingContext if the basedn
is not specified, so:

  ldbsearch ldap://hostname '(objectclass=user)'

works without knowing the domain name
(This used to be commit f6c2c51907)
2007-10-10 13:18:26 -05:00