rpc_mgmt_inq_server_princ_name(3) — Subroutines
NAME
rpc_mgmt_inq_server_princ_name - Returns a server’s principal name
Used by client, server, or management applications.
SYNOPSIS
#include <dce/rpc.h>
void rpc_mgmt_inq_server_princ_name(
rpc_binding_handle_t binding ,
unsigned32 authn_svc ,
unsigned_char_t ∗∗server_princ_name ,
unsigned32 ∗status );
PARAMETERS
Input
bindingSpecifies a binding handle. If a client application receives the principal name from a server application, supply a server binding handle for that server. If a server application receives its own principal name, supply the value NULL. If the binding handle you supply refers to partially bound binding information and the binding information contains a nil object UUID, this routine returns the rpc_s_binding_incomplete status code. In this case the RPC daemon (RPCD) does not know which server instance to select from the local endpoint map because the RPC runtime automatically registers the RPC management interface for all RPC servers. You can avoid this situation by calling the rpc_ep_resolve_binding routine to obtain a fully bound server binding handle.
authn_svcSpecifies the authentication service for which a principal name is returned. The rpc_binding_set_auth_info(3) reference page, in its explanation of the authn_svc argument, contains a list of supported authentication services.
Output
server_princ_nameReturns a principal name. This name is registered for the authentication service in argument authn_svc by the server referenced in argument binding. If the server registered multiple principal names, only one of them is returned.
statusReturns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not. The possible status codes and their meanings are as follows:
rpc_s_okSuccess.
rpc_s_binding_incomplete
Binding incomplete (no object ID and no endpoint).
rpc_s_comm_failureCommunications failure.
rpc_s_no_princ_nameNo principal name registered.
rpc_s_not_authorizedNot authorized for operation.
rpc_s_unknown_authn_service
Unknown authentication service.
rpc_s_wrong_kind_of_binding
Wrong kind of binding for operation.
DESCRIPTION
An application calls routine rpc_mgmt_inq_server_princ_name to obtain the principal name a server registered for a specified authentication service.
A client (or management) application uses this routine when it wants to allow one-way authentication with the server specified by argument binding. This means that the client does not care which server principal receives the remote procedure call request. However, the server verifies that the client is who the client claims to be. For one-way authentication, a client calls this routine before calling routine rpc_binding_set_auth_info.
A server application uses this routine to obtain the principal name it registered by calling routine rpc_server_register_auth_info.
The RPC runtime allocates memory for the string returned in argument server_princ_name. The application calls routine rpc_string_free to deallocate that memory.
By default, the RPC runtime allows all clients to call this routine remotely. To restrict these calls, a server application supplies an authorization function by calling routine rpc_mgmt_set_authorization_fn.
NOTES
For this release, the RPC authentication (RPC auth) routines are not implemented, nor is an independent security service provided.
RETURN VALUES
None.
RELATED INFORMATION
Functions: rpc_binding_inq_object(3), rpc_binding_set_auth_info(3), rpc_ep_resolve_binding(3), rpc_mgmt_set_authorization_fn(3), rpc_server_register_auth_info(3), rpc_string_free(3), uuid_is_nil(3)