• C
    qemu: Use -1 as unpriviledged uid/gid · aff6942c
    Christophe Fergeau 提交于
    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.
    aff6942c
qemu_conf.c 34.9 KB