From: Michal Privoznik Date: Wed, 13 Mar 2019 09:50:54 +0000 (+0100) Subject: qemuFirmwareFetchConfigs: Fix check for @privileged X-Git-Tag: v5.2.0-rc1~216 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d9542e340405ad4fefc06620da88ad2fbfec6bf;p=thirdparty%2Flibvirt.git qemuFirmwareFetchConfigs: Fix check for @privileged The qemuFirmwareFetchConfigs() function is supposed to fetch all firmware descriptions from paths defined by firmware.json specification. This includes user's $HOME directory. However, it was agreed that if libvirtd is running as privileged user then his $HOME is ignored (thus $HOME is included in the search only for regular users). Well, I got the condition wrong - it should have been reversed. Signed-off-by: Michal Privoznik Reviewed-by: Andrea Bolognani --- diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index b423ab10e4..4ce010caaa 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -974,7 +974,7 @@ qemuFirmwareFetchConfigs(char ***firmwares, *firmwares = NULL; - if (privileged) { + if (!privileged) { /* This is a slight divergence from the specification. * Since the system daemon runs as root, it doesn't make * much sense to parse files in root's home directory. It