rpc_mgmt_set_authorization_fn(3rpc)Establishes an authorization function for processing remote calls to a server's management routines Used by server applications. Synopsis #include <dce/rpc.h> void rpc_mgmt_set_authorization_fn( rpc_mgmt_authorization_fn_t authorization_fn, unsigned32 *status); Parameters Input
authorization_fn Specify NULL to unregister a previously registered authorization function. In this case, the default authorizations (as described later) are used. The following C definition for rpc_mgmt_authorization_fn_t illustrates the prototype for the authorization function:
typedef boolean32 (*rpc_mgmt_authorization_fn_t)
status
Description If a server does not provide an authorization function, the RPC runtime controls client application access to the server's remote management routines as shown in the next table. In the table, an enabled authorization allows all clients to execute the remote routine and a disabled authorization prevents all clients from executing the remote routine.
The specified function must provide access control for all of the remote management routines. If the authorization function returns TRUE, the management routine is allowed to execute. If the authorization function returns FALSE, the management routine does not execute, and the called routine returns to the client the status code returned from the rpc_mgmt_authorization_fn_t function. However, if the status code that the rpc_mgmt_authorization_fn_t function returns is 0 (zero) or rpc_s_ok, then the status code rpc_s_mgmt_op_disallowed is returned to the client. The RPC runtime calls the server-provided authorization function with the following two input arguments: · The binding handle of the calling client. · An integer value denoting which management routine the client has called. Using these arguments, the authorization function determines whether the calling client is allowed to execute the requested management routine. For example, the authorization function can call rpc_binding_inq_auth_client( ) to obtain authentication and authorization information about the calling client and determine if that client is authorized to execute the requested management routine.
Return Values Errors The following describes a partial list of errors that might be returned. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.
rpc_s_ok
Related Information rpc_mgmt_inq_server_princ_name(3rpc) rpc_mgmt_is_server_listening(3rpc) rpc_mgmt_stop_server_listening(3rpc)
|