HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Table 7-1 Parameters for the bind operation (continued)
DescriptionData typeParameter ID
The credentials that you want sent to
the client. Set this before calling
“slapi_send_ldap_result()”.
struct berval *SLAPI_BIND_RET_SASLCREDS
SASL mechanism used; for example,
LDAP_SASL_EXTERNAL.
char *SLAPI_BIND_SASLMECHANISM
If the SLAPI_BIND_SASLMECHANISM parameter is empty, simple authentication was used, and
simple credentials were provided.
7.3 Processing an LDAP unbind operation
When the Directory Server receives an LDAP unbind request from a client, the front end calls
the nunbind function for each back end. No operation-specific parameters are placed in the
parameter block that is passed to the unbind function.
In the parameter block, the following parameters specify plug-in functions that are called in the
process of executing an unbind operation:
The SLAPI_PLUGIN_PRE_UNBIND_FN parameter specifies the preoperation unbind
function.
The SLAPI_PLUGIN_POST_UNBIND_FN parameter specifies the postoperation unbind
function.
Call the “slapi_pblock_set()” function to set these parameters to the names of your functions.
Your plug-in functions should return 0 if successful. If the preoperation function returns a nonzero
value, the postoperation unbind function is never called.
7.4 Processing an LDAP search operation
The server processes an LDAP search operation in two stages:
1. First, the server gets a list of candidate entries, using an index (if applicable).
For example, for a search filter that finds entries where mail=a*, the server checks the index
for the mail attribute (if the index exists), finds the keys that start with a, and generates a
list of matching entries.
If no applicable index exists, all entries are considered to be candidates.
To get the list of candidates, the server calls the back end search function. For details, refer
to “Getting the list of candidates”.
2. Next, the server iterates through each candidate in the list and determines if the candidate
matches the search criteria.
If an entry matches the criteria, the server sends the entry to the client.
To check each candidate, the server calls the back end next_candidate function for each
candidate in the list. For details, refer to “Iterating through candidates”.
The rest of this section explains these stages in more detail.
7.4.1 Getting the list of candidates
When the Directory Server receives an LDAP search request, the front end gets information about
the search (such as the scope and base DN). The front end normalizes the base DN by calling the
slapi_sdn_get_ndn() function and determines if the base DN identifies a DSA-specific entry
(DSE). If so, the front end handles the search request directly and does not pass it to the back
end search function.
62 Defining functions for LDAP operations