OSF DCE Application Development Guide--Introduction and Style Guide
Security
dce_db_handle_t db_name, /* Name-indexed store. */
sec_acl_t *acl, /* The ACL itself. */
uuid_t *acl_uuid, /* ACL UUID. */
uuid_t *object_uuid, /* Object UUID. */
unsigned_char_t *object_name, /* The name of the object. */
void *object_data, /* The actual object data contents. */
/* NOTE: NOT USED NOW. */
boolean32 is_container, /* Are we storing a container ACL? */
unsigned32 *status) /* To return status. */
{
/* These two variables are used to hold UUIDs for the ACLs we will */
/* need to create if we have a container ACL on our hands... */
uuid_t def_object, def_container;
sample_data_t sample_data;
*status = error_status_ok;
/* Null the contents of the object_data variable... */
bzero(object_data, sizeof object_data);
/* If we have a container ACL, then we have to create and store the */
/* special stuff associated with it-- namely, the container ACL */
/* itself, and a default object ACL to go with it... */
if (is_container)
{
/* Create a UUID for the default object ACL... */
uuid_create(&def_object, status);
/* Create a UUID for the default container ACL... */
uuid_create(&def_container, status);
/* Store the default object ACL into UUID-indexed store... */
dce_db_store_by_uuid(db_acl, &def_object, acl, status);
/* Store the default container ACL into UUID-indexed */
/* store... */
dce_db_store_by_uuid(db_acl, &def_container, acl, status);
}
/* Store the plain object ACL into ACL UUID-indexed store... */
dce_db_store_by_uuid(db_acl, acl_uuid, acl, status);
/* Store the ACL UUID(s) into a standard object header... */
dce_db_std_header_init(
db_object, /* Object database. */
&(sample_data.s_hdr), /* Object data hdr. */
object_uuid, /* Object UUID. */
acl_uuid, /* ACL UUID. */
&def_object, /* Default object ACL. */
&def_container, /* Default container ACL. */
0, /* Reference count. */
status);
124246 Tandem Computers Incorporated 3− 35