vim should complain if viminfo is not writable

Bug #1260078 reported by Edward Z. Yang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vim (Ubuntu)
New
Undecided
Unassigned

Bug Description

The situation is described quite well here: http://stackoverflow.com/a/10755253/23845

Steps to reproduce:
1. Create a new account with sudoer permission
2. Run 'sudo vim' (i.e. run vim as root, from the account)
3. Use vim and check if your command history is saved

Expected result: Command history is saved

Actual result: Command history is not saved. The ~/.viminfo file is owned by root and not readable/writable

Suggested fix: At the very least, vim should complain if it cannot read the .viminfo file. But ideally, 'sudo vim' would avoid creating a .viminfo file with the wrong permissions in the first place.

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: vim 2:7.4.000-1ubuntu2
ProcVersionSignature: Ubuntu 3.11.0-14.21-generic 3.11.7
Uname: Linux 3.11.0-14-generic x86_64
NonfreeKernelModules: openafs
ApportVersion: 2.12.5-0ubuntu2.1
Architecture: amd64
Date: Wed Dec 11 13:09:07 2013
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-11-21 (20 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
MarkForUpload: True
SourcePackage: vim
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Edward Z. Yang (ezyang) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.