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:

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:

The function can return the following directory errors:

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