How to prevent VI from getting a shell?

a.r. 8947277 baxter rda353l at monu6.cc.monash.edu.au
Tue Sep 18 16:10:14 AEST 1990


bernie at DIALix.UUCP (Bernd Felsche) writes:

>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?
>set SHELL in the environment to something which doest nothing, say
>/bin/true.  vi forks-execs whatever SHELL is defined to be, or the
>shell if undefined.

Um, no. You can also type '<ESC>:set shell=/bin/sh' inside vi, then shell
out as you would normally. One way to stop shelling out is to get the source
for elvis or some other vi-clone, then remove the shell-out facility. You
also might want to disable the '<ESC>:r' and '<ESC>:w' commands, to stop 
people getting copies of files which they are not meant to see.

There may be some other way to stop shelling out, I dont claim to be an
expert on vi.

Anthony

Anthony Baxter:                              
rda353l%monu6.cc.monash.oz at uunet.UU.NET        Robotics and Digital Technology
{uunet}!munnari!monu6.cc.monash.oz!rda353l     Monash University, Caulfield



More information about the Comp.unix.questions mailing list