Creating a New Entry
In some situations, you might need to create a new entry. There are two basic ways
to do this:
•
By allocating memory for a new entry
To allocate memory for a new entry, call the
This function returns a pointer to a new entry of the opaque datatype
. Once you create a new entry, you should call other front-end
Slapi_Entry
routines to set the DN and attributes of the entry.
•
By copying an existing entry
To make a copy of an existing entry, call the
function returns a pointer to a new entry of the datatype
contains the copied data.
When you are finished using the entry, you should free it from memory by calling
the
slapi_entry_free()
Converting Between Entries and Strings
Entries can be stored in LDIF files. When stored in these files, entries are converted
into a string representation. The following format is the LDIF string representation
for a directory entry:
dn:[:] <dn>\n
[<attr>:[:] <value>\n]
[<attr>:[:] <value>\n]
[<space><continuedvalue>\n]*
...
If you want to continue the specification of a value on additional lines (in other
words, if the value wraps around to another line), use a single space (the ASCII 32
character) at the beginning of subsequent lines. For example:
dn: cn=Jane Doe
inski, ou=Accoun
ting, o=ex
ample.com
Refer to the Netscape Directory Server Administrator's Guide for details on DN syntax.
function.
Working with Entries, Attributes, and Values
slapi_entry_alloc()
slapi_entry_dup()
Slapi_Entry
Chapter 5
Front-End API Functions
function.
routine. This
that
61
Need help?
Do you have a question about the NETSCAPE DIRECTORY SERVER 6.1 - PLUG-IN and is the answer not in the manual?
Questions and answers