OSF DCE Application Development Guide--Introduction and Style Guide

A Sample Application
resolver, /* Application server function that gives */
/* the ACL UUID for a given object, when */
/* presented with that object’s name; for */
/* us it’s the sample_resolve_by_name() */
/* routine, below. */
NULL, /* Argument to pass to resolver routine; */
/* identified as the "resolver_arg" in the */
/* code to that function below. */
0, /* Flags -- none here. */
status);
if (*status != error_status_ok)
{
print_server_error("dce_acl_register_object_type()", *status);
return;
}
/* If we’re initializing, then we have to create all this stuff... */
if (need_init)
{
dce_svc_printf(NO_ACL_DBS_MSG);
/* Create the mgmt interface ACL... */
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug5,
"Calling server_create_acl()"));
server_create_acl(
mgmt_acl_mgr_uuid, /* Create mgmt manager type ACL. */
ALL_MGMT_PERMS, /* Permission set for new ACL. */
owner, /* Principal name for new entry. */
new_mgmt_acl, /* This will contain the new ACL. */
mgmt_acl_uuid, /* This will contain the ACL UUID. */
status);
if (*status != error_status_ok)
{
print_server_error("server_create_acl()", *status);
return;
}
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug4,
"Calling uuid_to_string()"));
uuid_to_string(mgmt_acl_uuid, &uuid_string, status);
if (*status != uuid_s_ok)
{
print_server_error("uuid_to_string()", *status);
}
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug8,
"String form of mgmt_acl_uuid == %s",
uuid_string));
124246 Tandem Computers Incorporated A 47