OSF DCE Application Development Guide--Introduction and Style Guide

OSF DCE Application Development Guide—Introduction and Style Guide
/* Now store the object data keyed by object UUID... */
if (strcmp(object_name, SAMPLE_OBJECT_NAME) == 0)
strcpy(sample_data.s_data.message,
"THIS IS AN OFFICIAL SAMPLE OBJECT TEXT!");
else if (strcmp(object_name, MGMT_OBJ_NAME) == 0)
strcpy(sample_data.s_data.message,
"THIS IS AN OFFICIAL MGMT OBJECT SAMPLE TEXT!");
else
strcpy(sample_data.s_data.message,
"I DON’T KNOW WHAT THIS IS!");
dce_db_store_by_uuid(db_object, object_uuid, (void *)&sample_data, status);
/* Finally, store the object UUID keyed by the object ("residual") */
/* name... */
dce_db_store_by_name(db_name, (char *)object_name, object_uuid, status);
}
3.4.3.18 The server_acl_mgr_setup Routine
The server_acl_mgr_setup( ) routine performs all the steps necessary to set up ACL
databases for the two object types used by the sample application.
/******
*
* server_acl_mgr_setup -- Open and, if necessary, create the ACL-related
* databases, that is:
*
* 1. Set up a default ACL manager for the management interface.
*
* 2. Create an initial ACL. For servers that dynamically create
* objects, this ACL is intended to be used as the ACL on the
* "container" in which objects are created. If the server
* manages static objects, this ACL can be used for some other
* purpose.
*
*
* Called from main().
*
******/
void server_acl_mgr_setup(
unsigned_char_t *db_acl_path, /* Pathname for databases. */
dce_acl_resolve_func_t resolver, /* sample_resolve_by_name. */
uuid_t acl_mgr_uuid, /* ACL manager UUID. */
uuid_t object_uuid, /* Object UUID. */
unsigned_char_t *object_name, /* Object name. */
sec_acl_permset_t owner_perms, /* Owner permission set. */
unsigned_char_t *owner, /* Owner name. */
boolean32 is_container, /* Is this a container object? */
3 36 Tandem Computers Incorporated 124246