MQZ_CHECK_PRIVILEGED - Check if user is privileged

This function is provided by an MQZAS_VERSION_6 authorization service component, and is invoked by the queue manager to determine whether a specified user is a privileged user.

The function identifier for this function (for MQZEP) is MQZID_CHECK_PRIVILEGED.


Syntax

MQZ_CHECK_PRIVILEGED( QMgrName , EntityData , EntityType , 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 that is to be checked. For more information, see MQZED - Entity descriptor.

    EntityType
    Type: MQLONG - input Entity type. The type of entity specified by EntityData. It must be one of the following values:

      MQZAET_PRINCIPAL
      Principal.

      MQZAET_GROUP
      Group.

    ComponentData
    Type: MQBYTExComponentDataLength - 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:

      MQZCI_DEFAULT
      Continuation dependent on queue manager.

      For MQZ_CHECK_AUTHORITY, this has the same effect as MQZCI_STOP.

      MQZCI_CONTINUE
      Continue with next component.

      MQZCI_STOP
      Do not continue with next component.

    If the call to a component fails (that is, CompCode returns MQCC_FAILED), and the Continuation parameter is MQZCI_DEFAULT or MQZCI_CONTINUE, the queue manager continues to call other components if there are any.

    If the call succeeds (that is, CompCode returns MQCC_OK) no other components are called no matter what the setting of Continuation is.

    If the call fails and the Continuation parameter is MQZCI_STOP then no other components are called and the error is returned to the queue manager. Components have no knowledge of previous calls, so the Continuation parameter is always set to MQZCI_DEFAULT before the call.

    CompCode
    Type: MQLONG - output Completion code. It must be one of the following values:

      MQCC_OK
      Successful completion.

      MQCC_FAILED
      Call failed.

    Reason
    Type: MQLONG - output

    Reason code qualifying CompCode.

    If CompCode is MQCC_OK:

      MQRC_NONE
      (0, X'000') No reason to report.

    If CompCode is MQCC_FAILED:

      MQRC_NOT_PRIVILEGED
      (2584, X'A18') This user is not a privileged user ID.

      MQRC_UNKNOWN_ENTITY
      (2292, X'8F4') Entity unknown to service.

      MQRC_SERVICE_ERROR
      (2289, X'8F1') Unexpected error occurred accessing service.

      MQRC_SERVICE_NOT_AVAILABLE
      (2285, X'8ED') Underlying service not available.

    For more information about these reason codes, see API reason codes.


C invocation

MQZ_CHECK_PRIVILEGED (QMgrName, &EntityData, EntityType,
                    ComponentData, &Continuation, 
                    &CompCode, &Reason);
The parameters passed to the service are declared as follows:
MQCHAR48  QMgrName;          /* Queue manager name */
MQZED     EntityData;        /* Entity name */
MQLONG    EntityType;        /* Entity type */
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 Parent topic: Installable services interface reference information on IBM i