Previous Topic: CADVUSR1

Next Topic: Special DD Statements

CADVUSR2

Use this exit program to control access to captured dumps by potential viewers. Since all dumps captured use the same high-level qualifier, this user exit can be used to deny access to sensitive dump data.

The parm area CADVPRM2, shown next, contains information about the captured dump and also the ID of the user attempting to view it.

Fields in the parm area include:

Request codes include:

The sample user exit CADVUSR2 is shown next:

CADVUSR2 TITLE 'CA SymDump System Sample User Exit (#2)'                 **------------------------------------------------------------------**   **                                                                  **   **  CADVUSR2 - CA SymDump System User Exit (#2)            **   **                                                                  **   **  This user exit performs security validation prior to            **   **  dump loading by the viewer.                                     **   **                                                                  **   **  Input Registers:                                                **   **                                                                  **   **  R1 contains the address of the parm area (CADVPRM2)             **   **  R13 contains the address of a register save area                **   **  R14 contains the return address                                 **   **  R15 contains the address of CADVUSR2                            **   **                                                                  **   **  All other registers are unpredictable.                          **  **                                                                  **  **  Output Registers:                                               **  **                                                                  **  **  R15 contains the return code (described below)                  **  **                                                                  **  **  All other registers must be returned unchanged.                 **  **                                                                  **  **  Return Codes                                                    **  **                                                                  **  **  R15 = 0   Allow dump viewing.                                   **  **                                                                  **  **  R15 > 0   Disallow dump viewing.                                **  **                                                                  **  **------------------------------------------------------------------**           SPACE ,                                                        CADVUSR2 CSECT                                                                   USING CADVUSR2,R12            Map the User Exit                         USING LDATA,R13               Map Local Data                            USING CADVPRM2,R8             Map the Parameter Area                 SPACE , 

                                                             STM   R14,R12,12(R13)         Save caller's registers                LR    R12,R15                 Set procedure base                     LR    R8,R1                   Set parm base                          SPACE ,                                                              LA    R1,PRM2WORK             @ Work area provided                   XC    0(256,R1),0(R1)         Clear it out                           ST    R13,4(,R1)              Save backward chain                    ST    R1,8(,R13)              Save forward chain                     LR    R13,R1                  Set our RSA address                    SPACE , 

* Perform security validation here.                                           SPACE ,                                                     RETURN   DS    0H                                                             L     R15,LDRC                Load the return code                   L     R13,4(,R13)             Restore @ caller's rsa                 L     R14,12(,R13)            Load return address                    LM    R0,R12,20(R13)          Restore registers                      BR    R14                     Return to caller                           TITLE 'LITERALS'                                                         LTORG ,                                                                  TITLE 'DSECTS: Local Data'                                      LDATA    DSECT    

                                                       LDSAVE   DS    18F                                                       LDRC     DS    F                                                                  TITLE 'DSECTS: Parameter Area'      

**------------------------------------------------------------------**  **                                                                  **  **  CADVPRM2 - CA SymDump System Parameter Area #2         **  **                                                                  **  **  This copy member maps the parameter area passed to CADVUSR2     **  **  prior to dump loading.                                          **  **                                                                  **  **------------------------------------------------------------------**           SPACE ,                                                        CADVPRM2 DSECT                                                          PRM2REQ  DS    XL4                    Request type                      P2_OPEN  EQU   5                        5 = OPEN A DUMP FOR VIEWING     P2_DDEL  EQU   7                        7 = DELETE A DUMP               P2_LOCK  EQU   22                      22 = LOCK A DUMP INDEX ENTRY     P2_UNLK  EQU   23                      23 = UNLOCK A DUMP INDEX ENTRY   P2_DDLX  EQU   28                      28 = DELETE A DUMP INDEX ENTRY    P2_BSTX  EQU   31                      31 = BUILD  ASTORAGE INDEX        PRM2USR  DS    CL8                    Requestor's user id                PRM2DJOB DS    CL8                    Dump job name                      PRM2DUSR DS    CL8                    Dump user id                       PRM2WORK DS    XL256                  256-BYTE WORK AREA                 LPRM2    EQU   *-CADVPRM2                                                         TITLE 'REGISTER EQUATES'                                        R0       EQU   0                                                         R1       EQU   1                                                         R2       EQU   2                                                         R3       EQU   3                                                         R4       EQU   4                                                         R5       EQU   5                                                         R6       EQU   6                                                         R7       EQU   7                                                         R8       EQU   8                                                         R9       EQU   9                                     R10      EQU   10                                    R11      EQU   11 R12      EQU   12                                    R13      EQU   13                                    R14      EQU   14                                    R15      EQU   15                                             END   CADVUSR2