Xref: utzoo comp.unix.wizards:13216 news.sysadmin:1842 Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!iuvax!rutgers!apple!vsi1!wyse!mips!dce From: dce@mips.COM (David Elliott) Newsgroups: comp.unix.wizards,news.sysadmin Subject: Re: Trojan horse FIX for Rnmail and Pnews Message-ID: <9353@dunkshot.mips.COM> Date: 6 Dec 88 14:33:21 GMT References: <6798@rosevax.Rosemount.COM> Reply-To: dce@mips.COM (David Elliott) Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 25 In article <6798@rosevax.Rosemount.COM> merlyn@ernie.rosemount.com writes: >! ${VISUAL-${EDITOR-$defeditor}} '+set nomodeline' $tmpart $oldart Did you test this with emacs? ed? Other editors that may not understand '+set nomodeline'? Isn't the problem that vi/ex need to be executed specially? In that case, a proper way to handle this would be TEXTED=${VISUAL-${EDITOR-$defeditor}} case "$TEXTED" in vi|*/vi|ex|*/ex) "$TEXTED" '+set nomodeline' $tmpart $oldart ;; *) "$TEXTED" $tmpart $oldart ;; esac Disclaimers: No, I didn't test this code. Yes, there may be other names for ex/vi I didn't handle. -- David Elliott dce@mips.com or {ames,prls,pyramid,decwrl}!mips!dce "Did you see his eyes? Did you see his crazy eyes?" -- Iggy (who else?)