NAME
ds_add_entry - Adds a leaf entry to the DIT.
SYNOPSIS
#include <xom.h>
#include <xds.h>
DS_status ds_add_entry(
OM_private_object session,
OM_private_object context,
OM_object name,
OM_object entry,
OM_sint *invoke_id_return);
PARAMETERS
Input
- session
-
(Object(DS_C_SESSION)). The directory session against which this
operation is performed. This must be a private object.
- context
-
(Object(DS_C_CONTEXT)). The directory context to be used for this operation.
This parameter must be a private object or the DS_DEFAULT_CONTEXT constant.
Note that DS_DONT_DEREFERENCE_ALIASES
and DS_SIZE_LIMIT
do not apply to this operation.
- name
-
(Object(DS_C_NAME)). The name of the entry to be added.
The immediate superior of the new entry is determined by removing
the last RDN component, which belongs
to the new entry.
The immediate superior must exist in the same Directory System Agent (DSA);
otherwise, the function can fail with DS_C_UPDATE_ERROR
(DS_E_AFFECTS_MULTIPLE_DSAS).
Any aliases in the name are not dereferenced.
- entry
-
(Object(DS_C_ATTRIBUTE_LIST)). The attribute information that,
together with that from the RDN,
constitutes the entry to be created.
Note that an instance of OM class
DS_C_ENTRY_INFO can be supplied as the value of this parameter,
since DS_C_ENTRY_INFO is a subclass of DS_C_ATTRIBUTE_LIST.
Output
- invoke_id_return
-
(Integer). Not supported.
DESCRIPTION
The ds_add_entry() function adds a leaf entry to the Directory.
The entry can be either an object or an alias.
The Directory checks that the resulting entry conforms to the Directory schema.
NOTES
Although the user ideally is not aware whether naming
operations are being handled by GDS
or CDS,
there are some situations where naming results can differ between
the two services. (See the xds_intro(3xds) reference page for XDS functions
for the general differences between operations on GDS and CDS.)
Note the following issues for the ds_add_entry() operation:
- Only leaf objects (that is, objects that are not CDS directory objects) can
be added to CDS through the XDS interface.
- Only the DS_A_COMMON_NAME and DS_A_MEMBER attributes are valid for
the DS_O_GROUP_OF_NAMES object in CDS.
- GDS-structured attribute types are not supported by CDS. If an attempt is made
to add a GDS-structured attribute type to CDS, then it returns with a
DS_C_ATTRIBUTE_ERROR (DS_E_CONSTRAINT_VIOLATION).
Since CDS does not implement the X.500 schema rules, some CDS objects may
not contain mandatory attributes like object class and so on.
RETURN VALUES
- DS_status
-
DS_SUCCESS is returned if the entry was added; otherwise,
an error is returned.
ERRORS
This function can return a DS_C_SYSTEM_ERROR or one of the following
DS_C_LIBRARY_ERRORs:
- DS_E_BAD_ARGUMENT
- DS_E_BAD_CONTEXT
- DS_E_BAD_NAME
- DS_E_BAD_SESSION
- DS_E_MISCELLANEOUS
- DS_E_MISSING_TYPE
- DS_E_TOO_MANY_OPERATIONS
The function can return the following directory errors:
- DS_C_ATTRIBUTE_ERROR
- DS_C_NAME_ERROR
- DS_C_REFERRAL
- DS_C_SECURITY_ERROR
- DS_C_SERVICE_ERROR
- DS_C_UPDATE_ERROR
The DS_C_UPDATE_ERROR (DS_E_AFFECTS_MULTIPLE_DSAS) error,
referred to earlier in this reference page,
need not be returned if there is local agreement between the DSAs
to allow the entry to be added.
This function can return a
DS_C_COMMUNICATIONS_ERROR, as well as the error constant
DS_NO_WORKSPACE.
© 1990-1996, Transarc Corporation