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     # module-specific config directives,
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 once for each perlModuleConfig line in the
88              slapd.conf(5) configuration file.  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
117       perlModuleConfig <arguments>
118              Invoke the module's config method with the given arguments.
119

EXAMPLE

121       There  is  an  example Perl module `SampleLDAP' in the slapd/back-perl/
122       directory in the OpenLDAP source tree.
123

ACCESS CONTROL

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

WARNING

132       The interface of this backend to the perl module MAY change.  Any  sug‐
133       gestions would greatly be appreciated.
134
135       Note:  in  previous  versions, any unrecognized lines in the slapd.conf
136       file were passed to the perl module's config method. This  behavior  is
137       deprecated  (but  still  allowed  for  backward compatibility), and the
138       perlModuleConfig directive should instead be used to  invoke  the  mod‐
139       ule's config method. This compatibility feature will be removed at some
140       future date.
141

FILES

143       /etc/openldap/slapd.conf
144              default slapd configuration file
145

SEE ALSO

147       slapd.conf(5), slapd(8), perl(1).
148
149
150
151OpenLDAP 2.4.44                   2016/02/05                     SLAPD-PERL(5)
Impressum