Bugtraq mailing list archives

Re: vulnerability in vi under AIX 3.2 (IN LINUX)


From: zblaxell () MYRUS COM (Zygo Blaxell)
Date: Fri, 26 Jul 1996 16:09:36 -0400


Quoted from kay hashimoto:
 >'vim file' will happily scribble all over 'file.swp', without regard to
 >who owns it, what it's a symlink to, etc.  Further, in the event of a
 >system crash, the .swp file is left lying around, causing unpredictable
 >results if you use vim to edit files in SysV-style init runlevel
 >directories.

When does vim do this?  One of the purposes of the .swp file is to
prevent concurrent editing of one file, so when vim sees file.swp in
the current directory, it gives a warning and writes to file.swo.

Errr...oops, I stand corrected:  It only writes to an existing .swp if
it is a symlink to a non-existant file.


--
Zygo Blaxell. Unix/soft/hardware guru, was for U of Waterloo CS Club, now for
(name withheld by request). 10th place, ACM Intl Collegiate Programming Contest
Finals, 1994.  Admin Linux/TCP/IP for food, clothing, anime.  Pager: 1 (613)
760 8572.  "I gave up $1000 to avoid working on windoze... *sigh*" - Amy Fong



Current thread: