The server_get_local_principal_id( ) routine retrieves a principal's UUID from the local cell registry.
/******
*
* server_get_local_principal_id -- Get (from the local cell registry) the
* UUID corresponding to a principal
name.
*
*
* Called from server_create_acl() and server_acl_mgr_setup().
*
******/
void
server_get_local_principal_id(
unsigned_char_t *p_name, /* Simple principal name. */
uuid_t *p_id, /* UUID returned
here. */
unsigned32 *status) /* Status returned here. */
{
char *cell_name;
/* For local cell name. */
sec_rgy_handle_t rhandle; /* For registry server handle. */
/* First, get the local cell name...
*/
dce_cf_get_cell_name(&cell_name, status);
/* Now bind to the cell's registry...
*/
sec_rgy_site_open(cell_name, &rhandle, status);
/* Free the string space we got the cell name in... */
free(cell_name);
/* Now get from the registry the UUID associated with the principal */
/* name we got in the first place...
*/
sec_rgy_pgo_name_to_id(rhandle,
sec_rgy_domain_person,
p_name,
p_id,
status);
}