Attached patch successfully solves this problem.

Please include it in the next releases. Thank you.
Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 vim (2:7.3.547-7) unstable; urgency=low
 .
   * Add vim-lesstif.preinst to handle transitioning /usr/share/doc/vim-lesstif
     from a symlink to a directory.  (Closes: #700069)
   * Add clarification to short description of vim-nox.  (Closes: #699780)
Author: James McCoy <[email protected]>
Bug-Debian: http://bugs.debian.org/699780
Bug-Debian: http://bugs.debian.org/700069

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- vim-7.3.547.orig/src/undo.c
+++ vim-7.3.547/src/undo.c
@@ -1600,10 +1600,12 @@ u_read_undo(name, hash, orig_name)

 #ifdef UNIX
 	/* For safety we only read an undo file if the owner is equal to the
-	 * owner of the text file. */
+	 * owner of the text file or equal to the current user. */
 	if (mch_stat((char *)orig_name, &st_orig) >= 0
 		&& mch_stat((char *)file_name, &st_undo) >= 0
-		&& st_orig.st_uid != st_undo.st_uid)
+		&& st_orig.st_uid != st_undo.st_uid
+		&& st_undo.st_uid != getuid())
+
 	{
 	    if (p_verbose > 0)
 	    {

Reply via email to