Bug#349465: vim: Vim makes bad assumptions about the presence of $HOME; problematic with sudo DSA-946-1

Pierre Habouzit pierre.habouzit at m4x.org
Mon Jan 23 08:26:16 UTC 2006


tag 349465 + moreinfo
severity normal
thanks

> Since the recent patch of sudo (DSA-946-1) started filtering the HOME
> environment variable (leaving it unset), Vim:
>
> * isn't smart enough to locate a user's homedir in the absence of
> $HOME

that's true, but it does not prevent you from using vim either.

> * seems to ask the file system for environment variable names. strace
> example:
>
> open("$HOME/.viminfo", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) =
> -1 ENOENT (No such file or directory)

and I don't see a problem in doing that.

> * fails to find the user's .vimrc

which is not very astonishing.

> * the following line in the default /etc/vim/vimrc causes Vim to very
> noisily fail to locate or create .viminfo :
>
> set viminfo='20,\"50

that I can't reproduce any noise, neither with sarge nor sid version, 
and that's why I've set the severity to normal.

> In summary, the vim package no longer works well by default within
> 'sudo'.

well, maybe you ill-configured your sudo, because even with the security 
fix, I still have $HOME available :

  [madcoder olympe] sudo echo $HOME
  /home/madcoder

So I'd be you, I'd search what is going on with your sudo configuration.
The point of not beeing able to tell where your $HOME is using getpwuid 
is not a good thing though, and deserve a fix.

-- 
·O·  Pierre Habouzit
··O                                                madcoder at debian.org
OOO                                                http://www.madism.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20060123/7cd7df4c/attachment.pgp


More information about the pkg-vim-maintainers mailing list