Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!goanna!minyos!monu6!rda353l From: rda353l@monu6.cc.monash.edu.au (a.r. 8947277 baxter) Newsgroups: comp.unix.questions Subject: Re: How to prevent VI from getting a shell? Keywords: vi Message-ID: <1990Sep18.061014.19064@monu6.cc.monash.edu.au> Date: 18 Sep 90 06:10:14 GMT References: <501@trux.UUCP> <570@DIALix.UUCP> Organization: Chisholm Institute of Technology, Melb., Australia Lines: 23 bernie@DIALix.UUCP (Bernd Felsche) writes: >In article <501@trux.UUCP> car@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 ":!" 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 ':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 ':r' and ':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@uunet.UU.NET Robotics and Digital Technology {uunet}!munnari!monu6.cc.monash.oz!rda353l Monash University, Caulfield