MQZAD (Authority data) on IBM i
The MQZAD structure is used on the MQZ_ENUMERATE_AUTHORITY_DATA call for two parameters.
The two parameters are:- MQZAD is used for the Filter parameter which is input to the call. This parameter specifies the selection criteria that are to be used to select the authority data returned by the call.
- MQZAD is also used for the AuthorityBuffer parameter which is output from the call. This parameter specifies the authorizations for one combination of profile name, object type, and entity.
Fields
- StrucId (MQCHAR4)
- Structure identifier.
The value is:
- MQZAD_STRUC_ID
- Identifier for authority data structure.
For the C programming language, the constant MQZAD_STRUC_ID_ARRAY is also defined; this has the same value as MQZAD_STRUC_ID, but is an array of characters instead of a string.
This is an input field to the service.
- Version (MQLONG)
- Structure version number.
The value is:
- MQZAD_VERSION_1
- Version-1 authority data structure.
The following constant specifies the version number of the current version:
- MQZAD_CURRENT_VERSION
- Current version of authority data structure.
This is an input field to the service.
- ProfileName (MQCHAR48)
- Profile name.
For the Filter parameter, this field is the profile name from which authority data is required. If the name is entirely blank up to the end of the field or the first null character, authority data for all profile names is returned.
For the AuthorityBuffer parameter, this field is the name of a profile that matches the specified selection criteria.
- ObjectType (MQLONG)
- Object type.
For the Filter parameter, this field is the object type for which authority data is required. If the value is MQOT_ALL, authority data for all object types is returned.
For the AuthorityBuffer parameter, this field is the object type to which the profile identified by ProfileName applies.
The value is one of the following; for the Filter parameter, the value MQOT_ALL is also valid:- MQOT_AUTH_INFO
- Authentication information.
- MQOT_CHANNEL
- Channel.
- MQOT_CLNTCONN_CHANNEL
- Client connection channel.
- MQOT_LISTENER
- Listener.
- MQOT_NAMELIST
- Namelist.
- MQOT_PROCESS
- Process definition.
- MQOT_Q
- Queue.
- MQOT_Q_MGR
- Queue manager.
- MQOT_SERVICE
- Service.
- Authority (MQLONG)
- Authority.
For the Filter parameter, this field is ignored.
For the AuthorityBuffer parameter, this field represents the authorizations that the entity has to the objects identified by ProfileName and ObjectType. If the entity has only one authority, the field is equal to the appropriate authorization value (MQZAO_* constant). If the entity has more than one authority, the field is the bitwise OR of the corresponding MQZAO_* constants.
- EntityDataPtr (PMQZED)
- Address of MQZED structure identifying an entity.
For the Filter parameter, this field points to an MQZED structure that identifies the entity from which authority data is required. If EntityDataPtr is the null pointer, authority data for all entities is returned.
For the AuthorityBuffer parameter, this field points to an MQZED structure that identifies the entity that the returned authority data came from.
- EntityType (MQLONG)
- Entity type.
For the Filter parameter, this field specifies the entity type for which authority data is required. If the value is MQZAET_NONE, authority data for all entity types is returned.
For the AuthorityBuffer parameter, this field specifies the type of the entity identified by the MQZED structure pointed to by EntityDataPtr.
The value is one of the following; for the Filter parameter, the value MQZAET_NONE is also valid:- MQZAET_PRINCIPAL
- Principal.
- MQZAET_GROUP
- Group.
- Options (MQAUTHOPT)
- Options.
This field specifies options that give control over the profiles that are displayed.
One of the following must be specified:- MQAUTHOPT_NAME_ALL_MATCHING
- Displays all profiles
- MQAUTHOPT_NAME_EXPLICIT
- Displays profiles that have exactly the same name as specified in the ProfileName field.
In addition, one of the following must also be specified:
- MQAUTHOPT_ENTITY_SET
- Display all profiles used to calculate the cumulative authority that the entity has to the object specified by ProfileName. The ProfileName field must not contain any wildcard characters.
- If the specified entity is a principal, for each member of the set {entity, groups} the most applicable profile that applies to the object is displayed.
- If the specified entity is a group, the most applicable profile from the group that applies to the object is displayed.
- If this value is specified, then the values of ProfileName, ObjectType, EntityType, and the entity name specified in the EntityDataPtr MQZED structure, must all be non-blank.
If we have specified MQAUTHOPT_NAME_ALL_MATCHING, we can also specify the following:
- MQAUTHOPT_ENTITY_EXPLICIT
- Displays profiles that have exactly the same entity name as the entity name specified in the EntityDataPtr MQZED structure.
C declaration
typedef struct tagMQZAD MQZAD; struct tagMQZAD { MQCHAR4 StrucId; /* Structure identifier */ MQLONG Version; /* Structure version number */ MQCHAR48 ProfileName; /* Profile name */ MQLONG ObjectType; /* Object type */ MQLONG Authority; /* Authority */ PMQZED EntityDataPtr; /* Address of MQZED structure identifying an entity */ MQLONG EntityType; /* Entity type */ MQAUTHOPT Options; /* Options */ };Parent topic: Installable services interface reference information on IBM i