Security Subroutines |
![]() ![]() ![]() |
An R-type or V-type VOC entry can optionally include the name of a catalogued security subroutine in field 4 (R-type) or field 5 (V-type). This subroutine can be used to determine whether the user is to be allowed to execute the command.
The security subroutine is written using QMBasic. A simple subroutine that prompts for a password is shown below.
SUBROUTINE SECURITY(OK, VERB, REMOTE.FILE, REMOTE.ID) PROMPT '' DISPLAY 'Enter security password: ' : FOR I = 1 TO 3 ECHO OFF INPUT PASSWORD ECHO ON IF PASSWORD = 'FSKJJ' THEN RETURN (@TRUE) NEXT I
RETURN (@FALSE) END
The arguments to this subroutine are:
If the validation fails or the subroutine cannot be found in the catalogue a message is displayed: This command is restricted (verb) |