Xref: utzoo comp.unix.wizards:13222 news.sysadmin:1844
Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uwmcsd1!marque!uunet!rosevax!news
From: news@rosevax.Rosemount.COM (News administrator)
Newsgroups: comp.unix.wizards,news.sysadmin
Subject: (argh!) Better Trojan horse fix for Rnmail & Pnews
Message-ID: <6802@rosevax.Rosemount.COM>
Date: 6 Dec 88 15:33:17 GMT
Reply-To: merlyn@ernie.rosemount.com
Organization: Rosemount Inc., Eden Prairie, MN
Lines: 64

My earlier 'fix' for Rnmail & Pnews failed to check if
the editor being used was vi or ex (you can also add edit if needed).
Here are more forgiving patches...


Rnmail:

*** Rnmail.old	Tue Dec  6 09:29:23 1988
--- Rnmail	Tue Dec  6 09:21:25 1988
***************
*** 200,206 ****
  		;;
  	    esac
  	done
! 	${VISUAL-${EDITOR-$defeditor}} '+set nomodeline' $tmpart $oldart
  	trap "$rescue" 2
  	state=ask
  	;;
--- 200,211 ----
  		;;
  	    esac
  	done
! 	myeditor="`basename ${VISUAL-${EDITOR-$defeditor}}`"
! 	if $test "vi" = "$myeditor" -o "ex" = "$myeditor"; then
! 		${VISUAL-${EDITOR-$defeditor}} '+set nomodeline' $tmpart $oldart
! 	else
! 		${VISUAL-${EDITOR-$defeditor}} $tmpart $oldart
! 	fi
  	trap "$rescue" 2
  	state=ask
  	;;


Pnews:

*** Pnews.old	Tue Dec  6 09:29:15 1988
--- Pnews	Tue Dec  6 09:21:09 1988
***************
*** 317,323 ****
  	    esac
  	done
  	trap : 2
! 	${VISUAL-${EDITOR-$defeditor}} '+set nomodeline' $tmpart $oldart
  	trap "$rescue" 2
  	state=ask
  	;;
--- 317,328 ----
  	    esac
  	done
  	trap : 2
! 	myeditor="`basename ${VISUAL-${EDITOR-$defeditor}}`"
! 	if $test "vi" = "$myeditor" -o "ex" = "$myeditor"; then
! 		${VISUAL-${EDITOR-$defeditor}} '+set nomodeline' $tmpart $oldart
! 	else
! 		${VISUAL-${EDITOR-$defeditor}} $tmpart $oldart
! 	fi
  	trap "$rescue" 2
  	state=ask
  	;;


-----
Merlyn LeRoy
 "start again"