Sets a parameter block for an internal search.
#include slapi-plugin.h int slapi_search_internal_set_pb(Slapi_PBlock *pb, const char *base, int scope, const char *filter, char **attrs, int attrsonly,LDAPControl **controls, const char *uniqueid,Slapi_ComponentId *plugin_identity, int operation_flags);
This function takes the following parameters:
Parameter block.
The base of the search.
LDAP_SCOPE_SUBTREE, LDAP_SCOPE_ONELEVEL , or LDAP_SCOPE_BASE
The search filter.
Request attribute list.
This parameter is currently ignored.
Specifying 1 retrieves only the attribute types. Specifying 0 retrieves the attribute types and the attribute values.
LDAP control that you wish to attach.
Unique ID must be set to NULL.
Plug-in identifier obtained from SLAPI_PLUGIN_IDENTITY during plug-in initialization.
The only flag that is exposed in this release is SLAPI_OP_FLAG_NEVER_CHAIN . If this flag is set, then the search will not be conducted if the entry is a chained backend.
This function returns 0 if successful. Otherwise, it returns an LDAP error code.
Use this function to set the parameter block to perform an internal search. This function is needed in order to use the internal search operation function, slapi_search_internal_pb().
You would typically create a Slapi_PBlock structure using slapi_pblock_new(), pass that parameter block to slapi_search_internal_pb(), and then pass the same parameter block to actually do the search.
Allocate the parameter block using slapi_pblock_new() before calling this function.
Directory Server does not free the parameters you passed to this function.
Free the parameter block after calling slapi_search_internal_pb() .