How to prevent VI from getting a shell?
Dan Bernstein
brnstnd at kramden.acf.nyu.edu
Fri Sep 21 14:06:28 AEST 1990
In article <1990Sep19.102407.1529 at dce.ie> em at dce.ie (Eamonn McManus) writes:
> This doesn't stop the user from typing Q to get into ex mode, then giving
> the command `shell', unless you want to make `Q' a dangerous character.
> Mapping Q to <ESC>aQ is too nasty because then you can't insert a Q at
> the beginning of a line.
No, that is *not* a problem. In the EXINIT, simply map Q to something
else. You can also do this to !---but not to :, which is why you have to
use the pty solution.
> You might want to knock out the :preserve and :recover commands the same
> way, for fear that the warped user could pervert them to evil ends. And
> why not nuke :read, :write, :wq, :edit, and :next while you're at it.
Fgs. This is why you want to nuke : entirely, then start adding macros
from a clean slate.
---Dan
More information about the Comp.unix.questions
mailing list