Path: utzoo!attcan!uunet!lll-winken!sol.ctr.columbia.edu!cica!tut.cis.ohio-state.edu!att!dptg!mtune!jrw From: jrw@mtune.ATT.COM (Jim Webb) Newsgroups: comp.unix.questions Subject: Re: How to prevent VI from getting a shell? Summary: nope Keywords: vi Message-ID: <789@mtune.ATT.COM> Date: 17 Sep 90 15:20:55 GMT References: <501@trux.UUCP> <570@DIALix.UUCP> Organization: AT&T BL Middletown/Lincroft NJ USA Lines: 23 In article <570@DIALix.UUCP>, 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. True, but..... $ SHELL=/bin/true ex # ex is easier to deal with here :-) :sh # run a shell.... ! # comes right back :set shell=/bin/sh # hmmm.... :sh # now what can I do.... $ Later, -- Jim Webb "Out of Phase -- Get Help" att!mtune!jrw "I'm bored with this....Let's Dance!"