]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Use -1 as unpriviledged uid/gid
authorChristophe Fergeau <cfergeau@redhat.com>
Sat, 2 Mar 2013 14:19:47 +0000 (15:19 +0100)
committerChristophe Fergeau <cfergeau@redhat.com>
Mon, 4 Mar 2013 07:50:09 +0000 (08:50 +0100)
commitaff6942c23713853d82fcb9acab970b75538bd07
treec66d5f9a90136cb8b55fae33ff008d25b947b029
parentc7e85db61b7f38de816bc7a7e44ec10ea1fd6fab
qemu: Use -1 as unpriviledged uid/gid

Commit f506a4c1 changed virSetUIDGID() to be a noop
when uid/gid are -1, while it used to be a noop when
they are <= 0.

The changes in this commit broke creating new VMs in GNOME Boxes
as qemuDomainCheckDiskPresence gets called during domain creation/startup,
which in turn calls virFileAccessibleAs which fails after calling
virSetUIDGID(0, 0) (Boxes uses session libvirtd). virSetUIDGID is called with
(0, 0) as these are the default user/group values in virQEMUDriverConfig
for session libvirtd.

This commit changes virQEMUDriverConfigNew to use -1 as the unpriviledged
uid/gid. I've also looked at the various places where cfg->user is used,
and they all seem to handle -1 correctly.
src/qemu/qemu_conf.c