How to prevent VI from getting a shell?

Leslie Mikesell les at chinet.chi.il.us
Wed Sep 19 06:43:00 AEST 1990


In article <501 at trux.UUCP> car at trux.UUCP (Chris Rende) writes:
>If I want to give someone access to VI and yet deny them access to a shell,
>how do I prevent the user from using VI's "<ESC>:!" command?

>I have an application program which launches VI. I don't want the user to
>be able to get to a shell from VI. (I also don't want the user to be able
>to launch other commands from VI. I.e., No :!pwd, or !!sort, etc...).

Sorta defeats the purpose of using vi unless you really don't have any
useful programs to :r !command or :w !command.  But, if that's what you
want, why not build a suitable environment in a subdirectory (TMPDIR,
vi itself, etc.) and chroot() before starting vi.  It's hard to hurt
anything if you can't get there.

Les Mikesell
  les at chinet.chi.il.us



More information about the Comp.unix.questions mailing list