OSF DCE Application Development Guide--Introduction and Style Guide

OSF DCE Application Development Guide—Introduction and Style Guide
KEYTAB, /* Local key file. */
(idl_char *)prin_name, /* Principal name. */
&status);
if (status != error_status_ok)
print_server_error("sec_key_mgmt_manage_key()", status);
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug7,
"Exiting managekey()"));
}
/******
*
* server_get_identity -- Establish a new server identity with valid
* credentials. This includes setting up a key
* management thread.
*
*
* Called from main().
*
******/
void server_get_identity(
unsigned_char_p_t prin_name, /* Server principal name. */
sec_login_handle_t *login_context, /* Returns server’s login context. */
unsigned_char_p_t keytab, /* Local key file. */
unsigned32 *status)
{
pthread_t keymgr;
sec_passwd_rec_t *keydata;
sec_login_auth_src_t auth_src;
boolean32 reset_pwd;
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug7,
"Entering server_get_identity()"));
*status = error_status_ok;
/* Spin off thread to manage key for specified principal... */
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug4,
"Calling pthread_create()"));
if (pthread_create(&keymgr, /* Thread handle. */
pthread_attr_default, /* Specifies default thread */
/* attributes. */
(pthread_startroutine_t)managekey, /* Start rou- */
/* tine; see above. */
(void*)prin_name)) /* Argument to pass to start */
/* routine: server princi- */
/* pal name. */
{
dce_svc_printf(CANNOT_MANAGE_KEYS_MSG);
return;
}
A 28 Tandem Computers Incorporated 124246