OSF DCE Application Development Guide--Introduction and Style Guide

OSF DCE Application Development Guide—Introduction and Style Guide
/* Now bind to the local cell registry... */
sec_rgy_site_open(cell_name, &rhandle, status);
/* Free the cellname string space... */
free(cell_name);
/* Get the specified principal’s local (cell-relative) name... */
local_name = malloc(strlen((char *)princ_name));
sec_id_parse_name(rhandle, /* Handle to the registry server. */
princ_name, /* Global (full) name of the principal. */
NULL, /* Principal’s home cell name returned here. */
NULL, /* Pointer to UUID of above returned here. */
local_name, /* Principal local name returned here. */
NULL, /* Pointer to UUID of above returned here. */
status);
fprintf(stdout, "sample_client: Full principal name == %s0, princ_name);
fprintf(stdout, "sample_client: Local principal name == %s0, local_name);
/* And finally, find out from the registry whether that principal */
/* is a valid member of the specified group... */
is_valid = sec_rgy_pgo_is_member(rhandle,
sec_rgy_domain_group,
group,
local_name,
status);
/* Free the principal name string area... */
free(local_name);
return(is_valid);
}
<.....>
/* Resolve the partial binding... */
rpc_ep_resolve_binding(binding_h,
sample_v1_0_c_ifspec,
&status);
/* Find out what the server’s principal name is... */
rpc_mgmt_inq_server_princ_name(binding_h,
rpc_c_authn_dce_secret,
&server_princ_name,
&status);
3 16 Tandem Computers Incorporated 124246