CMDL - the secure command loader.

CMDL, the command loader that comes with the UW Tools package, contains a number of features not found in the stock GCOS-8 loader. Most of the enhancements are designed to improve system security. For a fuller explanation of command loader security, see "expl cmdl security".

The TSS executive keeps a list of high-use or "standard" commands that it can load very quickly. If the first four letters of a command line match one of the commands in the list, the corresponding program will be invoked immediately. If there is no match, the executive invokes CMDL, the command loader, to figure out what command you actually want to invoke.

CMDL looks at the first "token" on the command line (everything up to the first blank in the line). If this contains a "/", CMDL assumes that the token is the name of a file containing the program you want to execute. If the "/" is the first character, CMDL looks for the file under your current directory; otherwise, it assumes that you have entered an absolute pathname.

If there is no "/" character, CMDL first truncates this first token to four characters (provided it is longer than four characters to begin with). Thus you can type

explain
explode
expla
explainit
and they all get shortened to "expl". It looks for a file with this truncated name under the account "cmdlib". Thus, it would look for "cmdlib/expl" in the example we just gave. If it doesn't find a file with this name, it looks for a file with that name under your userid account, NOT under your current directory. If it still does not find the file, it looks in the "/_cmd" directory in your userid. Finally, if it has not yet found the file it looks for the given name in your AFT.

If CMDL doesn't find a file that matches the first token, it issues an error message and hands things back to you. If it DOES find the file, it has to decide how the file is to be executed. Random files are assumed to be core images and are simply loaded and run. Sequential files may or may not be command files and CMDL has to check.

The UW Tools version of the ACCESS command lets you attach a "Use" attribute to sequential files. This is done with

access mf filename use/exec/
access mf filename use/crun/
access mf filename use/fred/
When asked to execute a sequential file, CMDL checks to see if the file has such a "Use" attribute. If it does, CMDL assumes that the file is a command file and passes the file to EXEC, CRUN, or FRED as appropriate. If the file does not have a "Use" attribute, CMDL assumes that the file is not a command file and issues an error message.

If the first character of a command line is a blank, "#", or "!", the TSS executive will immediately invoke the command loader, without checking its list of standard commands. This ensures that you get the "cmdlib" version of a command instead of the "standard" version known to TSS.

See Also:

expl cmdl security

expl access mf

expl cmdf

expl exec

expl fred

Copyright © 2000, Thinkage Ltd.