Output of file : EXTERN.DOC contained in archive :
WAF165.ZIP
Waffle v1.65 / External Programs
(C) Copyright 1992 Darkside International, All Rights Reserved.
C O N T E N T S
I The extern directory
II Format of the extern files
III Contents of _system file
IV Sample entries of _system file
V _send and _receive
VI Configuring external editors
VII Substitions in the /command= line
VIII Making external programs available to users
IX Aliasing Waffle commands
X Notes and caveats
----------/ EXTERNAL PROGRAMS /----------------------------------------------
o The extern directory
The /waffle/extern directory contains configuration files for
external programs, and also some system configuration files
beginning with underscores (_system, _editors, _send, _receive)
necessary for operation of the system.
All other files in this directory are user commands, which may
be executed by typing that name at the main prompt.
o Format of the extern files
The format of files in the extern directory is:
"Command" is only required when there are multiple lines
in the file; it is often used for choosing which external
program to run from a presented menu, (see below) and
in the system defined extern files.
The option list contains a space separated list of options,
each beginning with a slash. Options with arguments are
of the form /option=argument.
/access Minimum access required to run command; this
is an integer 0-9. By default, all users are
allowed to run commands.
/command The command to pass for execution. If this
contains spaces or slashes, it must be
enclosed in double quotes.
/dir Specify a directory to change to before
executing the command. Useful if commands must
be executed in a specific directory. The
previous directory is not restored on return.
/drop Drop carrier before executing the specified
command. Use in conjunction with /logout or
/exit. Ignored in Unix version.
/event Record the fact that this extern was used in
the system events file.
/exit Instead of running a command, Waffle will
terminate itself. If a numeric argument is
supplied it will return that status;
otherwise Waffle returns 0. The user is not
logged out unless /logout is specified.
/group Demand that the user be in a specified group
before allowing the command to be run.
/local In DOS version, turn off COMM I/O when
executing command. This is the default for
such things as external protocols, etc. but
may be necessary in other instances.
/log Records any instances in which this external
program is activated in the /waffle/admin/extern
logfile, available with SHOW EXTERN.
/logout Similar to /exit, /logout will terminate Waffle.
The user is logged out, and any argument given
to this option (such as /logout=BYE) will be
used as the "reason" for leaving Waffle. If a
return status is desired, use /exit as well.
/priv Minimum privilege required to run command;
an integer 0-9. Similar to the /access flag.
/reload Refresh the current account on return
to Waffle. Use this flag when the extern
updates the password file and you want
Waffle to accept any changes.
/reset Under DOS, reset the COMM driver upon return
to Waffle. If you lose control of the port with
a specific extern, add the /reset flag. May be
necessary with certain DSZ's cum FOSSIL.
/result Return the result code to a reserved field
in the password file, if it is greater than the
one already present. This is intended for use
with the Waffle voting booth.
/screen Disables the top status bar under DOS.
Programs which use direct screen writes
will often require this.
/shell Forces a shell to be used rather than
directly running the program; use this when
the command involves built-in shell commands,
when using redirection or pipes, or when
executing a DOS batch file.
/slash Convert forward slashes in the argument to
backslashes. This is useful when dealing with
editors that do not accept forward slashes
as directory separators.
/slip Normally arguments in %i are checked carefully
for special characters such as |, >, etc. The /slip
option turns this off, at the cost of creating
a possible security hole.
/then Execute a Waffle command after running the
external program; cannot be used in conjunction
with the /exit or /logout qualifiers. A common
situation is /then=BYE, to terminate the user.
Do not allow /then to loop by specifying the
current command; you will hate yourself.
/waffle Forces a Waffle command to be used as a shell
instead of an external program. This is a
crude way of aliasing commands.
o Contents of _system file:
mail Outgoing network mail is passed through
this hook. The %i parameter is set to the
destination address. Message text is
directed into standard input.
news Locally originated Usenet messages are
passed through this hook. A filename is
passed via %i, and the message text directed
into standard input.
arclist A program to view directories of archive
files. The filename in question is passed
via the %i parameter.
newuser If this line is present, execute this
command when a new user signs up. (The
stock installation does not have a newuser
extern command defined.)
login If this line is present, execute this
command when any user logs in. This is
executed in addition to any "newuser"
line defined when a new user signs up
as well. (The stock installation does not
have a login extern command defined.)
poll Dialout poll, executed when P is hit at
the "Awaiting Call" prompt. By default this
will exit with errorlevel 60, but it will
be happy to do whatever you want. DOS only.
shell Enter Unix or DOS shell; this action is
reserved for privileged users only.
command Similar to "shell", but this passes a single
command to the interpreter. The user should
*NOT* stay in the shell. The command is passed
through %i.
execute Run a command that was specified with "$command"
form in the Shell: of a user account. This calls
the /waffle/bin/execute.bat file.
chrome Run the CHROME local mail/news reader, executed
when C is hit at the "Awaiting Call" prompt.
o Sample entries of _system file
These will vary from system to system. Most importantly, FULLY
QUALIFIED PATHS SHOULD BE USED. If this is not done it is possible
in DOS for a sneaky user to upload a file matching one of these
names, and execute it if the name is not fully qualified.
_system DOS Unix
mail rmail %i /usr/lib/sendmail -bi
news rnews /usr/lib/news/inews -h
arclist arclist %i /bin/tar tvf %i
shell command /bin/csh
command command /c %i /bin/csh -c "%i"
poll /exit=60 (not available under Unix)
execute /exit=140 (not available under Unix)
chrome /exit=120 (not available under Unix)
o _send and _receive
External protocols are configured by the contents of the _send
and _receive files. Currently, these should be single character
names; 'X' used for XMODEM, 'Z' for ZMODEM, etc.
For this example, we use "DSZ" under DOS, and rz/sz under Unix.
_send DOS Unix
X dsz port %d sx %i sx %i
Y dsz port %d sb %i sb %i
Z dsz port %d sz %i sz %i
_receive DOS Unix
X dsz port %d rx %i rx %i
Y dsz port %d rb %i rb
Z dsz port %d rz %i rz
Note that different versions of these programs accept different
arguments; your mileage may vary.
o Configuring external editors
External editors may be made available to remote or local
users by placing lines in the _editors file. However, things
are seldom so simple, especially in a DOS environment.
DOS editors are often written using direct screen writes.
These editors are useless to callers over the modem, but may
be used locally. The top status bar will interfere with most
of these; in these cases specify the /screen flag.
Several other popular editors will treat /'s as options, and
not allow their use in filenames. This EViL and wicked practice
may be fought by specifying the /slash flag.
Example entry & explanation for the Turbo C 2.0 editor:
turbo /access=9 /screen /slash /command="C:\TC\CMD\TC %i."
Access 9 is required because it will not work over the modem,
and you do not want random users selecting it (even if it did
work over the modem, you would not want users running it
because it allows shell escapes). The Turbo C editor is a full
screen editor, so the top bar should be disabled. It does not
allow slashes in filenames. As a final blow it assumes files
are C programs, so "%i." must be used instead of "%i" to help
forget the .C that Turbo C assumes at the end of filenames.
The internal editor is used if the Editor: field in the password
file is blank, or is set to "none".
o Substitutions in the /command= line
The /command line is parsed for % substitutions before
execution. This is handy for passing account information, modem
rate, access levels, etc. to the external program.
%i will contain the remainder of the user's command as entered
in Waffle; for obvious reasons, shell "meta-characters" such
as "|" or ";" are not allowed to be passed via %i.
Items in the /waffle/extern/_* files use %i to pass
predefined arguments, such as filenames, newsgroups, etc.
o Making external programs available to users
To have external programs available online (often called
DOORS on other systems, for some silly reason), files must be
placed in the /waffle/extern directory. When a user's command
is not recognized, Waffle checks the extern directory (in
the same manner it checks the words directory) to see if an
external program is available with that name.
If matched, /waffle/menus is checked for an identical filename,
which is displayed if present. Note that this file must contain
any "prompt" for the user, who will otherwise be totally
confused. Execution then passes to the program specified inside
the extern file, with arguments as given in the file.
If there is more than one line in the file, the user must select
which is desired (this is useful for game menus, for
instance). Otherwise, this first field is ignored.
o Aliasing WAFFLE commands
It is possible to alias Waffle commands by using
this interface.
One severely demented example is, say, /waffle/extern/g
y /waffle /command="feedback -" /then="bye"
n /waffle /command="bye"
with the /waffle/menus/g file containing something on the
order of asking the user if they wish to FEEDBACK before
they leave - take note that MAIL must work for new users.
Heavy use of this feature is not recommended.
o Notes and caveats:
Programs under DOS that do direct screen writes, and those
under Unix that write to the local console may not work
properly through this interface. This means most DOS editors,
commercial games, graphics programs, etc.
If your online program ever enters DOS or any Unix shell,
system security should be considered Knockwurst..
Most well behaved programs should work right away; however
it appears that a majority of the DOS programs around are
NOT well behaved, and should be spanked.
--
[email protected]
(C) Copyright 1992 Darkside Int'l.
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/