OSF DCE Application Development Guide--Introduction and Style Guide

OSF DCE Application Development Guide—Introduction and Style Guide
dce_acl_resolve_func_t sample_resolve_by_name(
handle_t h, /* Client binding handle passed into the */
/* server stub. sec_acl_bind() is used to */
/* create this handle. */
sec_acl_component_name_t name, /* The object whose ACL’s UUID we want. */
sec_acl_type_t sec_acl_type, /* The type of ACL whose UUID we want. */
uuid_t *manager_type, /* The object’s manager type. */
/* NOTE that this parameter isn’t used be- */
/* low. */
boolean32 writing, /* "This parameter is ignored in OSF’s im- */
/* plementation" (from the manpage for */
/* dce_acl_resolve_by_uuid()). */
void *resolver_arg, /* This is the app-defined argument passed */
/* to dce_acl_register_object_type(); it */
/* should be a handle for a backing store */
/* indexed by UUID. Note that it isn’t */
/* used here though. */
uuid_t *acl_uuid, /* To return ACL’s UUID in. */
error_status_t *st /* To return status in. */
)
{
uuid_t u, *up; /* To hold the retrieved object UUID, and to */
/* take a pointer to it. */
unsigned_char_t *uuid_string;
sec_acl_t retrieved_acl;
uuid_t owner_uuid, group_uuid;
/* The definition of the following is in the sample.idl file. */
/* */
/* See the "Examples" section in the dce_db_open() manpage, */
/* where the skeleton IDL interface for a server’s backing */
/* store is given. The data type definition (which is what */
/* sample_data_t is) is there prescribed as consisting of a */
/* dce_db_header_t, plus whatever server-specific data is */
/* quired, all in a single structure. */
/* */
/* Essentially it’s a dce_db_header_t structure (with an */
/* application-defined message string tacked on); this is */
/* the object header data structure that is returned, e.g., */
/* by dce_db_header_fetch(); in other words, this is the */
/* thingie that actually contains the data "in" an object */
/* held in an object store. At least that’s what I think it */
/* is... */
sample_data_t object_data;
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug7,
"Entering sample_resolve_by_name()"));
*st = error_status_ok;
A 62 Tandem Computers Incorporated 124246