OSF DCE Application Development Guide--Introduction and Style Guide

A Sample Application
/* By default everybody must be able to get the principal */
/* name. They should be able to ping too. So add an appro- */
/* priate unauthenticated permissions entry to the ACL... */
permset = mgmt_perm_inq_pname | mgmt_perm_ping;
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug4,
"Calling dce_acl_obj_add_unauth_entry()"));
dce_acl_obj_add_unauth_entry(
new_mgmt_acl,
permset,
status);
if (*status != error_status_ok)
{
print_server_error("dce_acl_obj_add_unauth_entry()",
*status);
return;
}
/* Add permissions for the any_other entry in the ACL... */
permset = mgmt_perm_inq_pname | mgmt_perm_ping;
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug4,
"Calling dce_acl_obj_add_any_other_entry()"));
dce_acl_obj_add_any_other_entry(
new_mgmt_acl,
permset,
status);
if (*status != error_status_ok)
{
print_server_error("dce_acl_obj_add_any_other_entry()",
*status);
return;
}
/* Store the mgmt ACL... */
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug5,
"Calling server_store_acl()"));
server_store_acl(
*db_acl, /* The ACL UUID-indexed store. */
*db_object, /* The object UUID-indexed store. */
*db_name, /* The name ("residual")-indexed store. */
new_mgmt_acl, /* The ACL itself. */
mgmt_acl_uuid, /* The mgmt ACL UUID. */
&mgmt_object_uuid, /* The mgmt object UUID. */
(unsigned_char_t *)MGMT_OBJ_NAME, /* The mgmt ob- */
/* ject name. */
/* (void*) */ &object_data, /* The object contents. */
0, /* Not a container ACL. */
status);
124246 Tandem Computers Incorporated A 49