Security Management Guide (G06.24+, H06.03+)

TACL Macros
Security Management Guide522283-008
C-8
Example 5. Lock Routine
|then|
#output Logging off...
logoff/segrelease/
#logoff/segrelease/ [|if first one failed...|]
]
:^toascii :^pw2
== it's not logoff, so convert for comparison
[#if [_comparev :^pw1 :^pw2]
|then|
#raise EXIT
]
== leave routine (back to TACL prompt) if correct
#set :^wrong [:^wrong]X
== otherwise, count a new wrong guess
[#if [#match [:^wrongs] [:^wrong]]
|then|
#push #breakmode
#set #breakmode disable
#delay 6000 [|one minute|]
#pop #breakmode
]
== if too many wrongs, delay for one minute
#raise MAIN
== and loop around again
| EXIT |
== what to do when we leave
#reset frames
#return
]
#output SHOULD NOT HAVE REACHED HERE... PLEASE REPORT ERROR...
#logoff/noclear,segrelease/
== just in case, because there should be no way out
To run the routine, enter LOCK without parameters and then enter an arbitrarily chosen
password twice:
4> LOCK
Password?noway (password is not echoed)
Repeat Password?noway (password is not echoed)
At this point, the screen clears except for a banner message identifying the lock's
owner.
To unlock the terminal, press BREAK and enter the password. Incorrect entries are
rejected and return the terminal to the banner message.
If another user desires to use a locked terminal, the user can enter "logoff" in place of
the proper password. This returns TACL to its logged off state. From this state, the user
can log on under his or her own user ID.