Path: utzoo!attcan!uunet!ns-mx!iowasp.physics.uiowa.edu!maverick.ksu.ksu.edu!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!wb3ffv!ka3ovk!raysnec!shwake From: shwake@raysnec.UUCP (Ray Shwake) Newsgroups: comp.unix.questions Subject: Re: How to prevent VI from getting a shell? Message-ID: <77@raysnec.UUCP> Date: 19 Sep 90 20:25:32 GMT References: <501@trux.UUCP> <570@DIALix.UUCP> <1990Sep17.210110.26060@robobar.co.uk> Organization: IRS/CI - Technical Solutions Branch Lines: 10 ronald@robobar.co.uk (Ronald S H Khoo) writes: >I don't know about *your* version of vi, but mine lets you defeat this >by doing :set shell=/bin/sh >I got around the problem by binary patching out the call to fork() in vi. I suggest that, after predefining SHELL to something innocuous (I use /bin/echo), patch the *set* reference in the binary to something with an embedded space. So far, its proven quite tight. (Of course, if even THIS leaves some obscure weakness, I'm sure someone will point it out to me!)