Previous Topic: Definitions

Next Topic: Return Codes and Error Messages

Description

The LOCK command prevents updates to a user ID, directory profile, or CMS file. No one can update a locked item until you or another authorized user ID unlocks it using the UNLOCK command.

The LOCK command creates two permanent locks for each user ID, directory profile, or CMS file that you lock and writes them to a CMS file called PERMLOCK FILE A on the CA VM:Secure A-disk. For user IDs and directory profiles, the locks have the following form:

SHARED DISK filename filetype filemode
PRIVATE LOCKUSER userid 
PRIVATE LOCKUSER profilename

For CMS files, the form is as follows:

SHARED DISK filename filetype filemode
PRIVATE LOCKFILE filename filetype filemode

The LOCK command creates permanent locks that are maintained across CA VM:Secure initializations. Other commands that manipulate user ID or profile entries create temporary locks that are not written to any file and do not last beyond the duration of the command.

CA VM:Secure removes entries from the PERMLOCK FILE A file when you clear the lock. If this file exists at initialization, CA VM:Secure reads it to re-establish any previously existing permanent locks.

When processing a user or profile entry, the LOCK and UNLOCK commands use the same internal locks as the GETENTRY and REPENTRY commands. Thus, you cannot distinguish between the locks from the LOCK command and the locks from those commands. Do not use the GETENTRY command with the NOLOCK option and lock it later with the LOCK command. The user ID may have been updated in the meantime.