How to prevent VI from getting a shell?

Ray Shwake shwake at raysnec.UUCP
Thu Sep 20 06:25:32 AEST 1990


ronald at 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!)



More information about the Comp.unix.questions mailing list