mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-27 03:20:22 +08:00
176 lines
4.1 KiB
Groff
176 lines
4.1 KiB
Groff
.TH SLAPD-PERL 5 "RELEASEDATE" "OpenLDAP LDVERSION"
|
|
.\" $OpenLDAP$
|
|
.SH NAME
|
|
slapd-perl \- Perl backend to slapd
|
|
.SH SYNOPSIS
|
|
ETCDIR/slapd.conf
|
|
.SH DESCRIPTION
|
|
The Perl backend to
|
|
.BR slapd (8)
|
|
works by embedding a
|
|
.BR perl (1)
|
|
interpreter into
|
|
.BR slapd (8).
|
|
Any perl database section of the configuration file
|
|
.BR slapd.conf (5)
|
|
must then specify what Perl module to use.
|
|
.B Slapd
|
|
then creates a new Perl object that handles all the requests for that
|
|
particular instance of the backend.
|
|
.LP
|
|
You will need to create a method for each one of the
|
|
following actions:
|
|
.LP
|
|
.nf
|
|
* new # creates a new object,
|
|
* search # performs the ldap search,
|
|
* compare # does a compare,
|
|
* modify # modifies an entry,
|
|
* add # adds an entry to backend,
|
|
* modrdn # modifies an entry's rdn,
|
|
* delete # deletes an ldap entry,
|
|
* config # process unknown config file lines,
|
|
* init # called after backend is initialized.
|
|
.fi
|
|
.LP
|
|
Unless otherwise specified, the methods return the result code
|
|
which will be returned to the client. Unimplemented actions
|
|
can just return unwillingToPerform (53).
|
|
.TP
|
|
.B new
|
|
This method is called when the configuration file encounters a
|
|
.B perlmod
|
|
line.
|
|
The module in that line is then effectively `use'd into the perl
|
|
interpreter, then the \fBnew\fR method is called to create a new
|
|
object.
|
|
Note that multiple instances of that object may be instantiated, as
|
|
with any perl object.
|
|
.\" .LP
|
|
The
|
|
.B new
|
|
method receives the class name as argument.
|
|
.TP
|
|
.B search
|
|
This method is called when a search request comes from a client.
|
|
It arguments are as follows:
|
|
.nf
|
|
* object reference
|
|
* base DN
|
|
* scope
|
|
* alias deferencing policy
|
|
* size limit
|
|
* time limit
|
|
* filter string
|
|
* attributes only flag (1 for yes)
|
|
* list of attributes to return (may be empty)
|
|
.fi
|
|
.LP
|
|
Return value: (resultcode, ldif-entry, ldif-entry, ...)
|
|
.TP
|
|
.B compare
|
|
This method is called when a compare request comes from a client.
|
|
Its arguments are as follows.
|
|
.nf
|
|
* object reference
|
|
* dn
|
|
* attribute assertion string
|
|
.fi
|
|
.LP
|
|
.TP
|
|
.B modify
|
|
This method is called when a modify request comes from a client.
|
|
Its arguments are as follows.
|
|
.nf
|
|
* object reference
|
|
* dn
|
|
* a list formatted as follows
|
|
({ "ADD" | "DELETE" | "REPLACE" },
|
|
attributetype, value...)...
|
|
.fi
|
|
.LP
|
|
.TP
|
|
.B add
|
|
This method is called when a add request comes from a client.
|
|
Its arguments are as follows.
|
|
.nf
|
|
* object reference
|
|
* entry in string format
|
|
.fi
|
|
.LP
|
|
.TP
|
|
.B modrdn
|
|
This method is called when a modrdn request comes from a client.
|
|
Its arguments are as follows.
|
|
.nf
|
|
* object reference
|
|
* dn
|
|
* new rdn
|
|
* delete old dn flag (1 means yes)
|
|
.fi
|
|
.LP
|
|
.TP
|
|
.B delete
|
|
This method is called when a delete request comes from a client.
|
|
Its arguments are as follows.
|
|
.nf
|
|
* object reference
|
|
* dn
|
|
.fi
|
|
.LP
|
|
.TP
|
|
.B config
|
|
This method is called with unknown
|
|
.BR slapd.conf (5)
|
|
configuration file lines.
|
|
Its arguments are as follows.
|
|
.nf
|
|
* object reference
|
|
* array of arguments on line
|
|
.fi
|
|
.LP
|
|
Return value: nonzero if this is not a valid option.
|
|
.TP
|
|
.B init
|
|
This method is called after backend is initialized.
|
|
Its argument is as follows.
|
|
.nf
|
|
* object reference
|
|
.fi
|
|
.LP
|
|
Return value: nonzero if initialization failed.
|
|
.SH CONFIGURATION
|
|
These
|
|
.B slapd.conf
|
|
options apply to the PERL backend database.
|
|
That is, they must follow a "database perl" line and come before any
|
|
subsequent "backend" or "database" lines.
|
|
Other database options are described in the
|
|
.BR slapd.conf (5)
|
|
manual page.
|
|
.TP
|
|
.B perlModulePath /path/to/libs
|
|
Add the path to the @INC variable.
|
|
.TP
|
|
.B perlModule ModName
|
|
`Use' the module name ModName from ModName.pm
|
|
.TP
|
|
.B filterSearchResults
|
|
Search results are candidates that need to be filtered (with the
|
|
filter in the search request), rather than search results to be
|
|
returned directly to the client.
|
|
.SH EXAMPLE
|
|
There is an example Perl module `SampleLDAP' in the slapd/back-perl/
|
|
direcetory in the OpenLDAP source tree.
|
|
.SH WARNING
|
|
The interface of this backend to the perl module MAY change.
|
|
Any suggestions would greatly be appreciated.
|
|
.SH FILES
|
|
.TP
|
|
ETCDIR/slapd.conf
|
|
default slapd configuration file
|
|
.SH SEE ALSO
|
|
.BR slapd.conf (5),
|
|
.BR slapd (8),
|
|
.BR perl (1).
|