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


> We have been using the ldap from openldap.org site. Currently we are using
> ldbm backend with gdbm. I am trying to add a new SLAPD BACKEND. Could
> somebody tell me where I can find some detailed documentation for adding a
> new backend. I looked at the SLAPD and SLURPD ADMIN GUIDE 12th chapter but
> that's not really enough for building a backend. I tried to make
> changes to
> the /ldap/configure file but I guess there should be an easy way of doing
> this.  I would like to know if there is any detailed
> documentation on adding
> a backend.

I've been through this process several times, mainly trial & error. Here's
what I can suggest:
  First, get the latest release of GNU autoconf (ftp.gnu.org) and install
it. It's much easier to add your stuff to the configure.in file and let
autoconf rebuild the configure script, than to find all the right things to
add to configure itself. And, this is just The Right Thing to do anyway,
each release's configure script is just generated from configure.in.
  Second, pick an existing backend to copy from, like back-passwd, and
duplicate all of its configure.in rules for your backend. It likes like you
did a pretty thorough job in your case, but you must have missed something
still since your generated Makefile didn't do what you wanted. Find all
occurrences of "passwd" and "PASSWD" in the configure.in file, and add your
own stuff in each place.
  Third, you will have to edit include/portable.h.in and add a #define for
your backend in this file. Again, look for PASSWD as an example.

And of course, you have to modify backend.c as you have already done.

In the meantime, you can probably get your current Makefile to build by
manually editing it and changing the BUILD_SRV line to say "BUILD_SRV =
yes". But you will also need to a #define SLAPD_NAGS 1
to the include/portable.h file before backend.c will pick it up.