HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
Note:
This function modifies the string argument s. If you still need to use this string value, you should
make a copy of this string before calling slapi_str2entry().
If an error occurred during the conversion process, the function returns NULL instead of the
entry.
When you are done working with the entry, you should call the “slapi_entry_free()” function.
To convert an entry to a string description, call the “slapi_filter_free()” function.
Syntax
#include "slapi-plugin.h"
Slapi_Entry *slapi_str2entry( char *s, int flags );
Parameters This function takes the following parameters:
Description of an entry that you want to convert to “Slapi_Entry” .
s
One or more flags specifying how the entry should be generated
flags
The value of the flags argument can be one of the following values:
Removes any duplicate values in the attributes of the entry.
SLAPI_STR2ENTRY_REMOVEDUPVALS
Adds the relative distinguished name (RDN) components (for
example, uid=bjensen) as attributes of the entry.
SLAPI_STR2ENTRY_ADDRDNVALS
Returns This function returns one of the following values:
A pointer to the Slapi_Entry structure representing the entry.
NULL if the string cannot be converted; for example, if no DN is specified in the string.
See also “slapi_filter_free()”
232 Functions for managing entries