OSF DCE Application Development Guide--Introduction and Style Guide
OSF DCE Application Development Guide—Introduction and Style Guide
case rpc_c_mgmt_is_server_listen:
perm_required = mgmt_perm_ping;
break;
case rpc_c_mgmt_stop_server_listen:
perm_required = mgmt_perm_kill;
break;
default:
/* This should never happen, but just in case... */
return(0);
}
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug4,
"Calling uuid_to_string()"));
uuid_to_string(&mgmt_acl_uuid, &uuid_string, status);
if (*status != uuid_s_ok)
{
print_server_error("uuid_to_string()", *status);
return(0);
}
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug8,
"String form of mgmt_acl_uuid == %s", uuid_string));
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug4,
"Calling rpc_string_free()"));
rpc_string_free(&uuid_string, status);
if (*status != rpc_s_ok)
{
print_server_error("rpc_string_free()", *status);
return(0);
}
/* Okay, now check whether the client is authorized or not... */
DCE_SVC_DEBUG((smp_svc_handle, smp_s_server, svc_c_debug4,
"Calling dce_acl_is_client_authorized()"));
dce_acl_is_client_authorized(
client_binding, /* Client’s binding handle. */
&mgmt_acl_mgr_uuid, /* ACL manager type UUID. */
&mgmt_acl_uuid, /* The ACL UUID. */
NULL, /* Pointer to owner’s UUID. */
NULL, /* Pointer to owner’s group’s UUID. */
perm_required, /* The desired privileges. */
&authorized, /* Will be TRUE or FALSE on return. */
status);
if (*status != error_status_ok)
{
print_server_error("dce_acl_is_client_authorized()", *status);
return(0);
}
A− 60 Tandem Computers Incorporated 124246