HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
6 Writing pre- and postoperation plug-ins
This chapter explains how to write functions that the HP-UX Directory Server (Directory Server)
calls before and after executing an LDAP operation. These functions are called preoperation and
postoperation plug-in functions.
6.1 How pre- and postoperation plug-ins work
The Directory Server can perform the following LDAP operations:
bind
unbind
search
modify
add
delete
modifyRDN
compare
abandon
Note:
The Directory Server can also perform extended operations as defined in the LDAPv3 protocol.
For information on implementing plug-in functions to execute extended operations, refer to
Chapter 10 “Writing extended operation plug-ins”.
You can configure the Directory Server to call your custom plug-in functions before and after
executing any of these LDAP operations.
For example, you can write a preoperation function that validates an entry before the server
performs an LDAP add operation. An example of a postoperation plug-in function would be
one that sends a notification to a user after their entry has been modified by an LDAP modify
operation.
You can also set up the Directory Server to call your own plug-in functions before and after:
Sending an LDAP entry to the client.
Sending an LDAP result code to the client.
Sending an LDAP referral to the client.
Figure 6-1 “Calling preoperation and postoperation plug-in functions” illustrates how the
Directory Server front end calls preoperation and postoperation functions before and after
executing an LDAP operation.
When processing a request, the Directory Server will call all registered preoperation functions
before it calls the back end to service the request. All preoperation functions must return before
the front end calls the associated back end function.
6.1 How pre- and postoperation plug-ins work 57