Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!bellcore!decvax!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.bugs.usg,net.bugs.4bsd Subject: Re: fun bug in vi Message-ID: <2222@sun.uucp> Date: Sat, 25-May-85 15:27:22 EDT Article-I.D.: sun.2222 Posted: Sat May 25 15:27:22 1985 Date-Received: Mon, 27-May-85 00:06:39 EDT References: <124@iclbra.UUCP> Distribution: net Organization: Sun Microsystems, Inc. Lines: 24 Xref: watmath net.bugs.usg:237 net.bugs.4bsd:1537 > An undocumented feature in vi allows a valid command in the file being > 'edited' of the form > > ...ex:{command}: > or > ...vi:{command}: > > to be actioned before interactive editing is allowed. However, the bug > also permits the variants ei and vx. The feature(?) and the bug are in ex/vi 3.7 as well, which comes with 4.2BSD. > The bug was discovered by trying to install a user with the initials 'jei' > into /etc/passwd. The fact that mode-line processing can't be turned off is, arguably, a bug (the same thing may have bitten us here; "vi" acted strangely when editing /etc/passwd, and I think there was an entry that looked like a mode line). Somebody posted some changes to "ex" (which apply both the 4.2BSD's 3.7 and System V Release 2's 3.9) which added a flag "modelines" which, when on, enabled mode-line processing; the default was to disable mode-line processing. Guy Harris