HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Table 3-1 Directives for specifying different plug-in types (continued)
Example of useDescriptionDirective
You can use this plug-in type when your
plug-in does not fit in any of the other
types listed in this table. For example, if
your plug-in does performs more than
one operation, then you should use this
directive. This type of plug-in will
typically register the types of operations
it wants to handle using the internal API.
Declares an object plug-in. Object plug-ins
can install SLAPI_PLUGIN_START_FN,
SLAPI_PLUGIN_CLOSE_FN, and
SLAPI_PLUGIN_POSTSTART_FN
functions. They can also use the
slapi_register_plugin() call to
register any other kind of plug-in. Object
plug-ins are typically used to simplify
configuration of a group of related plug-ins
(one entry under cn=config instead of
many).
object
This directive will be supported in future
releases of Directory Server.
pwdstoragescheme
3.2 Loading the plug-in configuration file
After you have written the plug-in configuration file, you need to load it into the
/etc/opt/dirsrv/slapd-instance_name/dse.ldif file. You can do this either by using
an LDAP utility, such as ldapmodify, or by editing the file directly. If you choose to edit the
file directly, be sure to shut down the Directory Server first.
The following is an example of an LDAP command that loads the plug-in defined in the
configuration file example-plugin.ldif:
ldapmodify -h my_host -p 389 -a -D cn= Directory
Manager -w adminadmin -f example-plugin.ldif
After the plug-in configuration has been loaded, you need to restart the Directory Server before
you can make calls to your plug-in. To restart the Directory Server; you can either use the Directory
Server Console or use the restart-slapd script.
# /opt/dirsrv/slapd-instance_name/restart-slapd
3.3 Passing extra arguments to plug-ins
The standard method for configuring plug-ins is to provide configuration parameters as attributes
and values in the plug-in entry in the dse.ldif file. All plug-ins use the extensibleObject
object class, so any custom attribute can be added to that object class in the schema. A better
alternative is to define a custom auxiliary object class which contains the custom plug-in
configuration attributes.
Use the plug-in start function (registered in the initialization function with slapi_pblock_set()
using SLAPI_PLUGIN_START_FN) to use the custom configuration. One of the pblock
parameters passed to the start function is the plug-in entry, as the SLAPI_ADD_TARGET parameter.
The slapi_entry_attr_* family of functions can be used to get and use these values.
Plug-ins can be dynamically configured at run-time by registering DSE callbacks for the plug-in
entry with slapi_config_register_callback().
40 Configuring plug-ins