home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.tcl
- Path: sparky!uunet!pmafire!mica.inel.gov!ux1!simmdan
- From: simmdan@ux1.isu.edu (Daniel Simmons)
- Subject: Re: How difficult is a restricted tcl shell ?
- Message-ID: <C198w7.6Jv@ux1.isu.edu>
- Keywords: shell user supervisor interpreter
- Organization: Idaho State University, Pocatello
- References: <brucet.727682251@extro.ucc.su.OZ.AU>
- Date: Fri, 22 Jan 1993 12:19:19 GMT
- Lines: 42
-
- In article <brucet.727682251@extro.ucc.su.OZ.AU> brucet@extro.ucc.su.OZ.AU (Bruce Tulloch) writes:
- >Is something along the lines of a restricted tcl shell or "user" and
- >"supervisor" mode easily implemented ? For example, in supervisor mode,
- >all commands, procedures and variables are visible and usable (just
- >like tcl is now). In user mode, only a restricted set of commands,
- >procedures and variables are available and usable from the shell, and
- >certain procedures are protected from view (as described below
- >perhaps). "Supervisor" commands and procedures would still be available
- >if called from within a procedure and user/super mode could be changed
- >via a new built-in command (that accepts a password maybe) so that more
- >experienced users or developers could have full access.
- >
- >Anyone else done/though/dream't about an idea like this ?
-
- Well, I'm just at the thought/dream't state at the moment, but...
-
- As a part of a Campus Wide Information System for Idaho State University,
- I've been implementing a menu system based on Tcl. Menu definitions are
- all in Tcl, and the users actually get a Tcl interpreter to type menu
- choices into (they just don't know it). That is, the user is presented
- with a menu of numbered options and a command prompt. When they type
- number "5" for instance, they are actually calling a Tcl procedure named
- "5" which carries out the action named on the menu.
-
- Anyway, at the moment, they have full access to the interpreter, but it
- is my plan to eventually have two interpreters. One is for the users
- and will have most everything disabled (ie. no exec or any other way to
- get to a subshell, etc.). It will also have at least one command added
- from C which will be used for choosing menu items. In this case, when
- they type "1", it will actually call a C procedure which will pass the
- command "go 1" into a separate interpreter. The second interpreter
- will have the full set of Tcl commands plus the application specific
- commands.
-
- Does this kind of describe what you're thinking about? Anyone else
- have thoughts/comments?
-
- Danny
- --
- Daniel Simmons electronic mail : simmdan@isu.edu
- Idaho State University voice mail : (208) 236-3199
- Computer Center snail mail : Box 8037, Pocatello
-