OSF DCE Application Development Guide--Introduction and Style Guide
A Sample Application
status);
if (*status != error_status_ok)
{
print_server_error("sec_rgy_pgo_name_to_id()", *status);
return;
}
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug7,
"Exiting server_get_local_principal_id()"));
}
/******
*
* server_create_acl -- Create an ACL with some specified set of permissions
* assigned to some principal user.
*
*
* Called from server_acl_mgr_setup().
*
******/
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. */
{
static uuid_t u; /* For the principal’s UUID (from the registry). */
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug7,
"Entering server_create_acl()"));
*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()... */
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug4,
"Calling uuid_create()"));
uuid_create(acl_uuid, status);
if (*status != error_status_ok)
{
print_server_error("uuid_create()", *status);
return;
}
/* Create an initial ACL object with default permissions for the */
/* designated user principal identity... */
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug4,
124246 Tandem Computers Incorporated A− 35