]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Explicitly pass uml_dir argument to user-mode-linux
authorSoren Hansen <soren@linux2go.dk>
Wed, 25 Aug 2010 09:03:42 +0000 (11:03 +0200)
committerEric Blake <eblake@redhat.com>
Tue, 31 Aug 2010 16:13:05 +0000 (10:13 -0600)
commit0a58eed3d9d51d28c4e1d69e8dbe334779f447e0
treedde87921b94d6cd6183e8ca60fab253783734351
parentdeaa9e3ebd23ac634dfec69c83fad3b099617e5a
Explicitly pass uml_dir argument to user-mode-linux

uml_dir overrides user-mode-linux's default of ~/.uml. This is needed
for a couple of different reasons:

libvirt expects this to default to virGetUserDirectory(geteuid()) +
'/.uml'. However, user-mode-linux actually uses the HOME environment
variable to determine where to look for the uml sockets, but if running
libvirtd under sudo (which I routinely do during development), $HOME is
pointing at my user's homedir, while my euid is 0, so libvirt looks in
/root.

Also (and this was my actual motivation for this patch), if HOME isn't
set at all, user-mode-linux utterly fails. Looking at the code, it seems
it's meant to emit a warning, but alas, it doesn't for some reason.
If running libvirtd from upstart, HOME is not set, so any system using
upstart will need this change.

Signed-off-by: Soren Hansen <soren@linux2go.dk>
src/uml/uml_conf.c