| Directives |
|
| Formats | 1. On Program: PASSWORD pswd$ 2. On Common Password to All Programs: 3. On Data File - Required: 4. On Data File - Read Only: 5. On Data File - Required &
Encryption: 6. On Data File - Read Only &
Encryption: 7.Copy Password to Data File from
Data File 8. Remove
Password from Data File: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Where:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description | Use the PASSWORD directive to assign/remove passwords to/from programs and data files. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| *Important* | When encryption is enabled on a data file, all key and data blocks will be encrypted; therefore, routines that attempt to parse a passworded file in binary mode will not function correctly. This includes the file recovery utility, *UFAR. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Formats 1 and 2 | Assign or Remove Passwords on
Programs The formats described in this section assign/remove password protection on programs. Passworded programs cannot be listed or edited in ProvideX in any way unless the correct password is used.
Apply to Program. To assign a password, load the program, enter the PASSWORD directive followed by the new password pswd$, then save the program; For Example:
Before changing a password, you must reload the program and enter the PASSWORD directive followed by the previously assigned password. At this point, you can either change the password by entering PASSWORD (again) followed by a new string, or remove password protection by entering PASSWORD (again) followed by a null string. PASSWORD *[,pswd$] Apply Password Common to all Programs. Use the asterisk to denote a common password. ProvideX will apply a common password automatically to all previously passworded programs when they are loaded and to all new programs. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| *Notet* | To help eliminate the possibility of a hacker attempting to determine a program password by brute force, every wrong password attempt will result in a one second delay. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Formats 3, 4, 5, and 6 | Assign Password to Data File The formats described in this section assign password protection to data files. A KEY=pswd$ option is required to OPEN a passworded file. In order to define/change a password, you must have exclusive access to the file and it must be empty. The encryption feature is only available for VLR and EFF files. Use one the following syntax formats to assign a password to a data file:
The following table outlines the usage, access level, and encryption associated with each syntax format used to assign a password to a data file:.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
An internal password queue records passwords for successfully opened files and checks when an attempt is made to open a passworded file without specifying a KEY= clause or when a null KEY= value is supplied. The password stored in the queue is used if an entry exists for that file. The number of entries to keep in the queue is controlled by the 'PQ' System Parameter. The ability to distinguish between an invalid password and a non-existent password is provided by means of the 'PE' System Parameter. Due to the fact that all key and data blocks are encrypted, routines that attempt to parse a passworded file in binary mode will not function correctly. This includes the file recovery utility *UFAR. ProvideX includes a generic program called get_pswd that will prompt for a password when KEY= is invalid or missing when a passworded file is opened. ProvideX checks the existence of the get_pswdprogram in the *ext subdirectory first, and then in *ext/systemif the former is not found. This feature also allows the developer to customize the interface. As the prompt will be handled by a called program, it is also WindX-aware. An embedded I/O (EIO)
processing entry point called Get_Password
provides the ability to prompt the user for a password
based on logic associated with the EIO program. Provided
the EIO program is valid and the entry point Get_Password
exists, it will be used instead of the generic
*ext/system/get_pswd or custom
TCB(68) reports the number of attempts which have been made to prompt for the password. This value is incremented prior to ProvideX calling the embedded I/O or get_pswdroutine so the first attempt will have a TCB(68) value of 1 (one). By default, the first three attempts to access a passworded file using an invalid password will result in a prompt to re-enter the password. The fourth attempt generates an Error #53: Invalid password. This behaviour is controlled via the 'PP' System Parameter. The following error conditions will be trapped and reported:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Format 7 | Copy Password to Data File from
Data File
PASSWORD FROM allows a password from one file to be copied directly to another file without prompting the user for the password. Its use is primarily for rebuilding data files on the fly. The maximum length for a file password is eight (8) characters, any data beyond that is simply ignored. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| *Note* | An Error #13: File access mode invalid will occur if the destination file has an existing password and an Error #53: Invalid password is generated when the source file does not contain a password. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Format 8 | Remove Password from Data File
This format removes password protection from a data file. In order to remove a password, you must have exclusive access to the file, and it must be empty. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| See Also | 'EL'= System Parameter 'PE' System Parameter 'PP' System Parameter 'PQ' System Parameter OPEN Open a File for Processing |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||