slapd-perl(5)


NAME

   slapd-perl - Perl backend to slapd

SYNOPSIS

   /etc/ldap/slapd.conf

DESCRIPTION

   The  Perl  backend to slapd(8) works by embedding a perl(1) interpreter
   into slapd(8).  Any perl database section  of  the  configuration  file
   slapd.conf(5)  must  then  specify what Perl module to use.  Slapd then
   creates a new Perl object  that  handles  all  the  requests  for  that
   particular instance of the backend.

   You will need to create a method for each one of the following actions:

     * 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     # module-specific config directives,
     * init       # called after backend is initialized.

   Unless  otherwise  specified,  the methods return the result code which
   will be returned to the client.  Unimplemented actions can just  return
   unwillingToPerform (53).

   new    This  method  is called when the configuration file encounters a
          perlmod line.  The module  in  that  line  is  then  effectively
          `use'd  into the perl interpreter, then the new method is called
          to create a new object.  Note that multiple  instances  of  that
          object  may  be  instantiated, as with any perl object.  The new
          method receives the class name as argument.

   search This method is called when a search request comes from a client.
          It arguments are as follows:
            * object reference
            * base DN
            * scope
            * alias dereferencing policy
            * size limit
            * time limit
            * filter string
            * attributes only flag (1 for yes)
            * list of attributes to return (may be empty)

   Return value: (resultcode, ldif-entry, ldif-entry, ...)

   compare
          This  method  is  called  when  a  compare  request comes from a
          client.  Its arguments are as follows.
            * object reference
            * dn
            * attribute assertion string

   modify This method is called when a modify request comes from a client.
          Its arguments are as follows.
            * object reference
            * dn
            * a list formatted as follows
              ({ "ADD" | "DELETE" | "REPLACE" },
               attributetype, value...)...

   add    This  method  is  called when a add request comes from a client.
          Its arguments are as follows.
            * object reference
            * entry in string format

   modrdn This method is called when a modrdn request comes from a client.
          Its arguments are as follows.
            * object reference
            * dn
            * new rdn
            * delete old dn flag (1 means yes)

   delete This method is called when a delete request comes from a client.
          Its arguments are as follows.
            * object reference
            * dn

   config This method is called once for each perlModuleConfig line in the
          slapd.conf(5) configuration file.  Its arguments are as follows.
            * object reference
            * array of arguments on line

   Return value: nonzero if this is not a valid option.

   init   This  method  is  called  after  backend  is  initialized.   Its
          argument is as follows.
            * object reference

   Return value: nonzero if initialization failed.

CONFIGURATION

   These 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 slapd.conf(5) manual page.

   perlModulePath /path/to/libs
          Add the path to the @INC variable.

   perlModule ModName
          `Use' the module name ModName from ModName.pm

   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.

   perlModuleConfig <arguments>
          Invoke the module's config method with the given arguments.

EXAMPLE

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

ACCESS CONTROL

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

WARNING

   The interface of this backend to  the  perl  module  MAY  change.   Any
   suggestions would greatly be appreciated.

   Note:  in  previous  versions, any unrecognized lines in the slapd.conf
   file were passed to the perl module's config method. This  behavior  is
   deprecated  (but  still  allowed  for  backward compatibility), and the
   perlModuleConfig  directive  should  instead  be  used  to  invoke  the
   module's  config  method. This compatibility feature will be removed at
   some future date.

FILES

   /etc/ldap/slapd.conf
          default slapd configuration file

SEE ALSO

   slapd.conf(5), slapd(8), perl(1).





Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.





Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.


Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.





Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.


Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.





Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.


Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.