[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: support for dynamically loadable modules (ITS#196)
At 01:05 PM 6/9/99 GMT, Bastiaan.Bakker@lifeline.nl wrote:
>The patch can be found here:
> ftp://ftp.openldap.org/incoming/bb_dynmods_for_HEAD19990608.v0.1.gz
I'll try to toy with this evening...
>This patch is not complete: it will build a functional slapd server that can
>dynamically load modules. However slapd will not contain any backends, expecting
>them to be loaded dynamically.
Do we want to make this an all or nothing option? That is, all
modules static or all backends dynamically. Are there
cases where it makes sense to have a mixture of static and dynamic
linked modules within one executable? Is is feasible to support
a mixture of static and dynamically linked modules in the same
executable?
>At the moment backend modules still have to be built
>be hand.
We can improve this over time. Since it's --disable-modules
is the default, it shouldn't surprise anyone (who's listening).
>4) copy all modules to a suitable directory, say %installroot%/lib/modules
$libexecdir/$subdir/slapd-$module
Using current autoconf/openldap defaults:
/usr/local/libexec/openldap/slapd-back-ldbm.so
>Brief description of implementation:
>
>If the config parser finds a line starting with loadmodule it will call
>load_module(const char* file_name, int argc, char *argv[]) in module.c. This
>function will try to load the shared object / DLL in file 'file_name'. Then it
>looks whether the loaded module contains the function init_module(int argc, char
>*argv[]). If so, this function is called and the module does it's initialization
>stuff like adding the backend it implements to the backend info list. If not, a
>warning message is issued and slapd continues.
I think I would prefer that a module initialization errors be fatal.
Or maybe we can have a 'non-critical' flag to the directive.
>A choice has to be made about where modules will be located within the install dir
>subtree. I propose lib/modules. Let me know if you think different. The
>installation of modules is not in the makefile yet. Again, help will be
>appreciated.
I prefer to use autoconf defaults + subdir (like we now do with etc
files).
>Maybe it is useful to specify which backends should be linked statically even if
>module support is enabled?
See above questions. If yes, we can extend the configure options
to allow:
--enable-modules
--with-ldbm=static
--with-tcl=dynamic
or something...
>If you have any remarks, questions or other feedback, please let me know!
Cool stuff!
Kurt