Editor Escape

BBS Administration bbs at alchemy.UUCP
Wed Sep 26 14:12:59 AEST 1990


	I've been following this thread for some time now, and it does bring
about a pretty serious problem for administrators of bulletin board
systems. The system my company has written handles the problem in several
ways. There is a permission bit called "User can escape to the shell" and
when enabled, a command to do so will appear in the main BBS menu. If not
enabled, the command does not appear.

	When it comes to using an editor, we created a file that contains the
full pathname to the editor binary program, a "nice" description of the
editor, and the "permissions required" to use it. Then, via a preference
editor each user can run from within the BBS, they can select which
editor will be their editor to be run when entering a letter, writing an
article, whatever. Only those editors to which they have permission are
listed when selecting this. If users have the "shell escape" bit enabled,
then we allow them to select VI, since escaping to the shell is something
they could do anytime they wanted to. For users without this, I wrote
a line editor. Recently, the source code for ELVIS was posted to the
net (alt.sources I think) and it really works quite well. After playing
around a bit, I managed to add a "?" command for help, and remapped
several commands so "Q" and "q" will quit the editor, "S" and "s" will
save the contents and quit, and "R" and "r" will run a program that
allows the user to navigate their $HOME directory (and any subdirectories)
in search of a file they'd like to read in (using arrow keys and an easy
user interface). Additionally, I disabled shell escapes, and running
an external "filter" program. It's almost as easy as "grep system *.c"
to be honest. Find where programs are forked and print "You can't do
that." and return from the subroutine.

	What I'm trying to say, though I'm a bit lengthy, is that the
solution to everyone's problems lies in the fact that trying to make
VI or some other binary program do what you want by remapping the
keyboard, or running PTY on it to change things, might not be the
best solution. I like VI, and want everything to work "as advertised".
Most BBS users don't even know what UNIX is, and only need the basics of
an editor, so why bother with something as "complicated" as VI to
begin with? ELVIS lets you use the arrow keys (even in insert mode),
let's the user type ^Z^Z to save & exit the editor and basically makes
command mode "unnecessary" in most cases. Hacking away at the code to make
it "safe" was really quite easy if you know "C" -- so why not get the
source and tailor it to your needs (like adding a "?" command for help
and other amenities that YOU see fit)?

Comments, suggestions and flames are always welcomed, (and sorry about
being so long winded, it's my trademark)

-- John

John Donahue, Senior Partner | UUCP: ucrmath!alchemy!{bbs, gumby}  | The Future
  Alchemy Software Designs   | INET: {bbs, gumby}@alchemy.UUCP     | Begins Now
-------------------+---------+-------------------------------------+-----------
Communique On-line | +1-714-243-7150 {3, 12, 24, 96HST} Bps. 8-N-1 | Next Wave:
Information System |    Alchemy Software Designs Support System    | Communique



More information about the Comp.unix.sysv386 mailing list