[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: loadable module support

I'm quite interested in this (and other proposals for dynamic
loading of modules).  However, it's best we move any discussion
concerning this to our developer's mailing list (openldap-devel).

I await your posting to devel before making any specific comments.

At 05:57 PM 4/12/99 +0200, Bastiaan Bakker wrote:
>Hi ,
>I'm currently writing a new backend to LDAP-enable the userdatabase
>server in use at Lifeline. For development speed and flexibilty I
>thought it would be nice if OpenLDAP supports dynamically loadable
>modules, like Apache has. This way one could simply enable specific
>backends, authentication methods or features (e.g. phonetic) in the
>config file.
>Currently I've a small patch that allows a line in slapd.conf like:
>loadmodule    /opt/ldap/modules/backcorba.so
>This will load any shared object regardless of its function. It's up to
>the module to register itself upon initialization. So far I've only
>patched backend.c and some backends to allow for dynamic backend
>loading. The ugly if-then list in new_backend() is replaced by a lookup
>in a hashtable. This yields a pointer to a function that will set the
>appropiate hooks in the Backend structure. The init method of the
>backend modules adds the entry to the hashtable. I haven't included
>support for other modules yet. First I would like to receive some
>feedback on my approach. Specifically my patches require glib/gmodule
>for the loadable module support and the hashtable. In my opinion glib (a
>independently maintained spinoff of GTK/GNOME) is a great library for
>doing stuff like this in a platform independent way. Secondly, I'm no
>autoconf guru, so I anyone would like to help me incorporate the
>required changes in the build configuration (for example
>conditiotionally include -rdynamic in the CFLAGS), that would be
>appreciated very much. It's my intentiation to leave the loadable module
>support completely optional (switchale with ./configure).
>Please let me know what you think!
>Bastiaan Bakker
>Attachment Converted: "c:\home\kurt\data files\eudora\attach\vcard.vcf"