Home | History | Annotate | Line # | Download | only in man
      1  1.5      tron .lf 1 stdin
      2  1.7  christos .TH SLAPD-PERL 5 "2025/05/22" "OpenLDAP 2.6.10"
      3  1.5      tron .\" $OpenLDAP$
      4  1.1     lukem .SH NAME
      5  1.3     lukem slapd\-perl \- Perl backend to slapd
      6  1.1     lukem .SH SYNOPSIS
      7  1.1     lukem /etc/openldap/slapd.conf
      8  1.1     lukem .SH DESCRIPTION
      9  1.1     lukem The Perl backend to
     10  1.1     lukem .BR slapd (8)
     11  1.1     lukem works by embedding a
     12  1.1     lukem .BR perl (1)
     13  1.1     lukem interpreter into
     14  1.1     lukem .BR slapd (8).
     15  1.1     lukem Any perl database section of the configuration file
     16  1.1     lukem .BR slapd.conf (5)
     17  1.1     lukem must then specify what Perl module to use.
     18  1.1     lukem .B Slapd
     19  1.1     lukem then creates a new Perl object that handles all the requests for that
     20  1.1     lukem particular instance of the backend.
     21  1.1     lukem .LP
     22  1.1     lukem You will need to create a method for each one of the
     23  1.1     lukem following actions:
     24  1.1     lukem .LP
     25  1.1     lukem .nf
     26  1.1     lukem   * new        # creates a new object,
     27  1.1     lukem   * search     # performs the ldap search,
     28  1.1     lukem   * compare    # does a compare,
     29  1.1     lukem   * modify     # modifies an entry,
     30  1.1     lukem   * add        # adds an entry to backend,
     31  1.1     lukem   * modrdn     # modifies an entry's rdn,
     32  1.1     lukem   * delete     # deletes an ldap entry,
     33  1.5      tron   * config     # module-specific config directives,
     34  1.1     lukem   * init       # called after backend is initialized.
     35  1.1     lukem .fi
     36  1.1     lukem .LP
     37  1.1     lukem Unless otherwise specified, the methods return the result code
     38  1.1     lukem which will be returned to the client.  Unimplemented actions
     39  1.1     lukem can just return unwillingToPerform (53).
     40  1.1     lukem .TP
     41  1.1     lukem .B new
     42  1.1     lukem This method is called when the configuration file encounters a 
     43  1.1     lukem .B perlmod
     44  1.1     lukem line.
     45  1.1     lukem The module in that line is then effectively `use'd into the perl
     46  1.1     lukem interpreter, then the \fBnew\fR method is called to create a new
     47  1.1     lukem object.
     48  1.1     lukem Note that multiple instances of that object may be instantiated, as
     49  1.1     lukem with any perl object.
     50  1.1     lukem .\" .LP
     51  1.1     lukem The
     52  1.1     lukem .B new
     53  1.1     lukem method receives the class name as argument.
     54  1.1     lukem .TP
     55  1.1     lukem .B search
     56  1.1     lukem This method is called when a search request comes from a client.
     57  1.1     lukem It arguments are as follows:
     58  1.1     lukem .nf
     59  1.1     lukem   * object reference
     60  1.1     lukem   * base DN
     61  1.1     lukem   * scope
     62  1.1     lukem   * alias dereferencing policy
     63  1.1     lukem   * size limit
     64  1.1     lukem   * time limit
     65  1.1     lukem   * filter string
     66  1.1     lukem   * attributes only flag (1 for yes)
     67  1.1     lukem   * list of attributes to return (may be empty)
     68  1.1     lukem .fi
     69  1.1     lukem .LP
     70  1.1     lukem Return value: (resultcode, ldif-entry, ldif-entry, ...)
     71  1.1     lukem .TP
     72  1.1     lukem .B compare
     73  1.1     lukem This method is called when a compare request comes from a client.
     74  1.1     lukem Its arguments are as follows.
     75  1.1     lukem .nf
     76  1.1     lukem   * object reference
     77  1.1     lukem   * dn
     78  1.1     lukem   * attribute assertion string
     79  1.1     lukem .fi
     80  1.1     lukem .LP
     81  1.1     lukem .TP
     82  1.1     lukem .B modify
     83  1.1     lukem This method is called when a modify request comes from a client.
     84  1.1     lukem Its arguments are as follows.
     85  1.1     lukem .nf
     86  1.1     lukem   * object reference
     87  1.1     lukem   * dn
     88  1.1     lukem   * a list formatted as follows
     89  1.1     lukem     ({ "ADD" | "DELETE" | "REPLACE" },
     90  1.1     lukem      attributetype, value...)...
     91  1.1     lukem .fi
     92  1.1     lukem .LP
     93  1.1     lukem .TP
     94  1.1     lukem .B add
     95  1.1     lukem This method is called when a add request comes from a client.
     96  1.1     lukem Its arguments are as follows.
     97  1.1     lukem .nf
     98  1.1     lukem   * object reference
     99  1.1     lukem   * entry in string format
    100  1.1     lukem .fi
    101  1.1     lukem .LP
    102  1.1     lukem .TP
    103  1.1     lukem .B modrdn
    104  1.1     lukem This method is called when a modrdn request comes from a client.
    105  1.1     lukem Its arguments are as follows.
    106  1.1     lukem .nf
    107  1.1     lukem   * object reference
    108  1.1     lukem   * dn
    109  1.1     lukem   * new rdn
    110  1.1     lukem   * delete old dn flag (1 means yes)
    111  1.1     lukem .fi
    112  1.1     lukem .LP
    113  1.1     lukem .TP
    114  1.1     lukem .B delete
    115  1.1     lukem This method is called when a delete request comes from a client.
    116  1.1     lukem Its arguments are as follows.
    117  1.1     lukem .nf
    118  1.1     lukem   * object reference
    119  1.1     lukem   * dn
    120  1.1     lukem .fi
    121  1.1     lukem .LP
    122  1.1     lukem .TP
    123  1.1     lukem .B config
    124  1.5      tron This method is called once for each perlModuleConfig line in the
    125  1.1     lukem .BR slapd.conf (5)
    126  1.5      tron configuration file.
    127  1.1     lukem Its arguments are as follows.
    128  1.1     lukem .nf
    129  1.1     lukem   * object reference
    130  1.1     lukem   * array of arguments on line
    131  1.1     lukem .fi
    132  1.1     lukem .LP
    133  1.1     lukem Return value: nonzero if this is not a valid option.
    134  1.1     lukem .TP
    135  1.1     lukem .B init
    136  1.1     lukem This method is called after backend is initialized.
    137  1.1     lukem Its argument is as follows.
    138  1.1     lukem .nf
    139  1.1     lukem   * object reference
    140  1.1     lukem .fi
    141  1.1     lukem .LP
    142  1.1     lukem Return value: nonzero if initialization failed.
    143  1.1     lukem .SH CONFIGURATION
    144  1.1     lukem These
    145  1.1     lukem .B slapd.conf
    146  1.1     lukem options apply to the PERL backend database.
    147  1.1     lukem That is, they must follow a "database perl" line and come before any
    148  1.1     lukem subsequent "backend" or "database" lines.
    149  1.1     lukem Other database options are described in the
    150  1.1     lukem .BR slapd.conf (5)
    151  1.1     lukem manual page.
    152  1.1     lukem .TP
    153  1.1     lukem .B perlModulePath /path/to/libs
    154  1.1     lukem Add the path to the @INC variable.
    155  1.1     lukem .TP
    156  1.1     lukem .B perlModule ModName
    157  1.1     lukem `Use' the module name ModName from ModName.pm
    158  1.1     lukem .TP
    159  1.1     lukem .B filterSearchResults
    160  1.1     lukem Search results are candidates that need to be filtered (with the
    161  1.1     lukem filter in the search request), rather than search results to be
    162  1.1     lukem returned directly to the client.
    163  1.5      tron .TP
    164  1.5      tron .B perlModuleConfig <arguments>
    165  1.5      tron Invoke the module's config method with the given arguments.
    166  1.1     lukem .SH EXAMPLE
    167  1.3     lukem There is an example Perl module `SampleLDAP' in the slapd/back\-perl/
    168  1.1     lukem directory in the OpenLDAP source tree.
    169  1.1     lukem .SH ACCESS CONTROL
    170  1.1     lukem The
    171  1.5      tron .B perl
    172  1.1     lukem backend does not honor any of the access control semantics described in
    173  1.1     lukem .BR slapd.access (5);
    174  1.1     lukem all access control is delegated to the underlying PERL scripting.
    175  1.1     lukem Only
    176  1.1     lukem .B read (=r)
    177  1.1     lukem access to the
    178  1.1     lukem .B entry
    179  1.1     lukem pseudo-attribute and to the other attribute values of the entries
    180  1.1     lukem returned by the
    181  1.1     lukem .B search
    182  1.1     lukem operation is honored, which is performed by the frontend.
    183  1.1     lukem .SH WARNING
    184  1.1     lukem The interface of this backend to the perl module MAY change.
    185  1.1     lukem Any suggestions would greatly be appreciated.
    186  1.5      tron 
    187  1.5      tron Note: in previous versions, any unrecognized lines in the slapd.conf
    188  1.5      tron file were passed to the perl module's config method. This behavior is
    189  1.5      tron deprecated (but still allowed for backward compatibility), and the
    190  1.5      tron perlModuleConfig directive should instead be used to invoke the
    191  1.5      tron module's config method. This compatibility feature will be removed at
    192  1.5      tron some future date.
    193  1.1     lukem .SH FILES
    194  1.1     lukem .TP
    195  1.1     lukem /etc/openldap/slapd.conf
    196  1.1     lukem default slapd configuration file
    197  1.1     lukem .SH SEE ALSO
    198  1.1     lukem .BR slapd.conf (5),
    199  1.1     lukem .BR slapd (8),
    200  1.1     lukem .BR perl (1).
    201