home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / wizards / 5199 < prev    next >
Encoding:
Text File  |  1992-12-12  |  2.0 KB  |  44 lines

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