home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / wizards / 5213 / README next >
Encoding:
Text File  |  1992-12-14  |  2.5 KB  |  49 lines

  1. Before running the script 'rvi_install', read the introductory comments
  2. in both 'rvi.c' and 'rvi_install'.  These comments will confer a feel
  3. for what this package is intended to do and how it does it.
  4.  
  5. As distributed, 'rvi' allows users to reach an interactive RESTRICTED
  6. shell.  If you don't want this to happen, then remove the files 'rsh'
  7. and 'sh' in the "rvi-directory".  If you need further customization,
  8. read on:
  9.  
  10. -------------------------------------------
  11.  
  12. The following material is intended for those who want or need to offer
  13. restricted-'vi' users more flexibility than is provided by the bare editor,
  14. as for instance allowing access to specified filters to be used in
  15. processing text within the editor:
  16.  
  17. There's something you should know about the way 'vi' handles the ":!"
  18. and "!" shell escapes: the command you specify isn't invoked directly,
  19. instead 'vi' calls *shell* to execute the command, with the syntax
  20.  
  21.     *shell* -c "<entire-command-line>"
  22.  
  23. The reason "*shell*" is enclosed in asterisks is that the shell we're
  24. talking about is 'vi's own internal variable "shell", which is set via the
  25. ":set shell=whatever" command in 'vi'.  This internal variable overrides
  26. the environment variable $SHELL, although by default it starts out with
  27. the value of $SHELL.
  28.  
  29. If all you're interested in is letting a restricted user have a fullscreen
  30. editor, then no problem.  However, if you want your restricted user to
  31. be able to use 'vi's filtering capabilities, or if your restricted user
  32. must be able to run shell programs from within 'vi', then be aware that
  33. included in this package is a counterfeit shell, called "./sh", that
  34. invokes "./rsh" with the same arguments as were passed to "./sh".  The
  35. effect of all this is that a user's "!-escape" commands are executed
  36. as if they had been issued to /bin/rsh with the "-c" option-switch,
  37. always.  The user can't avoid the invocation of 'rsh' by his own action.
  38. However, if the user's command is the name of a shell script, 'rsh' will
  39. execute the script as if it were /bin/sh; be aware of this.  If it all
  40. seems like doubletalk, read up on rsh(C) [or perhaps rsh(1)] and sh(C)
  41. [sh(1)].
  42.  
  43. The main thing to remember here is that if you absolutely, positively,
  44. want to bar a restricted user from access to any sort of interactive
  45. shell, even the restricted shell, then you should remove the supplied
  46. program "sh" and undo the link or copy of "rsh" into the "rvi-directory".
  47. If you do this, then however the user won't be able to use 'vi's ability
  48. to filter text through external commands.
  49.