Previous section.

DCE 1.1: Authentication and Security Services
Copyright © 1997 The Open Group


sec_rgy_attr_update-Creates and updates attribute instances for a specified object


#include <dce/sec_rgy_attr.h>

void sec_rgy_attr_update (
    sec_rgy_handle_t context,
    sec_rgy_domain_t name_domain,
    sec_rgy_name_t name,
    unsigned32 num_to_write,
    unsigned32 space_avail,
    sec_attr_t in_attrs[],
    unsigned32 *num_returned,
 	sec_attr_t out_attrs[],
    unsigned32 *num_left,
    signed32 *failure_index,
    error_status_t *status);	




An opaque handle bound to a registry server. Use sec_rgy_site_open() to acquire a bound handle.


A value of type sec_rgy_domain_t that identifies the registry domain in which the object specified by name resides. The valid values are as follows:


The name identifies a principal.


The name identifies a group.


The name identifies an organization.

This parameter is ignored if name is policy or replist.


A character string of type sec_rgy_name_t specifying the name of the person, group, or organization to which the attribute is attached.


A 32-bit unsigned integer that specifies the number of elements in the in_attrs array. This integer must be greater than 0.


A 32-bit unsigned integer that specifies the size of the out_attrs array. This integer must be greater than 0.


An array of values of type sec_attr_t that specifies the attribute instances to be updated. The size of the array is determined by num_to_write.



A pointer to an unsigned 32-bit integer that specifies the number of attribute instances returned in the out_attrs array.


An array of values of type sec_attr_t that specifies the updated attribute instances. Not that only if these attributes were processed by an update attribute trigger server will they differ from the attributes in the in_attrs array. The size of the array is determined by space_avail and the length by num_returned.


A pointer to an unsigned 32-bit integer that supplies the number of attributes that could not be returned because of space constraints in the out_attrs buffer. To ensure that all the attributes will be returned, increase the size of the out_attrs array by increasing the size of space_avail and num_returned.


In the event of an error, failure_index is a pointer to the element in the in_attrs array that caused the update to fail. If the failure cannot be attributed to a specific attribute, the value of failure_index is -1.


A pointer to the completion status. On successful completion, the routine returns error_status_ok. Otherwise, it returns an error.


The sec_rgy_attr_update() routine creates new attribute instances and updates existing attribute instances attached to a object specified by name and Registry domain. The instances to be created or updated are passed as an array of sec_attr_t data types. This is an atomic operation: if the creation of any attribute in the in_attrs array fails, all updates are aborted. The attribute causing the update to fail is identified in failure_index. If the failure cannot be attributed to a given attribute, failure_index contains -1.

The in_attrs array, which specifies the attributes to be created, contains values of type sec_attr_t. These values are:

If an attribute instance already exists which is identical in both attr_id and attr_value to an attribute specified in in_attrs, the existing attribute information is overwritten by the new information. For multi-valued attributes, every instance with the same attr_id is overwritten with the supplied values.

If an attribute instance does not exist, it is created.

For multi-valued attributes, because every instance of the multi-valued attribute is identified by the same UUID, every instance is overwritten with the supplied value. To change only one of the values, you must supply the values that should be unchanged as well as the new value.

To create instances of multi-valued attributes, create individual sec_attr_t data types to define each multi-valued attribute instance and then pass all of them in in the input array.

If an input attribute is associated with an update attribute trigger server, the attribute trigger server is invoked (by the sec_attr_trig_update() function) and the in_attr array is supplied as input. The output attributes from the update attribute trigger server are stored in the registry database and returned in the out_attrs array. Note that the update attribute trigger server may modify the values before they are used to update the registry database. This is the only circumstance under which the values in the out_attrs array differ from the values in the in_attrs array.

Permissions Required
The sec_rgy_attr_update() routine requires the update permission set for each attribute type identified in the in_attrs array. These permissions are defined as part of the ACL manager set in the schema entry of each attribute type.



The idl file from which dce/sec_rgy_attr.h was derived.



The call was successful.


Invalid encoding type specified.


Invalid or unsupported attribute type.


Attribute instance already exists.


Attribute value is not unique.


Registry is read only.


Server is read only.


Server is unavailable.


Trigger server is unavailable.


Unauthorized to perform this operation.


Functions: sec_rgy_attr_delete(), sec_rgy_attr_test_and_update().
Please note that the html version of this specification may contain formatting aberrations. The definitive version is available as an electronic publication on CD-ROM from The Open Group.

Contents Next section Index