OSF DCE Application Development Guide--Core Components

OSF DCE Application Development Guide—Core Components
For multivalued attributes, because every instance of the multivalued attribute is
identified by the same UUID, every instance is overwritten with the supplied value. For
example, suppose object delores has three attributes of the multivalued type
security_role. If you pass in one value for security_role, the values of all three are
changed to the one you enter.
To change only one of the security_role values, you must supply the values that should
be unchanged as well as the new value. For example, suppose object delores has three
security_role attributes with values of level1, level2, and level3. To change level1 to
level1O. and retain level2 and level3, the input array must contain level1.5, level2, and
level3.
To create instances of multivalued attributes, you must create individual sec_attr_t data
types to define each multivalued attribute instance and then pass all of them in the
sec_rgy_attr_update( ) input array.
If an input attribute is associated with an update attribute trigger, the attribute trigger is
invoked (by the sec_attr_trig_update( ) call), and the values in the
sec_rgy_attr_update( ) input array are used as input to the update attribute trigger. The
output values from the update attribute trigger are stored in the registry database and
returned in the sec_rgy_attr_update( ) output array.
28.3.2.2 The sec_rgy_attr_test_and_update( ) Call
The sec_rgy_attr_test_and_update( ) call, like the sec_rgy_attr_update( ) call,
creates new attribute instances and updates existing attribute instances attached to an
object specified by name and registry domain. However, it performs the update only if a
set of specified attribute instances match the attribute instances that already exist for the
object. This call is useful to ensure that updates are made only if certain conditions
exist.
The attribute instances to be matched are passed in an input array of sec_attr_t values.
Other than this conditional test, this call functions exactly the same as the
sec_rgy_attr_update( ) call.
28.3.2.3 The sec_rgy_attr_delete( ) Call
The sec_rgy_attr_delete() call deletes the specified attribute instances from an object
identified by name and registry domain. The attribute instances to be deleted are passed
in as an array of values of sec_attr_t.
To delete attribute instances that are not multivalued and to delete all instances of a
multivalued attribute, an attribute UUID is all that is required. For these attribute
instances, supply the attribute UUID in the input array and set the attribute encoding (in
sec_attr_encoding_t)to sec_attr_enc_void.
To delete a specific instance of a multivalued attribute, you must supply the UUID and
value that uniquely identify the multivalued attribute instance in the input array.
2816 Tandem Computers Incorporated 124245