UUSVX1 is a user-written routine called by the USERV utility program before the execution of any command entered by the terminal operator. This module allows you to define security restrictions on the use of the various functions.
When USERV is initially invoked by the terminal operator, the GETCHR function is executed and the information obtained is passed to the user-written exit routine UUSVX1 in the form of a parameter list address. This information can be further referenced to place additional restrictions on the use of USERV.
Because the UUSVX1 module is only loaded once per invocation of USERV, internal switches can be set and subsequently referenced. Note that each invocation of USERV loads a new version of UUSVX1, causing the switches to be reset.
A dummy UUSVX1 module is distributed with the Com-plete system as a member of the distribution source and load libraries.
This document covers the following topics:
Upon entry to UUSVX1, a set of parameters is received in the form of fullword addresses pointed to by register 1. Word 1 of the parameter list contains the address of a return code halfword initialized to zero. Word 2 contains the address of an area containing the UPDTB1 information table. This table passes information to the user-written exit. It is described by the UPDTB1 macro (assemble sample UUPDX1 to see the layout of this area) and illustrated in UPDTB1 Information Control Block. Word 3 contains the address of the GETCHR information table. Word 4 contains the address of the library code entry in module UEDTB1 if a two-character library code was used to make the request (see UEDTB1 Entry DSECT). If no library code was entered, the corresponding field in UEDTB1 contains binary zeros and the address given in the parameter list must not be used.
To define security for a specific function, test for the existence of the appropriate function, thereby establishing the desired level of authorization, and set the return code pointed to by Word 1 of the parameter list to indicate acceptance or rejection.
Size restrictions are not imposed on UUSVX1. Size is a consideration, however, since the exit must fit into the same thread in which USERV executes. Because USERV is not threadlocked, it is invoked in one of any available threads. If the thread is too small to contain both USERV and the exit routine UUSVX1 (which is loaded), an error will result.
The following table summarizes the linkage conventions of UUSVX1.
Feature | Convention | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Attributes | Reentrant if in a resident area | |||||||||||||
Type | Thread | |||||||||||||
Size | Restricted by the USERV thread region | |||||||||||||
Registers at Entry |
|
|||||||||||||
Registers at Return | Registers 2 through 13 must be unchanged. | |||||||||||||
Parameters |
|
|||||||||||||
Return Codes |
|
|||||||||||||
Considerations |
|