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. The returned entry attributes depend on the value of attrs.
NULL: All attributes Null terminated array of strings representing a list of attribute types: A subset of the entry attributes, that is, the one specified in attrs if presents in the entry and a few other like the attributes used in the rdn.
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.
Returned entries are those provided to the entry callback or in the array got with slapi_pblock_get(pb, SLAPI_PLUGIN_INTOP_SEARCH_ENTRIES, &entries)().
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() .