HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
The referral URLs passed to the referral entry callback function do not need to be freed. If you
need to access a referral string after returning from the callback function, call slapi_ch_strdup()
to make a copy.
You do not need to call “slapi_free_search_results_internal()” after calling
slapi_search_internal_callback_pb.
17.7 slapi_search_internal_get_entry()
Description This function performs an internal search operation to read one entry; that is, it
performs a base object search. If an entry named by dn is found, the ret_entry pointer will be
set to point to a copy of the entry that contains the attribute values specified by the attrlist
parameter.
Syntax
#include "slapi-plugin.h"
int slapi_search_internal_get_entry( Slapi_DN *dn, char ** attrlist,
Slapi_Entry **ret_entry, void *caller_identity);
Parameters This function takes the following parameters:
The DN of the entry to be read.
dn
A NULL terminated array of attribute types to return from entries that match filter. If
you specify a NULL, all attributes will be returned.
attrlist
The address of a pointer to receive the entry if it is found.
ret_entry
A plug-in or component identifier. This value can be obtained from the
SLAPI_PLUGIN_IDENTITY field of the parameter block that is passed to your plug-in
initialization function.
caller_identity
Returns This function returns the LDAP result code for the search operation.
Memory concerns The returned entry (*ret_entry) should be freed by calling
“slapi_entry_free()”.
See also
slapi_search_internal_pb()
“slapi_entry_free()”
17.8 slapi_search_internal_pb()
This function performs an internal LDAP search based on a parameter block to search the
directory. The parameter block should be initialized by calling the
slapi_search_internal_set_pb() function.
Syntax
#include "slapi-plugin.h"
int slapi_search_internal_pb(Slapi_PBlock *pb);
Parameters This function takes the following parameter:
A parameter block that has been initialized using
slapi_search_internal_set_pb().
pb
Returns This function returns one of the following values:
0 if successful.
-1 if an error occurs. If -1 is returned, the SLAPI_PLUGIN_INTOP_RESULT field of the
parameter block should be consulted to determine the precise LDAP result code.
162 Functions for internal operations and plug-in callback