dced_binding_set_auth_info - Sets authentication and authorization information for a dced binding handle
#include <dce/dced.h>
void dced_binding_set_auth_info(
dced_binding_handle_t dced_bh,
unsigned32 protect_level,
unsigned32 authn_service,
rpc_auth_identity_handle_t authn_identity,
unsigned32 authz_service,
error_status_t *status);
Specify NULL to use the default security login context for the current address space.
error_status_ok dced_s_bad_binding dced_s_no_support ept_s_not_registered rpc_s_authn_authz_mismatch rpc_s_binding_incomplete rpc_s_comm_failure rpc_s_invalid_binding rpc_s_mgmt_op_disallowed rpc_s_rpcd_comm_failure rpc_s_unknown_authn_service rpc_s_unsupported_protect_level rpc_s_wrong_kind_of_binding
The dced_binding_set_auth_info() routine sets up the dced binding handle so it can be used for authenticated calls that include authorization information. The rpc_binding_set_auth_info(3rpc) routine performs in the same way as this one. See it for details of the parameters and values. Prior to calling this routine, the application must have established a valid dced binding handle by calling either the dced_binding_create() or dced_binding_from_rpc_binding() routine.
This example establishes a dced binding to a host's key table service, and then it calls dced_binding_set_auth_info() so that the application is authorized to access remote key tables by using additional calls to the key table service.
dced_binding_handle_t dced_bh;
error_status_t status;
dced_binding_create((dced_string_t)"keytab@hosts/patrick",
dced_c_binding_syntax_default,
&dced_bh,
&status);
dced_binding_set_auth_info(dced_bh,
rpc_c_protect_level_default,
rpc_c_authn_pkt_privacy,
NULL,
rpc_c_authz_dce,
&status);
. /* Other routines including dced API routines. */
Routines rpc_binding_set_auth_info(3rpc),
dced_binding_create(3dce), dced_binding_from_rpc_binding(3dce).
Books: OSF DCE Application Development Guide.