1SLAPD-PERL(5)                 File Formats Manual                SLAPD-PERL(5)
2
3
4

NAME

6       slapd-perl - Perl backend to slapd
7

SYNOPSIS

9       /etc/openldap/slapd.conf
10

DESCRIPTION

12       The  Perl  backend to slapd(8) works by embedding a perl(1) interpreter
13       into slapd(8).  Any perl database section  of  the  configuration  file
14       slapd.conf(5)  must  then  specify what Perl module to use.  Slapd then
15       creates a new Perl object that handles all the requests for  that  par‐
16       ticular instance of the backend.
17
18       You will need to create a method for each one of the following actions:
19
20         * new        # creates a new object,
21         * search     # performs the ldap search,
22         * compare    # does a compare,
23         * modify     # modifies an entry,
24         * add        # adds an entry to backend,
25         * modrdn     # modifies an entry's rdn,
26         * delete     # deletes an ldap entry,
27         * config     # process unknown config file lines,
28         * init       # called after backend is initialized.
29
30       Unless  otherwise  specified,  the methods return the result code which
31       will be returned to the client.  Unimplemented actions can just  return
32       unwillingToPerform (53).
33
34       new    This  method  is called when the configuration file encounters a
35              perlmod line.  The module  in  that  line  is  then  effectively
36              `use'd  into the perl interpreter, then the new method is called
37              to create a new object.  Note that multiple  instances  of  that
38              object  may  be  instantiated, as with any perl object.  The new
39              method receives the class name as argument.
40
41       search This method is called when a search request comes from a client.
42              It arguments are as follows:
43                * object reference
44                * base DN
45                * scope
46                * alias dereferencing policy
47                * size limit
48                * time limit
49                * filter string
50                * attributes only flag (1 for yes)
51                * list of attributes to return (may be empty)
52
53       Return value: (resultcode, ldif-entry, ldif-entry, ...)
54
55       compare
56              This  method  is  called  when  a  compare  request comes from a
57              client.  Its arguments are as follows.
58                * object reference
59                * dn
60                * attribute assertion string
61
62       modify This method is called when a modify request comes from a client.
63              Its arguments are as follows.
64                * object reference
65                * dn
66                * a list formatted as follows
67                  ({ "ADD" | "DELETE" | "REPLACE" },
68                   attributetype, value...)...
69
70       add    This  method  is  called when a add request comes from a client.
71              Its arguments are as follows.
72                * object reference
73                * entry in string format
74
75       modrdn This method is called when a modrdn request comes from a client.
76              Its arguments are as follows.
77                * object reference
78                * dn
79                * new rdn
80                * delete old dn flag (1 means yes)
81
82       delete This method is called when a delete request comes from a client.
83              Its arguments are as follows.
84                * object reference
85                * dn
86
87       config This method is called with unknown  slapd.conf(5)  configuration
88              file lines.  Its arguments are as follows.
89                * object reference
90                * array of arguments on line
91
92       Return value: nonzero if this is not a valid option.
93
94       init   This  method  is called after backend is initialized.  Its argu‐
95              ment is as follows.
96                * object reference
97
98       Return value: nonzero if initialization failed.
99

CONFIGURATION

101       These slapd.conf options apply to the PERL backend database.  That  is,
102       they  must follow a "database perl" line and come before any subsequent
103       "backend" or "database" lines.  Other database options are described in
104       the slapd.conf(5) manual page.
105
106       perlModulePath /path/to/libs
107              Add the path to the @INC variable.
108
109       perlModule ModName
110              `Use' the module name ModName from ModName.pm
111
112       filterSearchResults
113              Search results are candidates that need to be filtered (with the
114              filter in the search request), rather than search results to  be
115              returned directly to the client.
116

EXAMPLE

118       There  is  an  example Perl module `SampleLDAP' in the slapd/back-perl/
119       directory in the OpenLDAP source tree.
120

ACCESS CONTROL

122       The passwd backend does not honor any of the access  control  semantics
123       described  in  slapd.access(5);  all access control is delegated to the
124       underlying PERL scripting.  Only read (=r) access to the entry  pseudo-
125       attribute  and to the other attribute values of the entries returned by
126       the search operation is honored, which is performed by the frontend.
127

WARNING

129       The interface of this backend to the perl module MAY change.  Any  sug‐
130       gestions would greatly be appreciated.
131

FILES

133       /etc/openldap/slapd.conf
134              default slapd configuration file
135

SEE ALSO

137       slapd.conf(5), slapd(8), perl(1).
138
139
140
141OpenLDAP 2.3.34                    2007/2/16                     SLAPD-PERL(5)
Impressum