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

slapd - backend



Hi,
I have downloaded OpenLDAP2.0-alpha ,installed and compiled it
successfully on WinNT4.
Everything seems to work properly when creating, modifying, searching
e.t.c. in my directory using Berkeley DB as backend. But now I need to
change this backend to another database using the backend-script
provided in "slapd and slurpd administrators guide" (ch. 12).

I created a new directory in servers/slapd/   called  /back-tlwc/ and
copied everything from another backend folder (/back-tcl/) to this new
folder. I changed all function(file) names to tlwc_bind.c ,
tlwc_search.c e.t.c.
I finally declared the functions in 'slapd/backend.c':
    #ifdef SLAPD_TLWC
    #include "back-tlwc/external.h"
    #endif

and added the same functions as in the tcl-package(with new function
names) in external.h.

I  havent actually written any new stuff in the tlwc-package files
created above yet.

I do have some questions thou:
1. It is told that I must edit the slapd/backend.c file and include
declarations e.t.c. about my new functions. But the slapd/backend.c is
NOT included in the complete workspace, i.e. the file cannot be found
anywhere in the openLdap project. The file is there (in
/slapd/backend.c) but is not used.
How can this be possible?
Does the backend, using Berkeley DB, not use this file to find the
correct backend functions?
Should I (now) include this file together with my new backend functions
in a new project? How should(must) I link this to openldap?

2. Exactly where does the structures 'appear' after the frontend has
received and interpreted an incoming ldap_search or similar? I would
like to get hold of the entry information, i.e. the operation, the base,
the scope, filter and attributes e.t.c. but where do these appear?

3. Does openLDAP use my new functions (after I have managed to define
that this new backend should be used, see question below) directly?
Example:
    the frontend receives an incoming search operation, interpret the
TCP string with BER/DER handle authorization(?) and finally call my new
'tlwc_search.c' function automatically(with all needed information as
inparameters)???

4. I guess I have to define stuff in the slapd.conf file( or other
config files) to be able to use this new DB backend but where should I
make the changes? According to "slapd and slurpd admin..." one should
make the exact DB changes in Make-common file(the SLAPD_BACKEND
variable), but this file cannot be found in the package so I assume that
it has been integrated in the workspace...but where???

As I have indicated above I would like to get hold of all the incoming
information for bind, search, modify e.t.c. ..... work with this
information towards the new database.....and finally return the result
to the openLDAP frontend which should handle the ldapResult(with BER/DER
e.t.c.).

These are really NT4 based questions but I assume that other openLDAP
packages look just about the same.

Really greatful for any help.
--

Greatful
Mikael