24.49. slapi_str2entry()
A directory entry can be described by a string in LDIF format; for details, see Section 5.5.2, “Converting Between Entries and Strings”.
slapi_str2entry() function converts a string description in this format to a Slapi_Entry structure, which you can pass to other API functions.
Note
slapi_str2entry().
#include "slapi-plugin.h" Slapi_Entry *slapi_str2entry( char *s, int flags );
This function takes the following parameters:
|
s
| Description of an entry that you want to convert to Section 14.22, “Slapi_Entry” . |
|
flags
| One or more flags specifying how the entry should be generated |
|
SLAPI_STR2ENTRY_REMOVEDUPVALS
| Removes any duplicate values in the attributes of the entry. |
|
SLAPI_STR2ENTRY_ADDRDNVALS
| Adds the relative distinguished name (RDN) components (for example, uid=bjensen) as attributes of the entry. |
This function returns one of the following values:
- A pointer to the Slapi_Entry structure representing the entry.
NULLif the string cannot be converted; for example, if no DN is specified in the string.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.