.viminfo file gets deleted and re-created with 666 permissions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
vim (Ubuntu) |
Invalid
|
Undecided
|
Micah Cowan |
Bug Description
Binary package hint: vim
Version: 1:7.0-035+1ubuntu5
sa@inyo:~$ rm .viminfo
sa@inyo:~$ ln -s /dev/null .viminfo
sa@inyo:~$ ls -l .viminfo
lrwxrwxrwx 1 sa sa 9 2007-01-12 17:16 .viminfo -> /dev/null
sa@inyo:~$ umask 007
sa@inyo:~$ /usr/bin/vim.basic -c 'quit'
sa@inyo:~$ ls -l .viminfo
-rw-rw-rw- 1 sa sa 509 2007-01-12 17:16 .viminfo
As you can see the .viminfo file gets deleted and re-created with permissions 666 by vim.
Note that the use of -c 'quit' is just to simplify the bug for transcribing here -- I promise you the same thing happens if you use vim for editing/saving a document as well.
I consider this a security bug. vim deletes a file without telling me, and not only that but when it re-creates it, it ignores my umask by making it world writable. This is not what I expected it to do.
Thank you for submitting this bug report.
I've confirmed in Feisty, for regular vim-gnome, and also in the latest bleeding-edge sources from upstream. I'll bring this up with them.