Securing TCL Access
Version 3 Technical Highlights - Securing Accounts
Reader's Clinic - Prompting for Passwords
VERBatim - V64
QTIPS - Accessing Password Protected SYSPROG
Utility Diskette # 3 - Part I
Utility Diskette # 3 - Part II
VERBatim - V32
QTIPS - DOS File Names
VERBatim - V20
QTIPS - Accessing Password Protected SYSPROG
QTIPS - Equidistant Menu Options
QTIPS - Improved Menu Help 1
QTIPS - Improved Menu Help 2
QTIPS - Securing Menus
QTIPS - Overriding Menu Colours
Utility Diskette # 3 - Part I
Menus and Menu Drivers
QTIPS - Menus Without an Action Bar
QTIPS - Comment Lines In Pulldown Menus
Overlapping Windows And Window Menus
QTIPS - Blank Menus in Windows
QTIPS - Menu Item Pre-Processing
Caching in on the Frames Array - Mike Pope
What's New (and un(der)documented!) In 2.12
Utility Diskette # 4
QTIPS - Winus
QTIPS - Calling an Action Bar from a Pulldown Menu
VERBatim - V126
Esc.To.Exit
Uncommon Knowledge - WC_WST_CHAR%
SecureUser
REVMEDIA Revisited
SecureUser
Securing TCL Access
@ATTACK - @Privilege
SecureUser
VERBatim - V86
Advanced Revelation Initialisation Sequence (Overview) by Mike Pope
VERBatim - V86
VERBatim - V88
QTIPS - Securing Menus
Simple Security
VERBatim - V86
@ATTACK - @Help.Level
@ATTACK - @Window.Level
Version 2
Bugs and PCs - Xlate with Multipart Keys
RTP Series - RTP16
SecureUser
Indexing on Xlates
Reader's Clinic - Slow Multivalued Screen Display
Caching in on the Frames Array - Mike Pope
SecureUser
VERBatim - V25
@ATTACK - @Files.System
Advanced Revelation Initialisation Sequence (Overview) by Mike Pope
REVMEDIA Revisted
Utility Diskette # 4
Version 3 Technical Highlights - Creating New Accounts Programmatically
Version 3 Technical Highlights - Securing Accounts
Version 3 Technical Highlights - Deleting Accounts
Version 3 TCL Subroutines - Creating New Accounts
Version 3 TCL Subroutines - Deleting Accounts
Window or Not ?
Vroom - Window Processing
QTIPS - Window Symbol Tables
VROOM - Window Processing II
@ATTACK - @HW
Uncommon Knowledge - WC_Reset%
Reader's Clinic - Related Windows
Window or Not?
Reader's Clinic - Scribe Replace Processes in Window
Soft Windows
QTIPS - Window Bug and Debugging Window Bug
Overlapping Windows And Window Menus
QTIPS - New Catalyst Option
QTIPS - Collectors on the fly
QTIPS - Blank Menus in Windows
QTIPS - Moving Objects the EASY way.
QTIPS - Form Processor
QTIPS - Reusing Symbolics in Windows
Soft Windows
QTIPS - Query Windows - Changing Colours
Reader's Clinic - Template Name at Pre-Init
Caching in on the Frames Array - Mike Pope
Advanced Revelation Assembler Interface Module - Yves Pattyn, Technical Manager, Distribase, France
RTP Series - RTP27
QTIPS - Printing Large Variables from the Debugger
VERBatim - V87
SecureUser
Reader's Clinic - Changed SEC for 3.0
Reader's Clinic - Functions and Subroutines
Argument passing - Subroutines and Functions - Mike Pope
VERBatim - V6
QTIPS - Suppressing Initial Form Feed
QTIPS - Using RTP29 In Place of V6
Catalyst
@ATTACK - @Ans
QTIPS - Compiling Work around on runtimes
QTIPS - Potential Problem When Using @ANS
QTIPS - DOS File Names
DOS Interfacing (Part II)
VERBatim - V116
@ATTACK - @Pri.File
@ATTACK - @Rollout.File
File Variables
How Indexes Are Updated
Index Record Layouts
QTIPS - File Variable of File In SELECT Statement
QTIPS - Amending non-Attached Files
LINEAR HASH FILE STRUCTURES - Part 1
Index Flush
QTIPS - File Handle Structure
Vroom
RTP Series - RTP32
Utility Diskette # 3 - Part I
VERBatim - V65
QTIPS - Browse Lists in Collector Windows
Collector Windows
QTIPS - Collectors on the fly
@ATTACK - @Modal
Uncommon Knowledge - WC_W_CNT%
@ATTACK - @Record
@ATTACK - @Reduction.Done
Collector Windows
Soft Windows
Reader's Clinic - Template Name at Pre-Init
File Variables
LINEAR HASH FILE STRUCTURES - Part 1
QTIPS - File Handle Structure

RevMedia FKB

DocumentV1I6A7
TitleSecureUser
KeywordsSECUREUSER
@PRIVILEGE
XLATE
SYSTEM
USER
SEC
WINDOW_COMMON%
VERBS
SECUREACCOUNT
@ACCOUNT
TextI am not unique in wishing to provide my users WITH a secure operating
environment WITH reasonable levels of password protection AND the ability to
add new users at differing levels For EXAMPLE assuming a three level
hierarchy of management the Supervisors (S) should be allowed to add Middle
Management (MM) and Humble Minions (HM) but the MMs should only be allowed
to add HMs Similarly when checking AUDIT violations Ss should be able to
see all AUDIT violations but MMs should only be allowed to see violations
carried out by their own HMs

This was originally implemented by adding an option to LOGTO SYSPROG on the
Security menu and having a custom menu run on reaching SYSPROG to control
addition of new users by feeding data statements into SECUREUSER This
worked except of course that when I logged to SYSPROG @PRIVILEGE was set
to "" so the user security level could not be checked To circumvent this
all that was required was an XLATE to SYSTEM to retrieve the security level
Well and good until the user logged back to the home account and their
@PRIVILEGE was not RESET but stayed at "" They were now free to do
anything! What was required was a way of adding new users FROM the home
account

The initial problem of actually USING the SECUREUSER window in a different
account was solved by editing COMMANDS SECUREUSER and removed the account
restriction FROM the template Unfortunately the program hooked to
SECUREUSER (SEC) checks the account to be SYSPROG and aborts program
execution if it isn't SEC appeared to be the key to the problem

What follows represents the distillation of a few days investigation into
SEC

SEC is the system subroutine responsible for most things to do with
security password ENCRYPTION account and user checking options etc It
takes one of a dozen or so parameters ranging FROM 1 to 12 For the full
range of parameters see the list at the end of this article SEC normally
takes its data FROM @ANS and returns the result of any calculation in @ANS

Every USER record in the SYSTEM file has an encrypted version of both the
password (in filed 7) AND the USER record (in field 9) This ensures that
unauthorised attempts to modify ANY aspect of the USER record via the editor
or DOS results in failure as the USER record becomes invalidated Any
attempts to add new users/change existing users must be cognizant of this
fact or their attempts will fail The CALLS to SEC required are 6 (to
encrypt the password) and 9 (to encrypt the record) Being a routine
designed for use FROM a collector window any program wishing to call SEC
must have WINDOW_COMMON% inserted even if its a dummy version WITH WC_W%
dimmed to 1 not WC_W_CNT%

As SEC expects to be called FROM a collector window parameters must be
passed to it via @RECORD and @ANS Further the structure of @RECORD passed
must not be that of the USER record in SYSTEM rather it should be that of
the @RECORD in the collector window SECUREUSER To add a user it is
necessary to PROMPT for the user NAME and other details (environment video
etc) then prompt for the password encrypt the password then finally encrypt
the record (See EXAMPLE CODE listing below for details of this)

The only problem WITH this relatively simple scenario is that as pointed
out before SEC can only run FROM SYSPROG To get around this we need to
modify the OBJECT code for SEC I cannot stress enough how dangerous this
sort of procedure is Not only does it require a good understanding of what
you are doing but it leaves you OPEN to PROBLEMS created by upgrading at a
later DATE and to software COMPATIBILITY BEFORE TRYING THIS ENSURE THAT YOU
HAVE MADE A BACKUP OF YOUR SYSTEM Having mentioned these caveats to work
Firstly we need to COPY $SEC into a new record say $SECURITY so that $SEC
still works As the OBJECT code is going to be modded to be specific to a
single account we might as well copy the code into the BP for that account
and CATALOG it there

: COPY VERBS $SEC TO : (BP $SECURITY

: CATALOG BP SECURITY

Now to the difficult bit modding the OBJECT code so that it no longer looks
for SYSPROG but loks instaed for our account THE ACCOUNT NAME WE USE MUST
BE NO LONGER THAN 7 (SEVEN) CHARACTERS At TCL type

: EDIT BP $SECURITY

and then ^F to FIND SYSPROG Note that there is only one occurrence of
SYSPROG in the SYMBOL TABLE and it is preceded by a small character which is
an ASCII 7 Following the G of SYSPROG is an apparently blank SPACE This is
in fact an ASCII 0 the 'C' end of STRING delimiter The ASCII 7 is a
pointer indicating the length of te literal and the ASCII 0 delimits the end
of the literal We cannot just TYPE in our own account name without
adjusting these parameters very carefully We must ensure that whatever we
do we do not throw out the offsets in the symbol table or strange results
could follow It is necessary to REPLACE the WORD SYSPROG CHAR(0) WITH the
name of our account CHAR(0) AND THEN AS MANY SPACES AS ARE REQUIRED TO PAD
THE ACCOUNTNAME UP TO SEVEN> The ASCII length POINTER byte at the beginning
of the account name must then be changed FROM 7 to the length or our account
name Thus if our account name was SECURE we would replace

CHAR(7)SYSPROGCHAR(0) with

CHAR(6)SECURECHAR(0)CHAR(32)

where the characters in bold are the actual ASCII characters entered from
the Ctrl S ASCII POPUP Once we have DONE this we can file the program and
use it in our account

Once this is in place the routine can then be utilised to add users to the
user file Use the following EXAMPLE code to achieve this Note that in the
code we do not explicitly WRITE the user record to the SYSTEM file As this
routine is normally called FROM a collector window a call to SEC PASSING 9
automatically writes this to file This is interesting as it works from
whatever account you are in This seems to indicate that somewhere in memory
is a set of QFILES for at least the major system FILES such as SYSTEM I do
not know how to gain access to these it doubtless requires the ubiquitous
System COMPILER

ANS = "" ; PW = ""
@RECORD = ""
CALL MSG ("User name" "RC" ANS "")
IF ANS THEN
CALL MSG("Password" "RC" PW "")
@ANS = PW
*
* Encrypt password
*
CALL SECURITY
@RECORD<7> = @ANS
@RECORD<1> = ANS ; * User name
@RECORD<2> = ACCOUNT NAME$
@RECORD<3> = LOGON VERB$
@RECORD<4> = PRIVILEGE LEVEL$
@RECORD<5> = ENVIRONMENT$
@RECORD<6> = VIDEO$
@RECORD<8> = RESTART CODE$
@RECORD<9> = RESTART COMMAND$
CALL SECURITY(9)
END

Note further that the structure of the record passed to SEC is not identical
to that of the record in the system file In the system record the restart
code and COMMAND are found on the same field as MULTIVALUES To make
prompting easier the collector PROMPTS for these values separately and then
SEC combines them

Using the above we now have a routine that can add users FROM any account
and be used as the basis for a comprehensive security system It would be
nice were this SORT of messing around to be unnecessary perhaps by creating
a new category of SYSPROG which operates FROM any account if the privilege
level is high enough This should just be a CASE of modding the security
programs to check @PRIVILEGE rather than @ACCOUNT perhaps alternating
between the two as the result of a setup parameter

To conclude I list below the valid codes to pass to SEC and their ACTION

Code Action
1 Abort window if not SYSPROG
2 Provide popup of valid usernames
3 Provide popup of valid accountnames
4 Provide opoup of valid environments
5 Provide popup of valid VIDEO sets
6 Encrypt @ANS
7 DISPLAY MESSAGE (for OCONV)
8 Seems to load some details into CURRENT record
9 Documented above
10 Used by SECUREACCOUNT SCREEN on load
11 Check account to be valid
12 Used by SECUREACCOUNT as presave


(Volume 1 Issue 6 Pages 9 11)
[revmedia/copyrigh.htm]

Page last modified: 08/02/03