OSF DCE Application Development Guide--Introduction and Style Guide

OSF DCE Application Development Guide—Introduction and Style Guide
void server_create_acl(
uuid_t mgr_type_uuid, /* Manager type of ACL to create. */
sec_acl_permset_t perms, /* Permission set for ACL. */
unsigned_char_t *user, /* Principal name for new entry. */
sec_acl_t *acl, /* To return the ACL entry in. */
uuid_t *acl_uuid, /* To return the ACL’s UUID in. */
unsigned32 *status) /* To return status in. */
{
uuid_t u; /* For the principal’s UUID (from the registry). */
*status = error_status_ok;
/* Create a UUID for the ACL... */
/* Note that the new UUID doesn’t get associated with the entry in */
/* this routine. It must happen in server_acl_mgr_setup()... */
uuid_create(acl_uuid, status);
/* Create an initial ACL object with default permissions for the */
/* designated user principal identity... */
dce_acl_obj_init(&mgr_type_uuid, acl, status);
/* Get the specified principal’s UUID... */
server_get_local_principal_id(user, &u, status);
/* Now add the user ACL entry to the ACL... */
dce_acl_obj_add_user_entry(acl, perms, &u, status);
}
3.4.3.17 The server_store_acl Routine
The server_store_acl( ) routine stores an ACL and its related information in the
appropriate backing store databases.
/******
*
* server_store_acl -- Store ACL-related data.
*
*
* The data is stored in databases that support a
* name->object_uuid->acl_uuid style of ACL lookup.
*
*
* Called from server_acl_mgr_setup().
*
******/
void server_store_acl(
dce_db_handle_t db_acl, /* ACL (UUID)-indexed store. */
dce_db_handle_t db_object, /* Object (UUID)-indexed store. */
3 34 Tandem Computers Incorporated 124246