1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-23 11:17:06 +03:00

131 Commits

Author SHA1 Message Date
Kamen Mazdrashki
6a0d3665e2 s4: fix warning: unused variable ‘i’ 2010-07-09 07:01:26 +03:00
Andrew Tridgell
7f9153f7e8 s4-ldb: added ldb_options_find()
ldb_options_find() allows backends to find options in the options[]
array passed to the connect operation.

This will be used by the ldb_ldap bind code
2010-07-07 17:26:03 +10:00
Matthias Dieter Wallnöfer
8e9d7e84f6 ldb:ldb_modules.c - "ldb_dso_load_symbol" - remove unneeded caste before "dlsym" 2010-06-29 22:16:15 +02:00
Jelmer Vernooij
fb7a98aa32 ldb: Fix included ldb build. 2010-06-15 13:15:50 +02:00
Matthias Dieter Wallnöfer
4e16a285c7 LDB:common - Change counters to "unsigned" where appropriate
To count LDB objects use variables of type "unsigned (int)" or "long long int"
on binary or downto searches.

To count characters in strings use "size_t".

To calculate differences between pointers use "ptrdiff_t".
2010-03-08 12:52:24 +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
Andrew Tridgell
335af02218 s4-ldb: fixed valgrind error: ares can be freed by callback 2010-01-02 08:16:56 +11:00
Andrew Tridgell
81e8a18181 s4-ldb: allow modules to override error return values
The samldb module overrides the error code for some returns when
handling primaryGroupID. We need to take the error from the async
callback to allow this to work reliably
2010-01-02 08:16:55 +11:00
Andrew Tridgell
e1ffcfc783 s4-ldb: added ldb_module_get_ops()
This is needed to support DSDB_FLAG_OWN_MODULE

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-01-02 08:16:51 +11:00
Andrew Bartlett
3c6c230b2d s4:ldb Add additional tracing of the ldb API
This helps pin down where errors occour, by printing a call stack and
setting error strings and trace messages in the transaction case.

Andrew Bartlett
2009-10-27 11:32:14 +11:00
Andrew Bartlett
a37efaf922 s4:ldb Allow a NULL module list 2009-10-12 23:33:22 +11:00
Andrew Bartlett
93ac2cdb54 s4:ldb Allow a module string of ""
(We may have no modules set)

Andrew Bartlett
2009-10-12 16:51:02 +11:00
Andrew Tridgell
2e98ee0907 s4-ldb: only show the outer level of ldb ops when tracing 2009-09-22 17:10:05 -07:00
Andrew Tridgell
ec5d01278a s4-ldb: don't show timestamps on every line of ldb traces
This adds ldb_debug_add() and ldb_debug_end() to format multiline
messages
2009-09-22 17:10:05 -07:00
Andrew Tridgell
97ffb912c1 s4-ldb: add a LDB_FLG_ENABLE_TRACING for full ldb tracing
When LDB_FLG_ENABLE_TRACING is set ldb will send full traces
of all operations and results
2009-09-21 15:27:05 -07:00
Jelmer Vernooij
d0c9d5ed8e ldb: Remove references to operational module init function.
This module is now part of Samba 4's dsdb subsystem rather than
standalone ldb.
2009-09-11 23:49:57 +02:00
Andrew Tridgell
8995491f59 ldb: make ldb module programming less error prone
When a top level method in a module returns an error, it is supposed
to call ldb_module_done(). We ran across a case where this wasn't
done, and then found that in fact that are hundreds of similar cases
in our modules. It took Andrew and I a full day to work out that this
was the cause of a subtle segv in another part of the code.

To try to prevent this happening again, this patch changes
ldb_next_request() to catch the error by checking if a module
returning an error has called ldb_module_done(). If it hasn't then the
call is made on behalf of the module.
2009-09-04 17:29:21 +10:00
Andrew Tridgell
bfccc4590d always use prepare_commit in ldb transaction commits if possible
The reason we need this is to make multi-tdb transactions safe, with
the partition module. The linked_attributes and repl_meta_data modules
now do extra processing when the transaction ends, and that processing
can fail. When it fails we need to cancel the transaction, which we
can only do if the hook is on the prepare commit instead of the end
transaction call. Otherwise the partition module cannot ensure that no
commit has been done on another partition.
2009-09-03 18:36:09 +10: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
1f2b5ea97c Add helper function to get a module name, may be useful for debugging. 2009-01-30 10:18:52 -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
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
Andrew Tridgell
41a1c882d4 don't give errors when an empty modules list is given to ldb 2008-11-06 11:13:37 +11:00
Simo Sorce
2deeb99fff Transform the sequence_number operation into a normal extended operation as it should always have been. Make it also async so that it is not a special case. 2008-10-16 12:55:30 -04:00
Simo Sorce
8215374091 LDB ASYNC: Core files 2008-09-29 04:22:18 +02:00
Jelmer Vernooij
b0a95ad2f6 Revert LDB return code patches from Matthias. 2008-09-25 00:01:05 +02:00
Matthias Dieter Wallnöfer
9d849c30bc Cosmetic corrections for the LDB library
This commit applies some cosmetic corrections for the LDB library.
2008-09-24 19:40:03 +02:00
Simo Sorce
508527890a Merge ldb_search() and ldb_search_exp_fmt() into a simgle function.
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-23 18:17:46 -04:00
Stefan Metzmacher
5ccfd6a90e ldb: allow ldb modules to specify LDB_MODULE(name) or LDB_BACKEND(name)
metze
(This used to be commit 1d5b714438a955d76f92f4ccd8aa2f7f89ffa5fd)
2008-06-30 09:14:07 +02:00
Andrew Tridgell
310875e637 Change our module code to not use the special symbol name init_module()
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-17 13:11:29 +10:00
Jelmer Vernooij
b5bd663690 Fix use of realpath, fix init functions for ldb.
(This used to be commit ca510136d2c4cae8f520c76df6aaadb5d412bea1)
2008-02-25 20:40:37 +01:00
Jelmer Vernooij
738fd7fd50 Fix standalone ldb build modules.
(This used to be commit 0b133a30a23757cf463ff22dff6372ae5e11d4c7)
2008-02-25 17:33:28 +01:00
Jelmer Vernooij
584c4a518f Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
Conflicts:

	source/build/smb_build/header.pm
	source/build/smb_build/makefile.pm
	source/lib/ldb/include/ldb_private.h
(This used to be commit 1a646af0647f021d99473a8991c35e616a423ea6)
2008-02-25 12:58:09 +01:00
Jelmer Vernooij
995788536e Remove more function-based inits.
(This used to be commit b1a7810f3e70f9a831d9b8e85d531e448072adaf)
2008-02-20 02:57:07 +01:00
Jelmer Vernooij
71bc5acead Allow ldb backends without init function, use init function-less ldb modules.
(This used to be commit 141ee91272fb4dafca0149f679e17721b6a3011e)
2008-02-20 01:37:53 +01:00
Jelmer Vernooij
b66ee2ed22 Move responsibilities of build.h to makefile.
(This used to be commit a43f6d37bce85748e9cf2675e5beced5db26f1c3)
2008-02-16 18:38:02 +01:00
Jelmer Vernooij
c13ae70731 r26580: Include sentinel in build.h, in case the list is empty.
(This used to be commit f1997dabed584bdc864c4b7235c29603c312ef46)
2007-12-24 01:51:07 -06:00
Jelmer Vernooij
9852e793bc r26577: Fix the standalone ldb build.
(This used to be commit 1cf374eb3125c66844f01d013016feaf99760582)
2007-12-24 01:51:06 -06:00
Jelmer Vernooij
be33f4c611 r26576: Allow the static module loading code to be used for the Python modules.
Simplify the way module initialization functions are handled.
(This used to be commit ba8be2dfc0de4434c798663336b81f7f95cde520)
2007-12-24 01:51:06 -06:00
Jelmer Vernooij
cb62bbbb7c r26481: Make function for loading symbol from DSO more generic, and allow modules to provide an ops table directly rather than an initialization function.
(This used to be commit a71419a73a869c24121005ccbbcb4396f888888b)
2007-12-21 05:50:38 +01:00
Jelmer Vernooij
b8850f326b r26410: Remove unnecessary static.
(This used to be commit 13ae3108dad2f9f0f7a421d672751fa594f4e3fb)
2007-12-21 05:49:42 +01:00
Andrew Bartlett
89144dfead r26301: Collapose ldb_next_init() into being a caller of ldb_init_module_chain
and therefore further improve debug output.

Andrew Bartlett
(This used to be commit 5e93ca2ea16a7d10d63606ae539c0fdc4e224556)
2007-12-21 05:48:16 +01:00
Andrew Bartlett
dbf77b6405 r26299: Print out which module failed to initialise.
Andrew Bartlett
(This used to be commit 6628d9f843d773ec1a5841f793b16f76910c39c4)
2007-12-21 05:48:15 +01:00
Andrew Bartlett
f6312d1b5a r25962: Move to more modern ldb functions loading module list.
Andrew Bartlett
(This used to be commit c3bfcf44a49c6a19579c85fb3660331177a436fb)
2007-12-21 05:45:20 +01:00
Andrew Bartlett
08dd389ddf r25934: Handle a LDB_ERR_NO_SUCH_OBJECT return value when looking for the
modules.

This will be useful when we start enforcing validity in base DNs.

Andrew Bartlett
(This used to be commit aa8348a27a6938a1a26d4a7ed3b7405966202ad8)
2007-12-21 05:45:08 +01:00
Andrew Bartlett
e3198b3acd r25856: If the search fails, it is not valid to steal 'res'.
Andrew Bartlett
(This used to be commit f4d733c3d00c90ac2e02fcc202240ae7c290463e)
2007-12-21 05:44:29 +01:00
Andrew Bartlett
2de30ecd94 r25755: Fix a couple of memory leaks, in particular a new leak onto the NULL
context caused by my objectclass module work.

Andrew Bartlett
(This used to be commit 2a835d900fee71e4461d5d18e39b4358fa6fdfba)
2007-12-21 05:43:46 +01:00
Jelmer Vernooij
4a4cdc990c r25084: Move samba-specific code out of lib/ldb directory.
(This used to be commit 917bd737cb07817664d9088860588d47525f5ff8)
2007-10-10 15:06:26 -05:00
Jelmer Vernooij
ed2a1c718a r25081: Add modules_dir member to ldb_context that is used rather than a global
modulesdir setting. Samba always sets this to lp_modulesdir()/ldb
(This used to be commit e672380d2156cf0421108a9c34f04f096c2afeed)
2007-10-10 15:06:25 -05:00