Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!udel!rochester!bbn.com!orc!inews!iwarp.intel.com!gargoyle!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.unix.questions Subject: Re: How to prevent VI from getting a shell? Keywords: vi Message-ID: <1990Sep18.204300.25376@chinet.chi.il.us> Date: 18 Sep 90 20:43:00 GMT References: <501@trux.UUCP> Organization: Chinet - Chicago Public Access UNIX Lines: 16 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? >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@chinet.chi.il.us