### Client Credential

A client's credentials may be implicitly passed on to an ACL manager via a call to dce_acl_is_client_authorized( ). Or the credentials may be extracted from the client binding by a call to rpc_binding_inq_auth_client( ) and then passed on to an ACL manager via a call to sec_acl_mgr_is_authorized( ). In the latter case, there is some additional complication in the case that the client specified no authentication. If the server supports credential-based authorization, it should handle this case by testing for unauthenticated access via the ACL manager. However, no credentials are returned from rpc_binding_inq_auth_client( ) in this case. The convention is to set the pac argument to NULL in this case ((rpc_authz_handle_t)0). ACL managers that follow the recommended policies will test for unauthenticated access in the case of such a null handle.

Null credentials are not the same thing as anonymous credentials. Anonymous credentials are simply credentials for the well-known anonymous user UUID. They are tested in the normal way by the ACL manager against permissions for the anonymous user in the relevant ACL.

The following code fragment shows the necessary steps:

rpc_authz_handle_t pac;
/* Get the client's credentials... */
rpc_binding_inq_auth_client(. . . &pac . . &status);
/* If there is no authentication information, set up a set of null */
/* credentials... */
if (status == rpc_s_binding_has_no_auth)
{
pac = (rpc_authz_handle_t)0;
}
/* And now test the client's possession of the required permissions */
/* by passing its credentials (along with other pertinent data) to */
/* the following call... */
sec_acl_mgr_is_authorized(. . . (sec_id_pac_t*)pac . . .);

###