Sun Directory Server Enterprise Edition 7.0 Developer's Guide

Testing the Computed Attribute Plug-In

Before you can test the plug-in with the ldapsearch command, you must register the plug-in with Directory Server.

ProcedureTo Register the Plug-In

If you have not already done so, build the example plug-in library and activate both plug-in informational logging and the example plug-in.

  1. Build the plug-in.

    Hint Use install-path/examples/Makefile or install-path/examples/Makefile64.

  2. Configure Directory Server to log plug-in informational messages and load the plug-in.


     $ dsconf create-plugin -F custom-plugin-init-function -G custom-plugin-argument -H lib-path \
    -Y custom-plugin-type "Custom Plugin"
    $ dsconf enable-plugin "Custom Plugin"

    Hint For more information, use the commands specified in the plug-in source file.

  3. Restart Directory Server.


    $ dsadm restart instance-path
    

ProcedureTo use the Computed Attribute Plug-In

Before You Begin

Register the computed attribute plug-in with Directory Server.

  1. Run a search on the root DSE.


    $ ldapsearch -h localhost -p 1389 -b "" -s base "(objectclass=*)" currentTime
        version: 1
        dn:
        currentTime: Fri Feb 17 09:30:28 2006