Reader's Clinic - Changed SEC for 3.0

Published ByDateVersionKnowledge LevelKeywords
Sprezzatura Ltd01 NOV 19923.0+EXPERTSEC, SECUREACCOUNT_SUB, ACCOUNTADVANCED, ACCOUNTLOGTO

Jens Diederichs writes "Has anybody been playing with the revised (for AREV 3.0) version of SEC() yet? I used to be able to use the SEC(6) call to encrypt passwords as per RevMedia Vol 1 Issue 6. Some calls to SEC (such as 7) still work. A '6' call still works from a window but from TCL falls over. There is obviously something very simple here that I am missing - any guesses?"

As Jens noted, SEC has fundamentally changed for version 3. This is a function of a number of things - not least of which is that security had been harmonised and centralised in the system. SEC still takes 1 parameter but instead of a range of 1 to 12, the parameters can now be from 1 to 19. In addition SEC expects to always find Window_Common% loaded. If you wish to call it from your own program (not from a window) you must load a modified version of Window_Common% in which the WC_W% array is dimmed to a number rather than WC_WCnt%, then you must ClearCommon. Note also that some of the operations only make sense from a window and that these operations will require full Window_Common%.

CODEACTION
1Closes window if application is not SYSPROG.
2Provides a popup of valid usernames. If WC_Register%(1) is loaded with an account name (see 18) then only users for this account will be displayed.
3Provides a popup of valid applications
4Provides a popup of valid environments
5Calls the ACCOUNTLOGTO window and permits the alteration of characteristics of the logto password. Note that it expects @Record to be loaded with the Application row from SysEnv with Field 1 replaced with the Application name rather than the word "ACCOUNT". For details of how to load @Record in this fashion see the documentation on SECUREACCOUNT_SUB later in this issue. Note that this call will only work in SYSPROG.
6Encrypts contents of @Ans
7Used as an Oconv to display "<Encrypted>" message
8Used to load a User row into the current row from a window. Place on the post prompt process of the username prompt and @Record will be loaded from that SysEnv row. This works from any account.
9Used to save a User row as loaded by 8. This only works from SysProg.
10Used to load an Application row into the current row from a window. Place on the post prompt process of the application name prompt and @Record will be loaded from that SysEnv row. This works from any account.
11Used to save an application row as loaded by 10. This only works from SysProg.
12Used to validate an entry as a valid application name. Used as an edit pattern, it will set Status() accordingly and display an error message if the entry in @Ans is not an application.
13This is used by a large number of SysWindows and is therefore probably "Kill if RunTime" but until a 3.0 RunTime is available it will not be possible to test this.
14Calls the ACCOUNTADVANCED window and permits the alteration of characteristics of the application. Note that it expects @Record to be loaded with the Application row from SysEnv with Field 1 replaced with the Application name rather than the word "ACCOUNT". For details of how to load @Record in this fashion see the documentation on SECUREACCOUNT_SUB later in this issue. Note that this call will only work in SYSPROG.
15Used to delete an account or user. Only works in SysProg.
16Takes the value of @Ans and ensures that it is a valid location by truncating any directory name to 8 characters. Used as an edit pattern, looks for its input in @Ans. Therefore C:\AREV\TEST123456 would be returned as C:\AREV\TEST1234.
17Used by the Account window to warn you if you change a location that you have to move the Dos files as well. (B276)
18Used by the AccountUser window on a post initialise when looking at the users for an application. Seems only to load WC_Register%(1) with the name of the application.
19Used by Account window to call AccountUser window.

(Volume 4, Issue 6, Pages 5,6)

  • tips/revmedia/v4i6a2.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1