summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb_modules.c
AgeCommit message (Collapse)AuthorFilesLines
2011-07-05ldb: make ldb a top level library for Samba 4.0Andrew Bartlett1-1146/+0
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-08ldb:ldb/common/ldb_modules.c - change the request counter type to be "unsigned"Matthias Dieter Wallnöfer1-1/+1
Just for consistency since all other LDB counters are unsigned as well. And also the debug output specifier has been chosen to be "%u" - so it really should be unsigned. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Fri Apr 8 09:17:47 CEST 2011 on sn-devel-104
2011-04-08ldb:ldb/common/ldb_modules.c - trivial - fix integer output specifiersMatthias Dieter Wallnöfer1-2/+2
2011-04-07ldb:ldb/common/ldb_modules.c - always use LDB error codes if possibleMatthias Dieter Wallnöfer1-6/+7
The callers do compare against LDB error codes - hence don't give back "-1". Reviewed-by: Tridge + abartlet
2011-04-07ldb:common/*.c - check for some OOM conditionsMatthias Dieter Wallnöfer1-0/+3
Reviewed-by: abartlet
2010-12-08s4-ldb: use RTLD_DEEPBIND if available for ldb modulesAndrew Tridgell1-1/+13
this allows us to avoid issues with ldb using heimdal while an application using ldb using MIT kerberos Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-18ldb: error out when modules are not foundSimo Sorce1-1/+1
We shouldn't proceed without all required modules, it could cause damage to the ldb if operations are performed w/o the needed modules. Autobuild-User: Simo Sorce <idra@samba.org> Autobuild-Date: Thu Nov 18 14:02:34 UTC 2010 on sn-devel-104
2010-11-08s4-ldb: don't give an error if a module is already registeredAndrew Tridgell1-0/+7
this can happen when both the build and install paths are used to load ldb modules Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Mon Nov 8 05:28:14 UTC 2010 on sn-devel-104
2010-11-08s4-ldb: better error message when we try to register a module twiceAndrew Tridgell1-2/+3
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-05s4-ldb: show the reason for module initialization failureAndrew Tridgell1-1/+2
2010-11-04s4-ldb: don't load modules from the same directory twiceAndrew Tridgell1-4/+4
this prevents samba dying if you do a 'make install' while it is running. Otherwise the make install changes the inode numbers of the modules in the modules directory, causing them to reload, which causes multiple modules of the same name to try and load
2010-11-03s4-ldb: fixed sorting of module namesAndrew Tridgell1-1/+6
this should also fix a valgrind error on freebsd thanks to Matthieu for spotting this
2010-11-02s4-ldb: give the user a hint as to what may be wrongAndrew Tridgell1-2/+2
when a backend or module can't be found, give a hint about the LDB_MODULES_PATH environment variable Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Tue Nov 2 21:28:22 UTC 2010 on sn-devel-104
2010-11-03s4-ldb: expose some more ldb module functionsAndrew Tridgell1-10/+80
this exposes enough functions for s4 to not need ldb_private.h any more.
2010-11-01s4-ldb: use ldb_set_modules_dir() to load additional ldb modulesAndrew Tridgell1-6/+12
this allows ldb_wrap to enable s4 modules in a standalone ldb install without any additional installation Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Mon Nov 1 13:47:33 UTC 2010 on sn-devel-104
2010-11-01s4-ldb: added support for general ldb hooks in modulesAndrew Tridgell1-11/+45
this allows a ldb module to register a hook function called at various stages of processing. It will be initially used for ldb command line hooks, but should work generally. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-01s4-ldb: added an override flag to ldb_register_backend()Andrew Tridgell1-27/+30
this will be used to allow a system ldb build with an ldb backend to have its ldap handler overridden by the s4 one
2010-11-01s4-ldb: it is not an error for the modules directory to not existAndrew Tridgell1-0/+5
2010-11-01s4-ldb: removed the old ldb module loading styleAndrew Tridgell1-158/+31
this gets rid of some particularly obscure cpp macros for module lists
2010-11-01s4-ldb: support a new type of ldb module loadingAndrew Tridgell1-0/+185
this supports module loading in ldb which uses the approach of "load all modules in a directory". This is much more flexible than the current module loading, as it will allow us to load modules for command line parsing and authentication. Modules are loaded from a colon separated path, in the environment variable LDB_MODULES_PATH. If unset, it defaults to LDB_MODULESDIR. Within each directory modules are loaded recursively (traversing down the directory tree). The device/inode number of each module is remembered to prevent us loading a module twice. Each module is checked for a ldb_init_module() function with dlsym(). If found, it is called with the ldb module version as an argument.
2010-10-21ldb:ldb_modules.c - "dlclose" could cause inference on "dlerror"Matthias Dieter Wallnöfer1-1/+1
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Thu Oct 21 09:28:19 UTC 2010 on sn-devel-104
2010-10-21ldb:ldb_modules.c - if we don't find the associated dynamic object then ↵Matthias Dieter Wallnöfer1-0/+1
please close the handle Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Thu Oct 21 07:52:44 UTC 2010 on sn-devel-104
2010-10-05s4:ldb_modules.c - fix a typoMatthias Dieter Wallnöfer1-1/+1
2010-09-25ldb: added request location trackingAndrew Tridgell1-0/+2
this is used to help debug async ldb requests. The ldb request handle now contains a location string and the parent request pointer. This allows us to print a backtrace of ldb requests in the dsdb modules.
2010-07-09s4: fix warning: unused variable ‘i’Kamen Mazdrashki1-1/+0
2010-07-07s4-ldb: added ldb_options_find()Andrew Tridgell1-4/+4
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-06-29ldb:ldb_modules.c - "ldb_dso_load_symbol" - remove unneeded caste before "dlsym"Matthias Dieter Wallnöfer1-2/+1
2010-06-15ldb: Fix included ldb build.Jelmer Vernooij1-0/+4
2010-03-08LDB:common - Change counters to "unsigned" where appropriateMatthias Dieter Wallnöfer1-6/+6
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-02-22LDB related spelling fixes.Brad Hards1-1/+1
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-01-02s4-ldb: fixed valgrind error: ares can be freed by callbackAndrew Tridgell1-4/+1
2010-01-02s4-ldb: allow modules to override error return valuesAndrew Tridgell1-2/+4
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-02s4-ldb: added ldb_module_get_ops()Andrew Tridgell1-0/+5
This is needed to support DSDB_FLAG_OWN_MODULE Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2009-10-27s4:ldb Add additional tracing of the ldb APIAndrew Bartlett1-4/+60
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-12s4:ldb Allow a NULL module listAndrew Bartlett1-1/+1
2009-10-12s4:ldb Allow a module string of ""Andrew Bartlett1-0/+6
(We may have no modules set) Andrew Bartlett
2009-09-22s4-ldb: only show the outer level of ldb ops when tracingAndrew Tridgell1-3/+11
2009-09-22s4-ldb: don't show timestamps on every line of ldb tracesAndrew Tridgell1-26/+29
This adds ldb_debug_add() and ldb_debug_end() to format multiline messages
2009-09-21s4-ldb: add a LDB_FLG_ENABLE_TRACING for full ldb tracingAndrew Tridgell1-0/+22
When LDB_FLG_ENABLE_TRACING is set ldb will send full traces of all operations and results
2009-09-11ldb: Remove references to operational module init function.Jelmer Vernooij1-1/+0
This module is now part of Samba 4's dsdb subsystem rather than standalone ldb.
2009-09-04ldb: make ldb module programming less error proneAndrew Tridgell1-0/+14
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-03always use prepare_commit in ldb transaction commits if possibleAndrew Tridgell1-2/+17
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-07-14remove all '\n' from ldb_debugSumit Bose1-12/+12
2009-02-23Fix headers, ldb_includes.h is a private header,Simo Sorce1-4/+1
do not reference it from ldb.h
2009-01-30Add helper function to get a module name, may be useful for debugging.Simo Sorce1-0/+5
2009-01-30Fix the mess with ldb includes.Simo Sorce1-1/+36
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.
2008-12-17s4:ldb: make it possible to return per entry controlsAndrew Bartlett1-1/+5
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2008-11-06don't give errors when an empty modules list is given to ldbAndrew Tridgell1-2/+9
2008-10-16Transform the sequence_number operation into a normal extended operation as ↵Simo Sorce1-4/+0
it should always have been. Make it also async so that it is not a special case.
2008-09-29LDB ASYNC: Core filesSimo Sorce1-1/+140