MQZ_CHECK_AUTHORITY_2 - Check authority (extended)
This function is provided by a MQZAS_VERSION_2 authorization service component, and is started by the queue manager to check whether an entity has authority to perform a particular action, or actions, on a specified object.
The function identifier for this function (for MQZEP) is MQZID_CHECK_AUTHORITY.
MQZ_CHECK_AUTHORITY_2 is like MQZ_CHECK_AUTHORITY, but with the EntityName parameter replaced by the EntityData parameter.
Syntax
MQZ_CHECK_AUTHORITY_2( QMgrName , EntityData , EntityType , ObjectName , ObjectType , Authority , ComponentData , Continuation , CompCode , Reason )Parameters
- QMgrName
- Type: MQCHAR48 - input
Queue manager name. The name of the queue manager calling the component. This name is padded with blanks to the full length of the parameter; the name is not terminated by a null character.
The queue manager name is passed to the component for information; the authorization service interface does not require the component to use it in any defined manner.
- EntityData
- Type: MQZED - input
Entity data. Data relating to the entity with authorization to the object that is to be checked. See MQZED - Entity descriptor for details.
It is not essential for this entity to be known to the underlying security service. If it is not known, the authorizations of the special nobody group (to which all entities are assumed to belong) are used for the check. An all-blank name is valid and can be used in this way.
- EntityType
- Type: MQLONG - input
Entity type. The type of entity specified by EntityData. It must be one of the following values:
- ObjectName
- Type: MQCHAR48 - input
Object name. The name of the object to which access is required. The maximum length of the string is 48 characters; if it is shorter than that it is padded to the right with blanks. The name is not terminated by a null character.
If ObjectType is MQOT_Q_MGR, this name is the same as QMgrName.
- ObjectType
- Type: MQLONG - input
Object type. The type of entity specified by ObjectName. It must be one of the following values:
- Authority
- Type: MQLONG - input
Authority to be checked. If one authorization is being checked, this field is equal to the appropriate authorization operation (MQZAO_* constant). If more than one authorization is being checked, it is the bitwise OR of the corresponding MQZAO_* constants.
The following authorizations apply to use of the MQI calls:The following authorizations apply to administration of a queue manager:
The following authorizations apply to both use of the MQI and to administration of a queue manager:
- ComponentData
- Type: MQBYTE x ComponentDataLength - input/output
Component data. This data is kept by the queue manager on behalf of this particular component; any changes made to it by any of the functions provided by this component are preserved, and presented the next time one of these component functions is called.
The length of this data area is passed by the queue manager in the ComponentDataLength parameter of the MQZ_INIT_AUTHORITY call.
- Continuation
- Type: MQLONG - output
Continuation indicator set by component. The following values can be specified:
- CompCode
- Type: MQLONG - output
Completion code. It must be one of the following values:
- Reason
- Type: MQLONG - output
Reason code qualifying CompCode.
If CompCode is MQCC_OK:If CompCode is MQCC_FAILED:
For more information about these reason codes, see API reason codes.
C invocation
MQZ_CHECK_AUTHORITY_2 (QMgrName, &EntityData, EntityType, ObjectName, ObjectType, Authority, ComponentData, &Continuation, &CompCode, &Reason);The parameters passed to the service are declared as follows:
MQCHAR48 QMgrName; /* Queue manager name */ MQZED EntityData; /* Entity data */ MQLONG EntityType; /* Entity type */ MQCHAR48 ObjectName; /* Object name */ MQLONG ObjectType; /* Object type */ MQLONG Authority; /* Authority to be checked */ MQBYTE ComponentData[n]; /* Component data */ MQLONG Continuation; /* Continuation indicator set by component */ MQLONG CompCode; /* Completion code */ MQLONG Reason; /* Reason code qualifying CompCode */Parent topic: Installable services interface reference information