Path: utzoo!attcan!uunet!mcsun!unido!quando!omerzu From: omerzu@quando.quantum.de (Thomas Omerzu) Newsgroups: comp.unix.questions Subject: Re: How to prevent VI from getting a shell? Summary: not this way! Message-ID: <1716@quando.quantum.de> Date: 17 Sep 90 13:44:36 GMT References: <501@trux.UUCP> <570@DIALix.UUCP> Reply-To: omerzu@quando.quantum.de (Thomas Omerzu) Organization: Quantum GmbH, Dortmund, W-Germany Lines: 34 In article <570@DIALix.UUCP> bernie@DIALix.oz.au (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. NO! Although this will work for many applications, it won't work for vi! If you 'set SHELL /bin/true' the user will not be able to get a shell, that's true. BUT: THIS DOES NOT PREVENT THE USER FROM RESETTING THE SHEL VARIABLE! If that user does a: ':set shell /bin/sh' he _will_ get a shell on further requests!!! So long, Thomas. -- *-----------------------------------------------------------------------------* Thomas Omerzu UUCP: ...!unido!quando!omerzu / omerzu@quando.uucp Quantum GmbH, Bitnet: UNIDO!quando!omerzu / omerzu%quando@UNIDO(.bitnet) Dortmund, Germany Internet: omerzu@quando.quantum.de