Xref: utzoo comp.unix.wizards:13421 news.sysadmin:1936 Path: utzoo!utgpu!watmath!clyde!att!feathers!ron From: ron@feathers.ATT.COM (2589) Newsgroups: comp.unix.wizards,news.sysadmin Subject: Re: Trojan horse FIX for Rnmail and Pnews Message-ID: <81@feathers.ATT.COM> Date: 12 Dec 88 15:43:25 GMT References: <6798@rosevax.Rosemount.COM> <591@auspex.UUCP> <6811@rosevax.Rosemount.COM> <1687@mcgp1.UUCP> Reply-To: ron@feathers.ATT.COM (Ron Saad--615-2589) Organization: AT&T Bell Labs, Red Hill, NJ Lines: 38 In article <1687@mcgp1.UUCP> newsadm@mcgp1.UUCP (Netnews Administrator) writes: ]In article <6811@rosevax.Rosemount.COM>, news@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: <:> set nomodelines or, for the case above (where modeline cannot be disabled) <:> 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@feathers.ATT.COM @ AT&T Bell Labs, Red Hill (201) 615-2589