home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.wizards
- Path: sparky!uunet!usc!rpi!batcomputer!db.TC.Cornell.EDU!mdw
- From: mdw@db.TC.Cornell.EDU (Matt Welsh)
- Subject: Re: O Wizards, is there vi w/out shell?
- Message-ID: <1992Dec12.064517.8201@tc.cornell.edu>
- Sender: news@tc.cornell.edu
- Nntp-Posting-Host: db.tc.cornell.edu
- Organization: The Linux Inquisition, Propaganda Division
- References: <Bz0x63.Fqq@ucunix.san.uc.edu> <1992Dec11.180118.1144@leland.Stanford.EDU> <1992Dec11.201528.23902@mp.cs.niu.edu>
- Date: Sat, 12 Dec 1992 06:45:17 GMT
- Lines: 31
-
- In article <1992Dec11.201528.23902@mp.cs.niu.edu> rickert@mp.cs.niu.edu (Neil Rickert) writes:
- >In article <1992Dec11.180118.1144@leland.Stanford.EDU> dkeisen@leland.Stanford.EDU (Dave Eisen) writes:
- >>>>Well, basically, what I'm looking for is a vi text editor, or emacs
- >>>>acting like vi, for that matter, that will NOT allow shell commands, as
- >>
- >>>How about setting the SHELL environment variable to something like
- >>>/bin/false. Don't know about other Unixs, but this appears to work
- >>>for both vi and gnuemacs on the Ultrix system that I posted this from.
- >>
- >>This doesn't do any good. The user can still type :set shell=/bin/csh
- >>and give himself a shell whenver he wants. The SHELL environment
- >>vaiable is only used to initialize the internal vi shell variable.
- >
- >It is worse than that. Disallowing ':set shell= ..' does not help. On
- >the version of 'vi' that I use, I can type
- > :r !command
- >to read the output of command into the file. In this case 'vi' uses
- >/bin/sh regardless of how $SHELL is defined.
-
- Then replace /bin/sh with a wrapper that only lets
- privileged to actually run the shell. That really should work;
- I know of a number of UNIX-based BBS's that seem to operate on this
- principle. This would be the most secure solution (assuming
- that other shells were also locked up, and things like rsh
- were disabled as well).
-
- mdw
-
- --
- Matt Welsh mdw@tc.cornell.edu Cornell Theory Center
- "Go on, emote! I was raised on thought balloons!"
-