OSF DCE Application Development Guide--Introduction and Style Guide

A Sample Application
/* Create the UUID for the new ACL... */
*status = error_status_ok;
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;
}
if (is_container)
sec_acl_type = 2;
else
sec_acl_type = 1;
/* Now get the initial container’s ACL UUID. */
/* This is a call to sample_resolve_by_name(); see below... */
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug5,
"Calling (*resolver)()"));
(*resolver)(NULL, /* No client binding handle; this isn’t a re- */
/* mote call. */
container, /* The object whose ACL’s UUID we want; */
/* here, the initial container. */
sec_acl_type, /* Type of ACL we want UUID for. */
NULL, /* No manager type specified. */
0, /* Dummy parameter for us. */
NULL, /* No need to specify a special backing */
/* store handle. */
&iacl_uuid, /* Initial container ACL’s UUID is re- */
/* turned here. */
status);
if (*status != error_status_ok)
{
print_server_error("resolver function(*)", *status);
return;
}
/* Now get the initial container ACL... */
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug4,
"Calling dce_db_fetch_by_uuid()"));
dce_db_fetch_by_uuid(db_acl, /* ACL UUID-indexed database. */
&iacl_uuid, /* The initial container ACL UUID. */
acl, /* The ACL is returned here. */
status);
if (*status != error_status_ok)
{
print_server_error("dce_db_fetch_by_uuid()", *status);
return;
}
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug7,
"Exiting server_create_dflt_acl()"));
}
124246 Tandem Computers Incorporated A 33