Trojan horse FIX for Rnmail and Pnews

Guy Harris guy at auspex.UUCP
Fri Dec 9 04:33:49 AEST 1988


>>If you insist on sticking "+set nomodeline" here, rather than in the
>>user's ".exrc" where it belongs...
>
>No, it belongs in any code that puts uncontrolled text into a file
>and executes a "vi"-like editor.  A number of vi's have "modeline"
>on by default, and many people don't know about it.

The only "vi"s that I know of that have "modeline" on by default don't
let you turn it off (i.e., there *is* no "modeline" or "modelines"
option, it *always* recognizes mode lines); both the 4.3BSD and S5R3
versions have it off by default.  Unless you know of one that has it on
by default *and* that lets you turn it off, the "number" in "number of
vi's" is 0. 

>If Pnews can be made more robust, it should be.

The file most likely to contain bogus mode lines is probably the
password file, not "vi".  Not everybody edits their password file with
"vipw" (especially on System V, which as distributed by AT&T doesn't
*have* "vipw"). 

>Now for a different question... any other common editors (emacs, etc) with
>a similar hook?  Any way to disable it?

Fortunately, EMACS doesn't have that wretched mechanism, so there's no
need to disable it.



More information about the Comp.unix.wizards mailing list