]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuFirmwareFetchConfigs: Fix check for @privileged
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 13 Mar 2019 09:50:54 +0000 (10:50 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 13 Mar 2019 12:11:25 +0000 (13:11 +0100)
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 <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
src/qemu/qemu_firmware.c

index b423ab10e4c1d2382dd94cc5dbe54810f6e4380c..4ce010caaa1163bf403315ade2e5d92c2ca4cf20 100644 (file)
@@ -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