PreviousNext

dced_binding_set_auth_info(3dce)

Sets authentication and authorization information for a dced binding handle

Synopsis

#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);

Parameters

Input

dced_bh
Specifies the dced binding handle for which to set the authentication and authorization information.

protect_level
Specifies the protection level for dced API calls that will use the dced binding handle dced_bh.

authn_service
Specifies the authentication service to use for dced API calls that will use the dced binding handle dced_bh.

authn_identity
Specifies a handle for the data structure that contains the calling application's authentication and authorization credentials appropriate for the selected authn_service and authz_service services.

Specify NULL to use the default security login context for the current address space.

authz_service
Specifies the authorization service to be implemented by dced for the host service accessed.

Output

status
Returns the status code from this routine. This status code indicates whether the routine completed successfully or, if not, why not.

Description
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.

Examples
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. */
.

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.

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

Related Information
Routines: rpc_binding_set_auth_info(3rpc)

dced_binding_create(3dce)

dced_binding_from_rpc_binding(3dce)

Book: OSF DCE Application Development Guide - Core Components