From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 978 invoked from network); 1 Aug 2023 20:40:38 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 1 Aug 2023 20:40:38 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id A618441048; Wed, 2 Aug 2023 06:40:34 +1000 (AEST) Received: from freefriends.org (frenzy.freefriends.org [198.99.81.75]) by minnie.tuhs.org (Postfix) with ESMTPS id CD41C41047 for ; Wed, 2 Aug 2023 06:40:27 +1000 (AEST) X-Envelope-From: arnold@skeeve.com Received: from freefriends.org (localhost [127.0.0.1]) by freefriends.org (8.14.7/8.14.7) with ESMTP id 371Ke7vb027490 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 1 Aug 2023 14:40:07 -0600 Received: (from arnold@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id 371Ke6To027489; Tue, 1 Aug 2023 14:40:06 -0600 From: arnold@skeeve.com Message-Id: <202308012040.371Ke6To027489@freefriends.org> X-Authentication-Warning: frenzy.freefriends.org: arnold set sender to arnold@skeeve.com using -f Date: Tue, 01 Aug 2023 14:40:06 -0600 To: tuhs@tuhs.org, dave@horsfall.org References: <87zg3b3sc0.fsf@vuxu.org> In-Reply-To: User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID-Hash: K2NJEWOD3GS63R55FSABVKYRP5JRCR66 X-Message-ID-Hash: K2NJEWOD3GS63R55FSABVKYRP5JRCR66 X-MailFrom: arnold@skeeve.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: shell escapes in utilities List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Dave Horsfall wrote: > Not quite a Shell escape but possibly just as dangerous: EX/VI had/has the > ability to embed EX commands within a file to be run when opened e.g. "se > ts=4 sw=4" etc; no doubt EMACS has the same "feature". > > It would also recognise the EXINIT environment variable. > > -- Dave These are called "modelines". In modern vim they have to be in the first 4 or last 4 lines of a file (or so) and vim is careful about what it will run from a modeline. I *think* other vi versions have an option to enable modelines in the .exrc file, which is off by default, but I no longer remember the details. Arnold