OSF DCE Application Development Guide--Introduction and Style Guide

A Sample Application
(dce_acl_resolve_func_t)sample_resolve_by_name,
/* Our name->ACL UUID resolution */
/* function. */
sample_acl_mgr_uuid, /* UUID of our ACL manager; */
/* hard-coded at top of this file. */
sample_object_uuid, /* UUID of our sample object; */
/* hard-coded at top of this file. */
(unsigned_char_t *)SAMPLE_OBJECT_NAME, /* Name of */
/* our sample object. */
OBJ_OWNER_PERMS, /* Owner’s permissions on sample */
/* object. */
(unsigned_char_t *)SAMPLE_OWNER, /* Principal */
/* name of sample object owner. */
0, /* TRUE => object is a container. */
&db_acl, /* Will contain ACL UUID store handle. */
&db_object, /* Will contain obj UUID store handle. */
&db_name, /* Will contain name store handle. */
&sample_acl_uuid, /* Will contain object ACL UUID. */
&mgmt_acl_uuid, /* Will contain mgmt ACL UUID. */
&status);
if (status != error_status_ok)
{
print_server_error("server_acl_mgr_setup()", status);
goto CLEANUP_EXIT;
}
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);
return(0);
}
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug8,
"String form of mgmt_acl_uuid == %s", uuid_string));
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug4,
"Calling rpc_string_free()"));
rpc_string_free(&uuid_string, &status);
if (status != rpc_s_ok)
{
print_server_error("rpc_string_free()", status);
return(0);
}
/* Register the remote ACL interface (at the endpoint map, */
/* but not in the namespace)... */
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug5,
"Calling server_rdacl_export()"));
server_rdacl_export(binding_vector, &server_uuid_v, &status);
if (status != error_status_ok)
{
print_server_error("server_rdacl_export()", status);
124246 Tandem Computers Incorporated A 17