Trojan horse FIX for Rnmail and Pnews
2589
ron at feathers.ATT.COM
Tue Dec 13 01:43:25 AEST 1988
In article <1687 at mcgp1.UUCP> newsadm at mcgp1.UUCP (Netnews Administrator) writes:
]In article <6811 at rosevax.Rosemount.COM>, news at rosevax.Rosemount.COM (News administrator) writes:
]> If anyone has a vi
]> that doesn't understand +set nomodeline[s], they should speak up.
]
]The AT&T 3B1 (aka 7300 aka UNIX-PC) vi has modeline[s] on by default, with
]no way to turn it off! I'm thinking of writing a simple C program, called vi,
]that scans the file[s] to be edited looking for the culprit string. It will
] ...
] John Opalko
If indeed there is no way to turn it off, you may not have a
choice but to scan the file first. However, you may not need
a separate C program to do it - read on.
If modelines can be turned off, and you are trying to protect
users who don't disable modelines in .exrc, you can change
Pnews/Rnmail/whatever to print out a couple of lines into a
temp file and append the "real" message to it, having these
lines trigger the modelines (or equivalent emacs magic) -
something like:
<e><x><:> set nomodelines
or, for the case above (where modeline cannot be disabled)
<e><x><:> g/^[ TAB][ev][xi]:/s//MODELINE:/
Then, at the end of the editing session, these lines can be
removed.
Ron.
--
Ron Saad - WF2K ...!att!feathers!ron
Interface Systems ron at feathers.ATT.COM
@ AT&T Bell Labs, Red Hill (201) 615-2589
More information about the Comp.unix.wizards
mailing list